Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.common.instance.geometry.impl
Class AbstractCRSManager

java.lang.Object
  extended by eu.esdihumboldt.hale.common.instance.geometry.impl.AbstractCRSManager
All Implemented Interfaces:
CRSProvider
Direct Known Subclasses:
DefaultCRSManager, ProjectCRSManager

public abstract class AbstractCRSManager
extends Object
implements CRSProvider

Base class for CRS managers storing/loading preferences about assigned CRSs.

Author:
Simon Templer

Field Summary
static String PARAM_DEFAULT_CRS
          The configuration parameter name for the default CRS definition.
static String PREFIX_PARAM_CRS
          The prefix for configuration parameter names for the default CRS definition for a property.
 
Constructor Summary
AbstractCRSManager(InstanceReader reader, CRSProvider provider)
          Create a CRS manager.
 
Method Summary
 CRSDefinition getCRS(TypeDefinition parentType, List<QName> propertyPath)
          Get the CRS definition for values of the given property definition.
protected abstract  String loadValue(String key)
          Load a configuration value.
protected abstract  void storeValue(String key, String value)
          Store a configuration value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAM_DEFAULT_CRS

public static final String PARAM_DEFAULT_CRS
The configuration parameter name for the default CRS definition. AbstractObjectFactory.parse(String) is used to handle any values, so CRSDefinitionManager#asString(CRSDefinition) should be used to create them.

See Also:
Constant Field Values

PREFIX_PARAM_CRS

public static final String PREFIX_PARAM_CRS
The prefix for configuration parameter names for the default CRS definition for a property. The configuration parameter is the prefix concatenated with the PropertyDefinition identifier. AbstractObjectFactory.parse(String) is used to handle any values, so CRSDefinitionManager#asString(CRSDefinition) should be used to create them.

See Also:
Constant Field Values
Constructor Detail

AbstractCRSManager

public AbstractCRSManager(InstanceReader reader,
                          CRSProvider provider)
Create a CRS manager.

Parameters:
reader - the instance reader
provider - the internal CRS provider to use, may be null
Method Detail

getCRS

public CRSDefinition getCRS(TypeDefinition parentType,
                            List<QName> propertyPath)
Description copied from interface: CRSProvider
Get the CRS definition for values of the given property definition.

Specified by:
getCRS in interface CRSProvider
Parameters:
parentType - the definition of the type of the parent instance
propertyPath - the property path in the instance
Returns:
the CRS definition or null if it can't be determined

storeValue

protected abstract void storeValue(String key,
                                   String value)
Store a configuration value.

Parameters:
key - the configuration key
value - the associated value

loadValue

protected abstract String loadValue(String key)
Load a configuration value.

Parameters:
key - the configuration key
Returns:
the associated value

Humboldt Alignment Editor 2.5.0

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