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>

public interface EditableFeatureType extends FeatureType, org.gvsig.json.SupportFromJson
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.
  • Method Details

    • setDefaultGeometryAttributeName

      void setDefaultGeometryAttributeName(String name)
      Sets the default geometry attribute name
      Parameters:
      name - string containing the default geometry attribute name
    • setDefaultGeometryType

      void setDefaultGeometryType(int type, int subType)
    • remove

      boolean remove(EditableFeatureAttributeDescriptor attribute)
      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

      Object remove(String name)
      Removes an attribute given its name
      Parameters:
      name - string containing the name of the attribute to be removed
      Returns:
    • remove

      Object remove(int index)
      Removes an attribute given its index
      Parameters:
      index - position of the attribute to be removed
      Returns:
    • removeAll

      void removeAll()
    • addAll

      void addAll(FeatureType other)
    • add

      Adds an attribute to this EditableFeatureType.
      Parameters:
      name - string containing the name of the attribute
      type - data type of the attribute (one from DataTypes)
      Returns:
      a new EditableFeatureAttributeDescriptor
    • add

    • add

      EditableFeatureAttributeDescriptor add(String name, int type, int size)
      Adds an attribute to this EditableFeatureType.
      Parameters:
      name - string containing the name of the attribute
      type - data type of the attribute (one from DataTypes)
      size - size of the attribute.
      Returns:
      a new EditableFeatureAttributeDescriptor
    • add

      EditableFeatureAttributeDescriptor add(String name, String type, int size)
    • 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 attribute
      type - data type of the attribute (one from DataTypes)
      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:
      getEditable in interface FeatureType
      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

      void setDefaultTimeAttributeName(String name)
      Sets the default time attribute name
      Parameters:
      name - string containing the default time attribute name
    • getEditableAttributeDescriptor

      EditableFeatureAttributeDescriptor getEditableAttributeDescriptor(String name)
      Returns a FeatureAttributeDescriptor given the attribute name, or null if an attribute with the given name does not exist.
      Parameters:
      name - of the attribute
      Returns:
      a FeatureAttributeDescriptor
    • getEditableAttributeDescriptor

      EditableFeatureAttributeDescriptor getEditableAttributeDescriptor(int index)
      Returns a FeatureAttributeDescriptor given the attribute index.
      Parameters:
      index - of the attribute
      Returns:
      a FeatureAttributeDescriptor
    • addLike

    • setCheckFeaturesAtFinishEditing

      void setCheckFeaturesAtFinishEditing(boolean check)
    • setCheckFeaturesAtInsert

      void setCheckFeaturesAtInsert(boolean check)
    • set

      void set(String name, String value)
    • forceStrongChanges

      void forceStrongChanges()