You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by de...@apache.org on 2016/12/08 17:42:52 UTC
svn commit: r1773274 [4/9] - in /sis/trunk: ./
application/sis-console/src/main/artifact/
application/sis-openoffice/src/main/unopkg/
core/sis-build-helper/src/main/javadoc/
core/sis-feature/src/main/java/org/apache/sis/feature/
core/sis-feature/src/ma...
Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/GeodeticAuthorityFactory.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/GeodeticAuthorityFactory.java?rev=1773274&r1=1773273&r2=1773274&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/GeodeticAuthorityFactory.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/GeodeticAuthorityFactory.java [UTF-8] Thu Dec 8 17:42:51 2016
@@ -103,7 +103,7 @@ public abstract class GeodeticAuthorityF
*
* The online resource description with a \u201cConnection\u201d function is a SIS extension.</div>
*
- * @return The organization responsible for definition of the database, or {@code null} if unknown.
+ * @return the organization responsible for definition of the database, or {@code null} if unknown.
*
* @see #getVendor()
*/
@@ -140,7 +140,7 @@ public abstract class GeodeticAuthorityF
* Subclasses can override this method, but the set should always contain the same elements during
* all factory lifetime.
*
- * @return The namespaces recognized by this factory, or an empty set if none.
+ * @return the namespaces recognized by this factory, or an empty set if none.
*/
public Set<String> getCodeSpaces() {
final String authority = Citations.getCodeSpace(getAuthority());
@@ -157,8 +157,8 @@ public abstract class GeodeticAuthorityF
* This may be costly since it involves a full object creation.
* Subclasses are encouraged to provide a more efficient implementation if they can.
*
- * @param code Value allocated by authority.
- * @return A description of the object, or {@code null} if the object
+ * @param code value allocated by authority.
+ * @return a description of the object, or {@code null} if the object
* corresponding to the specified {@code code} has no description.
* @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
* @throws FactoryException if an error occurred while fetching the description.
@@ -181,8 +181,8 @@ public abstract class GeodeticAuthorityF
* Overriding this method is sufficient for supporting the more specific {@code createFoo(String)} methods,
* but subclasses are encouraged to override the later for efficiency.
*
- * @param code Value allocated by authority.
- * @return The object for the given code.
+ * @param code value allocated by authority.
+ * @return the object for the given code.
* @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
* @throws FactoryException if the object creation failed for some other reason.
*
@@ -222,8 +222,8 @@ public abstract class GeodeticAuthorityF
* The default implementation delegates to {@link #createObject(String)} and casts the result.
* If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
*
- * @param code Value allocated by authority.
- * @return The coordinate reference system for the given code.
+ * @param code value allocated by authority.
+ * @return the coordinate reference system for the given code.
* @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
* @throws FactoryException if the object creation failed for some other reason.
*
@@ -267,8 +267,8 @@ public abstract class GeodeticAuthorityF
* The default implementation delegates to {@link #createCoordinateReferenceSystem(String)} and casts the result.
* If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
*
- * @param code Value allocated by authority.
- * @return The coordinate reference system for the given code.
+ * @param code value allocated by authority.
+ * @return the coordinate reference system for the given code.
* @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
* @throws FactoryException if the object creation failed for some other reason.
*
@@ -301,8 +301,8 @@ public abstract class GeodeticAuthorityF
* The default implementation delegates to {@link #createCoordinateReferenceSystem(String)} and casts the result.
* If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
*
- * @param code Value allocated by authority.
- * @return The coordinate reference system for the given code.
+ * @param code value allocated by authority.
+ * @return the coordinate reference system for the given code.
* @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
* @throws FactoryException if the object creation failed.
*
@@ -336,8 +336,8 @@ public abstract class GeodeticAuthorityF
* The default implementation delegates to {@link #createCoordinateReferenceSystem(String)} and casts the result.
* If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
*
- * @param code Value allocated by authority.
- * @return The coordinate reference system for the given code.
+ * @param code value allocated by authority.
+ * @return the coordinate reference system for the given code.
* @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
* @throws FactoryException if the object creation failed for some other reason.
*
@@ -367,8 +367,8 @@ public abstract class GeodeticAuthorityF
* The default implementation delegates to {@link #createCoordinateReferenceSystem(String)} and casts the result.
* If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
*
- * @param code Value allocated by authority.
- * @return The coordinate reference system for the given code.
+ * @param code value allocated by authority.
+ * @return the coordinate reference system for the given code.
* @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
* @throws FactoryException if the object creation failed for some other reason.
*
@@ -386,8 +386,8 @@ public abstract class GeodeticAuthorityF
* The default implementation delegates to {@link #createCoordinateReferenceSystem(String)} and casts the result.
* If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
*
- * @param code Value allocated by authority.
- * @return The coordinate reference system for the given code.
+ * @param code value allocated by authority.
+ * @return the coordinate reference system for the given code.
* @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
* @throws FactoryException if the object creation failed for some other reason.
*
@@ -408,8 +408,8 @@ public abstract class GeodeticAuthorityF
* <div class="warning"><b>Warning:</b> in a future SIS version, the return type may be changed
* to {@code org.opengis.referencing.crs.ParametricCRS}. This change is pending GeoAPI revision.</div>
*
- * @param code Value allocated by authority.
- * @return The coordinate reference system for the given code.
+ * @param code value allocated by authority.
+ * @return the coordinate reference system for the given code.
* @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
* @throws FactoryException if the object creation failed for some other reason.
*
@@ -437,8 +437,8 @@ public abstract class GeodeticAuthorityF
* The default implementation delegates to {@link #createCoordinateReferenceSystem(String)} and casts the result.
* If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
*
- * @param code Value allocated by authority.
- * @return The coordinate reference system for the given code.
+ * @param code value allocated by authority.
+ * @return the coordinate reference system for the given code.
* @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
* @throws FactoryException if the object creation failed for some other reason.
*
@@ -456,8 +456,8 @@ public abstract class GeodeticAuthorityF
* The default implementation delegates to {@link #createCoordinateReferenceSystem(String)} and casts the result.
* If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
*
- * @param code Value allocated by authority.
- * @return The coordinate reference system for the given code.
+ * @param code value allocated by authority.
+ * @return the coordinate reference system for the given code.
* @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
* @throws FactoryException if the object creation failed for some other reason.
*
@@ -484,8 +484,8 @@ public abstract class GeodeticAuthorityF
* The default implementation delegates to {@link #createCoordinateReferenceSystem(String)} and casts the result.
* If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
*
- * @param code Value allocated by authority.
- * @return The coordinate reference system for the given code.
+ * @param code value allocated by authority.
+ * @return the coordinate reference system for the given code.
* @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
* @throws FactoryException if the object creation failed for some other reason.
*
@@ -504,8 +504,8 @@ public abstract class GeodeticAuthorityF
* The default implementation delegates to {@link #createCoordinateReferenceSystem(String)} and casts the result.
* If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
*
- * @param code Value allocated by authority.
- * @return The coordinate reference system for the given code.
+ * @param code value allocated by authority.
+ * @return the coordinate reference system for the given code.
* @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
* @throws FactoryException if the object creation failed for some other reason.
*
@@ -538,8 +538,8 @@ public abstract class GeodeticAuthorityF
* The default implementation delegates to {@link #createObject(String)} and casts the result.
* If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
*
- * @param code Value allocated by authority.
- * @return The datum for the given code.
+ * @param code value allocated by authority.
+ * @return the datum for the given code.
* @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
* @throws FactoryException if the object creation failed for some other reason.
*
@@ -571,8 +571,8 @@ public abstract class GeodeticAuthorityF
* The default implementation delegates to {@link #createDatum(String)} and casts the result.
* If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
*
- * @param code Value allocated by authority.
- * @return The datum for the given code.
+ * @param code value allocated by authority.
+ * @return the datum for the given code.
* @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
* @throws FactoryException if the object creation failed for some other reason.
*
@@ -605,8 +605,8 @@ public abstract class GeodeticAuthorityF
* The default implementation delegates to {@link #createDatum(String)} and casts the result.
* If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
*
- * @param code Value allocated by authority.
- * @return The datum for the given code.
+ * @param code value allocated by authority.
+ * @return the datum for the given code.
* @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
* @throws FactoryException if the object creation failed for some other reason.
*
@@ -624,8 +624,8 @@ public abstract class GeodeticAuthorityF
* The default implementation delegates to {@link #createDatum(String)} and casts the result.
* If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
*
- * @param code Value allocated by authority.
- * @return The datum for the given code.
+ * @param code value allocated by authority.
+ * @return the datum for the given code.
* @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
* @throws FactoryException if the object creation failed for some other reason.
*
@@ -646,8 +646,8 @@ public abstract class GeodeticAuthorityF
* <div class="warning"><b>Warning:</b> in a future SIS version, the return type may be changed
* to {@code org.opengis.referencing.datum.ParametricDatum}. This change is pending GeoAPI revision.</div>
*
- * @param code Value allocated by authority.
- * @return The datum for the given code.
+ * @param code value allocated by authority.
+ * @return the datum for the given code.
* @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
* @throws FactoryException if the object creation failed for some other reason.
*
@@ -677,8 +677,8 @@ public abstract class GeodeticAuthorityF
* The default implementation delegates to {@link #createDatum(String)} and casts the result.
* If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
*
- * @param code Value allocated by authority.
- * @return The datum for the given code.
+ * @param code value allocated by authority.
+ * @return the datum for the given code.
* @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
* @throws FactoryException if the object creation failed for some other reason.
*
@@ -697,8 +697,8 @@ public abstract class GeodeticAuthorityF
* The default implementation delegates to {@link #createDatum(String)} and casts the result.
* If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
*
- * @param code Value allocated by authority.
- * @return The datum for the given code.
+ * @param code value allocated by authority.
+ * @return the datum for the given code.
* @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
* @throws FactoryException if the object creation failed for some other reason.
*
@@ -728,8 +728,8 @@ public abstract class GeodeticAuthorityF
* The default implementation delegates to {@link #createObject(String)} and casts the result.
* If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
*
- * @param code Value allocated by authority.
- * @return The ellipsoid for the given code.
+ * @param code value allocated by authority.
+ * @return the ellipsoid for the given code.
* @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
* @throws FactoryException if the object creation failed for some other reason.
*
@@ -761,8 +761,8 @@ public abstract class GeodeticAuthorityF
* The default implementation delegates to {@link #createObject(String)} and casts the result.
* If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
*
- * @param code Value allocated by authority.
- * @return The prime meridian for the given code.
+ * @param code value allocated by authority.
+ * @return the prime meridian for the given code.
* @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
* @throws FactoryException if the object creation failed for some other reason.
*
@@ -791,8 +791,8 @@ public abstract class GeodeticAuthorityF
* The default implementation delegates to {@link #createObject(String)} and casts the result.
* If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
*
- * @param code Value allocated by authority.
- * @return The extent for the given code.
+ * @param code value allocated by authority.
+ * @return the extent for the given code.
* @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
* @throws FactoryException if the object creation failed for some other reason.
*
@@ -826,12 +826,13 @@ public abstract class GeodeticAuthorityF
* The default implementation delegates to {@link #createObject(String)} and casts the result.
* If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
*
- * @param code Value allocated by authority.
- * @return The coordinate system for the given code.
+ * @param code value allocated by authority.
+ * @return the coordinate system for the given code.
* @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
* @throws FactoryException if the object creation failed for some other reason.
*
* @see org.apache.sis.referencing.cs.AbstractCS
+ * @see org.apache.sis.referencing.cs.CoordinateSystems#getEpsgCode(Unit, AxisDirection...)
*/
public CoordinateSystem createCoordinateSystem(final String code) throws NoSuchAuthorityCodeException, FactoryException {
return cast(CoordinateSystem.class, createObject(code), code);
@@ -858,8 +859,8 @@ public abstract class GeodeticAuthorityF
* The default implementation delegates to {@link #createCoordinateSystem(String)} and casts the result.
* If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
*
- * @param code Value allocated by authority.
- * @return The coordinate system for the given code.
+ * @param code value allocated by authority.
+ * @return the coordinate system for the given code.
* @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
* @throws FactoryException if the object creation failed for some other reason.
*
@@ -887,8 +888,8 @@ public abstract class GeodeticAuthorityF
* The default implementation delegates to {@link #createCoordinateSystem(String)} and casts the result.
* If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
*
- * @param code Value allocated by authority.
- * @return The coordinate system for the given code.
+ * @param code value allocated by authority.
+ * @return the coordinate system for the given code.
* @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
* @throws FactoryException if the object creation failed for some other reason.
*
@@ -906,8 +907,8 @@ public abstract class GeodeticAuthorityF
* The default implementation delegates to {@link #createCoordinateSystem(String)} and casts the result.
* If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
*
- * @param code Value allocated by authority.
- * @return The coordinate system for the given code.
+ * @param code value allocated by authority.
+ * @return the coordinate system for the given code.
* @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
* @throws FactoryException if the object creation failed for some other reason.
*
@@ -927,8 +928,8 @@ public abstract class GeodeticAuthorityF
* <div class="warning"><b>Warning:</b> in a future SIS version, the return type may be changed
* to {@code org.opengis.referencing.cs.ParametricCS}. This change is pending GeoAPI revision.</div>
*
- * @param code Value allocated by authority.
- * @return The coordinate system for the given code.
+ * @param code value allocated by authority.
+ * @return the coordinate system for the given code.
* @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
* @throws FactoryException if the object creation failed for some other reason.
*
@@ -959,8 +960,8 @@ public abstract class GeodeticAuthorityF
* The default implementation delegates to {@link #createCoordinateSystem(String)} and casts the result.
* If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
*
- * @param code Value allocated by authority.
- * @return The coordinate system for the given code.
+ * @param code value allocated by authority.
+ * @return the coordinate system for the given code.
* @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
* @throws FactoryException if the object creation failed for some other reason.
*
@@ -988,8 +989,8 @@ public abstract class GeodeticAuthorityF
* The default implementation delegates to {@link #createCoordinateSystem(String)} and casts the result.
* If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
*
- * @param code Value allocated by authority.
- * @return The coordinate system for the given code.
+ * @param code value allocated by authority.
+ * @return the coordinate system for the given code.
* @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
* @throws FactoryException if the object creation failed for some other reason.
*
@@ -1007,8 +1008,8 @@ public abstract class GeodeticAuthorityF
* The default implementation delegates to {@link #createCoordinateSystem(String)} and casts the result.
* If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
*
- * @param code Value allocated by authority.
- * @return The coordinate system for the given code.
+ * @param code value allocated by authority.
+ * @return the coordinate system for the given code.
* @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
* @throws FactoryException if the object creation failed for some other reason.
*
@@ -1026,8 +1027,8 @@ public abstract class GeodeticAuthorityF
* The default implementation delegates to {@link #createCoordinateSystem(String)} and casts the result.
* If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
*
- * @param code Value allocated by authority.
- * @return The coordinate system for the given code.
+ * @param code value allocated by authority.
+ * @return the coordinate system for the given code.
* @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
* @throws FactoryException if the object creation failed for some other reason.
*
@@ -1057,8 +1058,8 @@ public abstract class GeodeticAuthorityF
* The default implementation delegates to {@link #createObject(String)} and casts the result.
* If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
*
- * @param code Value allocated by authority.
- * @return The axis for the given code.
+ * @param code value allocated by authority.
+ * @return the axis for the given code.
* @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
* @throws FactoryException if the object creation failed for some other reason.
*
@@ -1093,8 +1094,8 @@ public abstract class GeodeticAuthorityF
* The default implementation delegates to {@link #createObject(String)} and casts the result.
* If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
*
- * @param code Value allocated by authority.
- * @return The unit of measurement for the given code.
+ * @param code value allocated by authority.
+ * @return the unit of measurement for the given code.
* @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
* @throws FactoryException if the object creation failed for some other reason.
*
@@ -1125,8 +1126,8 @@ public abstract class GeodeticAuthorityF
* The default implementation delegates to {@link #createObject(String)} and casts the result.
* If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
*
- * @param code Value allocated by authority.
- * @return The parameter descriptor for the given code.
+ * @param code value allocated by authority.
+ * @return the parameter descriptor for the given code.
* @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
* @throws FactoryException if the object creation failed for some other reason.
*
@@ -1153,8 +1154,8 @@ public abstract class GeodeticAuthorityF
* The default implementation delegates to {@link #createObject(String)} and casts the result.
* If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
*
- * @param code Value allocated by authority.
- * @return The operation method for the given code.
+ * @param code value allocated by authority.
+ * @return the operation method for the given code.
* @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
* @throws FactoryException if the object creation failed for some other reason.
*
@@ -1187,8 +1188,8 @@ public abstract class GeodeticAuthorityF
* The default implementation delegates to {@link #createObject(String)} and casts the result.
* If the result can not be casted, then a {@link NoSuchAuthorityCodeException} is thrown.
*
- * @param code Value allocated by authority.
- * @return The operation for the given code.
+ * @param code value allocated by authority.
+ * @return the operation for the given code.
* @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
* @throws FactoryException if the object creation failed for some other reason.
*
@@ -1208,9 +1209,9 @@ public abstract class GeodeticAuthorityF
* <div class="section">Default implementation</div>
* The default implementation returns an empty set.
*
- * @param sourceCRS Coded value of source coordinate reference system.
- * @param targetCRS Coded value of target coordinate reference system.
- * @return The operations from {@code sourceCRS} to {@code targetCRS}.
+ * @param sourceCRS coded value of source coordinate reference system.
+ * @param targetCRS coded value of target coordinate reference system.
+ * @return the operations from {@code sourceCRS} to {@code targetCRS}.
* @throws NoSuchAuthorityCodeException if a specified code was not found.
* @throws FactoryException if the object creation failed for some other reason.
*/
@@ -1226,7 +1227,7 @@ public abstract class GeodeticAuthorityF
* from an incomplete one, for example from an object without "{@code ID[\u2026]}" or
* "{@code AUTHORITY[\u2026]}" element in <cite>Well Known Text</cite>.
*
- * @return A finder to use for looking up unidentified objects.
+ * @return a finder to use for looking up unidentified objects.
* @throws FactoryException if the finder can not be created.
*
* @see org.apache.sis.referencing.IdentifiedObjects#newFinder(String)
@@ -1247,8 +1248,8 @@ public abstract class GeodeticAuthorityF
* and the specified code start with the {@code "EPSG:"} prefix, then the prefix is removed.
* Otherwise, the string is returned unchanged (except for leading and trailing spaces).
*
- * @param code The code to trim.
- * @return The code with the namespace part removed if that part matched one of the values given by
+ * @param code the code to trim.
+ * @return the code with the namespace part removed if that part matched one of the values given by
* {@link #getCodeSpaces()}.
*/
final String trimNamespace(final String code) {
@@ -1279,10 +1280,10 @@ public abstract class GeodeticAuthorityF
* Casts the given object to the given type, or throws an exception if the object can not be casted.
* This convenience method is provided for implementation of {@code createXXX} methods.
*
- * @param type The type to return (e.g. {@code CoordinateReferenceSystem.class}).
- * @param object The object to cast.
- * @param code The authority code, used only for formatting an error message.
- * @return The object casted to the given type.
+ * @param type the type to return (e.g. {@code CoordinateReferenceSystem.class}).
+ * @param object the object to cast.
+ * @param code the authority code, used only for formatting an error message.
+ * @return the object casted to the given type.
* @throws NoSuchAuthorityCodeException if the given object is not an instance of the given type.
*/
@SuppressWarnings("unchecked")
Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/IdentifiedObjectFinder.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/IdentifiedObjectFinder.java?rev=1773274&r1=1773273&r2=1773274&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/IdentifiedObjectFinder.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/IdentifiedObjectFinder.java [UTF-8] Thu Dec 8 17:42:51 2016
@@ -443,7 +443,7 @@ public class IdentifiedObjectFinder {
candidate = create(code);
} catch (FactoryException e) {
/*
- * The identifier was not recognized. We will continue later will aliases.
+ * The identifier was not recognized. We will continue later with aliases.
* Note: we catch a more generic exception than NoSuchAuthorityCodeException because
* this attempt may fail for various reasons (character string not supported
* by the underlying database for primary key, duplicated name found, etc.).
@@ -509,12 +509,23 @@ public class IdentifiedObjectFinder {
}
/**
- * Creates an object for the given code. This method is invoked by the default {@link #find(IdentifiedObject)}
- * method implementation of for each code returned by the {@link #getCodeCandidates(IdentifiedObject)} method,
- * in iteration order.
+ * Creates an object for the given identifier, name or alias. This method is invoked by the default
+ * {@link #find(IdentifiedObject)} method implementation with the following argument values, in order
+ * (from less expensive to most expensive search operation):
+ *
+ * <ol>
+ * <li>All {@linkplain AbstractIdentifiedObject#getIdentifier() identifiers} of the object to search,
+ * formatted in an {@linkplain IdentifiedObjects#toString(Identifier) "AUTHORITY:CODE"} pattern.</li>
+ * <li>The {@linkplain AbstractIdentifiedObject#getName() name} of the object to search,
+ * {@linkplain org.apache.sis.referencing.NamedIdentifier#getCode() without authority}.</li>
+ * <li>All {@linkplain AbstractIdentifiedObject#getAlias() aliases} of the object to search.</li>
+ * <li>Each code returned by the {@link #getCodeCandidates(IdentifiedObject)} method, in iteration order.</li>
+ * </ol>
*
* @param code the authority code for which to create an object.
* @return the identified object for the given code, or {@code null} to stop attempts.
+ * @throws NoSuchAuthorityCodeException if no object is found for the given code. It may happen if {@code code}
+ * was a name or alias instead than an identifier and the factory supports only search by identifier.
* @throws FactoryException if an error occurred while creating the object.
*/
private IdentifiedObject create(final String code) throws FactoryException {
Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/MultiAuthoritiesFactory.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/MultiAuthoritiesFactory.java?rev=1773274&r1=1773273&r2=1773274&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/MultiAuthoritiesFactory.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/MultiAuthoritiesFactory.java [UTF-8] Thu Dec 8 17:42:51 2016
@@ -533,7 +533,7 @@ public class MultiAuthoritiesFactory ext
* condition is meet, threads can safely use their iterators concurrently.</p>
*/
final Iterator<AuthorityFactory> getAllFactories() {
- return new LazySynchronizedIterator<>(providers);
+ return new LazySynchronizedIterator<AuthorityFactory>(providers);
}
/**
Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/UnavailableFactoryException.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/UnavailableFactoryException.java?rev=1773274&r1=1773273&r2=1773274&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/UnavailableFactoryException.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/UnavailableFactoryException.java [UTF-8] Thu Dec 8 17:42:51 2016
@@ -56,7 +56,7 @@ public class UnavailableFactoryException
/**
* Construct an exception with the specified detail message.
*
- * @param message The detail message. The detail message is saved
+ * @param message the detail message. The detail message is saved
* for later retrieval by the {@link #getMessage()} method.
*/
public UnavailableFactoryException(String message) {
@@ -68,9 +68,9 @@ public class UnavailableFactoryException
* The cause is the exception thrown in the underlying database
* (e.g. {@link java.io.IOException} or {@link java.sql.SQLException}).
*
- * @param message The detail message. The detail message is saved
+ * @param message the detail message. The detail message is saved
* for later retrieval by the {@link #getMessage()} method.
- * @param cause The cause for this exception. The cause is saved
+ * @param cause the cause for this exception. The cause is saved
* for later retrieval by the {@link #getCause()} method.
*/
public UnavailableFactoryException(String message, Throwable cause) {
@@ -90,7 +90,7 @@ public class UnavailableFactoryException
* unavailable. User may want to be informed about which factory is unavailable, for example in order
* to remove it from the list of factory managed by {@link MultiAuthoritiesFactory}.</div>
*
- * @param factory The factory which is unavailable.
+ * @param factory the factory which is unavailable.
*/
public void setUnavailableFactory(final AuthorityFactory factory) {
this.factory = factory;
@@ -100,7 +100,7 @@ public class UnavailableFactoryException
* Returns the factory which has been found unavailable, or {@code null} if unspecified.
* See {@link #setUnavailableFactory(AuthorityFactory)} for more details.
*
- * @return The factory that should be considered as unavailable.
+ * @return the factory that should be considered as unavailable.
*/
public AuthorityFactory getUnavailableFactory() {
return factory;
Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java?rev=1773274&r1=1773273&r2=1773274&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java [UTF-8] Thu Dec 8 17:42:51 2016
@@ -66,6 +66,7 @@ import org.opengis.referencing.datum.*;
import org.opengis.referencing.operation.*;
import org.opengis.referencing.IdentifiedObject;
import org.opengis.referencing.NoSuchAuthorityCodeException;
+
import org.apache.sis.internal.metadata.ReferencingServices;
import org.apache.sis.internal.metadata.TransformationAccuracy;
import org.apache.sis.internal.metadata.WKTKeywords;
@@ -464,7 +465,7 @@ addURIs: for (int i=0; ; i++) {
case 0: url = "http://epsg-registry.org/"; function = OnLineFunction.SEARCH; break;
case 1: url = "http://www.epsg.org/"; function = OnLineFunction.DOWNLOAD; break;
case 2: {
- url = metadata.getURL();
+ url = SQLUtilities.getSimplifiedURL(metadata);
function = OnLineFunction.valueOf(CONNECTION);
description = Resources.formatInternational(Resources.Keys.GeodeticDataBase_4,
Constants.EPSG, version, metadata.getDatabaseProductName(),
@@ -476,7 +477,7 @@ addURIs: for (int i=0; ; i++) {
}
final DefaultOnlineResource r = new DefaultOnlineResource();
try {
- r.setLinkage(new URI(SQLUtilities.getSimplifiedURL(metadata)));
+ r.setLinkage(new URI(url));
} catch (URISyntaxException exception) {
unexpectedException("getAuthority", exception);
}
@@ -2515,7 +2516,12 @@ next: while (r.next()) {
/*
* Determines if the inverse operation can be performed by reversing the parameter sign.
* The EPSG dataset uses "Yes" or "No" value, but SIS scripts use boolean type. We have
- * to accept both.
+ * to accept both. Note that if we do not recognize the string as a boolean value, then
+ * we need a SQLException, not a null value. If the value is wrongly null, this method
+ * will succeed anyway and EPSGDataAccess will finish its work without apparent problem,
+ * but Apache SIS will fail later when it will try to compute the inverse operation, for
+ * example in a call to CRS.findOperation(\u2026). The exception thrown at such later time is
+ * much more difficult to relate to the root cause than if we throw the exception here.
*/
InternationalString isReversible = null;
try (ResultSet r = executeQuery("ParameterSign",
@@ -2523,13 +2529,15 @@ next: while (r.next()) {
" WHERE (PARAMETER_CODE = ?)", epsg))
{
if (r.next()) {
- final String v = r.getString(1);
- if (v != null && !r.next()) {
- if (v.equalsIgnoreCase("true") || v.equalsIgnoreCase("yes") || v.equals("1")) {
- isReversible = SignReversalComment.OPPOSITE;
- } else if (v.equalsIgnoreCase("false") || v.equalsIgnoreCase("no") || v.equals("0")) {
- isReversible = SignReversalComment.SAME;
- }
+ Boolean b;
+ if (translator.useBoolean()) {
+ b = r.getBoolean(1);
+ if (r.wasNull()) b = null;
+ } else {
+ b = SQLUtilities.toBoolean(r.getString(1)); // May throw SQLException - see above comment.
+ }
+ if (b != null) {
+ isReversible = b ? SignReversalComment.OPPOSITE : SignReversalComment.SAME;
}
}
}
@@ -3058,7 +3066,8 @@ next: while (r.next()) {
}
/**
- * Searches for the given object with warnings for deprecations temporarily disabled.
+ * Lookups objects which are approximatively equal to the specified object.
+ * This method temporarily disables warnings about deprecated objects.
*/
@Override
public Set<IdentifiedObject> find(final IdentifiedObject object) throws FactoryException {
Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGFactory.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGFactory.java?rev=1773274&r1=1773273&r2=1773274&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGFactory.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGFactory.java [UTF-8] Thu Dec 8 17:42:51 2016
@@ -43,6 +43,7 @@ import org.apache.sis.internal.system.De
import org.apache.sis.internal.util.Constants;
import org.apache.sis.referencing.factory.ConcurrentAuthorityFactory;
import org.apache.sis.referencing.factory.UnavailableFactoryException;
+import org.apache.sis.util.logging.Logging;
import org.apache.sis.util.ArgumentChecks;
import org.apache.sis.util.Classes;
import org.apache.sis.util.Exceptions;
@@ -74,7 +75,7 @@ import org.apache.sis.util.Localized;
*
* @author Martin Desruisseaux (Geomatys)
* @since 0.7
- * @version 0.7
+ * @version 0.8
* @module
*
* @see EPSGDataAccess
@@ -239,8 +240,8 @@ public class EPSGFactory extends Concurr
* {@linkplain Locale#getDefault(Locale.Category) display locale}.</li>
* </ul>
*
- * @param properties The data source, authority factories and other configuration properties,
- * or {@code null} for the default values.
+ * @param properties the data source, authority factories and other configuration properties,
+ * or {@code null} for the default values.
* @throws ClassCastException if a property value is not of the expected class.
* @throws IllegalArgumentException if a property value is invalid.
* @throws FactoryException if an error occurred while creating the EPSG factory.
@@ -426,6 +427,7 @@ public class EPSGFactory extends Concurr
Connection connection = null;
try {
connection = dataSource.getConnection();
+ Logging.log(EPSGFactory.class, "newDataAccess", Initializer.connected(connection.getMetaData()));
SQLTranslator tr = translator;
if (tr == null) {
synchronized (this) {
Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGInstaller.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGInstaller.java?rev=1773274&r1=1773273&r2=1773274&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGInstaller.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGInstaller.java [UTF-8] Thu Dec 8 17:42:51 2016
@@ -25,15 +25,12 @@ import java.util.StringTokenizer;
import java.util.concurrent.TimeUnit;
import java.util.logging.Level;
import java.util.logging.LogRecord;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
import java.io.BufferedReader;
import org.apache.sis.util.StringBuilders;
import org.apache.sis.internal.metadata.sql.ScriptRunner;
import org.apache.sis.internal.metadata.sql.SQLUtilities;
import org.apache.sis.internal.system.DefaultFactories;
import org.apache.sis.internal.util.Fallback;
-import org.apache.sis.util.CharSequences;
import org.apache.sis.util.Exceptions;
import org.apache.sis.util.resources.Messages;
import org.apache.sis.util.logging.PerformanceLevel;
@@ -64,9 +61,11 @@ final class EPSGInstaller extends Script
* UPDATE epsg_datum
* SET datum_name = replace(datum_name, CHAR(182), CHAR(10));
* }
+ *
+ * Note: this regular expression use a capturing group.
*/
static final String REPLACE_STATEMENT =
- "\\s*UPDATE\\s+[\\w\\.\" ]+\\s+SET\\s+(\\w+)\\s*=\\s*replace\\s*\\(\\s*\\1\\W+.*";
+ "UPDATE\\s+[\\w\\.\" ]+\\s+SET\\s+(\\w+)\\s*=\\s*replace\\s*\\(\\s*\\1\\W+.*";
/**
* {@code true} if the Pilcrow character (� - decimal code 182) should be replaced by Line Feed
@@ -76,16 +75,10 @@ final class EPSGInstaller extends Script
private final boolean replacePilcrow;
/**
- * Non-null if there is SQL statements to skip. This is the case of {@code UPDATE \u2026 SET x = REPLACE(x, \u2026)}
- * functions, since Derby does not supports the {@code REPLACE} function.
- */
- private final Matcher statementToSkip;
-
- /**
* Creates a new runner which will execute the statements using the given connection.
* The encoding is {@code "ISO-8859-1"}, which is the encoding used for the files provided by EPSG.
*
- * @param connection The connection to the database.
+ * @param connection the connection to the database.
* @throws SQLException if an error occurred while executing a SQL statement.
*/
public EPSGInstaller(final Connection connection) throws SQLException {
@@ -100,11 +93,15 @@ final class EPSGInstaller extends Script
break;
}
}
- if (isReplaceSupported) {
- statementToSkip = null;
- } else {
- statementToSkip = Pattern.compile(REPLACE_STATEMENT, Pattern.CASE_INSENSITIVE).matcher("");
+ if (!isReplaceSupported) {
+ addStatementToSkip(REPLACE_STATEMENT);
}
+ /*
+ * The SQL scripts provided by EPSG contains some lines with only a "COMMIT" statement.
+ * This statement is not understood by all databases, and interferes with our calls to
+ * setAutoCommit(false) ... commit() / rollback().
+ */
+ addStatementToSkip("COMMIT");
replacePilcrow = false; // Never supported for now.
}
@@ -114,7 +111,7 @@ final class EPSGInstaller extends Script
*
* <p>This method should be invoked only once. It does nothing if the database does not supports schema.</p>
*
- * @param schema The schema (usually {@code "epsg"}).
+ * @param schema the schema (usually {@code "epsg"}).
* @throws SQLException if the schema can not be created.
* @throws IOException if an I/O operation was required and failed.
*/
@@ -124,9 +121,10 @@ final class EPSGInstaller extends Script
* Creates the schema on the database. We do that before to setup the 'toSchema' map, while the map still null.
* Note that we do not quote the schema name, which is a somewhat arbitrary choice.
*/
- execute(new StringBuilder("CREATE SCHEMA ").append(schema));
+ execute(new StringBuilder("CREATE SCHEMA ").append(identifierQuote).append(schema).append(identifierQuote));
if (isGrantOnSchemaSupported) {
- execute(new StringBuilder("GRANT USAGE ON SCHEMA ").append(schema).append(" TO ").append(PUBLIC));
+ execute(new StringBuilder("GRANT USAGE ON SCHEMA ")
+ .append(identifierQuote).append(schema).append(identifierQuote).append(" TO ").append(PUBLIC));
}
/*
* Mapping from the table names used in the SQL scripts to the original names used in the MS-Access database.
@@ -175,8 +173,16 @@ final class EPSGInstaller extends Script
final void prependNamespace(final String schema) {
modifyReplacements(new BiFunction<String,String,String>() {
@Override public String apply(String key, String value) {
- return key.startsWith(SQLTranslator.TABLE_PREFIX) ?
- schema + '.' + identifierQuote + value + identifierQuote : value;
+ if (key.startsWith(SQLTranslator.TABLE_PREFIX)) {
+ final StringBuilder buffer = new StringBuilder(value.length() + schema.length() + 5);
+ buffer.append(identifierQuote).append(schema).append(identifierQuote).append('.');
+ final boolean isQuoted = value.endsWith(identifierQuote);
+ if (!isQuoted) buffer.append(identifierQuote);
+ buffer.append(value);
+ if (!isQuoted) buffer.append(identifierQuote);
+ value = buffer.toString();
+ }
+ return value;
}
});
}
@@ -187,9 +193,9 @@ final class EPSGInstaller extends Script
* same than "information is an empty string". This replacement is okay in this particular case
* since there is no field in the EPSG database for which we really want an empty string.
*
- * @param sql The whole SQL statement.
- * @param lower Index of the first character of the text in {@code sql}.
- * @param upper Index after the last character of the text in {@code sql}.
+ * @param sql the whole SQL statement.
+ * @param lower index of the first character of the text in {@code sql}.
+ * @param upper index after the last character of the text in {@code sql}.
*/
@Override
protected void editText(final StringBuilder sql, final int lower, final int upper) {
@@ -213,30 +219,10 @@ final class EPSGInstaller extends Script
* Modifies the SQL statement before to execute it, or omit unsupported statements.
*
* @throws SQLException if an error occurred while executing the SQL statement.
- * @throws IOException if an I/O operation was required and failed.
+ * @throws IOException if an I/O operation was required and failed.
*/
@Override
protected int execute(final StringBuilder sql) throws SQLException, IOException {
- /*
- * The SQL scripts provided by EPSG contains some lines with only a "COMMIT" statement.
- * This statement is not understood by all databases, and interferes with our calls to
- * setAutoCommit(false) ... commit() / rollback().
- */
- if (CharSequences.equalsIgnoreCase(sql, "COMMIT")) {
- return 0;
- }
- if (!isGrantOnTableSupported && CharSequences.regionMatches(sql, 0, "GRANT")) {
- return 0;
- }
- if (!isEnumTypeSupported && CharSequences.regionMatches(sql, 0, "CREATE")) {
- final String t = CharSequences.trimWhitespaces(sql, 6, 12).toString();
- if (t.equals("TYPE") || t.equals("CAST")) {
- return 0;
- }
- }
- if (statementToSkip != null && statementToSkip.reset(sql).matches()) {
- return 0;
- }
if (replacePilcrow) {
StringBuilders.replace(sql, "�", "\n");
}
@@ -246,8 +232,8 @@ final class EPSGInstaller extends Script
/**
* Processes to the creation of the EPSG database using the SQL scripts from the given provider.
*
- * @param scriptProvider User-provided scripts, or {@code null} for automatic lookup.
- * @throws IOException if an error occurred while reading an input.
+ * @param scriptProvider user-provided scripts, or {@code null} for automatic lookup.
+ * @throws IOException if an error occurred while reading an input.
* @throws SQLException if an error occurred while executing a SQL statement.
*/
public void run(InstallationResources scriptProvider, final Locale locale) throws SQLException, IOException {
Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/InstallationScriptProvider.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/InstallationScriptProvider.java?rev=1773274&r1=1773273&r2=1773274&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/InstallationScriptProvider.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/InstallationScriptProvider.java [UTF-8] Thu Dec 8 17:42:51 2016
@@ -29,6 +29,10 @@ import java.io.InputStreamReader;
import java.io.IOException;
import java.io.FileNotFoundException;
import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.DirectoryStream;
+import java.nio.file.Files;
+import java.nio.file.Path;
import org.apache.sis.util.resources.Errors;
import org.apache.sis.util.logging.Logging;
import org.apache.sis.util.ArgumentChecks;
@@ -39,12 +43,6 @@ import org.apache.sis.internal.system.Lo
import org.apache.sis.internal.util.CollectionsExt;
import org.apache.sis.internal.util.Constants;
-// Branch-dependent imports
-import java.nio.charset.StandardCharsets;
-import java.nio.file.DirectoryStream;
-import java.nio.file.Files;
-import java.nio.file.Path;
-
/**
* Provides SQL scripts needed for creating a local copy of a dataset. This class allows Apache SIS users
@@ -118,8 +116,8 @@ public abstract class InstallationScript
* </tr>
* </table>
*
- * @param authority The authority (typically {@code "EPSG"}), or {@code null} if not available.
- * @param resources Names of the SQL scripts to read.
+ * @param authority the authority (typically {@code "EPSG"}), or {@code null} if not available.
+ * @param resources names of the SQL scripts to read.
*
* @see #getResourceNames(String)
* @see #openStream(String)
@@ -142,7 +140,7 @@ public abstract class InstallationScript
* if that authority was {@code null}. An empty set means that the provider does not have all
* needed resources or does not have permission to distribute the installation scripts.
*
- * @return Identifiers of SQL scripts that this instance can distribute.
+ * @return identifiers of SQL scripts that this instance can distribute.
*/
@Override
@SuppressWarnings("ReturnOfCollectionOrArrayField")
@@ -164,8 +162,8 @@ public abstract class InstallationScript
* This is a copy of the array of names given to the constructor.
* Those names are often filenames, but not necessarily (they may be just labels).
*
- * @param authority The value given at construction time (e.g. {@code "EPSG"}).
- * @return The names of all SQL scripts to execute.
+ * @param authority the value given at construction time (e.g. {@code "EPSG"}).
+ * @return the names of all SQL scripts to execute.
* @throws IllegalArgumentException if the given {@code authority} argument is not the expected value.
* @throws IOException if fetching the script names required an I/O operation and that operation failed.
*/
@@ -201,10 +199,10 @@ public abstract class InstallationScript
* in which case an Apache SIS build-in script is used \u2013 and wrap the result in a {@link LineNumberReader}.
* The file encoding is ISO LATIN-1 (the encoding used in the scripts distributed by EPSG).
*
- * @param authority The value given at construction time (e.g. {@code "EPSG"}).
- * @param resource Index of the SQL script to read, from 0 inclusive to
+ * @param authority the value given at construction time (e.g. {@code "EPSG"}).
+ * @param resource index of the SQL script to read, from 0 inclusive to
* <code>{@linkplain #getResourceNames getResourceNames}(authority).length</code> exclusive.
- * @return A reader for the content of SQL script to execute.
+ * @return a reader for the content of SQL script to execute.
* @throws IllegalArgumentException if the given {@code authority} argument is not the expected value.
* @throws IndexOutOfBoundsException if the given {@code resource} argument is out of bounds.
* @throws IOException if an error occurred while creating the reader.
@@ -226,6 +224,7 @@ public abstract class InstallationScript
} else {
in = openStream(name);
charset = StandardCharsets.ISO_8859_1;
+ name = name.concat(".sql");
}
if (in == null) {
throw new FileNotFoundException(Errors.format(Errors.Keys.FileNotFound_1, name));
@@ -261,8 +260,8 @@ public abstract class InstallationScript
* }
* </div>
*
- * @param name Name of the script file to open. Can be {@code null} if the resource is not found.
- * @return An input stream opened of the given script file.
+ * @param name name of the script file to open. Can be {@code null} if the resource is not found.
+ * @return an input stream opened of the given script file.
* @throws IOException if an error occurred while opening the file.
*/
protected abstract InputStream openStream(final String name) throws IOException;
@@ -368,7 +367,7 @@ public abstract class InstallationScript
/**
* Returns {@code null} since the user is presumed to have downloaded the files himself.
*
- * @return The terms of use in plain text or HTML, or {@code null} if the license is presumed already accepted.
+ * @return the terms of use in plain text or HTML, or {@code null} if the license is presumed already accepted.
*/
@Override
public String getLicense(String authority, Locale locale, String mimeType) {
@@ -378,8 +377,8 @@ public abstract class InstallationScript
/**
* Opens the input stream for the SQL script of the given name.
*
- * @param name Name of the script file to open.
- * @return An input stream opened of the given script file, or {@code null} if the resource was not found.
+ * @param name name of the script file to open.
+ * @return an input stream opened of the given script file, or {@code null} if the resource was not found.
* @throws IOException if an error occurred while opening the file.
*/
@Override
Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/SQLTranslator.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/SQLTranslator.java?rev=1773274&r1=1773273&r2=1773274&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/SQLTranslator.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/SQLTranslator.java [UTF-8] Thu Dec 8 17:42:51 2016
@@ -219,9 +219,9 @@ public class SQLTranslator {
* An empty string ({@code ""}) means to search for tables without catalog or schema.
* A {@code null} value means that the catalog or schema should not be used to narrow the search.</p>
*
- * @param md Information about the database.
- * @param catalog The catalog where to look for EPSG schema, or {@code null} if any.
- * @param schema The schema where to look for EPSG tables, or {@code null} if any.
+ * @param md information about the database.
+ * @param catalog the catalog where to look for EPSG schema, or {@code null} if any.
+ * @param schema the schema where to look for EPSG tables, or {@code null} if any.
* @throws SQLException if an error occurred while querying the database metadata.
*/
public SQLTranslator(final DatabaseMetaData md, final String catalog, final String schema) throws SQLException {
@@ -313,7 +313,7 @@ public class SQLTranslator {
* Note that this method may still return {@code null} if the EPSG tables were not found or if the database
* does not {@linkplain DatabaseMetaData#supportsCatalogsInDataManipulation() supports catalogs}.
*
- * @return The catalog that contains the EPSG schema, or {@code null}.
+ * @return the catalog that contains the EPSG schema, or {@code null}.
*/
public String getCatalog() {
return catalog;
@@ -325,7 +325,7 @@ public class SQLTranslator {
* Note that this method may still return {@code null} if the EPSG tables were not found or if the database
* does not {@linkplain DatabaseMetaData#supportsSchemasInDataManipulation() supports schemas}.
*
- * @return The schema that contains the EPSG tables, or {@code null}.
+ * @return the schema that contains the EPSG tables, or {@code null}.
*/
public String getSchema() {
return schema;
@@ -365,8 +365,8 @@ public class SQLTranslator {
* Adapts the given SQL statement from the original MS-Access dialect to the dialect of the target database.
* Table and column names may also be replaced.
*
- * @param sql The statement in MS-Access dialect.
- * @return The SQL statement adapted to the dialect of the target database.
+ * @param sql the statement in MS-Access dialect.
+ * @return the SQL statement adapted to the dialect of the target database.
*/
public String apply(final String sql) {
final String catalog = nonEmpty(this.catalog);
Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractCoordinateOperation.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractCoordinateOperation.java?rev=1773274&r1=1773273&r2=1773274&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractCoordinateOperation.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractCoordinateOperation.java [UTF-8] Thu Dec 8 17:42:51 2016
@@ -776,7 +776,7 @@ check: for (int isTarget=0; ; isTar
deepEquals(getInterpolationCRS(), getInterpolationCRS(that), mode))
{
/*
- * At this point all metdata match or can be ignored. First, compare the targetCRS.
+ * At this point all metadata match or can be ignored. First, compare the targetCRS.
* We need to perform this comparison only if this 'equals(\u2026)' method is not invoked
* from AbstractDerivedCRS, otherwise we would fall in an infinite recursive loop
* (because targetCRS is the DerivedCRS, which in turn wants to compare this operation).
@@ -786,7 +786,7 @@ check: for (int isTarget=0; ; isTar
* its "from base" conversion. The flag should never be set in any other circumstance,
* since this is an internal Apache SIS mechanism. If we know that we are comparing the
* AbstractDerivedCRS.fromBase conversion, then (in the way Apache SIS is implemented)
- * this.sourceCRS == AbstractDerivedCRS.baseCRS. Consequently we can relax the check
+ * this.sourceCRS == AbstractDerivedCRS.baseCRS. Consequently we can relax the check of
* sourceCRS axis order if the mode is ComparisonMode.IGNORE_METADATA.
*/
if (Semaphores.queryAndSet(Semaphores.CONVERSION_AND_CRS)) {
Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractSingleOperation.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractSingleOperation.java?rev=1773274&r1=1773273&r2=1773274&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractSingleOperation.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractSingleOperation.java [UTF-8] Thu Dec 8 17:42:51 2016
@@ -112,7 +112,9 @@ class AbstractSingleOperation extends Ab
/**
* Creates a coordinate operation from the given properties.
+ * This constructor would be public if {@code AbstractSingleOperation} was public.
*/
+ @SuppressWarnings("PublicConstructorInNonPublicClass")
public AbstractSingleOperation(final Map<String,?> properties,
final CoordinateReferenceSystem sourceCRS,
final CoordinateReferenceSystem targetCRS,
@@ -364,8 +366,8 @@ class AbstractSingleOperation extends Ab
/*
* We consider the operation method as metadata. One could argue that OperationMethod's 'sourceDimension' and
* 'targetDimension' are not metadata, but their values should be identical to the 'sourceCRS' and 'targetCRS'
- * dimensions, already checked below. We could also argue that 'OperationMethod.parameters' are not metadata,
- * but their values should have been taken in account for the MathTransform creation, compared below.
+ * dimensions, already checked above. We could also argue that 'OperationMethod.parameters' are not metadata,
+ * but their values should have been taken in account for the MathTransform creation, compared above.
*
* Comparing the MathTransforms instead of parameters avoid the problem of implicit parameters. For example in
* a ProjectedCRS, the "semiMajor" and "semiMinor" axis lengths are sometime provided as explicit parameters,
Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationFinder.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationFinder.java?rev=1773274&r1=1773273&r2=1773274&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationFinder.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationFinder.java [UTF-8] Thu Dec 8 17:42:51 2016
@@ -941,7 +941,7 @@ public class CoordinateOperationFinder e
if (SubTypes.isSingleOperation(main)) {
final SingleOperation op = (SingleOperation) main;
final MathTransform mt = factorySIS.getMathTransformFactory().createConcatenatedTransform(mt1, mt2);
- main = createFromMathTransform(new HashMap<>(IdentifiedObjects.getProperties(main)),
+ main = createFromMathTransform(new HashMap<String,Object>(IdentifiedObjects.getProperties(main)),
sourceCRS, targetCRS, mt, op.getMethod(), op.getParameterValues(),
(main instanceof Transformation) ? Transformation.class :
(main instanceof Conversion) ? Conversion.class : SingleOperation.class);
@@ -961,7 +961,7 @@ public class CoordinateOperationFinder e
break;
}
}
- main = createFromMathTransform(new HashMap<>(IdentifiedObjects.getProperties(main)),
+ main = createFromMathTransform(new HashMap<String,Object>(IdentifiedObjects.getProperties(main)),
main.getSourceCRS(), main.getTargetCRS(), main.getMathTransform(), null, null, type);
}
return main;
Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationRegistry.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationRegistry.java?rev=1773274&r1=1773273&r2=1773274&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationRegistry.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationRegistry.java [UTF-8] Thu Dec 8 17:42:51 2016
@@ -706,7 +706,7 @@ class CoordinateOperationRegistry {
CoordinateReferenceSystem crs;
if (Utilities.equalsApproximatively(sourceCRS, crs = operation.getSourceCRS())) sourceCRS = crs;
if (Utilities.equalsApproximatively(targetCRS, crs = operation.getTargetCRS())) targetCRS = crs;
- final Map<String,Object> properties = new HashMap<>(derivedFrom(operation));
+ final Map<String,Object> properties = new HashMap<String,Object>(derivedFrom(operation));
/*
* Determine whether the operation to create is a Conversion or a Transformation
* (could also be a Conversion subtype like Projection, but this is less important).
Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConcatenatedOperation.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConcatenatedOperation.java?rev=1773274&r1=1773273&r2=1773274&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConcatenatedOperation.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConcatenatedOperation.java [UTF-8] Thu Dec 8 17:42:51 2016
@@ -101,11 +101,12 @@ final class DefaultConcatenatedOperation
* </tr>
* </table>
*
- * @param properties The properties to be given to the identified object.
- * @param operations The sequence of operations. Shall contains at least two operations.
- * @param mtFactory The math transform factory to use for math transforms concatenation.
+ * @param properties the properties to be given to the identified object.
+ * @param operations the sequence of operations. Shall contains at least two operations.
+ * @param mtFactory the math transform factory to use for math transforms concatenation.
* @throws FactoryException if the factory can not concatenate the math transforms.
*/
+ @SuppressWarnings("PublicConstructorInNonPublicClass")
public DefaultConcatenatedOperation(final Map<String,?> properties, CoordinateOperation[] operations,
final MathTransformFactory mtFactory) throws FactoryException
{
@@ -158,10 +159,10 @@ final class DefaultConcatenatedOperation
* since we are adding accuracy informations to a concatenated operation. This departure should be considered
* as a convenience feature only; accuracies are really relevant in transformations only.</div>
*
- * @param properties The properties specified at construction time, or {@code null} if unknown.
- * @param operations The operations to concatenate.
- * @param flattened The destination list in which to add the {@code SingleOperation} instances.
- * @param mtFactory The math transform factory to use, or {@code null} for not performing concatenation.
+ * @param properties the properties specified at construction time, or {@code null} if unknown.
+ * @param operations the operations to concatenate.
+ * @param flattened the destination list in which to add the {@code SingleOperation} instances.
+ * @param mtFactory the math transform factory to use, or {@code null} for not performing concatenation.
* @param setAccuracy {@code true} for setting the {@link #coordinateOperationAccuracy} field.
* @param setDomain {@code true} for setting the {@link #domainOfValidity} field.
* @throws FactoryException if the factory can not concatenate the math transforms.
@@ -257,7 +258,7 @@ final class DefaultConcatenatedOperation
*
* <p>This constructor performs a shallow copy, i.e. the properties are not cloned.</p>
*
- * @param operation The coordinate operation to copy.
+ * @param operation the coordinate operation to copy.
*
* @see #castOrCopy(ConcatenatedOperation)
*/
@@ -274,8 +275,8 @@ final class DefaultConcatenatedOperation
* Note that this is a <cite>shallow</cite> copy operation, since the other properties contained in the given
* object are not recursively copied.
*
- * @param object The object to get as a SIS implementation, or {@code null} if none.
- * @return A SIS implementation containing the values of the given object (may be the
+ * @param object the object to get as a SIS implementation, or {@code null} if none.
+ * @return a SIS implementation containing the values of the given object (may be the
* given object itself), or {@code null} if the argument was null.
*/
public static DefaultConcatenatedOperation castOrCopy(final ConcatenatedOperation object) {
@@ -308,7 +309,7 @@ final class DefaultConcatenatedOperation
* This is necessary for supporting usage of {@code PassThroughOperation} with {@link ConcatenatedOperation}.
* </div>
*
- * @return The sequence of operations.
+ * @return the sequence of operations.
*/
@Override
@SuppressWarnings("ReturnOfCollectionOrArrayField")
@@ -327,7 +328,7 @@ final class DefaultConcatenatedOperation
@Override
public boolean equals(final Object object, final ComparisonMode mode) {
if (object == this) {
- return true; // Slight optimization.
+ return true; // Slight optimization.
}
if (super.equals(object, mode)) {
if (mode == ComparisonMode.STRICT) {
@@ -353,7 +354,7 @@ final class DefaultConcatenatedOperation
* Formats this coordinate operation in pseudo-WKT. This is specific to Apache SIS since
* there is no concatenated operation in the Well Known Text (WKT) version 2 format.
*
- * @param formatter The formatter to use.
+ * @param formatter the formatter to use.
* @return {@code "ConcatenatedOperation"}.
*/
@Override
Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConversion.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConversion.java?rev=1773274&r1=1773273&r2=1773274&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConversion.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConversion.java [UTF-8] Thu Dec 8 17:42:51 2016
@@ -144,13 +144,13 @@ public class DefaultConversion extends A
* with different source and target datum, it does not accept to use such instances for
* {@linkplain org.apache.sis.referencing.crs.DefaultDerivedCRS derived CRS} construction.
*
- * @param properties The properties to be given to the identified object.
- * @param sourceCRS The source CRS.
- * @param targetCRS The target CRS, which shall use a datum
- * {@linkplain Utilities#equalsIgnoreMetadata equals (ignoring metadata)} to the source CRS datum.
- * @param interpolationCRS The CRS of additional coordinates needed for the operation, or {@code null} if none.
- * @param method The coordinate operation method (mandatory in all cases).
- * @param transform Transform from positions in the source CRS to positions in the target CRS.
+ * @param properties the properties to be given to the identified object.
+ * @param sourceCRS the source CRS.
+ * @param targetCRS the target CRS, which shall use a datum
+ * {@linkplain Utilities#equalsIgnoreMetadata equals (ignoring metadata)} to the source CRS datum.
+ * @param interpolationCRS the CRS of additional coordinates needed for the operation, or {@code null} if none.
+ * @param method the coordinate operation method (mandatory in all cases).
+ * @param transform transform from positions in the source CRS to positions in the target CRS.
*/
public DefaultConversion(final Map<String,?> properties,
final CoordinateReferenceSystem sourceCRS,
@@ -193,10 +193,10 @@ public class DefaultConversion extends A
* the parameters used for creating the transform. Those parameters will be stored for information purpose and can
* be given back by the {@link #getParameterValues()} method.</p>
*
- * @param properties The properties to be given to the identified object.
- * @param method The operation method.
- * @param transform Transform from positions in the source CRS to positions in the target CRS, or {@code null}.
- * @param parameters The {@code transform} parameter values, or {@code null}.
+ * @param properties the properties to be given to the identified object.
+ * @param method the operation method.
+ * @param transform transform from positions in the source CRS to positions in the target CRS, or {@code null}.
+ * @param parameters the {@code transform} parameter values, or {@code null}.
*
* @see DefaultMathTransformFactory#swapAndScaleAxes(MathTransform, DefaultMathTransformFactory.Context)
*/
@@ -224,11 +224,11 @@ public class DefaultConversion extends A
* specified source and target CRS. While the source conversion can be an arbitrary one, it is
* typically a defining conversion.
*
- * @param definition The defining conversion.
- * @param source The new source CRS.
- * @param target The new target CRS.
- * @param factory The factory to use for creating a transform from the parameters or for performing axis changes.
- * @param actual An array of length 1 where to store the actual operation method used by the math transform factory.
+ * @param definition the defining conversion.
+ * @param source the new source CRS.
+ * @param target the new target CRS.
+ * @param factory the factory to use for creating a transform from the parameters or for performing axis changes.
+ * @param actual an array of length 1 where to store the actual operation method used by the math transform factory.
*/
DefaultConversion(final Conversion definition,
final CoordinateReferenceSystem source,
@@ -311,7 +311,7 @@ public class DefaultConversion extends A
*
* <p>This constructor performs a shallow copy, i.e. the properties are not cloned.</p>
*
- * @param operation The coordinate operation to copy.
+ * @param operation the coordinate operation to copy.
*
* @see #castOrCopy(Conversion)
*/
@@ -342,8 +342,8 @@ public class DefaultConversion extends A
* properties contained in the given object are not recursively copied.</li>
* </ul>
*
- * @param object The object to get as a SIS implementation, or {@code null} if none.
- * @return A SIS implementation containing the values of the given object (may be the
+ * @param object the object to get as a SIS implementation, or {@code null} if none.
+ * @return a SIS implementation containing the values of the given object (may be the
* given object itself), or {@code null} if the argument was null.
*/
public static DefaultConversion castOrCopy(final Conversion object) {
@@ -355,7 +355,7 @@ public class DefaultConversion extends A
* The default implementation returns {@code Conversion.class}.
* Subclasses implementing a more specific GeoAPI interface shall override this method.
*
- * @return The conversion interface implemented by this class.
+ * @return the conversion interface implemented by this class.
*/
@Override
public Class<? extends Conversion> getInterface() {
@@ -381,12 +381,12 @@ public class DefaultConversion extends A
* interface, but may also implement a more specific GeoAPI interface if {@code specialize(\u2026)} has been able
* to infer the type from this operation {@linkplain #getMethod() method}.
*
- * @param <T> Compile-time type of the {@code baseType} argument.
- * @param baseType The base GeoAPI interface to be implemented by the conversion to return.
- * @param sourceCRS The source CRS.
- * @param targetCRS The target CRS.
- * @param factory The factory to use for creating a transform from the parameters or for performing axis changes.
- * @return The conversion of the given type between the given CRS.
+ * @param <T> compile-time type of the {@code baseType} argument.
+ * @param baseType the base GeoAPI interface to be implemented by the conversion to return.
+ * @param sourceCRS the source CRS.
+ * @param targetCRS the target CRS.
+ * @param factory the factory to use for creating a transform from the parameters or for performing axis changes.
+ * @return the conversion of the given type between the given CRS.
* @throws ClassCastException if a contradiction is found between the given {@code baseType},
* the defining {@linkplain DefaultConversion#getInterface() conversion type} and
* the {@linkplain DefaultOperationMethod#getOperationType() method operation type}.
@@ -435,9 +435,9 @@ public class DefaultConversion extends A
* Ensures that the {@code actual} CRS uses a datum which is equals, ignoring metadata,
* to the datum of the {@code expected} CRS.
*
- * @param param The parameter name, used only in case of error.
- * @param expected The CRS containing the expected datum, or {@code null}.
- * @param actual The CRS for which to check the datum, or {@code null}.
+ * @param param the parameter name, used only in case of error.
+ * @param expected the CRS containing the expected datum, or {@code null}.
+ * @param actual the CRS for which to check the datum, or {@code null}.
* @throws MismatchedDatumException if the two CRS use different datum.
*/
private static void ensureCompatibleDatum(final String param,
@@ -459,12 +459,12 @@ public class DefaultConversion extends A
* For example if {@code sourceCRS} uses a {@code CartesianCS}, then {@code targetCRS} must use
* a {@code CartesianCS} too.
*
- * @param transform The transform to which to concatenate axis changes.
- * @param sourceCRS The first CRS of the pair for which to check for axes changes.
- * @param targetCRS The second CRS of the pair for which to check for axes changes.
- * @param interpDim The number of dimensions of the interpolation CRS, or 0 if none.
- * @param isSource {@code true} for pre-concatenating the changes, or {@code false} for post-concatenating.
- * @param factory The factory to use for performing axis changes.
+ * @param transform the transform to which to concatenate axis changes.
+ * @param sourceCRS the first CRS of the pair for which to check for axes changes.
+ * @param targetCRS the second CRS of the pair for which to check for axes changes.
+ * @param interpDim the number of dimensions of the interpolation CRS, or 0 if none.
+ * @param isSource {@code true} for pre-concatenating the changes, or {@code false} for post-concatenating.
+ * @param factory the factory to use for performing axis changes.
*/
private static MathTransform swapAndScaleAxes(MathTransform transform,
final CoordinateReferenceSystem sourceCRS,
Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultOperationMethod.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultOperationMethod.java?rev=1773274&r1=1773273&r2=1773274&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultOperationMethod.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultOperationMethod.java [UTF-8] Thu Dec 8 17:42:51 2016
@@ -323,7 +323,7 @@ public class DefaultOperationMethod exte
* @return The identified object properties in a mutable map.
*/
private static Map<String,Object> getProperties(final IdentifiedObject info, final Citation authority) {
- final Map<String,Object> properties = new HashMap<>(IdentifiedObjects.getProperties(info));
+ final Map<String,Object> properties = new HashMap<String,Object>(IdentifiedObjects.getProperties(info));
properties.put(NAME_KEY, new NamedIdentifier(authority, info.getName().getCode()));
properties.remove(IDENTIFIERS_KEY);
return properties;