Revision 37496 branches/v2_0_0_prep/libraries/libFMap_dal/src/org/gvsig/fmap/dal/feature/AbstractFeatureStoreTransform.java
AbstractFeatureStoreTransform.java | ||
---|---|---|
5 | 5 |
|
6 | 6 |
import org.gvsig.fmap.dal.exception.DataException; |
7 | 7 |
import org.gvsig.tools.ToolsLocator; |
8 |
import org.gvsig.tools.dynobject.DynObject; |
|
8 | 9 |
import org.gvsig.tools.dynobject.DynStruct; |
10 |
import org.gvsig.tools.dynobject.exception.DynFieldNotFoundException; |
|
9 | 11 |
import org.gvsig.tools.persistence.PersistenceManager; |
10 | 12 |
import org.gvsig.tools.persistence.PersistentState; |
11 | 13 |
import org.gvsig.tools.persistence.exception.PersistenceException; |
... | ... | |
24 | 26 |
*/ |
25 | 27 |
public abstract class AbstractFeatureStoreTransform implements |
26 | 28 |
FeatureStoreTransform { |
29 |
public static final String METADATA_DEFINITION_NAME = "FeatureStoreTransform"; |
|
27 | 30 |
public static final String ABSTRACT_FEATURESTORE_DYNCLASS_NAME = "AbstractFeatureStoreTransform"; |
28 | 31 |
|
29 | 32 |
private FeatureStore store; |
... | ... | |
35 | 38 |
|
36 | 39 |
protected String descripcion; |
37 | 40 |
|
38 |
|
|
41 |
private DynObject originalMetadata = null; |
|
42 |
|
|
39 | 43 |
|
40 | 44 |
public AbstractFeatureStoreTransform() { |
41 |
this("", "");
|
|
45 |
this(null, "");
|
|
42 | 46 |
} |
43 | 47 |
|
44 | 48 |
public AbstractFeatureStoreTransform(String name, String description) { |
... | ... | |
48 | 52 |
this.name = name; |
49 | 53 |
} |
50 | 54 |
this.descripcion = description; |
55 |
|
|
51 | 56 |
} |
52 | 57 |
|
53 | 58 |
public String getDescription() { |
... | ... | |
106 | 111 |
public void saveToState(PersistentState state) throws PersistenceException { |
107 | 112 |
state.set("store", store); |
108 | 113 |
} |
114 |
|
|
115 |
|
|
116 |
public final void setSourceMetadata(DynObject metadata) { |
|
117 |
this.originalMetadata = metadata; |
|
118 |
} |
|
119 |
|
|
120 |
protected DynObject getSourceMetadata() { |
|
121 |
return this.originalMetadata; |
|
122 |
} |
|
123 |
|
|
124 |
/** |
|
125 |
* Get the metadata value for the name <code>name</code>. |
|
126 |
* |
|
127 |
* Overwrite this method to support that this transform overwrite the values |
|
128 |
* of the statore's metadata. |
|
129 |
* |
|
130 |
* @see {#Metadata.getDynValue} |
|
131 |
*/ |
|
132 |
public Object getDynValue(String name) throws DynFieldNotFoundException { |
|
133 |
throw new DynFieldNotFoundException(name, "transform"); |
|
134 |
} |
|
135 |
|
|
136 |
/** |
|
137 |
* Return true is the value <code>name</name> has a value in the metadata |
|
138 |
* |
|
139 |
* Overwrite this method to support that this transform overwrite the values |
|
140 |
* of the statore's metadata. |
|
141 |
* |
|
142 |
* @see {#Metadata.hasDynValue} |
|
143 |
*/ |
|
144 |
public boolean hasDynValue(String name) { |
|
145 |
return false; |
|
146 |
} |
|
147 |
|
|
148 |
/** |
|
149 |
* Set the value of a metadata. |
|
150 |
* |
|
151 |
* Overwrite this method to support that this transform overwrite the values |
|
152 |
* of the statore's metadata. |
|
153 |
* |
|
154 |
* @see {#Metadata.getDynValue} |
|
155 |
*/ |
|
156 |
public void setDynValue(String name, Object value) |
|
157 |
throws DynFieldNotFoundException { |
|
158 |
throw new DynFieldNotFoundException(name, "transform"); |
|
159 |
} |
|
160 |
|
|
109 | 161 |
} |
Also available in: Unified diff