/** Returns a string representation of this finder, for debugging purpose only. */ @Override public String toString() { return getProxy().toString(IdentifiedObjectFinder.class); }
/** Creates a finder using the same proxy than the specified finder. */ IdentifiedObjectFinder(final IdentifiedObjectFinder finder) { this.setProxy(finder.getProxy()); }
/** * Returns a set of authority codes that <strong>may</strong> identify the same object than the * specified one. The returned set must contains the code of every objects that are {@linkplain * CRS#equalsIgnoreMetadata equals, ignoring metadata}, to the specified one. However the set is * not required to contains only the codes of those objects; it may conservatively contains the * code for more objects if an exact search is too expensive. * * <p>This method is invoked by the default {@link #find find} method implementation. The caller * may iterates through every returned codes, instantiate the objects and compare them with the * specified one in order to determine which codes are really applicable. * * <p>The default implementation returns the same set than <code> * {@linkplain AuthorityFactory#getAuthorityCodes getAuthorityCodes}(type)</code> where {@code * type} is the interface specified at construction type. Subclasses should override this method * in order to return a smaller set, if they can. * * @param object The object looked up. * @return A set of code candidates. * @throws FactoryException if an error occured while fetching the set of code candidates. */ protected Set /*<String>*/ getCodeCandidates(final IdentifiedObject object) throws FactoryException { return getProxy().getAuthorityCodes(); }
/** * The Authority for this Finder; used during get Identifier. * * @return Citation for the authority being represented. */ protected Citation getAuthority() { return getProxy().getAuthorityFactory().getAuthority(); } /** Returns the identifier for the specified object. */
IdentifiedObject candidate; try { candidate = getProxy().create(code); } catch (FactoryException e) { LOGGER.log(Level.FINEST, "Could not create '" + code + "':" + e);
final Citation authority = getProxy().getAuthorityFactory().getAuthority(); final boolean isAll = ReferencingFactory.ALL.equals(authority); for (final Iterator it = object.getIdentifiers().iterator(); it.hasNext(); ) { candidate = getProxy().create(id.getCode()); } catch (NoSuchAuthorityCodeException e) {