public class DefaultEditableFeatureType extends DefaultFeatureType implements EditableFeatureType, Observer
| Modifier and Type | Class and Description |
|---|---|
protected class |
DefaultEditableFeatureType.EditableDelegatedIterator |
DefaultFeatureType.DelegatedIterator, DefaultFeatureType.SubtypeFeatureTypeNameExceptionFeatureType.FeatureTypeChangedallowAtomaticValues, checkFeaturesAtFinishEditing, checkFeaturesAtInsert, defaultGeometryAttributeIndex, defaultGeometryAttributeName, defaultTimeAttributeIndex, defaultTimeAttributeName, fixed, hasEmulators, hasEvaluators, hasOID, internalID, pk, RECENTS_USEDSALL_FILTER, BASIC_TYPES_FILTEREMPTY_UNMODIFIABLEBASICLISTEMPTY_GETITEMWITHSIZEANDITERATOR| Modifier | Constructor and Description |
|---|---|
protected |
DefaultEditableFeatureType(DefaultEditableFeatureType other) |
protected |
DefaultEditableFeatureType(DefaultFeatureType other) |
|
DefaultEditableFeatureType(FeatureStore store) |
|
DefaultEditableFeatureType(FeatureStore store,
java.lang.String id) |
| Modifier and Type | Method and Description |
|---|---|
EditableFeatureAttributeDescriptor |
add(java.lang.String name,
int type)
Adds an attribute to this EditableFeatureType.
|
EditableFeatureAttributeDescriptor |
add(java.lang.String name,
int type,
Evaluator evaluator)
Adds a calculated attribute to this EditableFeatureType.
|
EditableFeatureAttributeDescriptor |
add(java.lang.String name,
int type,
FeatureAttributeEmulator emulator) |
EditableFeatureAttributeDescriptor |
add(java.lang.String name,
int type,
int size)
Adds an attribute to this EditableFeatureType.
|
EditableFeatureAttributeDescriptor |
add(java.lang.String name,
java.lang.String type) |
EditableFeatureAttributeDescriptor |
add(java.lang.String name,
java.lang.String type,
int size) |
boolean |
addAll(DefaultFeatureType other) |
void |
addAll(FeatureType attributes) |
EditableFeatureAttributeDescriptor |
addLike(FeatureAttributeDescriptor other) |
void |
checkIntegrity() |
void |
copyFrom(FeatureType other) |
void |
copyFrom(JsonObject json) |
protected void |
fixAll() |
void |
forceStrongChanges() |
FeatureType |
getCopy()
Returns a new copy of this FeatureType
|
protected DefaultFeatureAttributeDescriptor |
getCopyAttributeDescriptor(DefaultFeatureAttributeDescriptor src) |
FeatureAttributeDescriptor |
getDefaultGeometryAttribute()
Returns the default geometry FeatureAttributeDescriptor.
|
int |
getDefaultGeometryAttributeIndex()
Returns the index of the attribute that will be used as default geometry
attribute.
|
java.lang.String |
getDefaultGeometryAttributeName()
Returns the name of the attribute that will be used as default geometry
attribute for those processes that require a geometry (for instance
rendering).
|
int |
getDefaultTimeAttributeIndex()
Returns the index of the attribute that will be used as default geometry
attribute.
|
java.lang.String |
getDefaultTimeAttributeName()
Returns the name of the attribute that will be used as default geometry
attribute for those processes that require a geometry (for instance
rendering).
|
EditableFeatureType |
getEditable()
Returns an editable instance of this FeatureType.
|
EditableFeatureAttributeDescriptor |
getEditableAttributeDescriptor(int index)
Returns a
FeatureAttributeDescriptor given the attribute index. |
EditableFeatureAttributeDescriptor |
getEditableAttributeDescriptor(java.lang.String name)
Returns a
FeatureAttributeDescriptor given the attribute name,
or null if an attribute with the given name does not exist. |
protected java.util.Iterator |
getIterator(java.util.Iterator iter) |
FeatureType |
getNotEditableCopy()
Returns a copy of the associated FeatureType.
|
FeatureType |
getSource()
Returns the associated FeatureType.
|
boolean |
hasStrongChanges() |
boolean |
remove(EditableFeatureAttributeDescriptor attribute)
Removes an attribute from this EditableFeatureType, given
a reference to its descriptor.
|
FeatureAttributeDescriptor |
remove(int index)
Removes an attribute given its index
|
java.lang.Object |
remove(java.lang.String name)
Removes an attribute given its name
|
void |
removeAll() |
boolean |
removeAttributeDescriptor(EditableFeatureAttributeDescriptor attribute) |
java.lang.Object |
removeAttributeDescriptor(java.lang.String name) |
static void |
selfRegister() |
void |
set(java.lang.String name,
java.lang.String value) |
protected void |
setAllowAutomaticValues(boolean value) |
void |
setCheckFeaturesAtFinishEditing(boolean check) |
void |
setCheckFeaturesAtInsert(boolean check) |
void |
setDefaultGeometryAttributeName(java.lang.String name)
Sets the default geometry attribute name
|
void |
setDefaultGeometryType(int type,
int subType) |
void |
setHasOID(boolean hasOID)
Sets whether this EditableFeatureType has an OID.
|
void |
update(Observable observable,
java.lang.Object notification)
Called whenever a
Observable object is changed and this
Observer has registered on it to receive notifications. |
addDynField, addDynField, addDynFieldArray, addDynFieldBoolean, addDynFieldChoice, addDynFieldChoice, addDynFieldDate, addDynFieldDouble, addDynFieldFile, addDynFieldFloat, addDynFieldFolder, addDynFieldInt, addDynFieldList, addDynFieldLong, addDynFieldMap, addDynFieldObject, addDynFieldRange, addDynFieldRange, addDynFieldSet, addDynFieldSingle, addDynFieldSingle, addDynFieldString, addDynFieldURI, addDynFieldURL, addDynMethod, allowAutomaticValues, clone, copyFrom, equals, extend, extend, extend, extend, extend, fromJson, get, getAllAttributeDescriptors, getAsFeatureStore, getAttributeDescriptor, getAttributeDescriptor, getAttributeDescriptorFromAll, getAttributeDescriptors, getAttributeName, getCRC, getDeclaredDynField, getDeclaredDynFields, getDeclaredDynMethod, getDeclaredDynMethods, getDefaultSRS, getDefaultTimeAttribute, getDescription, getDynField, getDynFields, getDynMethod, getDynMethod, getDynMethods, getExtraColumns, getFilteredAttributes, getFullName, getId, getIndex, getLabel, getName, getNamespace, getNewFieldName, getOriginalFeatureType, getPrimaryKey, getRecentUseds, getRules, getSRSs, getStore, getSubtype, getSubtype, getSubtype, getSubtype, getSuperDynClasses, getSuperDynStructs, getTags, hasEmulators, hasEvaluators, hasOID, hasOnlyMetadataChanges, hasPrimaryKey, hasRequiredFields, isCheckFeaturesAtFinishEditing, isCheckFeaturesAtInsert, isExtendable, isInstance, isSubtypeOf, iterator, loadFromState, newInstance, registerPersistenceDefinition, remove, removeAll, removeDynField, removeDynMethod, saveToState, setDefaultTimeAttributeName, setDescription, setExtraColumn, setLabel, setNamespace, setStore, supportReferences, toJson, toJsonBuilder, toList, toString, validate, validateFeature, validateFeature, writeAsDALFile, writeAsDALFileadd, add, addAll, addAll, clear, contains, ensureCapacity, forEach, get, indexOf, isEmpty, lastIndexOf, listIterator, listIterator, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizefinalize, getClass, notify, notifyAll, wait, wait, waitsetDefaultTimeAttributeNameallowAutomaticValues, get, get, getAllAttributeDescriptors, getAsFeatureStore, getAttributeDescriptor, getAttributeDescriptor, getAttributeDescriptorFromAll, getAttributeDescriptors, getAttributeName, getDefaultSRS, getDefaultTimeAttribute, getExtraColumns, getFilteredAttributes, getId, getIndex, getNewFieldName, getOriginalFeatureType, getPrimaryKey, getRecentUseds, getRules, getSRSs, getStore, hasEvaluators, hasOID, hasOnlyMetadataChanges, hasPrimaryKey, isCheckFeaturesAtFinishEditing, isCheckFeaturesAtInsert, isEmpty, iterator, size, supportReferences, writeAsDALFile, writeAsDALFileaddDynMethod, getDeclaredDynMethod, getDeclaredDynMethods, getDynMethod, getDynMethod, getDynMethods, getSuperDynClasses, removeDynMethodaddDynField, getLabel, getTags, setLabeladdDynField, 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, validatetoListisEmpty, isEmpty, isEmptyQuietlytoJson, toJson, toJsonBuilder, toJsonBuilderfromJsoncloneQuietly, cloneQuietlypublic DefaultEditableFeatureType(FeatureStore store)
public DefaultEditableFeatureType(FeatureStore store, java.lang.String id)
protected DefaultEditableFeatureType(DefaultEditableFeatureType other)
protected DefaultEditableFeatureType(DefaultFeatureType other)
protected DefaultFeatureAttributeDescriptor getCopyAttributeDescriptor(DefaultFeatureAttributeDescriptor src)
getCopyAttributeDescriptor in class DefaultFeatureTypepublic void forceStrongChanges()
forceStrongChanges in interface EditableFeatureTypepublic boolean hasStrongChanges()
public FeatureType getCopy()
FeatureTypegetCopy in interface FeatureTypegetCopy in class DefaultFeatureTypepublic EditableFeatureType getEditable()
FeatureTypegetEditable in interface EditableFeatureTypegetEditable in interface FeatureTypegetEditable in class DefaultFeatureTypeEditableFeatureTypepublic boolean addAll(DefaultFeatureType other)
public EditableFeatureAttributeDescriptor addLike(FeatureAttributeDescriptor other)
addLike in interface EditableFeatureTypepublic FeatureType getSource()
EditableFeatureTypegetSource in interface EditableFeatureTypepublic FeatureType getNotEditableCopy()
EditableFeatureTypegetNotEditableCopy in interface EditableFeatureTypepublic EditableFeatureAttributeDescriptor add(java.lang.String name, int type)
EditableFeatureTypeadd in interface EditableFeatureTypename - string containing the name of the attributetype - data type of the attribute (one from DataTypes)public void removeAll()
removeAll in interface EditableFeatureTypepublic void addAll(FeatureType attributes)
addAll in interface EditableFeatureTypeaddAll in class DefaultFeatureTypepublic EditableFeatureAttributeDescriptor add(java.lang.String name, int type, int size)
EditableFeatureTypeadd in interface EditableFeatureTypename - string containing the name of the attributetype - data type of the attribute (one from DataTypes)size - size of the attribute.public EditableFeatureAttributeDescriptor add(java.lang.String name, int type, Evaluator evaluator)
EditableFeatureTypeadd in interface EditableFeatureTypename - string containing the name of the attributetype - data type of the attribute (one from DataTypes)evaluator - an evaluator containing the desired expressionpublic EditableFeatureAttributeDescriptor add(java.lang.String name, int type, FeatureAttributeEmulator emulator)
add in interface EditableFeatureTypepublic EditableFeatureAttributeDescriptor add(java.lang.String name, java.lang.String type)
add in interface EditableFeatureTypepublic EditableFeatureAttributeDescriptor add(java.lang.String name, java.lang.String type, int size)
add in interface EditableFeatureTypepublic java.lang.Object removeAttributeDescriptor(java.lang.String name)
public boolean removeAttributeDescriptor(EditableFeatureAttributeDescriptor attribute)
public FeatureAttributeDescriptor remove(int index)
EditableFeatureTyperemove in interface java.util.List<FeatureAttributeDescriptor>remove in interface EditableFeatureTyperemove in class java.util.ArrayList<FeatureAttributeDescriptor>index - position of the attribute to be removedpublic java.lang.Object remove(java.lang.String name)
EditableFeatureTyperemove in interface EditableFeatureTypename - string containing the name of the attribute to be removedpublic boolean remove(EditableFeatureAttributeDescriptor attribute)
EditableFeatureTyperemove in interface EditableFeatureTypeattribute - descriptor of the attribute to removeprotected void fixAll()
fixAll in class DefaultFeatureTypepublic void checkIntegrity()
throws DataListException
DataListExceptionpublic void setDefaultGeometryType(int type,
int subType)
setDefaultGeometryType in interface EditableFeatureTypepublic void setDefaultGeometryAttributeName(java.lang.String name)
EditableFeatureTypesetDefaultGeometryAttributeName in interface EditableFeatureTypename - string containing the default geometry attribute namepublic int getDefaultGeometryAttributeIndex()
FeatureTypegetDefaultGeometryAttributeIndex in interface FeatureTypegetDefaultGeometryAttributeIndex in class DefaultFeatureTypepublic java.lang.String getDefaultGeometryAttributeName()
FeatureTypegetDefaultGeometryAttributeName in interface FeatureTypegetDefaultGeometryAttributeName in class DefaultFeatureTypepublic FeatureAttributeDescriptor getDefaultGeometryAttribute()
FeatureTypegetDefaultGeometryAttribute in interface FeatureTypegetDefaultGeometryAttribute in class DefaultFeatureTypepublic int getDefaultTimeAttributeIndex()
FeatureTypegetDefaultTimeAttributeIndex in interface FeatureTypegetDefaultTimeAttributeIndex in class DefaultFeatureTypepublic java.lang.String getDefaultTimeAttributeName()
FeatureTypegetDefaultTimeAttributeName in interface FeatureTypegetDefaultTimeAttributeName in class DefaultFeatureTypepublic void setHasOID(boolean hasOID)
EditableFeatureTypesetHasOID in interface EditableFeatureTypehasOID - true if it has an OID, or false if not.protected java.util.Iterator getIterator(java.util.Iterator iter)
getIterator in class DefaultFeatureTypepublic EditableFeatureAttributeDescriptor getEditableAttributeDescriptor(java.lang.String name)
EditableFeatureTypeFeatureAttributeDescriptor given the attribute name,
or null if an attribute with the given name does not exist.getEditableAttributeDescriptor in interface EditableFeatureTypename - of the attributeFeatureAttributeDescriptorpublic EditableFeatureAttributeDescriptor getEditableAttributeDescriptor(int index)
EditableFeatureTypeFeatureAttributeDescriptor given the attribute index.getEditableAttributeDescriptor in interface EditableFeatureTypeindex - of the attributeFeatureAttributeDescriptorpublic void setCheckFeaturesAtFinishEditing(boolean check)
setCheckFeaturesAtFinishEditing in interface EditableFeatureTypepublic void setCheckFeaturesAtInsert(boolean check)
setCheckFeaturesAtInsert in interface EditableFeatureTypeprotected void setAllowAutomaticValues(boolean value)
public void copyFrom(FeatureType other)
copyFrom in interface FeatureTypecopyFrom in class DefaultFeatureTypepublic void copyFrom(JsonObject json)
copyFrom in interface FeatureTypecopyFrom in class DefaultFeatureTypepublic void set(java.lang.String name,
java.lang.String value)
set in interface EditableFeatureTypepublic static void selfRegister()
public void update(Observable observable, java.lang.Object notification)
ObserverObservable object is changed and this
Observer has registered on it to receive notifications.
Implementations of this method will be called for each simple notification or, if a complex notification is created, for each of the child notifications.
In the latter case, don't assume any ordering in the notification between
this Observer and other Observers listening to the same
Observable.
In a complex notification scenario, if you want to receive only the
complex notification and not each of the child notifications, just
implement the ComplexObserver and prepare this method
implementation to handle receiving DefaultComplexNotification instances
as well as direct notification objects.