diff --git a/NOTICE b/NOTICE index ef7d3db..238ceb3 100644 --- a/NOTICE +++ b/NOTICE @@ -5,4 +5,4 @@ MAPCODE JAVA LIBRARY Original C library created by Pieter Geelen. Work on Java version of the Mapcode library by Rijn Buve (original port by Matthew Lowden). -Copyright (C) 2014-2016 Stichting Mapcode Foundation (http://www.mapcode.com) +Copyright (C) 2014-2017, Stichting Mapcode Foundation (http://www.mapcode.com) diff --git a/README.md b/README.md index 6c38b40..d98f0fc 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,13 @@ # Mapcode Library for Java +[![Codacy Badge](https://api.codacy.com/project/badge/Grade/0c9f11645f504b50bd154a80fb95a5c3)](https://www.codacy.com/app/rijnb/mapcode-java?utm_source=github.com&utm_medium=referral&utm_content=mapcode-foundation/mapcode-java&utm_campaign=Badge_Grade) [![Build Status](https://img.shields.io/travis/mapcode-foundation/mapcode-java.svg?maxAge=3600)](https://travis-ci.org/mapcode-foundation/mapcode-java) [![Coverage Status](https://coveralls.io/repos/github/mapcode-foundation/mapcode-java/badge.svg?branch=master&maxAge=3600)](https://coveralls.io/github/mapcode-foundation/mapcode-java?branch=master) [![License](http://img.shields.io/badge/license-APACHE2-blue.svg)]() [![Release](https://img.shields.io/github/release/mapcode-foundation/mapcode-java.svg?maxAge=3600)](https://github.com/mapcode-foundation/mapcode-java/releases) [![Maven Central](https://img.shields.io/maven-central/v/com.mapcode/mapcode.svg?maxAge=3600)](https://maven-badges.herokuapp.com/maven-central/com.mapcode/mapcode) -**Copyright (C) 2014-2016 Stichting Mapcode Foundation (http://www.mapcode.com)** +**Copyright (C) 2014-2017, Stichting Mapcode Foundation (http://www.mapcode.com)** This Java project contains a library to encode latitude/longitude pairs to mapcodes and to decode mapcodes back to latitude/longitude pairs. diff --git a/pom.xml b/pom.xml index 39272b5..adb817b 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ mapcode jar - 2.4.1 + 2.4.2-SNAPSHOT Mapcode Java Library @@ -67,10 +67,9 @@ UTF-8 UTF-8 - 1.6 - - lq77rzORtJmhhqs4MWED6qPzVi0IEqrf9 + + 1.6 4.2.0 @@ -142,9 +141,6 @@ org.eluder.coveralls coveralls-maven-plugin ${coveralls-maven-plugin.version} - - ${coveralls-maven-plugin.repoToken} - diff --git a/src/main/java/com/mapcode/Alphabet.java b/src/main/java/com/mapcode/Alphabet.java index 509f100..cfd18fb 100644 --- a/src/main/java/com/mapcode/Alphabet.java +++ b/src/main/java/com/mapcode/Alphabet.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014-2016 Stichting Mapcode Foundation (http://www.mapcode.com) + * Copyright (C) 2014-2017, Stichting Mapcode Foundation (http://www.mapcode.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/com/mapcode/Boundary.java b/src/main/java/com/mapcode/Boundary.java index 097af57..73a1367 100644 --- a/src/main/java/com/mapcode/Boundary.java +++ b/src/main/java/com/mapcode/Boundary.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014-2016 Stichting Mapcode Foundation (http://www.mapcode.com) + * Copyright (C) 2014-2017, Stichting Mapcode Foundation (http://www.mapcode.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/com/mapcode/CheckArgs.java b/src/main/java/com/mapcode/CheckArgs.java index a8b08cf..755bf0d 100644 --- a/src/main/java/com/mapcode/CheckArgs.java +++ b/src/main/java/com/mapcode/CheckArgs.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014-2016 Stichting Mapcode Foundation (http://www.mapcode.com) + * Copyright (C) 2014-2017, Stichting Mapcode Foundation (http://www.mapcode.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/com/mapcode/Common.java b/src/main/java/com/mapcode/Common.java index 103e773..3485dec 100644 --- a/src/main/java/com/mapcode/Common.java +++ b/src/main/java/com/mapcode/Common.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014-2016 Stichting Mapcode Foundation (http://www.mapcode.com) + * Copyright (C) 2014-2017, Stichting Mapcode Foundation (http://www.mapcode.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/com/mapcode/Data.java b/src/main/java/com/mapcode/Data.java index a74ee9c..66c3c20 100644 --- a/src/main/java/com/mapcode/Data.java +++ b/src/main/java/com/mapcode/Data.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014-2016 Stichting Mapcode Foundation (http://www.mapcode.com) + * Copyright (C) 2014-2017, Stichting Mapcode Foundation (http://www.mapcode.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/com/mapcode/DataModel.java b/src/main/java/com/mapcode/DataModel.java index 45a1ba7..a571657 100644 --- a/src/main/java/com/mapcode/DataModel.java +++ b/src/main/java/com/mapcode/DataModel.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014-2016 Stichting Mapcode Foundation (http://www.mapcode.com) + * Copyright (C) 2014-2017, Stichting Mapcode Foundation (http://www.mapcode.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/com/mapcode/Decoder.java b/src/main/java/com/mapcode/Decoder.java index 6ea384c..e957487 100644 --- a/src/main/java/com/mapcode/Decoder.java +++ b/src/main/java/com/mapcode/Decoder.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014-2016 Stichting Mapcode Foundation (http://www.mapcode.com) + * Copyright (C) 2014-2017, Stichting Mapcode Foundation (http://www.mapcode.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -244,7 +244,7 @@ public Unicode2Ascii(final char min, final char max, @Nonnull final String conve /* Gurmukhi */ {'\u0a05', '\u0a15', '\u0a17', '\u0a18', '\u0a0f', '\u0a1a', '\u0a1c', '\u0a1f', MISSCODE, '\u0a20', '\u0a23', '\u0a24', '\u0a26', '\u0a27', MISSCODE, '\u0a28', '\u0a2a', '\u0a2d', '\u0a2e', '\u0a30', '\u0a2b', '\u0a32', '\u0a35', '\u0a38', '\u0a39', '\u0a21', '\u0a66', '\u0a67', '\u0a68', '\u0a69', '\u0a6a', '\u0a6b', '\u0a6c', '\u0a6d', '\u0a6e', '\u0a6f'}, // Gurmukhi /* Tibetan */ {'\u0f58', '\u0f40', '\u0f41', '\u0f42', '\u0f64', '\u0f44', '\u0f45', '\u0f46', MISSCODE, '\u0f47', '\u0f49', '\u0f55', '\u0f50', '\u0f4f', MISSCODE, '\u0f51', '\u0f53', '\u0f54', '\u0f56', '\u0f5e', '\u0f60', '\u0f5f', '\u0f61', '\u0f62', '\u0f63', '\u0f66', '\u0f20', '\u0f21', '\u0f22', '\u0f23', '\u0f24', '\u0f25', '\u0f26', '\u0f27', '\u0f28', '\u0f29'}, // Tibetan /* Arabic */ {'\u0628', '\u062a', '\u062d', '\u062e', '\u062B', '\u062f', '\u0630', '\u0631', '\u0627', '\u0632', '\u0633', '\u0634', '\u0635', '\u0636', '\u0647', '\u0637', '\u0638', '\u0639', '\u063a', '\u0641', '\u0642', '\u062C', '\u0644', '\u0645', '\u0646', '\u0648', '\u0030', '\u0031', '\u0032', '\u0033', '\u0034', '\u0035', '\u0036', '\u0037', '\u0038', '\u0039'}, // Arabic - /* Korean */ {'\u1112', '\u1100', '\u1102', '\u1103', '\u1166', '\u1105', '\u1107', '\u1109', '\u1175', '\u1110', '\u1111', '\u1161', '\u1162', '\u1163', '\u110b', '\u1164', '\u1165', '\u1167', '\u1169', '\u1172', '\u1174', '\u110c', '\u110e', '\u110f', '\u116d', '\u116e', '\u0030', '\u0031', '\u0032', '\u0033', '\u0034', '\u0035', '\u0036', '\u0037', '\u0038', '\u0039'}, // Korean + /* Korean */ {'\u1112', '\u1100', '\u1102', '\u1103', '\u1166', '\u1105', '\u1107', '\u1109', '\u1175', '\u1110', '\u1111', '\u1161', '\u1162', '\u1163', '\u110b', '\u1164', '\u1165', '\u1167', '\u1169', '\u1172', '\u1174', '\u110c', '\u110e', '\u110f', '\u116d', '\u116e', '\u0030', '\u0031', '\u0032', '\u0033', '\u0034', '\u0035', '\u0036', '\u0037', '\u0038', '\u0039'}, // Korean /* Burmese */ {'\u1005', '\u1000', '\u1001', '\u1002', '\u1013', '\u1003', '\u1004', '\u101a', '\u101b', '\u1007', '\u100c', '\u100d', '\u100e', '\u1010', '\u101d', '\u1011', '\u1012', '\u101e', '\u1014', '\u1015', '\u1016', '\u101f', '\u1017', '\u1018', '\u100f', '\u101c', '\u1040', '\u1041', '\u1042', '\u1043', '\u1044', '\u1045', '\u1046', '\u1047', '\u1048', '\u1049'}, // Burmese /* Khmer */ {'\u1789', '\u1780', '\u1781', '\u1782', '\u1785', '\u1783', '\u1784', '\u1787', '\u179a', '\u1788', '\u178a', '\u178c', '\u178d', '\u178e', '\u179c', '\u1791', '\u1792', '\u1793', '\u1794', '\u1795', '\u179f', '\u1796', '\u1798', '\u179b', '\u17a0', '\u17a2', '\u17e0', '\u17e1', '\u17e2', '\u17e3', '\u17e4', '\u17e5', '\u17e6', '\u17e7', '\u17e8', '\u17e9'}, // Khmer /* Sinhalese*/ {'\u0d85', '\u0d9a', '\u0d9c', '\u0d9f', '\u0d89', '\u0da2', '\u0da7', '\u0da9', '\u0dc2', '\u0dac', '\u0dad', '\u0daf', '\u0db1', '\u0db3', '\u0dc5', '\u0db4', '\u0db6', '\u0db8', '\u0db9', '\u0dba', '\u0d8b', '\u0dbb', '\u0dbd', '\u0dc0', '\u0dc3', '\u0dc4', '\u0030', '\u0031', '\u0032', '\u0033', '\u0034', '\u0035', '\u0036', '\u0037', '\u0038', '\u0039'}, // Sinhalese @@ -294,8 +294,8 @@ public Unicode2Ascii(final char min, final char max, @Nonnull final String conve /* Thaana */ new Unicode2Ascii('\u0780', '\u07b1', "BCDFGHJKLMNPQRSTVWXYA?OE????U???????I????????????Z"), // Thaana /* Chinese */ new Unicode2Ascii('\u3105', '\u3129', "BDFCGHJKLMNRSTUEPQWYZ????I?O??A????XV"), // Chinese /* Tifinagh */ new Unicode2Ascii('\u2d31', '\u2d63', "B?C???D????FG??H??JKL?M?A???NPI???EOQR??STVW??X?YUZ"), // Tifinagh - /* Tamil */ new Unicode2Ascii('\u0b85', '\u0bb5', "SE?TV????WXY?ZU?B???AC???OD????F???GIH???JKLRMQPN"), // Tamil - /* Amharic */ new Unicode2Ascii('\u1200', '\u1354', "H???????L??????????????????A??E?T?????V?????S???????????????????Q???R???????????????????????????B???C???????????W?????X????????????????????????????M????????????I???????????K???????????????????????????U???????O???????????Z???????????J???????D???????????????????????G???????????????????????????????????????????????Y?????????????????F?????N???P"), // Amharic + /* Tamil */ new Unicode2Ascii('\u0b85', '\u0bb5', "SE?TV????WXY?ZU?B???AC???OD????F???GIH???JKLRMQPN"), // Tamil + /* Amharic */ new Unicode2Ascii('\u1200', '\u1354', "H???????L??????????????????A??E?T?????V?????S???????????????????Q???R???????????????????????????B???C???????????W?????X????????????????????????????M????????????I???????????K???????????????????????????U???????O???????????Z???????????J???????D???????????????????????G???????????????????????????????????????????????Y?????????????????F?????N???P"), // Amharic /* Telugu */ new Unicode2Ascii('\u0c15', '\u0c35', "BOC?DFIG?AHJK?LMNPQR?SETUV?W?XY?Z"), // Telugu /* Odia */ new Unicode2Ascii('\u0b15', '\u0b39', "BCDF?G?HA?JOKLEMNPQR?SIT?VWX??Y????ZU"), // Odia /* Kannada */ new Unicode2Ascii('\u0c85', '\u0cb5', "I?U?O????E???A??BCD?FGHJ???KL?MN?PQR?STVW??X?Y??Z"), // Kannada diff --git a/src/main/java/com/mapcode/Encoder.java b/src/main/java/com/mapcode/Encoder.java index 39f2160..e3522be 100644 --- a/src/main/java/com/mapcode/Encoder.java +++ b/src/main/java/com/mapcode/Encoder.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014-2016 Stichting Mapcode Foundation (http://www.mapcode.com) + * Copyright (C) 2014-2017, Stichting Mapcode Foundation (http://www.mapcode.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/com/mapcode/IncorrectDataModelException.java b/src/main/java/com/mapcode/IncorrectDataModelException.java index fd8f8bb..2872204 100644 --- a/src/main/java/com/mapcode/IncorrectDataModelException.java +++ b/src/main/java/com/mapcode/IncorrectDataModelException.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014-2016 Stichting Mapcode Foundation (http://www.mapcode.com) + * Copyright (C) 2014-2017, Stichting Mapcode Foundation (http://www.mapcode.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/com/mapcode/Mapcode.java b/src/main/java/com/mapcode/Mapcode.java index 77ee58a..c7adfcb 100644 --- a/src/main/java/com/mapcode/Mapcode.java +++ b/src/main/java/com/mapcode/Mapcode.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014-2016 Stichting Mapcode Foundation (http://www.mapcode.com) + * Copyright (C) 2014-2017, Stichting Mapcode Foundation (http://www.mapcode.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/com/mapcode/MapcodeCodec.java b/src/main/java/com/mapcode/MapcodeCodec.java index 727eb3c..b3a57d7 100644 --- a/src/main/java/com/mapcode/MapcodeCodec.java +++ b/src/main/java/com/mapcode/MapcodeCodec.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014-2016 Stichting Mapcode Foundation (http://www.mapcode.com) + * Copyright (C) 2014-2017, Stichting Mapcode Foundation (http://www.mapcode.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/com/mapcode/MapcodeZone.java b/src/main/java/com/mapcode/MapcodeZone.java index 954154d..cf13ed1 100644 --- a/src/main/java/com/mapcode/MapcodeZone.java +++ b/src/main/java/com/mapcode/MapcodeZone.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014-2016 Stichting Mapcode Foundation (http://www.mapcode.com) + * Copyright (C) 2014-2017, Stichting Mapcode Foundation (http://www.mapcode.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/com/mapcode/Point.java b/src/main/java/com/mapcode/Point.java index 92cebdc..7de9ccb 100644 --- a/src/main/java/com/mapcode/Point.java +++ b/src/main/java/com/mapcode/Point.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014-2016 Stichting Mapcode Foundation (http://www.mapcode.com) + * Copyright (C) 2014-2017, Stichting Mapcode Foundation (http://www.mapcode.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/com/mapcode/Territory.java b/src/main/java/com/mapcode/Territory.java index 8486fb4..043a06e 100644 --- a/src/main/java/com/mapcode/Territory.java +++ b/src/main/java/com/mapcode/Territory.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014-2016 Stichting Mapcode Foundation (http://www.mapcode.com) + * Copyright (C) 2014-2017, Stichting Mapcode Foundation (http://www.mapcode.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/com/mapcode/UnknownAlphabetException.java b/src/main/java/com/mapcode/UnknownAlphabetException.java index 069656c..fcf332e 100644 --- a/src/main/java/com/mapcode/UnknownAlphabetException.java +++ b/src/main/java/com/mapcode/UnknownAlphabetException.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014-2016 Stichting Mapcode Foundation (http://www.mapcode.com) + * Copyright (C) 2014-2017, Stichting Mapcode Foundation (http://www.mapcode.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/com/mapcode/UnknownMapcodeException.java b/src/main/java/com/mapcode/UnknownMapcodeException.java index aa7ebbd..792cd48 100644 --- a/src/main/java/com/mapcode/UnknownMapcodeException.java +++ b/src/main/java/com/mapcode/UnknownMapcodeException.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014-2016 Stichting Mapcode Foundation (http://www.mapcode.com) + * Copyright (C) 2014-2017, Stichting Mapcode Foundation (http://www.mapcode.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/com/mapcode/UnknownPrecisionFormatException.java b/src/main/java/com/mapcode/UnknownPrecisionFormatException.java index bc6764c..01d86a4 100644 --- a/src/main/java/com/mapcode/UnknownPrecisionFormatException.java +++ b/src/main/java/com/mapcode/UnknownPrecisionFormatException.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014-2016 Stichting Mapcode Foundation (http://www.mapcode.com) + * Copyright (C) 2014-2017, Stichting Mapcode Foundation (http://www.mapcode.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/com/mapcode/UnknownTerritoryException.java b/src/main/java/com/mapcode/UnknownTerritoryException.java index ba89348..22d02ba 100644 --- a/src/main/java/com/mapcode/UnknownTerritoryException.java +++ b/src/main/java/com/mapcode/UnknownTerritoryException.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014-2016 Stichting Mapcode Foundation (http://www.mapcode.com) + * Copyright (C) 2014-2017, Stichting Mapcode Foundation (http://www.mapcode.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,6 +17,7 @@ package com.mapcode; import javax.annotation.Nonnull; +import javax.annotation.Nullable; /** * This runtime exception is thrown for unknown territory codes. It is specifically a runtime exception, because @@ -37,4 +38,9 @@ public UnknownTerritoryException(final int code) { super(); this.code = code; } + + @Nullable + public Integer getCode() { + return code; + } } diff --git a/src/main/resources/com/mapcode/README.md b/src/main/resources/com/mapcode/README.md index 21035cb..e00fac4 100644 --- a/src/main/resources/com/mapcode/README.md +++ b/src/main/resources/com/mapcode/README.md @@ -1,7 +1,7 @@ The binary file "mminfo.dat" is subject to the following copyright and license statements: -Copyright (C) 2014-2016 Stichting Mapcode Foundation (http://www.mapcode.com) +Copyright (C) 2014-2017, Stichting Mapcode Foundation (http://www.mapcode.com) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/src/site/markdown/ReleaseNotes.md b/src/site/markdown/ReleaseNotes.md index 65e952d..28c307a 100755 --- a/src/site/markdown/ReleaseNotes.md +++ b/src/site/markdown/ReleaseNotes.md @@ -2,6 +2,10 @@ These are the release notes for the Java library for mapcodes. +### 2.4.2 + +* Removed secret Coveralls key from POM file. + ### 2.4.1 * Added scripts for Tifinagh (Berber), Tamil, Amharic, Telugu, Odia, Kannada, Gujarati. diff --git a/src/site/site.xml b/src/site/site.xml index 386be50..4d9b53c 100644 --- a/src/site/site.xml +++ b/src/site/site.xml @@ -1,6 +1,6 @@