org.gvsig.fmap.dal.feature
Class AbstractFeatureStoreTransform

java.lang.Object
  extended by org.gvsig.fmap.dal.feature.AbstractFeatureStoreTransform
All Implemented Interfaces:
FeatureStoreTransform, Persistent

public abstract class AbstractFeatureStoreTransform
extends Object
implements FeatureStoreTransform

Abstract feature store transform intended for giving a partial default implementation of the FeatureStoreTransform interface to other transform implementations. It is recommended to extend this class when implementing new FeatureStoreTransforms. The FeatureType of this class is not persistent: it has to be generated by the child implementations of this abstract class when they are created using the persistence mechanism.

Version:
$Id$
Author:
gvSIG team

Field Summary
static String ABSTRACT_FEATURESTORE_DYNCLASS_NAME
           
protected  String descripcion
           
static String METADATA_DEFINITION_NAME
           
protected  String name
           
 
Constructor Summary
AbstractFeatureStoreTransform()
           
AbstractFeatureStoreTransform(String name, String description)
           
 
Method Summary
 FeatureType getDefaultFeatureType()
          Returns the default FeatureType.
 String getDescription()
           
 Object getDynValue(String name)
          Get the metadata value for the name name.
 FeatureStore getFeatureStore()
          Returns the FeatureStore to which this transform belongs.
 List getFeatureTypes()
          Returns this FeatureStoreTransform's FeatureType(s)
 String getName()
           
protected  DynObject getSourceMetadata()
           
 boolean hasDynValue(String name)
          Return true is the value name has a value in the metadata Overwrite this method to support that this transform overwrite the values of the statore's metadata.
 void loadFromState(PersistentState state)
           
static void registerPersistent()
           
 void saveToState(PersistentState state)
           
 void setDynValue(String name, Object value)
          Set the value of a metadata.
 void setFeatureStore(FeatureStore store)
          Sets the FeatureStore to which this transform is applied.
protected  void setFeatureTypes(List types, FeatureType defaultType)
           
 void setSourceMetadata(DynObject metadata)
          Sets the original metadata for this transform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.gvsig.fmap.dal.feature.FeatureStoreTransform
applyTransform, getSourceFeatureTypeFrom, isTransformsOriginalValues
 

Field Detail

METADATA_DEFINITION_NAME

public static final String METADATA_DEFINITION_NAME
See Also:
Constant Field Values

ABSTRACT_FEATURESTORE_DYNCLASS_NAME

public static final String ABSTRACT_FEATURESTORE_DYNCLASS_NAME
See Also:
Constant Field Values

name

protected String name

descripcion

protected String descripcion
Constructor Detail

AbstractFeatureStoreTransform

public AbstractFeatureStoreTransform()

AbstractFeatureStoreTransform

public AbstractFeatureStoreTransform(String name,
                                     String description)
Method Detail

getDescription

public String getDescription()
Specified by:
getDescription in interface FeatureStoreTransform

getName

public String getName()
Specified by:
getName in interface FeatureStoreTransform

getDefaultFeatureType

public FeatureType getDefaultFeatureType()
                                  throws DataException
Description copied from interface: FeatureStoreTransform
Returns the default FeatureType.

Specified by:
getDefaultFeatureType in interface FeatureStoreTransform
Returns:
default FeatureType
Throws:
DataException

getFeatureTypes

public List getFeatureTypes()
                     throws DataException
Description copied from interface: FeatureStoreTransform
Returns this FeatureStoreTransform's FeatureType(s)

Specified by:
getFeatureTypes in interface FeatureStoreTransform
Returns:
Throws:
DataException

setFeatureStore

public void setFeatureStore(FeatureStore store)
Description copied from interface: FeatureStoreTransform
Sets the FeatureStore to which this transform is applied.

Specified by:
setFeatureStore in interface FeatureStoreTransform
Parameters:
store - FeatureStore to which this transform is applied.

getFeatureStore

public FeatureStore getFeatureStore()
Description copied from interface: FeatureStoreTransform
Returns the FeatureStore to which this transform belongs.

Specified by:
getFeatureStore in interface FeatureStoreTransform
Returns:
FeatureStore to which this transform belongs.

setFeatureTypes

protected void setFeatureTypes(List types,
                               FeatureType defaultType)

registerPersistent

public static void registerPersistent()

loadFromState

public void loadFromState(PersistentState state)
                   throws PersistenceException
Specified by:
loadFromState in interface Persistent
Throws:
PersistenceException

saveToState

public void saveToState(PersistentState state)
                 throws PersistenceException
Specified by:
saveToState in interface Persistent
Throws:
PersistenceException

setSourceMetadata

public final void setSourceMetadata(DynObject metadata)
Description copied from interface: FeatureStoreTransform
Sets the original metadata for this transform

Specified by:
setSourceMetadata in interface FeatureStoreTransform

getSourceMetadata

protected DynObject getSourceMetadata()

getDynValue

public Object getDynValue(String name)
                   throws DynFieldNotFoundException
Get the metadata value for the name name. Overwrite this method to support that this transform overwrite the values of the statore's metadata.

Specified by:
getDynValue in interface FeatureStoreTransform
Throws:
DynFieldNotFoundException
See Also:
{#Metadata.getDynValue}

hasDynValue

public boolean hasDynValue(String name)
Return true is the value name has a value in the metadata Overwrite this method to support that this transform overwrite the values of the statore's metadata.

Specified by:
hasDynValue in interface FeatureStoreTransform
See Also:
{#Metadata.hasDynValue}

setDynValue

public void setDynValue(String name,
                        Object value)
                 throws DynFieldNotFoundException
Set the value of a metadata. Overwrite this method to support that this transform overwrite the values of the statore's metadata.

Specified by:
setDynValue in interface FeatureStoreTransform
Throws:
DynFieldNotFoundException
See Also:
{#Metadata.getDynValue}


Copyright © 2004-2012 gvSIG. All Rights Reserved.