Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.ui.common.crs
Class WKTPreferencesCRSFactory

java.lang.Object
  extended by org.geotools.factory.AbstractFactory
      extended by eu.esdihumboldt.hale.ui.common.crs.WKTPreferencesCRSFactory
All Implemented Interfaces:
RegisterableService, org.geotools.factory.Factory, org.opengis.referencing.AuthorityFactory, org.opengis.referencing.crs.CRSAuthorityFactory

public class WKTPreferencesCRSFactory
extends org.geotools.factory.AbstractFactory
implements org.opengis.referencing.crs.CRSAuthorityFactory

CRS factory based on WKT stored in Java preferences

Author:
Simon Templer
Partner:
01 / Fraunhofer Institute for Computer Graphics Research

Field Summary
static String AUTHORITY
          The authority
static String AUTHORITY_PREFIX
          The authority prefix
protected  org.opengis.referencing.crs.CRSFactory crsFactory
          CRS factory
protected static WKTPreferencesCRSFactory INSTANCE
          The one and only factory instance
 
Fields inherited from class org.geotools.factory.AbstractFactory
hints, MAXIMUM_PRIORITY, MINIMUM_PRIORITY, NORMAL_PRIORITY, priority
 
Constructor Summary
protected WKTPreferencesCRSFactory()
          Creates a new instance
protected WKTPreferencesCRSFactory(org.opengis.referencing.crs.CRSFactory factory)
          Create a new instance, use the given CRS factory
 
Method Summary
 void addWKT(String code, String wkt)
          Add a WKT
 org.opengis.referencing.crs.CompoundCRS createCompoundCRS(String str)
           
 org.opengis.referencing.crs.CoordinateReferenceSystem createCoordinateReferenceSystem(String code)
           
 org.opengis.referencing.crs.DerivedCRS createDerivedCRS(String str)
           
 org.opengis.referencing.crs.EngineeringCRS createEngineeringCRS(String str)
           
 org.opengis.referencing.crs.GeocentricCRS createGeocentricCRS(String str)
           
 org.opengis.referencing.crs.GeographicCRS createGeographicCRS(String code)
           
 org.opengis.referencing.crs.ImageCRS createImageCRS(String str)
           
 org.opengis.referencing.IdentifiedObject createObject(String code)
           
 org.opengis.referencing.crs.ProjectedCRS createProjectedCRS(String code)
           
 org.opengis.referencing.crs.TemporalCRS createTemporalCRS(String str)
           
 org.opengis.referencing.crs.VerticalCRS createVerticalCRS(String str)
           
 org.opengis.metadata.citation.Citation getAuthority()
           
 Set<String> getAuthorityCodes(Class<? extends org.opengis.referencing.IdentifiedObject> clazz)
           
 List<String> getCodes()
          Get the available CRS codes (with the authority prefix)
 org.opengis.util.InternationalString getDescriptionText(String code)
           
static WKTPreferencesCRSFactory getInstance()
          Get the factory instance
 org.opengis.metadata.citation.Citation getVendor()
           
 String getWKT(String code)
          Get the WKT for the given code
static void install()
          Install the factory with the ReferencingFactoryFinder
static void registerWKT(String code, String wkt)
          Register a WKT with the factory
 void removeWKT(String code)
          Add a WKT
 
Methods inherited from class org.geotools.factory.AbstractFactory
addImplementationHints, equals, getImplementationHints, getPriority, hashCode, onDeregistration, onRegistration, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

AUTHORITY

public static final String AUTHORITY
The authority

See Also:
Constant Field Values

AUTHORITY_PREFIX

public static final String AUTHORITY_PREFIX
The authority prefix

See Also:
Constant Field Values

INSTANCE

protected static WKTPreferencesCRSFactory INSTANCE
The one and only factory instance


crsFactory

protected org.opengis.referencing.crs.CRSFactory crsFactory
CRS factory

Constructor Detail

WKTPreferencesCRSFactory

protected WKTPreferencesCRSFactory()
Creates a new instance


WKTPreferencesCRSFactory

protected WKTPreferencesCRSFactory(org.opengis.referencing.crs.CRSFactory factory)
Create a new instance, use the given CRS factory

Parameters:
factory - the CRS factory to use
Method Detail

getInstance

public static WKTPreferencesCRSFactory getInstance()
Get the factory instance

Returns:
the factory instance

install

public static void install()
Install the factory with the ReferencingFactoryFinder


registerWKT

public static void registerWKT(String code,
                               String wkt)
Register a WKT with the factory

Parameters:
code - the CRS code (e.g. 4326 or EPSG:4326)
wkt - the CRS well known text

addWKT

public void addWKT(String code,
                   String wkt)
Add a WKT

Parameters:
code - the CRS code (e.g. 4326 or EPSG:4326)
wkt - the CRS well known text

removeWKT

public void removeWKT(String code)
Add a WKT

Parameters:
code - the CRS code (e.g. 4326 or EPSG:4326) that the WKT is associated to

getWKT

public String getWKT(String code)
Get the WKT for the given code

Parameters:
code - the CRS code (e.g. 4326 or EPSG:4326) that the WKT is associated to
Returns:
the WKT or null

getCodes

public List<String> getCodes()
Get the available CRS codes (with the authority prefix)

Returns:
the CRS codes

createCoordinateReferenceSystem

public org.opengis.referencing.crs.CoordinateReferenceSystem createCoordinateReferenceSystem(String code)
                                                                                      throws org.opengis.referencing.FactoryException
