org.geotoolkit.referencing
Class AbstractReferenceSystem

Object
  extended by FormattableObject
      extended by AbstractIdentifiedObject
          extended by AbstractReferenceSystem
All Implemented Interfaces:
Serializable, Formattable, LenientComparable, IdentifiedObject, ReferenceSystem
Direct Known Subclasses:
AbstractCRS

@Immutable
public class AbstractReferenceSystem
extends AbstractIdentifiedObject
implements ReferenceSystem

Description of a spatial and temporal reference system used by a dataset.

This class is conceptually abstract, even if it is technically possible to instantiate it. Typical applications should create instances of the most specific subclass with Default prefix instead. An exception to this rule may occurs when it is not possible to identify the exact type.

Since:
2.1
Version:
3.18
Author:
Martin Desruisseaux (IRD, Geomatys)
See Also:
Serialized Form
Module:
referencing/geotk-referencing (download)    View source code for this class

Field Summary
 
Fields inherited from class FormattableObject
EPSG, GEOTIFF, INTERNAL, OGC, SINGLE_LINE
 
Fields inherited from interface ReferenceSystem
DOMAIN_OF_VALIDITY_KEY, SCOPE_KEY
 
Fields inherited from interface IdentifiedObject
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY
 
Constructor Summary
AbstractReferenceSystem(Map<String,?> properties)
          Constructs a reference system from a set of properties.
AbstractReferenceSystem(ReferenceSystem object)
          Constructs a new reference system with the same values than the specified one.
 
Method Summary
 boolean equals(Object object, ComparisonMode mode)
          Compares this reference system with the specified object for equality.
 Extent getDomainOfValidity()
          Area or region or timeframe in which this (coordinate) reference system is valid.
 InternationalString getScope()
          Description of domain of usage, or limitations of usage, for which this (coordinate) reference system object is valid.
 
Methods inherited from class AbstractIdentifiedObject
computeHashCode, equals, getAlias, getIdentifier, getIdentifiers, getName, getName, getRemarks, hashCode, nameMatches
 
Methods inherited from class FormattableObject
formatWKT, getDefaultIndentation, print, setDefaultIndentation, toString, toWKT, toWKT, toWKT
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface IdentifiedObject
getAlias, getIdentifiers, getName, getRemarks, toWKT
 

Constructor Detail

AbstractReferenceSystem

public AbstractReferenceSystem(ReferenceSystem object)
Constructs a new reference system with the same values than the specified one. This copy constructor provides a way to convert an arbitrary implementation into a Geotk one or a user-defined one (as a subclass), usually in order to leverage some implementation-specific API. This constructor performs a shallow copy, i.e. the properties are not cloned.

Parameters:
object - The reference system to copy.
Since:
2.2

AbstractReferenceSystem

public AbstractReferenceSystem(Map<String,?> properties)
Constructs a reference system from a set of properties. The properties given in argument follow the same rules than for the super-class constructor. Additionally, the following properties are understood by this construtor:

Property name Value type Value given to
 "domainOfValidity"   Extent   getDomainOfValidity()
 "scope"   String or InternationalString   getScope()

Parameters:
properties - The properties to be given to this object.
Method Detail

getDomainOfValidity

public Extent getDomainOfValidity()
Area or region or timeframe in which this (coordinate) reference system is valid. Returns null if not available.

Specified by:
getDomainOfValidity in interface ReferenceSystem
Since:
2.4

getScope

public InternationalString getScope()
Description of domain of usage, or limitations of usage, for which this (coordinate) reference system object is valid. Returns null if not available.

Specified by:
getScope in interface ReferenceSystem

equals

public boolean equals(Object object,
                      ComparisonMode mode)
Compares this reference system with the specified object for equality. If the mode argument value is STRICT or BY_CONTRACT, then all available properties are compared including the domain of validity and the scope.

Specified by:
equals in interface LenientComparable
Overrides:
equals in class AbstractIdentifiedObject
Parameters:
object - The object to compare to this.
mode - STRICT for performing a strict comparison, or IGNORE_METADATA for comparing only properties relevant to transformations.
Returns:
true if both objects are equal.


Copyright © 2009-2011 Geotoolkit.org. All Rights Reserved.