/** * Returns the coordinate system factory to use for the specified URI. If the URI contains a * version string, then this method will try to fetch a factory for that particular version. The * {@link #createVersionedFactory} method may be invoked for that purpose. If no factory is * provided for that specific version, then the {@linkplain * AuthorityFactoryAdapter#getCSAuthorityFactory default one} is used. * * @param code The URI given to this class. * @return A factory for the specified URI (never {@code null}). * @throws FactoryException if no coordinate system factory is available. */ @Override protected CSAuthorityFactory getCSAuthorityFactory(final String code) throws FactoryException { if (code != null) { final URI_Parser parser = getParser(code); parser.logWarningIfTypeMismatch(this, CSAuthorityFactory.class); final AuthorityFactory factory = getVersionedFactory(parser); if (factory instanceof CSAuthorityFactory) { return (CSAuthorityFactory) factory; } } return super.getCSAuthorityFactory(code); }
/** * Returns the coordinate reference system factory to use for the specified URI. If the URI * contains a version string, then this method will try to fetch a factory for that particular * version. The {@link #createVersionedFactory} method may be invoked for that purpose. If no * factory is provided for that specific version, then the {@linkplain * AuthorityFactoryAdapter#getCRSAuthorityFactory default one} is used. * * @param code The URI given to this class. * @return A factory for the specified URI (never {@code null}). * @throws FactoryException if no coordinate reference system factory is available. */ @Override protected CRSAuthorityFactory getCRSAuthorityFactory(final String code) throws FactoryException { if (code != null) { final URI_Parser parser = getParser(code); parser.logWarningIfTypeMismatch(this, CRSAuthorityFactory.class); final AuthorityFactory factory = getVersionedFactory(parser); if (factory instanceof CRSAuthorityFactory) { return (CRSAuthorityFactory) factory; } } return super.getCRSAuthorityFactory(code); }
/** * Returns the coordinate operation factory to use for the specified URI. If the URI contains a * version string, then this method will try to fetch a factory for that particular version. The * {@link #createVersionedFactory} method may be invoked for that purpose. If no factory is * provided for that specific version, then the {@linkplain * AuthorityFactoryAdapter#getCoordinateOperationAuthorityFactory default one} is used. * * @param code The URI given to this class. * @return A factory for the specified URI (never {@code null}). * @throws FactoryException if no coordinate operation factory is available. */ @Override protected CoordinateOperationAuthorityFactory getCoordinateOperationAuthorityFactory( final String code) throws FactoryException { if (code != null) { final URI_Parser parser = getParser(code); parser.logWarningIfTypeMismatch(this, CoordinateOperationAuthorityFactory.class); final AuthorityFactory factory = getVersionedFactory(parser); if (factory instanceof CoordinateOperationAuthorityFactory) { return (CoordinateOperationAuthorityFactory) factory; } } return super.getCoordinateOperationAuthorityFactory(code); }
/** * Returns the datum factory to use for the specified URI. If the URI contains a version string, * then this method will try to fetch a factory for that particular version. The {@link * #createVersionedFactory} method may be invoked for that purpose. If no factory is provided * for that specific version, then the {@linkplain * AuthorityFactoryAdapter#getDatumAuthorityFactory default one} is used. * * @param code The URI given to this class. * @return A factory for the specified URI (never {@code null}). * @throws FactoryException if no datum factory is available. */ @Override protected DatumAuthorityFactory getDatumAuthorityFactory(final String code) throws FactoryException { if (code != null) { final URI_Parser parser = getParser(code); parser.logWarningIfTypeMismatch(this, DatumAuthorityFactory.class); final AuthorityFactory factory = getVersionedFactory(parser); if (factory instanceof DatumAuthorityFactory) { return (DatumAuthorityFactory) factory; } } return super.getDatumAuthorityFactory(code); }