Specified by:
createCoordinateReferenceSystem in interface org.opengis.referencing.crs.CRSAuthorityFactory
Throws:
org.opengis.referencing.FactoryException
See Also:
CRSAuthorityFactory.createCoordinateReferenceSystem(String)

createObject

public org.opengis.referencing.IdentifiedObject createObject(String code)
                                                      throws org.opengis.referencing.FactoryException
Specified by:
createObject in interface org.opengis.referencing.AuthorityFactory
Throws:
org.opengis.referencing.FactoryException
See Also:
AuthorityFactory.createObject(String)

createProjectedCRS

public org.opengis.referencing.crs.ProjectedCRS createProjectedCRS(String code)
                                                            throws org.opengis.referencing.FactoryException
Specified by:
createProjectedCRS in interface org.opengis.referencing.crs.CRSAuthorityFactory
Throws:
org.opengis.referencing.FactoryException
See Also:
CRSAuthorityFactory.createProjectedCRS(String)

createGeographicCRS

public org.opengis.referencing.crs.GeographicCRS createGeographicCRS(String code)
                                                              throws org.opengis.referencing.FactoryException
Specified by:
createGeographicCRS in interface org.opengis.referencing.crs.CRSAuthorityFactory
Throws:
org.opengis.referencing.FactoryException
See Also:
CRSAuthorityFactory.createGeographicCRS(String)

getAuthority

public org.opengis.metadata.citation.Citation getAuthority()
Specified by:
getAuthority in interface org.opengis.referencing.AuthorityFactory
See Also:
AuthorityFactory.getAuthority()

getAuthorityCodes

public Set<String> getAuthorityCodes(Class<? extends org.opengis.referencing.IdentifiedObject> clazz)
                              throws org.opengis.referencing.FactoryException
Specified by:
getAuthorityCodes in interface org.opengis.referencing.AuthorityFactory
Throws:
org.opengis.referencing.FactoryException
See Also:
The following implementation filters the set of codes based on the "PROJCS" and "GEOGCS" at the start of the WKT strings. It is assumed that we only have GeographicCRS and ProjectedCRS's here.

getVendor

public org.opengis.metadata.citation.Citation getVendor()
See Also:
Factory.getVendor()

getDescriptionText

public org.opengis.util.InternationalString getDescriptionText(String code)
                                                        throws org.opengis.referencing.FactoryException
Specified by:
getDescriptionText in interface org.opengis.referencing.AuthorityFactory
Throws:
org.opengis.referencing.FactoryException
See Also:
AuthorityFactory.getDescriptionText(String)

createCompoundCRS

public org.opengis.referencing.crs.CompoundCRS createCompoundCRS(String str)
                                                          throws org.opengis.referencing.FactoryException
Specified by:
createCompoundCRS in interface org.opengis.referencing.crs.CRSAuthorityFactory
Throws:
org.opengis.referencing.FactoryException
See Also:
CRSAuthorityFactory.createCompoundCRS(String)

createDerivedCRS

public org.opengis.referencing.crs.DerivedCRS createDerivedCRS(String str)
                                                        throws org.opengis.referencing.FactoryException
Specified by:
createDerivedCRS in interface org.opengis.referencing.crs.CRSAuthorityFactory
Throws:
org.opengis.referencing.FactoryException
See Also:
CRSAuthorityFactory.createDerivedCRS(String)

createEngineeringCRS

public org.opengis.referencing.crs.EngineeringCRS createEngineeringCRS(String str)
                                                                throws org.opengis.referencing.FactoryException
Specified by:
createEngineeringCRS in interface org.opengis.referencing.crs.CRSAuthorityFactory
Throws:
org.opengis.referencing.FactoryException
See Also:
CRSAuthorityFactory.createEngineeringCRS(String)

createGeocentricCRS

public org.opengis.referencing.crs.GeocentricCRS createGeocentricCRS(String str)
                                                              throws org.opengis.referencing.FactoryException
Specified by:
createGeocentricCRS in interface org.opengis.referencing.crs.CRSAuthorityFactory
Throws:
org.opengis.referencing.FactoryException
See Also:
CRSAuthorityFactory.createGeocentricCRS(String)

createImageCRS

public org.opengis.referencing.crs.ImageCRS createImageCRS(String str)
                                                    throws org.opengis.referencing.FactoryException
Specified by:
createImageCRS in interface org.opengis.referencing.crs.CRSAuthorityFactory
Throws:
org.opengis.referencing.FactoryException
See Also:
CRSAuthorityFactory.createImageCRS(String)

createTemporalCRS

public org.opengis.referencing.crs.TemporalCRS createTemporalCRS(String str)
                                                          throws org.opengis.referencing.FactoryException
Specified by:
createTemporalCRS in interface org.opengis.referencing.crs.CRSAuthorityFactory
Throws:
org.opengis.referencing.FactoryException
See Also:
CRSAuthorityFactory.createTemporalCRS(String)

createVerticalCRS

public org.opengis.referencing.crs.VerticalCRS createVerticalCRS(String str)
                                                          throws org.opengis.referencing.FactoryException
Specified by:
createVerticalCRS in interface org.opengis.referencing.crs.CRSAuthorityFactory
Throws:
org.opengis.referencing.FactoryException
See Also:
CRSAuthorityFactory.createVerticalCRS(String)

Humboldt Alignment Editor 2.5.0

Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d