Added: sis/ip-review/rev/24689/FallbackAuthorityFactory.xhtml URL: http://svn.apache.org/viewvc/sis/ip-review/rev/24689/FallbackAuthorityFactory.xhtml?rev=1718599&view=auto ============================================================================== --- sis/ip-review/rev/24689/FallbackAuthorityFactory.xhtml (added) +++ sis/ip-review/rev/24689/FallbackAuthorityFactory.xhtml Tue Dec 8 13:33:15 2015 @@ -0,0 +1,807 @@ + + + + + FallbackAuthorityFactory changes for revisions 24688:24689 + + + +
+

FallbackAuthorityFactory changes for revisions 24688:24689

+

This is a useful commit and it would be hard to ignore if we ported that class… + But we do not plan to port FallbackAuthorityFactory to SIS, in an effort to reduce + the complexity of authority factory stack.

+ +

Command line:

+
svn diff --extensions "--unified --ignore-space-change --ignore-all-space --ignore-eol-style" -r24688:24689 http://svn.osgeo.org/geotools/trunk/modules/library/referencing/src/main/java/org/geotools/referencing/factory/FallbackAuthorityFactory.java
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Revision 24688Revision 24689
import org.opengis.referencing.IdentifiedObject;
+import org.opengis.referencing.AuthorityFactory;
+import org.opengis.referencing.FactoryException;
+import org.opengis.metadata.extent.Extent;
+import org.opengis.metadata.citation.Citation;
+import org.opengis.parameter.ParameterDescriptor;
import org.opengis.referencing.IdentifiedObject;
+import org.opengis.referencing.AuthorityFactory;
+import org.opengis.referencing.FactoryException;
+import org.opengis.referencing.NoSuchAuthorityCodeException;
+import org.opengis.metadata.extent.Extent;
+import org.opengis.metadata.citation.Citation;
+import org.opengis.parameter.ParameterDescriptor;
        return super.getDescriptionText(code);
