Package org.gvsig.fmap.dal.feature
Interface EditableFeatureType
- All Superinterfaces:
org.gvsig.tools.dynobject.DynClass,org.gvsig.tools.dynobject.DynStruct,org.gvsig.tools.dynobject.DynStruct_v2,FeatureType,org.gvsig.tools.util.GetItem<FeatureAttributeDescriptor>,org.gvsig.tools.util.GetItemWithSize<FeatureAttributeDescriptor>,org.gvsig.tools.util.GetItemWithSizeAndIterator<FeatureAttributeDescriptor>,org.gvsig.tools.util.IsEmpty,Iterable<FeatureAttributeDescriptor>,org.gvsig.tools.util.Size,org.gvsig.json.SupportFromJson,org.gvsig.json.SupportToJson,org.gvsig.tools.dynobject.Tagged,org.gvsig.tools.util.UnmodifiableBasicCollection<FeatureAttributeDescriptor>,org.gvsig.tools.util.UnmodifiableBasicList<FeatureAttributeDescriptor>
This interface represents a FeatureType in editable state.
To edit a FeatureType you have to obtain its instance of
EditableFeatureType and then perform editing operations on it.
Once you have completed the editing you can save the changes to the original
FeatureType. This is the only way to edit a FeatureType.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gvsig.fmap.dal.feature.FeatureType
FeatureType.FeatureTypeChanged -
Field Summary
Fields inherited from interface org.gvsig.fmap.dal.feature.FeatureType
ALL_FILTER, BASIC_TYPES_FILTERFields inherited from interface org.gvsig.tools.util.GetItemWithSizeAndIterator
EMPTY_GETITEMWITHSIZEANDITERATORFields inherited from interface org.gvsig.tools.util.UnmodifiableBasicList
EMPTY_UNMODIFIABLEBASICLIST -
Method Summary
Modifier and TypeMethodDescriptionAdds an attribute to this EditableFeatureType.Adds an attribute to this EditableFeatureType.add(String name, int type, FeatureAttributeEmulator emulator) Adds a calculated attribute to this EditableFeatureType.voidaddAll(FeatureType other) voidReturns a copy of this editable feature type.getEditableAttributeDescriptor(int index) Returns aFeatureAttributeDescriptorgiven the attribute index.Returns aFeatureAttributeDescriptorgiven the attribute name, or null if an attribute with the given name does not exist.Returns a copy of the associated FeatureType.Returns the associated FeatureType.remove(int index) Removes an attribute given its indexRemoves an attribute given its namebooleanremove(EditableFeatureAttributeDescriptor attribute) Removes an attribute from this EditableFeatureType, given a reference to its descriptor.voidvoidvoidsetCheckFeaturesAtFinishEditing(boolean check) voidsetCheckFeaturesAtInsert(boolean check) voidSets the default geometry attribute namevoidsetDefaultGeometryType(int type, int subType) voidSets the default time attribute namevoidsetHasOID(boolean hasOID) Sets whether this EditableFeatureType has an OID.Methods inherited from interface org.gvsig.tools.dynobject.DynClass
addDynMethod, getDeclaredDynMethod, getDeclaredDynMethods, getDynMethod, getDynMethod, getDynMethods, getSuperDynClasses, removeDynMethodMethods inherited from interface org.gvsig.tools.dynobject.DynStruct
addDynField, addDynFieldArray, addDynFieldBoolean, addDynFieldChoice, addDynFieldChoice, addDynFieldDate, addDynFieldDouble, addDynFieldFile, addDynFieldFloat, addDynFieldFolder, addDynFieldInt, addDynFieldList, addDynFieldLong, addDynFieldMap, addDynFieldObject, addDynFieldRange, addDynFieldRange, addDynFieldSet, addDynFieldSingle, addDynFieldSingle, addDynFieldString, addDynFieldURI, addDynFieldURL, extend, extend, extend, getDeclaredDynField, getDeclaredDynFields, getDescription, getDynField, getDynFields, getFullName, getName, getNamespace, getSuperDynStructs, isExtendable, isInstance, newInstance, remove, removeDynField, setDescription, setNamespace, validateMethods inherited from interface org.gvsig.tools.dynobject.DynStruct_v2
addDynField, getLabel, getTags, setLabelMethods inherited from interface org.gvsig.fmap.dal.feature.FeatureType
allowAutomaticValues, copyFrom, get, get, getAllAttributeDescriptors, getAsFeatureStore, getAttributeDescriptor, getAttributeDescriptor, getAttributeDescriptorFromAll, getAttributeDescriptors, getAttributeName, getCopy, getDefaultGeometryAttribute, getDefaultGeometryAttributeIndex, getDefaultGeometryAttributeName, getDefaultSRS, getDefaultTimeAttribute, getDefaultTimeAttributeIndex, getDefaultTimeAttributeName, getExtraColumns, getFilteredAttributes, getId, getIndex, getNewFieldName, getOriginalFeatureType, getPrimaryKey, getRecentUseds, getRules, getSRSs, getStore, hasEvaluators, hasOID, hasOnlyMetadataChanges, hasPrimaryKey, isCheckFeaturesAtFinishEditing, isCheckFeaturesAtInsert, isEmpty, iterator, size, supportReferences, writeAsDALFile, writeAsDALFileMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface org.gvsig.json.SupportFromJson
fromJsonMethods inherited from interface org.gvsig.json.SupportToJson
toJson, toJson, toJsonBuilder, toJsonBuilderMethods inherited from interface org.gvsig.tools.util.UnmodifiableBasicList
toList
-
Method Details
-
setDefaultGeometryAttributeName
Sets the default geometry attribute name- Parameters:
name- string containing the default geometry attribute name
-
setDefaultGeometryType
void setDefaultGeometryType(int type, int subType) -
remove
Removes an attribute from this EditableFeatureType, given a reference to its descriptor.- Parameters:
attribute- descriptor of the attribute to remove- Returns:
- true if the attribute was removed successfully, false if not.
-
remove
Removes an attribute given its name- Parameters:
name- string containing the name of the attribute to be removed- Returns:
-
remove
Removes an attribute given its index- Parameters:
index- position of the attribute to be removed- Returns:
-
removeAll
void removeAll() -
addAll
-
add
Adds an attribute to this EditableFeatureType.- Parameters:
name- string containing the name of the attributetype- data type of the attribute (one fromDataTypes)- Returns:
- a new EditableFeatureAttributeDescriptor
-
add
-
add
Adds an attribute to this EditableFeatureType.- Parameters:
name- string containing the name of the attributetype- data type of the attribute (one fromDataTypes)size- size of the attribute.- Returns:
- a new EditableFeatureAttributeDescriptor
-
add
-
add
EditableFeatureAttributeDescriptor add(String name, int type, org.gvsig.tools.evaluator.Evaluator evaluator) Adds a calculated attribute to this EditableFeatureType.- Parameters:
name- string containing the name of the attributetype- data type of the attribute (one fromDataTypes)evaluator- an evaluator containing the desired expression- Returns:
- a new EditableFeatureAttributeDescriptor
-
add
-
getSource
FeatureType getSource()Returns the associated FeatureType.- Returns:
- the associated FeatureType
-
getNotEditableCopy
FeatureType getNotEditableCopy()Returns a copy of the associated FeatureType.- Returns:
- associated FeatureType
-
getEditable
EditableFeatureType getEditable()Returns a copy of this editable feature type.- Specified by:
getEditablein interfaceFeatureType- Returns:
- the copy
- See Also:
-
setHasOID
void setHasOID(boolean hasOID) Sets whether this EditableFeatureType has an OID. An OID is a unique serializable reference to a feature (a primary key of sorts that may or may not be defined by the store). If the store does not define this OID then it will be generated by the feature reference itself. Its main use is to provide a way to persist data associated to a feature by this OID.- Parameters:
hasOID- true if it has an OID, or false if not.
-
setDefaultTimeAttributeName
Sets the default time attribute name- Parameters:
name- string containing the default time attribute name
-
getEditableAttributeDescriptor
Returns aFeatureAttributeDescriptorgiven the attribute name, or null if an attribute with the given name does not exist.- Parameters:
name- of the attribute- Returns:
- a
FeatureAttributeDescriptor
-
getEditableAttributeDescriptor
Returns aFeatureAttributeDescriptorgiven the attribute index.- Parameters:
index- of the attribute- Returns:
- a
FeatureAttributeDescriptor
-
addLike
-
setCheckFeaturesAtFinishEditing
void setCheckFeaturesAtFinishEditing(boolean check) -
setCheckFeaturesAtInsert
void setCheckFeaturesAtInsert(boolean check) -
set
-
forceStrongChanges
void forceStrongChanges()
-