org.geotoolkit.referencing.factory.web
Class WebCRSFactory

Object
  extended by Factory
      extended by ReferencingFactory
          extended by AbstractAuthorityFactory
              extended by DirectAuthorityFactory
                  extended by WebCRSFactory
All Implemented Interfaces:
AuthorityFactory, CRSAuthorityFactory, Factory

@ThreadSafe
public class WebCRSFactory
extends DirectAuthorityFactory
implements CRSAuthorityFactory

The factory for coordinate reference systems in the CRS namespace. The format is usually "CRS:n" where n is a number like 27, 83 or 84. However this factory is lenient and allows the CRS part to be repeated as in "CRS:CRS84". It also accepts "OGC" as a synonymous of the "CRS" namespace. Examples:

Since:
2.2
Version:
3.00
Author:
Martin Desruisseaux (IRD)
Module:
referencing/geotk-referencing (download)    View source code for this class

Nested Class Summary
 
Nested classes/interfaces inherited from class Factory
Factory.Availability, Factory.Organizer
 
Field Summary
 
Fields inherited from class DirectAuthorityFactory
factories
 
Fields inherited from class AbstractAuthorityFactory
nameFactory
 
Fields inherited from class ReferencingFactory
LOGGER
 
Fields inherited from class Factory
EMPTY_HINTS, hints
 
Constructor Summary
WebCRSFactory()
          Constructs a default factory for the CRS authority.
WebCRSFactory(Hints userHints)
          Constructs a factory for the CRS authority using the specified hints.
 
Method Summary
 CoordinateReferenceSystem createCoordinateReferenceSystem(String code)
          Creates a coordinate reference system from the specified code.
 IdentifiedObject createObject(String code)
          Creates an object from the specified code.
 Citation getAuthority()
          Returns the authority for this factory, which is CRS.
 Set<String> getAuthorityCodes(Class<? extends IdentifiedObject> type)
          Provides a complete set of the known codes provided by this authority.
 InternationalString getDescriptionText(String code)
          Returns the CRS name for the given code.
 
Methods inherited from class DirectAuthorityFactory
getImplementationHints
 
Methods inherited from class AbstractAuthorityFactory
createCartesianCS, createCompoundCRS, createCoordinateOperation, createCoordinateSystem, createCoordinateSystemAxis, createCylindricalCS, createDatum, createDerivedCRS, createEllipsoid, createEllipsoidalCS, createEngineeringCRS, createEngineeringDatum, createExtent, createFromCoordinateReferenceSystemCodes, createGeocentricCRS, createGeodeticDatum, createGeographicCRS, createImageCRS, createImageDatum, createOperationMethod, createParameterDescriptor, createPolarCS, createPrimeMeridian, createProjectedCRS, createSphericalCS, createTemporalCRS, createTemporalDatum, createTimeCS, createUnit, createVerticalCRS, createVerticalCS, createVerticalDatum, dispose, getBackingStoreDescription, getIdentifiedObjectFinder, noSuchAuthorityCode, trimAuthority
 
Methods inherited from class ReferencingFactory
ensureNonNull, getVendor
 
Methods inherited from class Factory
availability, equals, hasCompatibleHints, hashCode, setOrdering, toString
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface CRSAuthorityFactory
createCompoundCRS, createDerivedCRS, createEngineeringCRS, createGeocentricCRS, createGeographicCRS, createImageCRS, createProjectedCRS, createTemporalCRS, createVerticalCRS
 
Methods inherited from interface Factory
getVendor
 

Constructor Detail

WebCRSFactory

public WebCRSFactory()
Constructs a default factory for the CRS authority.


WebCRSFactory

public WebCRSFactory(Hints userHints)
Constructs a factory for the CRS authority using the specified hints.

Parameters:
userHints - An optional set of hints, or null for the default ones.
Method Detail

getAuthority

public Citation getAuthority()
Returns the authority for this factory, which is CRS.

Specified by:
getAuthority in interface AuthorityFactory
Specified by:
getAuthority in class AbstractAuthorityFactory

getAuthorityCodes

public Set<String> getAuthorityCodes(Class<? extends IdentifiedObject> type)
                              throws FactoryException
Provides a complete set of the known codes provided by this authority. The returned set contains only numeric identifiers like "84", "27", etc. The authority name ("CRS") is not included. This is consistent with the codes returned by the EPSG factory and avoid duplication, since the authority is the same for every codes returned by this factory. It also make it easier for clients to prepend whatever authority name they wish, as for example in the all authorities factory.

Specified by:
getAuthorityCodes in interface AuthorityFactory
Throws:
FactoryException

getDescriptionText

public InternationalString getDescriptionText(String code)
                                       throws FactoryException
Returns the CRS name for the given code.

Specified by:
getDescriptionText in interface AuthorityFactory
Throws:
FactoryException - if an error occurred while fetching the description.

createObject

public IdentifiedObject createObject(String code)
                              throws FactoryException
Creates an object from the specified code. The default implementation delegates to createCoordinateReferenceSystem(code).

Specified by:
createObject in interface AuthorityFactory
Overrides:
createObject in class AbstractAuthorityFactory
Parameters:
code - Value allocated by authority.
Throws:
FactoryException - if the object creation failed.

createCoordinateReferenceSystem

public CoordinateReferenceSystem createCoordinateReferenceSystem(String code)
                                                          throws FactoryException
Creates a coordinate reference system from the specified code.

Specified by:
createCoordinateReferenceSystem in interface CRSAuthorityFactory
Overrides:
createCoordinateReferenceSystem in class AbstractAuthorityFactory
Parameters:
code - Value allocated by authority.
Returns:
The coordinate reference system for the given code.
Throws:
FactoryException - if the object creation failed.


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