Class MultiAuthoritiesFactory.Finder

java.lang.Object
org.apache.sis.referencing.factory.IdentifiedObjectFinder
org.apache.sis.referencing.factory.MultiAuthoritiesFactory.Finder
Enclosing class:
MultiAuthoritiesFactory

private static class MultiAuthoritiesFactory.Finder extends IdentifiedObjectFinder
A IdentifiedObjectFinder which tests every factories declared in the collection of factories.
  • Field Details

    • finders

      private IdentifiedObjectFinder[] finders
      The finders of all factories, or null if not yet fetched. We will create this array only when first needed in order to avoid instantiating the factories before needed (for example we may be able to find an object using only its code). However if we need to create this array, then we will create it fully (for all factories at once).
  • Constructor Details

    • Finder

      protected Finder(MultiAuthoritiesFactory factory) throws org.opengis.util.FactoryException
      Creates a new finder.
      Throws:
      org.opengis.util.FactoryException
  • Method Details

    • setSearchDomain

      public void setSearchDomain(IdentifiedObjectFinder.Domain domain)
      Sets the domain of the search (for example whether to include deprecated objects in the search).
      Overrides:
      setSearchDomain in class IdentifiedObjectFinder
      Parameters:
      domain - the domain of the search.
    • setIgnoringAxes

      public void setIgnoringAxes(boolean ignore)
      Sets whether the search should ignore coordinate system axes.
      Overrides:
      setIgnoringAxes in class IdentifiedObjectFinder
      Parameters:
      ignore - true if the search should ignore coordinate system axes.
    • createFromCodes

      final Set<org.opengis.referencing.IdentifiedObject> createFromCodes(org.opengis.referencing.IdentifiedObject object) throws org.opengis.util.FactoryException
      Delegates to every factories registered in the enclosing MultiAuthoritiesFactory, in iteration order. This method is invoked only if the parent class failed to find the object by its identifiers and by its name. At this point, as a last resort, we will scan over the objects in the database.

      This method shall not delegate the job to the parent class, as the default implementation in the parent class is very inefficient. We need to delegate to the finders of all factories, so we can leverage their potentially more efficient algorithms.

      Overrides:
      createFromCodes in class IdentifiedObjectFinder
      Parameters:
      object - the object looked up.
      Returns:
      the identified object, or null if not found.
      Throws:
      org.opengis.util.FactoryException - if an error occurred while scanning through authority codes.
      See Also: