@Test public void testFind() throws FactoryException { final AbstractAuthorityFactory all = AllAuthoritiesFactory.DEFAULT; final IdentifiedObjectFinder finder = all.getIdentifiedObjectFinder(CoordinateReferenceSystem.class); finder.setFullScanAllowed(false); assertNull("Should not find the CRS without a scan.", finder.find(DefaultGeographicCRS.WGS84)); finder.setFullScanAllowed(true); final IdentifiedObject find = finder.find(DefaultGeographicCRS.WGS84); assertNotNull("With scan allowed, should find the CRS.", find); assertTrue(CRS.equalsIgnoreMetadata(find, DefaultGeographicCRS.WGS84)); assertSame(all.createCoordinateReferenceSystem("CRS:84"), find); assertEquals("CRS:84", finder.findIdentifier(DefaultGeographicCRS.WGS84)); }
@Override public IdentifiedObjectFinder getIdentifiedObjectFinder(Class<? extends IdentifiedObject> type) throws FactoryException { return new Finder(this, type); }
AllAuthoritiesFactory extends ManyAuthoritiesFactory { @Override public IdentifiedObjectFinder getIdentifiedObjectFinder(Class<? extends IdentifiedObject> type) throws FactoryException { return new Finder(this, type); } }
AllAuthoritiesFactory extends ManyAuthoritiesFactory { @Override public IdentifiedObjectFinder getIdentifiedObjectFinder(Class<? extends IdentifiedObject> type) throws FactoryException { return new Finder(this, type); } AllAuthoritiesFactory(final Hints hints); }
AllAuthoritiesFactory extends ManyAuthoritiesFactory { @Override public IdentifiedObjectFinder getIdentifiedObjectFinder(Class<? extends IdentifiedObject> type) throws FactoryException { return new Finder(this, type); } AllAuthoritiesFactory(final Hints hints); @Override Set<String> getAuthorityNames(); @Override IdentifiedObjectFinder getIdentifiedObjectFinder(Class<? extends IdentifiedObject> type); }
AllAuthoritiesFactory extends ManyAuthoritiesFactory { @Override public IdentifiedObjectFinder getIdentifiedObjectFinder(Class<? extends IdentifiedObject> type) throws FactoryException { return new Finder(this, type); } AllAuthoritiesFactory(final Hints hints); @Override Set<String> getAuthorityNames(); @Override IdentifiedObjectFinder getIdentifiedObjectFinder(Class<? extends IdentifiedObject> type); static AllAuthoritiesFactory DEFAULT; }