# Enum Class IdentifiedObjectFinder.Domain

Object
Enum<IdentifiedObjectFinder.Domain>
Domain

All Implemented Interfaces:
  `Serializable, Comparable<IdentifiedObjectFinder​.Domain>, Constable`

Enclosing class:
  `IdentifiedObjectFinder`

public static enum IdentifiedObjectFinder.Domain extends Enum<IdentifiedObjectFinder.Domain>
The domain of the search (for example, whether to include deprecated objects in the search).

Since:
  0.7
See Also:
  - `IdentifiedObjectFinder​.getSearchDomain()`

- ## Nested Class Summary

  ### Nested classes/interfaces inherited from class Enum

  `Enum​.EnumDesc<E>`

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `ALL_DATASET`
  Lookup based on all objects (both valid and deprecated) known to the factory.
  `DECLARATION`
  Fast lookup based only on declared identifiers.
  `EXHAUSTIVE_VALID_DATASET`
  Search unconditionally based on all valid (non-deprecated) objects known to the factory.
  `VALID_DATASET`
  Lookup based on declared identifiers and on non-deprecated objects known to the factory.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static IdentifiedObjectFinder​.Domain`
  `valueOf(String name)`
  Returns 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`

  ### Methods inherited from class Object

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### DECLARATION

    public static final IdentifiedObjectFinder.Domain DECLARATION
    Fast lookup based only on declared identifiers. If those identification information does not allow to locate an object in the factory, then the `find(…)` method will return an empty set instead of performing an exhaustive search in the geodetic dataset.

    #### Example

    If `IdentifiedObjectFinder​.find(IdentifiedObject)` is invoked with an object having the `"4326"` identifier, then the `find(…)` method will invoke `factory.createGeographicCRS("4326")` and compare the result with the object to search. If the two objects do not match, then some implementations may perform another attempt using the object name. If using the name does not work neither, then `find(…)` method makes no other attempt and returns an empty set.

  - ### VALID_DATASET

    public static final IdentifiedObjectFinder.Domain VALID_DATASET
    Lookup based on declared identifiers and on non-deprecated objects known to the factory. First, a fast lookup is performed as described in `DECLARATION`. If the last lookup found some matches, those matches are returned without scanning the rest of the database. It may be an incomplete set compared to what `EXHAUSTIVE_VALID_DATASET` would have returned. If the fast lookup gave no result, only then an exhaustive search is performed by scanning the content of the geodetic dataset.

    This is the default domain of `IdentifiedObjectFinder`.

    #### Example

    If `IdentifiedObjectFinder​.find(IdentifiedObject)` is invoked with an object equivalent to the WGS84 geographic CRS but without declaring the `"4326"` identifier and without the WGS 84 name, then the initial lookup described in `DECLARATION` will give no result. As a fallback, the `find(…)` method scans the geodetic dataset in search for geographic CRS equivalent to the specified object. It may be a costly operation.

  - ### EXHAUSTIVE_VALID_DATASET

    public static final IdentifiedObjectFinder.Domain EXHAUSTIVE_VALID_DATASET
    Search unconditionally based on all valid (non-deprecated) objects known to the factory. This is similar to `VALID_DATASET` except that the fast `DECLARATION` lookup is skipped. Instead, a potentially costly scan of the geodetic dataset is unconditionally performed (unless the result is already in the cache).

    #### Use case

    The EPSG geodetic dataset 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 in a search ignoring axis order. The `VALID_DATASET` domain may not give a complete set because the "fast lookup by identifiers" optimization may prevent `IdentifiedObjectFinder` to scan the rest of the geodetic dataset. This `EXHAUSTIVE_VALID_DATASET` domain forces such scan.
    Since:
      1.2

  - ### ALL_DATASET

    public static final IdentifiedObjectFinder.Domain ALL_DATASET
    Lookup based on all objects (both valid and deprecated) known to the factory. This is the same search as `VALID_DATASET` except that deprecated objects are included in the search.

- ## Method Details

  - ### values

    public static IdentifiedObjectFinder.Domain[] 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

    public static IdentifiedObjectFinder.Domain valueOf(String name)
    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 name
      `NullPointerException` - if the argument is null