@Test public void testWhenForceXY() throws FactoryException { try { Hints.putSystemDefault(Hints.FORCE_AXIS_ORDER_HONORING, "http"); Hints.putSystemDefault(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER, Boolean.TRUE); try { ReferencingFactoryFinder.getCRSAuthorityFactory("URN:OGC:DEF", null); fail("URN factory should not accept FORCE_LONGITUDE_FIRST_AXIS_ORDER = TRUE"); } catch (FactoryNotFoundException e) { } CoordinateReferenceSystem crs = CRS.decode("URN:OGC:DEF:CRS:CRS:84", true); assertTrue(CRS.equalsIgnoreMetadata(DefaultGeographicCRS.WGS84, crs)); crs = CRS.decode("URN:OGC:DEF:CRS:CRS:84"); assertTrue(CRS.equalsIgnoreMetadata(DefaultGeographicCRS.WGS84, crs)); } finally { Hints.removeSystemDefault(Hints.FORCE_AXIS_ORDER_HONORING); Hints.removeSystemDefault(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER); } }
@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();  }