@Test public void testCRS() throws FactoryException { CRSAuthorityFactory factory = ReferencingFactoryFinder.getCRSAuthorityFactory("URN:OGC:DEF", null); GeographicCRS crs; try { crs = factory.createGeographicCRS("CRS:84"); fail(); } catch (NoSuchAuthorityCodeException exception) { assertEquals("CRS:84", exception.getAuthorityCode()); } crs = factory.createGeographicCRS("urn:ogc:def:crs:CRS:WMS1.3:84"); assertSame(crs, factory.createGeographicCRS("urn:ogc:def:crs:CRS:1.3:84")); assertSame(crs, factory.createGeographicCRS("URN:OGC:DEF:CRS:CRS:1.3:84")); assertSame(crs, factory.createGeographicCRS("URN:OGC:DEF:CRS:CRS:84")); assertSame(crs, factory.createGeographicCRS("urn:x-ogc:def:crs:CRS:1.3:84")); assertSame(crs, CRS.decode("urn:ogc:def:crs:CRS:1.3:84")); assertSame(crs, CRS.decode("CRS:84")); assertNotSame(crs, DefaultGeographicCRS.WGS84); assertFalse(DefaultGeographicCRS.WGS84.equals(crs)); assertTrue(CRS.equalsIgnoreMetadata(DefaultGeographicCRS.WGS84, crs)); crs = factory.createGeographicCRS("urn:ogc:def:crs:CRS:1.3:83"); assertSame(crs, CRS.decode("CRS:83")); assertFalse(CRS.equalsIgnoreMetadata(DefaultGeographicCRS.WGS84, crs)); }
@Override protected CRSAuthorityFactory getCRSAuthorityFactory(final String code) throws FactoryException { if (code != null) { final URN_Parser parser = getParser(code); parser.logWarningIfTypeMismatch(CRSAuthorityFactory.class); final AuthorityFactory factory = getVersionedFactory(parser); if (factory instanceof CRSAuthorityFactory) { return (CRSAuthorityFactory) factory; } } return super.getCRSAuthorityFactory(code); }
URN_AuthorityFactory extends AuthorityFactoryAdapter implements CRSAuthorityFactory,
        CSAuthorityFactory, DatumAuthorityFactory, CoordinateOperationAuthorityFactory { @Override protected CRSAuthorityFactory getCRSAuthorityFactory(final String code) throws FactoryException { if (code != null) { final URN_Parser parser = getParser(code); parser.logWarningIfTypeMismatch(CRSAuthorityFactory.class); final AuthorityFactory factory = getVersionedFactory(parser); if (factory instanceof CRSAuthorityFactory) { return (CRSAuthorityFactory) factory; } } return super.getCRSAuthorityFactory(code); } }
URN_AuthorityFactory extends AuthorityFactoryAdapter implements CRSAuthorityFactory,
        CSAuthorityFactory, DatumAuthorityFactory, CoordinateOperationAuthorityFactory { @Override protected CRSAuthorityFactory getCRSAuthorityFactory(final String code) throws FactoryException { if (code != null) { final URN_Parser parser = getParser(code); parser.logWarningIfTypeMismatch(CRSAuthorityFactory.class); final AuthorityFactory factory = getVersionedFactory(parser); if (factory instanceof CRSAuthorityFactory) { return (CRSAuthorityFactory) factory; } } return super.getCRSAuthorityFactory(code); } URN_AuthorityFactory();  URN_AuthorityFactory(final Hints userHints);  URN_AuthorityFactory(final AllAuthoritiesFactory factory); }
URN_AuthorityFactory extends AuthorityFactoryAdapter implements CRSAuthorityFactory,
        CSAuthorityFactory, DatumAuthorityFactory, CoordinateOperationAuthorityFactory { @Override protected CRSAuthorityFactory getCRSAuthorityFactory(final String code) throws FactoryException { if (code != null) { final URN_Parser parser = getParser(code); parser.logWarningIfTypeMismatch(CRSAuthorityFactory.class); final AuthorityFactory factory = getVersionedFactory(parser); if (factory instanceof CRSAuthorityFactory) { return (CRSAuthorityFactory) factory; } } return super.getCRSAuthorityFactory(code); } URN_AuthorityFactory();  URN_AuthorityFactory(final Hints userHints);  URN_AuthorityFactory(final AllAuthoritiesFactory factory); @Override Citation getAuthority(); }
URN_AuthorityFactory extends AuthorityFactoryAdapter implements CRSAuthorityFactory,
        CSAuthorityFactory, DatumAuthorityFactory, CoordinateOperationAuthorityFactory { @Override protected CRSAuthorityFactory getCRSAuthorityFactory(final String code) throws FactoryException { if (code != null) { final URN_Parser parser = getParser(code); parser.logWarningIfTypeMismatch(CRSAuthorityFactory.class); final AuthorityFactory factory = getVersionedFactory(parser); if (factory instanceof CRSAuthorityFactory) { return (CRSAuthorityFactory) factory; } } return super.getCRSAuthorityFactory(code); } URN_AuthorityFactory();  URN_AuthorityFactory(final Hints userHints);  URN_AuthorityFactory(final AllAuthoritiesFactory factory); @Override Citation getAuthority();  }