Class MultiAuthoritiesFactory.Finder
java.lang.Object
org.apache.sis.referencing.factory.IdentifiedObjectFinder
org.apache.sis.referencing.factory.MultiAuthoritiesFactory.Finder
- Enclosing class:
MultiAuthoritiesFactory
A
IdentifiedObjectFinder
which tests every factories declared in the
collection of factories.-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.sis.referencing.factory.IdentifiedObjectFinder
IdentifiedObjectFinder.Domain
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate IdentifiedObjectFinder[]
The finders of all factories, ornull
if not yet fetched.Fields inherited from class org.apache.sis.referencing.factory.IdentifiedObjectFinder
COMPARISON_MODE, factory
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Finder
(MultiAuthoritiesFactory factory) Creates a new finder. -
Method Summary
Modifier and TypeMethodDescription(package private) final Set
<org.opengis.referencing.IdentifiedObject> createFromCodes
(org.opengis.referencing.IdentifiedObject object) Delegates to every factories registered in the enclosingMultiAuthoritiesFactory
, in iteration order.void
setIgnoringAxes
(boolean ignore) Sets whether the search should ignore coordinate system axes.void
Sets the domain of the search (for example whether to include deprecated objects in the search).Methods inherited from class org.apache.sis.referencing.factory.IdentifiedObjectFinder
cache, find, findSingleton, getCodeCandidates, getFromCache, getSearchDomain, isIgnoringAxes, setWrapper
-
Field Details
-
finders
The finders of all factories, ornull
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
Creates a new finder.- Throws:
org.opengis.util.FactoryException
-
-
Method Details
-
setSearchDomain
Sets the domain of the search (for example whether to include deprecated objects in the search).- Overrides:
setSearchDomain
in classIdentifiedObjectFinder
- 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 classIdentifiedObjectFinder
- 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 enclosingMultiAuthoritiesFactory
, 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 classIdentifiedObjectFinder
- 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:
-