+    } catch (FactoryException exception) {
+        notifyFailure("getDescriptionText", exception);
+        return fallback.getDescriptionText(code);
+    }
+}
+
+/**
+ * Returns an arbitrary object from a code.
        return super.getDescriptionText(code);
+    } catch (FactoryException exception) {
+        notifyFailure("getDescriptionText", exception);
+        try {
+        return fallback.getDescriptionText(code);
+        } catch (NoSuchAuthorityCodeException ignore) {
+            throw exception;
+    }
+}
+}
+
+/**
+ * Returns an arbitrary object from a code.
        return super.createObject(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createObject", exception);
+        return fallback.createObject(code);
+    }
+}
+
+/**
+ * Returns an arbitrary {@linkplain org.opengis.referencing.datum.Datum datum} from a code.
        return super.createObject(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createObject", exception);
+        try {
+        return fallback.createObject(code);
+        } catch (NoSuchAuthorityCodeException ignore) {
+            throw exception;
+    }
+}
+}
+
+/**
+ * Returns an arbitrary {@linkplain org.opengis.referencing.datum.Datum datum} from a code.
        return super.createDatum(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createDatum", exception);
+        return fallback.createDatum(code);
+    }
+}
+
+/**
+ * Creates a {@linkplain EngineeringDatum engineering datum} from a code.
        return super.createDatum(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createDatum", exception);
+        try {
+        return fallback.createDatum(code);
+        } catch (NoSuchAuthorityCodeException ignore) {
+            throw exception;
+    }
+}
+}
+
+/**
+ * Creates a {@linkplain EngineeringDatum engineering datum} from a code.
        return super.createEngineeringDatum(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createEngineeringDatum", exception);
+        return fallback.createEngineeringDatum(code);
+    }
+}
+
+/**
+ * Creates a {@linkplain ImageDatum image datum} from a code.
        return super.createEngineeringDatum(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createEngineeringDatum", exception);
+        try {
+        return fallback.createEngineeringDatum(code);
+        } catch (NoSuchAuthorityCodeException ignore) {
+            throw exception;
+    }
+}
+}
+
+/**
+ * Creates a {@linkplain ImageDatum image datum} from a code.
        return super.createImageDatum(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createImageDatum", exception);
+        return fallback.createImageDatum(code);
+    }
+}
+
+/**
+ * Creates a {@linkplain VerticalDatum vertical datum} from a code.
        return super.createImageDatum(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createImageDatum", exception);
+        try {
+        return fallback.createImageDatum(code);
+        } catch (NoSuchAuthorityCodeException ignore) {
+            throw exception;
+    }
+}
+}
+
+/**
+ * Creates a {@linkplain VerticalDatum vertical datum} from a code.
        return super.createVerticalDatum(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createVerticalDatum", exception);
+        return fallback.createVerticalDatum(code);
+    }
+}
+
+/**
+ * Creates a {@linkplain TemporalDatum temporal datum} from a code.
        return super.createVerticalDatum(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createVerticalDatum", exception);
+        try {
+        return fallback.createVerticalDatum(code);
+        } catch (NoSuchAuthorityCodeException ignore) {
+            throw exception;
+    }
+}
+}
+
+/**
+ * Creates a {@linkplain TemporalDatum temporal datum} from a code.
        return super.createTemporalDatum(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createTemporalDatum", exception);
+        return fallback.createTemporalDatum(code);
+    }
+}
+
+/**
+ * Returns a {@linkplain GeodeticDatum geodetic datum} from a code.
        return super.createTemporalDatum(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createTemporalDatum", exception);
+        try {
+        return fallback.createTemporalDatum(code);
+        } catch (NoSuchAuthorityCodeException ignore) {
+            throw exception;
+    }
+}
+}
+
+/**
+ * Returns a {@linkplain GeodeticDatum geodetic datum} from a code.
        return super.createGeodeticDatum(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createGeodeticDatum", exception);
+        return fallback.createGeodeticDatum(code);
+    }
+}
+
+/**
+ * Returns an {@linkplain Ellipsoid ellipsoid} from a code.
        return super.createGeodeticDatum(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createGeodeticDatum", exception);
+        try {
+        return fallback.createGeodeticDatum(code);
+        } catch (NoSuchAuthorityCodeException ignore) {
+            throw exception;
+    }
+}
+}
+
+/**
+ * Returns an {@linkplain Ellipsoid ellipsoid} from a code.
        return super.createEllipsoid(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createEllipsoid", exception);
+        return fallback.createEllipsoid(code);
+    }
+}
+
+/**
+ * Returns a {@linkplain PrimeMeridian prime meridian} from a code.
        return super.createEllipsoid(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createEllipsoid", exception);
+        try {
+        return fallback.createEllipsoid(code);
+        } catch (NoSuchAuthorityCodeException ignore) {
+            throw exception;
+    }
+}
+}
+
+/**
+ * Returns a {@linkplain PrimeMeridian prime meridian} from a code.
        return super.createPrimeMeridian(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createPrimeMeridian", exception);
+        return fallback.createPrimeMeridian(code);
+    }
+}
+
+/**
+ * Returns a {@linkplain Extent extent} (usually an area of validity) from a code.
        return super.createPrimeMeridian(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createPrimeMeridian", exception);
+        try {
+        return fallback.createPrimeMeridian(code);
+        } catch (NoSuchAuthorityCodeException ignore) {
+            throw exception;
+    }
+}
+}
+
+/**
+ * Returns a {@linkplain Extent extent} (usually an area of validity) from a code.
        return super.createExtent(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createExtent", exception);
+        return fallback.createExtent(code);
+    }
+}
+
+/**
+ * Returns an arbitrary {@linkplain CoordinateSystem coordinate system} from a code.
        return super.createExtent(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createExtent", exception);
+        try {
+        return fallback.createExtent(code);
+        } catch (NoSuchAuthorityCodeException ignore) {
+            throw exception;
+    }
+}
+}
+
+/**
+ * Returns an arbitrary {@linkplain CoordinateSystem coordinate system} from a code.
        return super.createCoordinateSystem(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createCoordinateSystem", exception);
+        return fallback.createCoordinateSystem(code);
+    }
+}
+
+/**
+ * Creates a cartesian coordinate system from a code.
        return super.createCoordinateSystem(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createCoordinateSystem", exception);
+        try {
+        return fallback.createCoordinateSystem(code);
+        } catch (NoSuchAuthorityCodeException ignore) {
+            throw exception;
+    }
+}
+}
+
+/**
+ * Creates a cartesian coordinate system from a code.
        return super.createCartesianCS(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createCartesianCS", exception);
+        return fallback.createCartesianCS(code);
+    }
+}
+
+/**
+ * Creates a polar coordinate system from a code.
        return super.createCartesianCS(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createCartesianCS", exception);
+        try {
+        return fallback.createCartesianCS(code);
+        } catch (NoSuchAuthorityCodeException ignore) {
+            throw exception;
+    }
+}
+}
+
+/**
+ * Creates a polar coordinate system from a code.
        return super.createPolarCS(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createPolarCS", exception);
+        return fallback.createPolarCS(code);
+    }
+}
+
+/**
+ * Creates a cylindrical coordinate system from a code.
        return super.createPolarCS(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createPolarCS", exception);
+        try {
+        return fallback.createPolarCS(code);
+        } catch (NoSuchAuthorityCodeException ignore) {
+            throw exception;
+    }
+}
+}
+
+/**
+ * Creates a cylindrical coordinate system from a code.
        return super.createCylindricalCS(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createCylindricalCS", exception);
+        return fallback.createCylindricalCS(code);
+    }
+}
+
+/**
+ * Creates a spherical coordinate system from a code.
        return super.createCylindricalCS(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createCylindricalCS", exception);
+        try {
+        return fallback.createCylindricalCS(code);
+        } catch (NoSuchAuthorityCodeException ignore) {
+            throw exception;
+    }
+}
+}
+
+/**
+ * Creates a spherical coordinate system from a code.
        return super.createSphericalCS(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createSphericalCS", exception);
+        return fallback.createSphericalCS(code);
+    }
+}
+
+/**
+ * Creates an ellipsoidal coordinate system from a code.
        return super.createSphericalCS(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createSphericalCS", exception);
+        try {
+        return fallback.createSphericalCS(code);
+        } catch (NoSuchAuthorityCodeException ignore) {
+            throw exception;
+    }
+}
+}
+
+/**
+ * Creates an ellipsoidal coordinate system from a code.
        return super.createEllipsoidalCS(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createEllipsoidalCS", exception);
+        return fallback.createEllipsoidalCS(code);
+    }
+}
+
+/**
+ * Creates a vertical coordinate system from a code.
        return super.createEllipsoidalCS(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createEllipsoidalCS", exception);
+        try {
+        return fallback.createEllipsoidalCS(code);
+        } catch (NoSuchAuthorityCodeException ignore) {
+            throw exception;
+    }
+}
+}
+
+/**
+ * Creates a vertical coordinate system from a code.
        return super.createVerticalCS(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createVerticalCS", exception);
+        return fallback.createVerticalCS(code);
+    }
+}
+
+/**
+ * Creates a temporal coordinate system from a code.
        return super.createVerticalCS(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createVerticalCS", exception);
+        try {
+        return fallback.createVerticalCS(code);
+        } catch (NoSuchAuthorityCodeException ignore) {
+            throw exception;
+    }
+}
+}
+
+/**
+ * Creates a temporal coordinate system from a code.
        return super.createTimeCS(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createTimeCS", exception);
+        return fallback.createTimeCS(code);
+    }
+}
+
+/**
+ * Returns a {@linkplain CoordinateSystemAxis coordinate system axis} from a code.
        return super.createTimeCS(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createTimeCS", exception);
+        try {
+        return fallback.createTimeCS(code);
+        } catch (NoSuchAuthorityCodeException ignore) {
+            throw exception;
+    }
+}
+}
+
+/**
+ * Returns a {@linkplain CoordinateSystemAxis coordinate system axis} from a code.
        return super.createCoordinateSystemAxis(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createCoordinateSystemAxis", exception);
+        return fallback.createCoordinateSystemAxis(code);
+    }
+}
+
+/**
+ * Returns an {@linkplain Unit unit} from a code.
        return super.createCoordinateSystemAxis(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createCoordinateSystemAxis", exception);
+        try {
+        return fallback.createCoordinateSystemAxis(code);
+        } catch (NoSuchAuthorityCodeException ignore) {
+            throw exception;
+    }
+}
+}
+
+/**
+ * Returns an {@linkplain Unit unit} from a code.
        return super.createUnit(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createUnit", exception);
+        return fallback.createUnit(code);
+    }
+}
+
+/**
+ * Returns an arbitrary {@linkplain CoordinateReferenceSystem coordinate reference system}
        return super.createUnit(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createUnit", exception);
+        try {
+        return fallback.createUnit(code);
+        } catch (NoSuchAuthorityCodeException ignore) {
+            throw exception;
+    }
+}
+}
+
+/**
+ * Returns an arbitrary {@linkplain CoordinateReferenceSystem coordinate reference system}
        return super.createCoordinateReferenceSystem(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createCoordinateReferenceSystem", exception);
+        return fallback.createCoordinateReferenceSystem(code);
+    }
+}
+
+/**
+ * Creates a 3D coordinate reference system from a code.
        return super.createCoordinateReferenceSystem(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createCoordinateReferenceSystem", exception);
+        try {
+        return fallback.createCoordinateReferenceSystem(code);
+        } catch (NoSuchAuthorityCodeException ignore) {
+            throw exception;
+    }
+}
+}
+
+/**
+ * Creates a 3D coordinate reference system from a code.
        return super.createCompoundCRS(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createCompoundCRS", exception);
+        return fallback.createCompoundCRS(code);
+    }
+}
+
+/**
+ * Creates a derived coordinate reference system from a code.
        return super.createCompoundCRS(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createCompoundCRS", exception);
+        try {
+        return fallback.createCompoundCRS(code);
+        } catch (NoSuchAuthorityCodeException ignore) {
+            throw exception;
+    }
+}
+}
+
+/**
+ * Creates a derived coordinate reference system from a code.
        return super.createDerivedCRS(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createDerivedCRS", exception);
+        return fallback.createDerivedCRS(code);
+    }
+}
+
+/**
+ * Creates a {@linkplain EngineeringCRS engineering coordinate reference system} from a code.
        return super.createDerivedCRS(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createDerivedCRS", exception);
+        try {
+        return fallback.createDerivedCRS(code);
+        } catch (NoSuchAuthorityCodeException ignore) {
+            throw exception;
+    }
+}
+}
+
+/**
+ * Creates a {@linkplain EngineeringCRS engineering coordinate reference system} from a code.
        return super.createEngineeringCRS(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createEngineeringCRS", exception);
+        return fallback.createEngineeringCRS(code);
+    }
+}
+
+/**
+ * Returns a {@linkplain GeographicCRS geographic coordinate reference system} from a code.
        return super.createEngineeringCRS(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createEngineeringCRS", exception);
+        try {
+        return fallback.createEngineeringCRS(code);
+        } catch (NoSuchAuthorityCodeException ignore) {
+            throw exception;
+    }
+}
+}
+
+/**
+ * Returns a {@linkplain GeographicCRS geographic coordinate reference system} from a code.
        return super.createGeographicCRS(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createGeographicCRS", exception);
+        return fallback.createGeographicCRS(code);
+    }
+}
+
+/**
+ * Returns a {@linkplain GeocentricCRS geocentric coordinate reference system} from a code.
        return super.createGeographicCRS(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createGeographicCRS", exception);
+        try {
+        return fallback.createGeographicCRS(code);
+        } catch (NoSuchAuthorityCodeException ignore) {
+            throw exception;
+    }
+}
+}
+
+/**
+ * Returns a {@linkplain GeocentricCRS geocentric coordinate reference system} from a code.
        return super.createGeocentricCRS(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createGeocentricCRS", exception);
+        return fallback.createGeocentricCRS(code);
+    }
+}
+
+/**
+ * Creates a {@linkplain ImageCRS image coordinate reference system} from a code.
        return super.createGeocentricCRS(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createGeocentricCRS", exception);
+        try {
+        return fallback.createGeocentricCRS(code);
+        } catch (NoSuchAuthorityCodeException ignore) {
+            throw exception;
+    }
+}
+}
+
+/**
+ * Creates a {@linkplain ImageCRS image coordinate reference system} from a code.
        return super.createImageCRS(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createImageCRS", exception);
+        return fallback.createImageCRS(code);
+    }
+}
+
+/**
+ * Returns a {@linkplain ProjectedCRS projected coordinate reference system} from a code.
        return super.createImageCRS(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createImageCRS", exception);
+        try {
+        return fallback.createImageCRS(code);
+        } catch (NoSuchAuthorityCodeException ignore) {
+            throw exception;
+    }
+}
+}
+
+/**
+ * Returns a {@linkplain ProjectedCRS projected coordinate reference system} from a code.
        return super.createProjectedCRS(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createProjectedCRS", exception);
+        return fallback.createProjectedCRS(code);
+    }
+}
+
+/**
+ * Creates a {@linkplain TemporalCRS temporal coordinate reference system} from a code.
        return super.createProjectedCRS(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createProjectedCRS", exception);
+        try {
+        return fallback.createProjectedCRS(code);
+        } catch (NoSuchAuthorityCodeException ignore) {
+            throw exception;
+    }
+}
+}
+
+/**
+ * Creates a {@linkplain TemporalCRS temporal coordinate reference system} from a code.
        return super.createTemporalCRS(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createTemporalCRS", exception);
+        return fallback.createTemporalCRS(code);
+    }
+}
+
+/**
+ * Creates a {@linkplain VerticalCRS vertical coordinate reference system} from a code.
        return super.createTemporalCRS(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createTemporalCRS", exception);
+        try {
+        return fallback.createTemporalCRS(code);
+        } catch (NoSuchAuthorityCodeException ignore) {
+            throw exception;
+    }
+}
+}
+
+/**
+ * Creates a {@linkplain VerticalCRS vertical coordinate reference system} from a code.
        return super.createVerticalCRS(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createVerticalCRS", exception);
+        return fallback.createVerticalCRS(code);
+    }
+}
+
+/**
+ * Creates a parameter descriptor from a code.
        return super.createVerticalCRS(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createVerticalCRS", exception);
+        try {
+        return fallback.createVerticalCRS(code);
+        } catch (NoSuchAuthorityCodeException ignore) {
+            throw exception;
+    }
+}
+}
+
+/**
+ * Creates a parameter descriptor from a code.
        return super.createParameterDescriptor(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createParameterDescriptor", exception);
+        return fallback.createParameterDescriptor(code);
+    }
+}
+
+/**
+ * Creates an operation method from a code.
        return super.createParameterDescriptor(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createParameterDescriptor", exception);
+        try {
+        return fallback.createParameterDescriptor(code);
+        } catch (NoSuchAuthorityCodeException ignore) {
+            throw exception;
+    }
+}
+}
+
+/**
+ * Creates an operation method from a code.
        return super.createOperationMethod(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createOperationMethod", exception);
+        return fallback.createOperationMethod(code);
+    }
+}
+
+/**
+ * Creates an operation from a single operation code.
        return super.createOperationMethod(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createOperationMethod", exception);
+        try {
+        return fallback.createOperationMethod(code);
+        } catch (NoSuchAuthorityCodeException ignore) {
+            throw exception;
+    }
+}
+}
+
+/**
+ * Creates an operation from a single operation code.
        return super.createCoordinateOperation(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createCoordinateOperation", exception);
+        return fallback.createCoordinateOperation(code);
+    }
+}
+
+/**
+ * Creates an operation from coordinate reference system codes.
        return super.createCoordinateOperation(code);
+    } catch (FactoryException exception) {
+        notifyFailure("createCoordinateOperation", exception);
+        try {
+        return fallback.createCoordinateOperation(code);
+        } catch (NoSuchAuthorityCodeException ignore) {
+            throw exception;
+    }
+}
+}
+
+/**
+ * Creates an operation from coordinate reference system codes.
        return super.createFromCoordinateReferenceSystemCodes(sourceCode, targetCode);
+    } catch (FactoryException exception) {
+        notifyFailure("createFromCoordinateReferenceSystemCodes", exception);
+        return fallback.createFromCoordinateReferenceSystemCodes(sourceCode, targetCode);
+    }
+}
+
+/**
+ * Invoked by <code>create</code><var>Foo</var><code>(String)</code> methods when the
        return super.createFromCoordinateReferenceSystemCodes(sourceCode, targetCode);
+    } catch (FactoryException exception) {
+        notifyFailure("createFromCoordinateReferenceSystemCodes", exception);
+        try {
+        return fallback.createFromCoordinateReferenceSystemCodes(sourceCode, targetCode);
+        } catch (NoSuchAuthorityCodeException ignore) {
+            throw exception;
+    }
+}
+}
+
+/**
+ * Invoked by <code>create</code><var>Foo</var><code>(String)</code> methods when the
+
+ + Propchange: sis/ip-review/rev/24689/FallbackAuthorityFactory.xhtml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: sis/ip-review/rev/24689/FallbackAuthorityFactory.xhtml ------------------------------------------------------------------------------ svn:mime-type = text/html Added: sis/ip-review/rev/24689/HEADER.html URL: http://svn.apache.org/viewvc/sis/ip-review/rev/24689/HEADER.html?rev=1718599&view=auto ============================================================================== --- sis/ip-review/rev/24689/HEADER.html (added) +++ sis/ip-review/rev/24689/HEADER.html Tue Dec 8 13:33:15 2015 @@ -0,0 +1,17 @@ + + + + + Revision 24689 + + +
+

Revision 24689

+ + + + +
Author:aaime
Date:2007-03-06
Message:Fix for the fallback system, when falling back because of an error, make sure to report that error if the fallback just does not know about the required code
+
+ + Propchange: sis/ip-review/rev/24689/HEADER.html ------------------------------------------------------------------------------ svn:eol-style = native Propchange: sis/ip-review/rev/24689/HEADER.html ------------------------------------------------------------------------------ svn:mime-type = text/html Added: sis/ip-review/rev/25050/AllAuthoritiesFactory.xhtml URL: http://svn.apache.org/viewvc/sis/ip-review/rev/25050/AllAuthoritiesFactory.xhtml?rev=1718599&view=auto ============================================================================== --- sis/ip-review/rev/25050/AllAuthoritiesFactory.xhtml (added) +++ sis/ip-review/rev/25050/AllAuthoritiesFactory.xhtml Tue Dec 8 13:33:15 2015 @@ -0,0 +1,169 @@ + + + + + AllAuthoritiesFactory changes for revisions 25049:25050 + + + +
+

AllAuthoritiesFactory changes for revisions 25049:25050

+

+ The only change in this commit is to rename FactoryFinder as ReferencingFactoryFinder. + However this change does not apply to SIS since we do not plan to port [Referencing]FactoryFinder. + The plan is to replace them by some dependency injection mechanism. +

+

Command line:

+
svn diff --extensions "--unified --ignore-space-change --ignore-all-space --ignore-eol-style" -r25049:25050 http://svn.osgeo.org/geotools/trunk/modules/library/referencing/src/main/java/org/geotools/referencing/factory/AllAuthoritiesFactory.java
+ + + + + + + + + + + + + + + + + + + + +
Revision 25049Revision 25050
import org.geotools.factory.Hints;
+import org.geotools.factory.Factory;
+import org.geotools.factory.FactoryRegistryException;
+import org.geotools.referencing.FactoryFinder;
+import org.geotools.metadata.iso.citation.Citations;
+import org.geotools.metadata.iso.citation.CitationImpl;
+import org.geotools.util.GenericName;
import org.geotools.factory.Hints;
+import org.geotools.factory.Factory;
+import org.geotools.factory.FactoryRegistryException;
+import org.geotools.referencing.ReferencingFactoryFinder;
+import org.geotools.metadata.iso.citation.Citations;
+import org.geotools.metadata.iso.citation.CitationImpl;
+import org.geotools.util.GenericName;
* This class parses the authority name and delegates the work the corresponding factory. For
+* example if any {@code createFoo(...)} method in this class is invoked with a code starting
+* by {@code "EPSG:"}, then this class delegates the object creation to the authority factory
+* provided by <code>FactoryFinder.{@linkplain FactoryFinder#getCRSAuthorityFactory
+* getCRSAuthorityFactory}("EPSG", hints)</code>.
+* <p>
+* This class is not registered in {@link FactoryFinder}, because it is not a real authority
+* factory. There is not a single authority name associated to this factory, but rather a set
+* of names determined from all available authority factories. If this "authority" factory is
+* wanted, then users need to refer explicitly to the {@link #DEFAULT} constant or to create
* This class parses the authority name and delegates the work the corresponding factory. For
+* example if any {@code createFoo(...)} method in this class is invoked with a code starting
+* by {@code "EPSG:"}, then this class delegates the object creation to the authority factory
+* provided by <code>FactoryFinder.{@linkplain ReferencingFactoryFinder#getCRSAuthorityFactory
+* getCRSAuthorityFactory}("EPSG", hints)</code>.
+* <p>
+* This class is not registered in {@link ReferencingFactoryFinder}, because it is not a real authority
+* factory. There is not a single authority name associated to this factory, but rather a set
+* of names determined from all available authority factories. If this "authority" factory is
+* wanted, then users need to refer explicitly to the {@link #DEFAULT} constant or to create
};
+
+/**
+ * A set of user-specified factories to try before to delegate to {@link FactoryFinder},
+ * or {@code null} if none.
+ */
+private final Collection/*<AuthorityFactory>*/ factories;
};
+
+/**
+ * A set of user-specified factories to try before to delegate to {@link ReferencingFactoryFinder},
+ * or {@code null} if none.
+ */
+private final Collection/*<AuthorityFactory>*/ factories;
* first scan the supplied factories in their iteration order. The first factory implementing
+* the appropriate interface and having the expected {@linkplain AuthorityFactory#getAuthority
+* authority name} will be used. Only if no suitable factory is found, then this class delegates
+* to {@link FactoryFinder}.
+* <p>
+* If the {@code factories} collection contains more than one factory for the same authority
+* and interface, then all additional factories will be {@linkplain FallbackAuthorityFactory
* first scan the supplied factories in their iteration order. The first factory implementing
+* the appropriate interface and having the expected {@linkplain AuthorityFactory#getAuthority
+* authority name} will be used. Only if no suitable factory is found, then this class delegates
+* to {@link ReferencingFactoryFinder}.
+* <p>
+* If the {@code factories} collection contains more than one factory for the same authority
+* and interface, then all additional factories will be {@linkplain FallbackAuthorityFactory
 *
+ * @param hints An optional set of hints, or {@code null} if none.
+ * @param factories A set of user-specified factories to try before to delegate
+ *        to {@link FactoryFinder}, or {@code null} if none.
+ */
+public AllAuthoritiesFactory(final Hints hints,
+                             final Collection/*<? extends AuthorityFactory>*/ factories)
 *
+ * @param hints An optional set of hints, or {@code null} if none.
+ * @param factories A set of user-specified factories to try before to delegate
+ *        to {@link ReferencingFactoryFinder}, or {@code null} if none.
+ */
+public AllAuthoritiesFactory(final Hints hints,
+                             final Collection/*<? extends AuthorityFactory>*/ factories)
*
+* @param hints An optional set of hints, or {@code null} if none.
+* @param factories A set of user-specified factories to try before to delegate
+*        to {@link FactoryFinder}, or {@code null} if none.
+* @param separator The separator between the authority name and the code.
+*
+* @deprecated Override the {@link #getSeparator} method instead.
*
+* @param hints An optional set of hints, or {@code null} if none.
+* @param factories A set of user-specified factories to try before to delegate
+*        to {@link ReferencingFactoryFinder}, or {@code null} if none.
+* @param separator The separator between the authority name and the code.
+*
+* @deprecated Override the {@link #getSeparator} method instead.
/**
+ * Searchs for a factory of the given type. This method first search in user-supplied
+ * factories. If no user factory is found, then this method request for a factory using
+ * {@link FactoryFinder}. The authority name is inferred from the specified code.
+ *
+ * @param  type The interface to be implemented.
+ * @param  code The code of the object to create.
/**
+ * Searchs for a factory of the given type. This method first search in user-supplied
+ * factories. If no user factory is found, then this method request for a factory using
+ * {@link ReferencingFactoryFinder}. The authority name is inferred from the specified code.
+ *
+ * @param  type The interface to be implemented.
+ * @param  code The code of the object to create.
final AuthorityFactory factory;
+try {
+    if (CRSAuthorityFactory.class.equals(type)) {
+        factory = FactoryFinder.getCRSAuthorityFactory(authority, userHints);
+    } else if (CSAuthorityFactory.class.equals(type)) {
+        factory = FactoryFinder.getCSAuthorityFactory(authority, userHints);
+    } else if (DatumAuthorityFactory.class.equals(type)) {
+        factory = FactoryFinder.getDatumAuthorityFactory(authority, userHints);
+    } else if (CoordinateOperationAuthorityFactory.class.equals(type)) {
+        factory = FactoryFinder.getCoordinateOperationAuthorityFactory(authority, userHints);
+    } else {
+        continue;
+    }
final AuthorityFactory factory;
+try {
+    if (CRSAuthorityFactory.class.equals(type)) {
+        factory = ReferencingFactoryFinder.getCRSAuthorityFactory(authority, userHints);
+    } else if (CSAuthorityFactory.class.equals(type)) {
+        factory = ReferencingFactoryFinder.getCSAuthorityFactory(authority, userHints);
+    } else if (DatumAuthorityFactory.class.equals(type)) {
+        factory = ReferencingFactoryFinder.getDatumAuthorityFactory(authority, userHints);
+    } else if (CoordinateOperationAuthorityFactory.class.equals(type)) {
+        factory = ReferencingFactoryFinder.getCoordinateOperationAuthorityFactory(authority, userHints);
+    } else {
+        continue;
+    }
done.add(this); // Safety for avoiding recursive calls.
+inProgress.set(Boolean.TRUE);
+try {
+    for (final Iterator it=FactoryFinder.getAuthorityNames().iterator(); it.hasNext();) {
+        final String authority = ((String) it.next()).trim();
+        final char separator = getSeparator(authority);
+        /*
done.add(this); // Safety for avoiding recursive calls.
+inProgress.set(Boolean.TRUE);
+try {
+    for (final Iterator it=ReferencingFactoryFinder.getAuthorityNames().iterator(); it.hasNext();) {
+        final String authority = ((String) it.next()).trim();
+        final char separator = getSeparator(authority);
+        /*
+
+ + Propchange: sis/ip-review/rev/25050/AllAuthoritiesFactory.xhtml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: sis/ip-review/rev/25050/AllAuthoritiesFactory.xhtml ------------------------------------------------------------------------------ svn:mime-type = text/html Added: sis/ip-review/rev/25050/AuthorityFactoryAdapter.xhtml URL: http://svn.apache.org/viewvc/sis/ip-review/rev/25050/AuthorityFactoryAdapter.xhtml?rev=1718599&view=auto ============================================================================== --- sis/ip-review/rev/25050/AuthorityFactoryAdapter.xhtml (added) +++ sis/ip-review/rev/25050/AuthorityFactoryAdapter.xhtml Tue Dec 8 13:33:15 2015 @@ -0,0 +1,53 @@ + + + + + AuthorityFactoryAdapter changes for revisions 25049:25050 + + + +
+

AuthorityFactoryAdapter changes for revisions 25049:25050

+

+ The only change in this commit is to rename FactoryFinder as ReferencingFactoryFinder. + However this change does not apply to SIS since we do not plan to port [Referencing]FactoryFinder. + The plan is to replace them by some dependency injection mechanism. +

+

Command line:

+
svn diff --extensions "--unified --ignore-space-change --ignore-all-space --ignore-eol-style" -r25049:25050 http://svn.osgeo.org/geotools/trunk/modules/library/referencing/src/main/java/org/geotools/referencing/factory/AuthorityFactoryAdapter.java
+ + + + + + +
Revision 25049Revision 25050
import org.geotools.factory.Factory;
+import org.geotools.factory.AbstractFactory;
+import org.geotools.factory.OptionalFactory;
+import org.geotools.referencing.FactoryFinder;
+import org.geotools.resources.i18n.Logging;
+import org.geotools.resources.i18n.LoggingKeys;
+import org.geotools.resources.i18n.ErrorKeys;
import org.geotools.factory.Factory;
+import org.geotools.factory.AbstractFactory;
+import org.geotools.factory.OptionalFactory;
+import org.geotools.referencing.ReferencingFactoryFinder;
+import org.geotools.resources.i18n.Logging;
+import org.geotools.resources.i18n.LoggingKeys;
+import org.geotools.resources.i18n.ErrorKeys;
            return (CoordinateOperationFactory) candidate;
+        }
+    }
+    return FactoryFinder.getCoordinateOperationFactory(hints());
+}
+
+/**
            return (CoordinateOperationFactory) candidate;
+        }
+    }
+    return ReferencingFactoryFinder.getCoordinateOperationFactory(hints());
+}
+
+/**
+
+ + Propchange: sis/ip-review/rev/25050/AuthorityFactoryAdapter.xhtml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: sis/ip-review/rev/25050/AuthorityFactoryAdapter.xhtml ------------------------------------------------------------------------------ svn:mime-type = text/html Added: sis/ip-review/rev/25050/DatumAliases.xhtml URL: http://svn.apache.org/viewvc/sis/ip-review/rev/25050/DatumAliases.xhtml?rev=1718599&view=auto ============================================================================== --- sis/ip-review/rev/25050/DatumAliases.xhtml (added) +++ sis/ip-review/rev/25050/DatumAliases.xhtml Tue Dec 8 13:33:15 2015 @@ -0,0 +1,61 @@ + + + + + DatumAliases changes for revisions 25049:25050 + + + +
+

DatumAliases changes for revisions 25049:25050

+

This class will not be ported to SIS.

+

Command line:

+
svn diff --extensions "--unified --ignore-space-change --ignore-all-space --ignore-eol-style" -r25049:25050 http://svn.osgeo.org/geotools/trunk/modules/library/referencing/src/main/java/org/geotools/referencing/factory/DatumAliases.java
+ + + + + + + + +
Revision 25049Revision 25050
import org.opengis.util.ScopedName;
+
+// Geotools dependencies
+import org.geotools.referencing.FactoryFinder;
+import org.geotools.referencing.AbstractIdentifiedObject;
+import org.geotools.referencing.datum.AbstractDatum;        // For javadoc
+import org.geotools.referencing.datum.BursaWolfParameters;  // For javadoc
import org.opengis.util.ScopedName;
+
+// Geotools dependencies
+import org.geotools.referencing.ReferencingFactoryFinder;
+import org.geotools.referencing.AbstractIdentifiedObject;
+import org.geotools.referencing.datum.AbstractDatum;        // For javadoc
+import org.geotools.referencing.datum.BursaWolfParameters;  // For javadoc
/**
+ * The underlying datum factory. If {@code null}, a default factory will be fetch
+ * from {@link FactoryFinder} when first needed. A default value can't be set at
+ * construction time, since all factories may not be registered at this time.
+ */
+private DatumFactory factory;
/**
+ * The underlying datum factory. If {@code null}, a default factory will be fetch
+ * from {@link ReferencingFactoryFinder} when first needed. A default value can't be set at
+ * construction time, since all factories may not be registered at this time.
+ */
+private DatumFactory factory;
assert Thread.holdsLock(this);
+if (factory == null) {
+    DatumFactory candidate;
+    final Iterator it = FactoryFinder.getDatumFactories(null).iterator();
+    do candidate = (DatumFactory) it.next();
+    while (candidate == this);
+    factory = candidate;
assert Thread.holdsLock(this);
+if (factory == null) {
+    DatumFactory candidate;
+    final Iterator it = ReferencingFactoryFinder.getDatumFactories(null).iterator();
+    do candidate = (DatumFactory) it.next();
+    while (candidate == this);
+    factory = candidate;
+
+ + Propchange: sis/ip-review/rev/25050/DatumAliases.xhtml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: sis/ip-review/rev/25050/DatumAliases.xhtml ------------------------------------------------------------------------------ svn:mime-type = text/html Added: sis/ip-review/rev/25050/ManyAuthoritiesFactory.xhtml URL: http://svn.apache.org/viewvc/sis/ip-review/rev/25050/ManyAuthoritiesFactory.xhtml?rev=1718599&view=auto ============================================================================== --- sis/ip-review/rev/25050/ManyAuthoritiesFactory.xhtml (added) +++ sis/ip-review/rev/25050/ManyAuthoritiesFactory.xhtml Tue Dec 8 13:33:15 2015 @@ -0,0 +1,169 @@ + + + + + ManyAuthoritiesFactory changes for revisions 25049:25050 + + + +
+

ManyAuthoritiesFactory changes for revisions 25049:25050

+

+ The only change in this commit is to rename FactoryFinder as ReferencingFactoryFinder. + However this change does not apply to SIS since we do not plan to port [Referencing]FactoryFinder. + The plan is to replace them by some dependency injection mechanism. +

+

Command line:

+
svn diff --extensions "--unified --ignore-space-change --ignore-all-space --ignore-eol-style" -r25049:25050 http://svn.osgeo.org/geotools/trunk/modules/library/referencing/src/main/java/org/geotools/referencing/factory/ManyAuthoritiesFactory.java
+ + + + + + + + + + + + + + + + + + + + +
Revision 25049Revision 25050
import org.geotools.factory.Hints;
+import org.geotools.factory.Factory;
+import org.geotools.factory.FactoryRegistryException;
+import org.geotools.referencing.FactoryFinder;
+import org.geotools.metadata.iso.citation.Citations;
+import org.geotools.metadata.iso.citation.CitationImpl;
+import org.geotools.util.GenericName;
import org.geotools.factory.Hints;
+import org.geotools.factory.Factory;
+import org.geotools.factory.FactoryRegistryException;
+import org.geotools.referencing.ReferencingFactoryFinder;
+import org.geotools.metadata.iso.citation.Citations;
+import org.geotools.metadata.iso.citation.CitationImpl;
+import org.geotools.util.GenericName;
* This class parses the authority name and delegates the work the corresponding factory. For
+* example if any {@code createFoo(...)} method in this class is invoked with a code starting
+* by {@code "EPSG:"}, then this class delegates the object creation to the authority factory
+* provided by <code>FactoryFinder.{@linkplain FactoryFinder#getCRSAuthorityFactory
+* getCRSAuthorityFactory}("EPSG", hints)</code>.
+* <p>
+* This class is not registered in {@link FactoryFinder}, because it is not a real authority
+* factory. There is not a single authority name associated to this factory, but rather a set
+* of names determined from all available authority factories. If this "authority" factory is
+* wanted, then users need to refer explicitly to the {@link #DEFAULT} constant or to create
* This class parses the authority name and delegates the work the corresponding factory. For
+* example if any {@code createFoo(...)} method in this class is invoked with a code starting
+* by {@code "EPSG:"}, then this class delegates the object creation to the authority factory
+* provided by <code>FactoryFinder.{@linkplain ReferencingFactoryFinder#getCRSAuthorityFactory
+* getCRSAuthorityFactory}("EPSG", hints)</code>.
+* <p>
+* This class is not registered in {@link ReferencingFactoryFinder}, because it is not a real authority
+* factory. There is not a single authority name associated to this factory, but rather a set
+* of names determined from all available authority factories. If this "authority" factory is
+* wanted, then users need to refer explicitly to the {@link #DEFAULT} constant or to create
};
+
+/**
+ * A set of user-specified factories to try before to delegate to {@link FactoryFinder},
+ * or {@code null} if none.
+ */
+private final Collection/*<AuthorityFactory>*/ factories;
};
+
+/**
+ * A set of user-specified factories to try before to delegate to {@link ReferencingFactoryFinder},
+ * or {@code null} if none.
+ */
+private final Collection/*<AuthorityFactory>*/ factories;
* first scan the supplied factories in their iteration order. The first factory implementing
+* the appropriate interface and having the expected {@linkplain AuthorityFactory#getAuthority
+* authority name} will be used. Only if no suitable factory is found, then this class delegates
+* to {@link FactoryFinder}.
+* <p>
+* If the {@code factories} collection contains more than one factory for the same authority
+* and interface, then all additional factories will be {@linkplain FallbackAuthorityFactory
* first scan the supplied factories in their iteration order. The first factory implementing
+* the appropriate interface and having the expected {@linkplain AuthorityFactory#getAuthority
+* authority name} will be used. Only if no suitable factory is found, then this class delegates
+* to {@link ReferencingFactoryFinder}.
+* <p>
+* If the {@code factories} collection contains more than one factory for the same authority
+* and interface, then all additional factories will be {@linkplain FallbackAuthorityFactory
 *
+ * @param hints An optional set of hints, or {@code null} if none.
+ * @param factories A set of user-specified factories to try before to delegate
+ *        to {@link FactoryFinder}, or {@code null} if none.
+ */
+public AllAuthoritiesFactory(final Hints hints,
+                             final Collection/*<? extends AuthorityFactory>*/ factories)
 *
+ * @param hints An optional set of hints, or {@code null} if none.
+ * @param factories A set of user-specified factories to try before to delegate
+ *        to {@link ReferencingFactoryFinder}, or {@code null} if none.
+ */
+public AllAuthoritiesFactory(final Hints hints,
+                             final Collection/*<? extends AuthorityFactory>*/ factories)
*
+* @param hints An optional set of hints, or {@code null} if none.
+* @param factories A set of user-specified factories to try before to delegate
+*        to {@link FactoryFinder}, or {@code null} if none.
+* @param separator The separator between the authority name and the code.
+*
+* @deprecated Override the {@link #getSeparator} method instead.
*
+* @param hints An optional set of hints, or {@code null} if none.
+* @param factories A set of user-specified factories to try before to delegate
+*        to {@link ReferencingFactoryFinder}, or {@code null} if none.
+* @param separator The separator between the authority name and the code.
+*
+* @deprecated Override the {@link #getSeparator} method instead.
/**
+ * Searchs for a factory of the given type. This method first search in user-supplied
+ * factories. If no user factory is found, then this method request for a factory using
+ * {@link FactoryFinder}. The authority name is inferred from the specified code.
+ *
+ * @param  type The interface to be implemented.
+ * @param  code The code of the object to create.
/**
+ * Searchs for a factory of the given type. This method first search in user-supplied
+ * factories. If no user factory is found, then this method request for a factory using
+ * {@link ReferencingFactoryFinder}. The authority name is inferred from the specified code.
+ *
+ * @param  type The interface to be implemented.
+ * @param  code The code of the object to create.
final AuthorityFactory factory;
+try {
+    if (CRSAuthorityFactory.class.equals(type)) {
+        factory = FactoryFinder.getCRSAuthorityFactory(authority, userHints);
+    } else if (CSAuthorityFactory.class.equals(type)) {
+        factory = FactoryFinder.getCSAuthorityFactory(authority, userHints);
+    } else if (DatumAuthorityFactory.class.equals(type)) {
+        factory = FactoryFinder.getDatumAuthorityFactory(authority, userHints);
+    } else if (CoordinateOperationAuthorityFactory.class.equals(type)) {
+        factory = FactoryFinder.getCoordinateOperationAuthorityFactory(authority, userHints);
+    } else {
+        continue;
+    }
final AuthorityFactory factory;
+try {
+    if (CRSAuthorityFactory.class.equals(type)) {
+        factory = ReferencingFactoryFinder.getCRSAuthorityFactory(authority, userHints);
+    } else if (CSAuthorityFactory.class.equals(type)) {
+        factory = ReferencingFactoryFinder.getCSAuthorityFactory(authority, userHints);
+    } else if (DatumAuthorityFactory.class.equals(type)) {
+        factory = ReferencingFactoryFinder.getDatumAuthorityFactory(authority, userHints);
+    } else if (CoordinateOperationAuthorityFactory.class.equals(type)) {
+        factory = ReferencingFactoryFinder.getCoordinateOperationAuthorityFactory(authority, userHints);
+    } else {
+        continue;
+    }
done.add(this); // Safety for avoiding recursive calls.
+inProgress.set(Boolean.TRUE);
+try {
+    for (final Iterator it=FactoryFinder.getAuthorityNames().iterator(); it.hasNext();) {
+        final String authority = ((String) it.next()).trim();
+        final char separator = getSeparator(authority);
+        /*
done.add(this); // Safety for avoiding recursive calls.
+inProgress.set(Boolean.TRUE);
+try {
+    for (final Iterator it=ReferencingFactoryFinder.getAuthorityNames().iterator(); it.hasNext();) {
+        final String authority = ((String) it.next()).trim();
+        final char separator = getSeparator(authority);
+        /*
+
+ + Propchange: sis/ip-review/rev/25050/ManyAuthoritiesFactory.xhtml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: sis/ip-review/rev/25050/ManyAuthoritiesFactory.xhtml ------------------------------------------------------------------------------ svn:mime-type = text/html Added: sis/ip-review/rev/25050/OrderedAxisAuthorityFactory.xhtml URL: http://svn.apache.org/viewvc/sis/ip-review/rev/25050/OrderedAxisAuthorityFactory.xhtml?rev=1718599&view=auto ============================================================================== --- sis/ip-review/rev/25050/OrderedAxisAuthorityFactory.xhtml (added) +++ sis/ip-review/rev/25050/OrderedAxisAuthorityFactory.xhtml Tue Dec 8 13:33:15 2015 @@ -0,0 +1,77 @@ + + + + + OrderedAxisAuthorityFactory changes for revisions 25049:25050 + + + +
+

OrderedAxisAuthorityFactory changes for revisions 25049:25050

+

+ The only change in this commit is to rename FactoryFinder as ReferencingFactoryFinder. + However this change does not apply to SIS since we do not plan to port [Referencing]FactoryFinder. + The plan is to replace them by some dependency injection mechanism. +

+

Command line:

+
svn diff --extensions "--unified --ignore-space-change --ignore-all-space --ignore-eol-style" -r25049:25050 http://svn.osgeo.org/geotools/trunk/modules/library/referencing/src/main/java/org/geotools/referencing/factory/OrderedAxisAuthorityFactory.java
+ + + + + + + + +
Revision 25049Revision 25050
// Geotools dependencies
+import org.geotools.factory.Hints;
+import org.geotools.factory.FactoryRegistryException;
+import org.geotools.referencing.FactoryFinder;
+import org.geotools.referencing.cs.DefaultCoordinateSystemAxis;
+import org.geotools.resources.i18n.Errors;
+import org.geotools.resources.i18n.ErrorKeys;
// Geotools dependencies
+import org.geotools.factory.Hints;
+import org.geotools.factory.FactoryRegistryException;
+import org.geotools.referencing.ReferencingFactoryFinder;
+import org.geotools.referencing.cs.DefaultCoordinateSystemAxis;
+import org.geotools.resources.i18n.Errors;
+import org.geotools.resources.i18n.ErrorKeys;
* <p>
+* For some authority factories, an instance of this class can be obtained by passing a
+* {@link Hints#FORCE_LONGITUDE_FIRST_AXIS_ORDER FORCE_LONGITUDE_FIRST_AXIS_ORDER} hint
+* to the <code>{@linkplain FactoryFinder#getCRSAuthorityFactory
+* FactoryFinder.getCRSAuthorityFactory}(...)</code> method. Whatever this hint is supported
+* or not is authority dependent. Example:
+*
* <p>
+* For some authority factories, an instance of this class can be obtained by passing a
+* {@link Hints#FORCE_LONGITUDE_FIRST_AXIS_ORDER FORCE_LONGITUDE_FIRST_AXIS_ORDER} hint
+* to the <code>{@linkplain ReferencingFactoryFinder#getCRSAuthorityFactory
+* FactoryFinder.getCRSAuthorityFactory}(...)</code> method. Whatever this hint is supported
+* or not is authority dependent. Example:
+*
/**
+ * Creates a factory which will reorder the axis of all objects created by the default
+ * authority factories. The factories are fetched using {@link FactoryFinder}. This
+ * constructor accepts the following hints:
+ * <p>
+ * <ul>
+ *   <li>{@link Hints#FORCE_STANDARD_AXIS_UNITS}</li>
+ *   <li>{@link Hints#FORCE_STANDARD_AXIS_DIRECTIONS}</li>
+ *   <li>All hints understood by {@link FactoryFinder}</li>
+ * </ul>
+ *
+ * @param  authority The authority to wraps (example: {@code "EPSG"}). If {@code null},
/**
+ * Creates a factory which will reorder the axis of all objects created by the default
+ * authority factories. The factories are fetched using {@link ReferencingFactoryFinder}. This
+ * constructor accepts the following hints:
+ * <p>
+ * <ul>
+ *   <li>{@link Hints#FORCE_STANDARD_AXIS_UNITS}</li>
+ *   <li>{@link Hints#FORCE_STANDARD_AXIS_DIRECTIONS}</li>
+ *   <li>All hints understood by {@link ReferencingFactoryFinder}</li>
+ * </ul>
+ *
+ * @param  authority The authority to wraps (example: {@code "EPSG"}). If {@code null},
+
+ + Propchange: sis/ip-review/rev/25050/OrderedAxisAuthorityFactory.xhtml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: sis/ip-review/rev/25050/OrderedAxisAuthorityFactory.xhtml ------------------------------------------------------------------------------ svn:mime-type = text/html Added: sis/ip-review/rev/25050/TransformedAuthorityFactory.xhtml URL: http://svn.apache.org/viewvc/sis/ip-review/rev/25050/TransformedAuthorityFactory.xhtml?rev=1718599&view=auto ============================================================================== --- sis/ip-review/rev/25050/TransformedAuthorityFactory.xhtml (added) +++ sis/ip-review/rev/25050/TransformedAuthorityFactory.xhtml Tue Dec 8 13:33:15 2015 @@ -0,0 +1,89 @@ + + + + + TransformedAuthorityFactory changes for revisions 25049:25050 + + + +
+

TransformedAuthorityFactory changes for revisions 25049:25050

+

+ The only change in this commit is to rename FactoryFinder as ReferencingFactoryFinder. + However this change does not apply to SIS since we do not plan to port [Referencing]FactoryFinder. + The plan is to replace them by some dependency injection mechanism. +

+

Command line:

+
svn diff --extensions "--unified --ignore-space-change --ignore-all-space --ignore-eol-style" -r25049:25050 http://svn.osgeo.org/geotools/trunk/modules/library/referencing/src/main/java/org/geotools/referencing/factory/TransformedAuthorityFactory.java
+ + + + + + + + +
Revision 25049Revision 25050
import org.geotools.factory.Hints;
+import org.geotools.factory.Factory;
+import org.geotools.factory.FactoryRegistryException;
+import org.geotools.referencing.FactoryFinder;
+import org.geotools.referencing.AbstractIdentifiedObject;
+import org.geotools.referencing.operation.DefiningConversion;
+import org.geotools.referencing.cs.DefaultCoordinateSystemAxis;
import org.geotools.factory.Hints;
+import org.geotools.factory.Factory;
+import org.geotools.factory.FactoryRegistryException;
+import org.geotools.referencing.ReferencingFactoryFinder;
+import org.geotools.referencing.AbstractIdentifiedObject;
+import org.geotools.referencing.operation.DefiningConversion;
+import org.geotools.referencing.cs.DefaultCoordinateSystemAxis;
/**
+ * Creates a wrappers around the default factories for the specified
+ * authority. The factories are fetched using {@link FactoryFinder}.
+ * <p>
+ * <strong>WARNING:</strong> Do not invoke this constructor from a subclass
+ * to be registered in a {@code META-INF/services/} file for use by
+ * {@link FactoryFinder}. It may lead to recursive calls until a
+ * {@link StackOverflowError} is thrown.
+ *
+ * @param authority The authority to wraps (example: {@code "EPSG"}). If {@code null},
/**
+ * Creates a wrappers around the default factories for the specified
+ * authority. The factories are fetched using {@link ReferencingFactoryFinder}.
+ * <p>
+ * <strong>WARNING:</strong> Do not invoke this constructor from a subclass
+ * to be registered in a {@code META-INF/services/} file for use by
+ * {@link ReferencingFactoryFinder}. It may lead to recursive calls until a
+ * {@link StackOverflowError} is thrown.
+ *
+ * @param authority The authority to wraps (example: {@code "EPSG"}). If {@code null},
TransformedAuthorityFactory(final String authority, final Hints hints)
+        throws FactoryRegistryException
+{
+    super(FactoryFinder.getCRSAuthorityFactory                (authority, hints),
+          FactoryFinder.getCSAuthorityFactory                 (authority, hints),
+          FactoryFinder.getDatumAuthorityFactory              (authority, hints),
+          FactoryFinder.getCoordinateOperationAuthorityFactory(authority, hints));
+}
+
+/**
+ * Returns the priority for this factory. Priorities are used by
+ * {@link FactoryFinder} for selecting a preferred factory when many are
+ * found for the same service. The default implementation returns
+ * <code>{@linkplain #priority priority} + 1</code>, which implies that
+ * this adapter has precedence over the wrapped factories. Subclasses should
TransformedAuthorityFactory(final String authority, final Hints hints)
+        throws FactoryRegistryException
+{
+    super(ReferencingFactoryFinder.getCRSAuthorityFactory                (authority, hints),
+          ReferencingFactoryFinder.getCSAuthorityFactory                 (authority, hints),
+          ReferencingFactoryFinder.getDatumAuthorityFactory              (authority, hints),
+          ReferencingFactoryFinder.getCoordinateOperationAuthorityFactory(authority, hints));
+}
+
+/**
+ * Returns the priority for this factory. Priorities are used by
+ * {@link ReferencingFactoryFinder} for selecting a preferred factory when many are
+ * found for the same service. The default implementation returns
+ * <code>{@linkplain #priority priority} + 1</code>, which implies that
+ * this adapter has precedence over the wrapped factories. Subclasses should
+
+ + Propchange: sis/ip-review/rev/25050/TransformedAuthorityFactory.xhtml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: sis/ip-review/rev/25050/TransformedAuthorityFactory.xhtml ------------------------------------------------------------------------------ svn:mime-type = text/html Added: sis/ip-review/rev/25050/URN_AuthorityFactory.xhtml URL: http://svn.apache.org/viewvc/sis/ip-review/rev/25050/URN_AuthorityFactory.xhtml?rev=1718599&view=auto ============================================================================== --- sis/ip-review/rev/25050/URN_AuthorityFactory.xhtml (added) +++ sis/ip-review/rev/25050/URN_AuthorityFactory.xhtml Tue Dec 8 13:33:15 2015 @@ -0,0 +1,37 @@ + + + + + URN_AuthorityFactory changes for revisions 25049:25050 + + + +
+

URN_AuthorityFactory changes for revisions 25049:25050

+

This class will not be ported to SIS. Experience has shown that attempts to handle HTTP and URN factories + as AuthorityFactory was more a source of complications than conveniences.

+ +

Command line:

+
svn diff --extensions "--unified --ignore-space-change --ignore-all-space --ignore-eol-style" -r25049:25050 http://svn.osgeo.org/geotools/trunk/modules/library/referencing/src/main/java/org/geotools/referencing/factory/URN_AuthorityFactory.java
+ + + + +
Revision 25049Revision 25050
* name space. An exemple of complete URN is {@code "urn:ogc:def:crs:EPSG:6.8:4326"}.
+* <p>
+* Users don't need to create an instance of this class, since one is automatically
+* registered for use in {@link org.opengis.referencing.FactoryFinder}.
+*
+* @since 2.4
+* @source $URL$
* name space. An exemple of complete URN is {@code "urn:ogc:def:crs:EPSG:6.8:4326"}.
+* <p>
+* Users don't need to create an instance of this class, since one is automatically
+* registered for use in {@link org.opengis.referencing.ReferencingFactoryFinder}.
+*
+* @since 2.4
+* @source $URL$
+
+ + Propchange: sis/ip-review/rev/25050/URN_AuthorityFactory.xhtml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: sis/ip-review/rev/25050/URN_AuthorityFactory.xhtml ------------------------------------------------------------------------------ svn:mime-type = text/html Added: sis/ip-review/rev/25916/CachingAuthorityFactory.xhtml URL: http://svn.apache.org/viewvc/sis/ip-review/rev/25916/CachingAuthorityFactory.xhtml?rev=1718599&view=auto ============================================================================== --- sis/ip-review/rev/25916/CachingAuthorityFactory.xhtml (added) +++ sis/ip-review/rev/25916/CachingAuthorityFactory.xhtml Tue Dec 8 13:33:15 2015 @@ -0,0 +1,21 @@ + + + + + CachingAuthorityFactory changes for revisions 25895:25916 + + + +
+

CachingAuthorityFactory changes for revisions 25895:25916

+

Changes reverted.

+

Command line:

+
svn diff --extensions "--unified --ignore-space-change --ignore-all-space --ignore-eol-style" -r25895:25916 http://svn.osgeo.org/geotools/trunk/modules/library/referencing/src/main/java/org/geotools/referencing/factory/BufferedAuthorityFactory.java
+ + +
Revision 25895Revision 25916
+
+ + Propchange: sis/ip-review/rev/25916/CachingAuthorityFactory.xhtml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: sis/ip-review/rev/25916/CachingAuthorityFactory.xhtml ------------------------------------------------------------------------------ svn:mime-type = text/html Added: sis/ip-review/rev/25916/HEADER.html URL: http://svn.apache.org/viewvc/sis/ip-review/rev/25916/HEADER.html?rev=1718599&view=auto ============================================================================== --- sis/ip-review/rev/25916/HEADER.html (added) +++ sis/ip-review/rev/25916/HEADER.html Tue Dec 8 13:33:15 2015 @@ -0,0 +1,17 @@ + + + + + Revision 25916 + + +
+

Revision 25916

+ + + + +
Author:jgarnett
Date:2007-06-19
Message:rollback so I can svn mv like a normal person; this will break the build
+
+ + Propchange: sis/ip-review/rev/25916/HEADER.html ------------------------------------------------------------------------------ svn:eol-style = native Propchange: sis/ip-review/rev/25916/HEADER.html ------------------------------------------------------------------------------ svn:mime-type = text/html Added: sis/ip-review/rev/25916/ThreadedAuthorityFactory.xhtml URL: http://svn.apache.org/viewvc/sis/ip-review/rev/25916/ThreadedAuthorityFactory.xhtml?rev=1718599&view=auto ============================================================================== --- sis/ip-review/rev/25916/ThreadedAuthorityFactory.xhtml (added) +++ sis/ip-review/rev/25916/ThreadedAuthorityFactory.xhtml Tue Dec 8 13:33:15 2015 @@ -0,0 +1,21 @@ + + + + + ThreadedAuthorityFactory changes for revisions 25895:25916 + + + +
+

ThreadedAuthorityFactory changes for revisions 25895:25916

+

Changes reverted.

+

Command line:

+
svn diff --extensions "--unified --ignore-space-change --ignore-all-space --ignore-eol-style" -r25895:25916 http://svn.osgeo.org/geotools/trunk/modules/library/referencing/src/main/java/org/geotools/referencing/factory/ThreadedAuthorityFactory.java
+ + +
Revision 25895Revision 25916
+
+ + Propchange: sis/ip-review/rev/25916/ThreadedAuthorityFactory.xhtml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: sis/ip-review/rev/25916/ThreadedAuthorityFactory.xhtml ------------------------------------------------------------------------------ svn:mime-type = text/html Added: sis/ip-review/rev/25919/DeferredAuthorityFactory.xhtml URL: http://svn.apache.org/viewvc/sis/ip-review/rev/25919/DeferredAuthorityFactory.xhtml?rev=1718599&view=auto ============================================================================== --- sis/ip-review/rev/25919/DeferredAuthorityFactory.xhtml (added) +++ sis/ip-review/rev/25919/DeferredAuthorityFactory.xhtml Tue Dec 8 13:33:15 2015 @@ -0,0 +1,36 @@ + + + + + DeferredAuthorityFactory changes for revisions 25895:25919 + + + +
+

DeferredAuthorityFactory changes for revisions 25895:25919

+

This change does not apply to SIS.

+ +

Command line:

+
svn diff --extensions "--unified --ignore-space-change --ignore-all-space --ignore-eol-style" -r25895:25919 http://svn.osgeo.org/geotools/trunk/modules/library/referencing/src/main/java/org/geotools/referencing/factory/DeferredAuthorityFactory.java
+ + + + +
Revision 25895Revision 25919
 * @version $Id$
+ * @author Martin Desruisseaux
+ */
+public abstract class DeferredAuthorityFactory extends BufferedAuthorityFactory
+                                            implements OptionalFactory
+{
+    /**
 * @version $Id$
+ * @author Martin Desruisseaux
+ */
+public abstract class DeferredAuthorityFactory extends ThreadedAuthorityFactory
+                                            implements OptionalFactory
+{
+    /**
+
+ + Propchange: sis/ip-review/rev/25919/DeferredAuthorityFactory.xhtml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: sis/ip-review/rev/25919/DeferredAuthorityFactory.xhtml ------------------------------------------------------------------------------ svn:mime-type = text/html Added: sis/ip-review/rev/25919/HEADER.html URL: http://svn.apache.org/viewvc/sis/ip-review/rev/25919/HEADER.html?rev=1718599&view=auto ============================================================================== --- sis/ip-review/rev/25919/HEADER.html (added) +++ sis/ip-review/rev/25919/HEADER.html Tue Dec 8 13:33:15 2015 @@ -0,0 +1,17 @@ + + + + + Revision 25919 + + +
+

Revision 25919

+ + + + +
Author:jgarnett
Date:2007-06-19
Message:juggle the code back into place
+
+ + Propchange: sis/ip-review/rev/25919/HEADER.html ------------------------------------------------------------------------------ svn:eol-style = native Propchange: sis/ip-review/rev/25919/HEADER.html ------------------------------------------------------------------------------ svn:mime-type = text/html Added: sis/ip-review/rev/25940/AuthorityFactoryAdapter.xhtml URL: http://svn.apache.org/viewvc/sis/ip-review/rev/25940/AuthorityFactoryAdapter.xhtml?rev=1718599&view=auto ============================================================================== --- sis/ip-review/rev/25940/AuthorityFactoryAdapter.xhtml (added) +++ sis/ip-review/rev/25940/AuthorityFactoryAdapter.xhtml Tue Dec 8 13:33:15 2015 @@ -0,0 +1,67 @@ + + + + + AuthorityFactoryAdapter changes for revisions 25939:25940 + + + +
+

AuthorityFactoryAdapter changes for revisions 25939:25940

+

+ The only change in this commit is to rename FactoryGroup as ReferencingFactoryContainer. + This change does not apply to SIS since we will try to avoid that ReferencingFactoryContainer class, + or find another name. +

+

Command line:

+
svn diff --extensions "--unified --ignore-space-change --ignore-all-space --ignore-eol-style" -r25939:25940 http://svn.osgeo.org/geotools/trunk/modules/library/referencing/src/main/java/org/geotools/referencing/factory/AuthorityFactoryAdapter.java
+ + + + + + + + +
Revision 25939Revision 25940
 *
+ * @see #getFactoryGroup
+ */
+private transient FactoryGroup factories;
+
+/**
+ * Creates a wrapper around no factory. This constructor should never be used except by
 *
+ * @see #getFactoryGroup
+ */
+private transient ReferencingFactoryContainer factories;
+
+/**
+ * Creates a wrapper around no factory. This constructor should never be used except by
 * {@link TransformedAuthorityFactory} that need low-level access to factories. Do not change
+ * this method into a public one; we would need a better API before to do such thing.
+ */
+final FactoryGroup getFactoryGroup(final boolean crs) {
+    final AuthorityFactory factory;
+    if (crs) {
+        factory = crsFactory;
 * {@link TransformedAuthorityFactory} that need low-level access to factories. Do not change
+ * this method into a public one; we would need a better API before to do such thing.
+ */
+final ReferencingFactoryContainer getFactoryGroup(final boolean crs) {
+    final AuthorityFactory factory;
+    if (crs) {
+        factory = crsFactory;
    }
+    // No predefined factory group. Create one.
+    if (factories == null) {
+        factories = FactoryGroup.createInstance(hints());
+    }
+    return factories;
+}
    }
+    // No predefined factory group. Create one.
+    if (factories == null) {
+        factories = ReferencingFactoryContainer.instance(hints());
+    }
+    return factories;
+}
+
+ + Propchange: sis/ip-review/rev/25940/AuthorityFactoryAdapter.xhtml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: sis/ip-review/rev/25940/AuthorityFactoryAdapter.xhtml ------------------------------------------------------------------------------ svn:mime-type = text/html