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 https://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