Module org.apache.sis.referencing
Enum Class IdentifiedObjectFinder.Domain
- All Implemented Interfaces:
Serializable
,Comparable<IdentifiedObjectFinder.Domain>
,Constable
- Enclosing class:
IdentifiedObjectFinder
The domain of the search (for example whether to include deprecated objects in the search).
- Since:
- 0.7
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionLookup based on all objects (both valid and deprecated) known to the factory.Fast lookup based only on embedded identifiers and names.Lookup unconditionally based on all valid (non-deprecated) objects known to the factory.Lookup based on valid (non-deprecated) objects known to the factory. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.static IdentifiedObjectFinder.Domain[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
DECLARATION
Fast lookup based only on embedded identifiers and names. If those identification information does not allow to locate an object in the factory, then the search will return an empty set.Example
IfIdentifiedObjectFinder.find(IdentifiedObject)
is invoked with an object having the"4326"
identifier, then thefind(…)
method will invokefactory.createGeographicCRS("4326")
and compare the object from the factory with the object to search. If the objects do not match, then another attempt will be done using the object name. If using name does not work neither, thenfind(…)
method makes no other attempt and returns an empty set. -
VALID_DATASET
Lookup based on valid (non-deprecated) objects known to the factory. First, a fast lookup is performed based onDECLARATION
. If the fast lookup gave no result, then a more extensive search is performed by scanning the content of the dataset.Example
IfIdentifiedObjectFinder.find(IdentifiedObject)
is invoked with an object equivalent to the WGS84 geographic CRS but does not declare the"4326"
identifier and does not have the "WGS 84" name, then the search based onDECLARATION
will give no result. Thefind(…)
method will then scan the dataset for geographic CRS using equivalent datum and coordinate system. This may be a costly operation. This is the default domain ofIdentifiedObjectFinder
. -
EXHAUSTIVE_VALID_DATASET
Lookup unconditionally based on all valid (non-deprecated) objects known to the factory. This is similar toVALID_DATASET
except that the fastDECLARATION
lookup is skipped. Instead, a potentially costly scan of the database is unconditionally performed (unless the result is already in the cache).This domain can be useful when the search ignores axis order. If axis order is not ignored, then this domain usually has no advantage over
VALID_DATASET
(unless the geodetic dataset contains duplicated entries) to justify the performance cost.Use case
The EPSG database sometimes contains two definitions for almost identical geographic CRS, one with (latitude, longitude) axis order and one with reverse order (e.g. EPSG::4171 versus EPSG::7084). It is sometimes useful to know all variants of a given CRS. TheVALID_DATASET
domain may not give a complete set because the "fast lookup by identifier" optimization may preventIdentifiedObjectFinder
to scan the rest of the database. ThisEXHAUSTIVE_VALID_DATASET
domain forces such scan.- Since:
- 1.2
-
ALL_DATASET
Lookup based on all objects (both valid and deprecated) known to the factory. This is the same search thanVALID_DATASET
except that deprecated objects are included in the search.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-