public class DefaultFeatureType extends ArrayList<FeatureAttributeDescriptor> implements FeatureType, DynClass, Cloneable
Modifier and Type | Class and Description |
---|---|
protected class |
DefaultFeatureType.DelegatedIterator |
class |
DefaultFeatureType.SubtypeFeatureTypeNameException |
Modifier and Type | Field and Description |
---|---|
protected boolean |
allowAtomaticValues |
protected int |
defaultGeometryAttributeIndex |
protected String |
defaultGeometryAttributeName |
protected int |
defaultTimeAttributeIndex |
protected boolean |
hasEmulators |
protected boolean |
hasEvaluators |
protected boolean |
hasOID |
protected String |
internalID |
protected FeatureAttributeDescriptor[] |
pk |
modCount
Modifier | Constructor and Description |
---|---|
protected |
DefaultFeatureType() |
protected |
DefaultFeatureType(DefaultFeatureType other) |
protected |
DefaultFeatureType(DefaultFeatureType other,
boolean copyAttributes) |
protected |
DefaultFeatureType(String id) |
Modifier and Type | Method and Description |
---|---|
DynField |
addDynField(String name)
Start of DynClass interface implementation
READONLY
|
DynField |
addDynFieldArray(String name) |
DynField |
addDynFieldBoolean(String name) |
DynField |
addDynFieldChoice(String name,
int type,
Object defaultValue,
DynObjectValueItem[] values) |
DynField |
addDynFieldChoice(String name,
int type,
Object defaultValue,
DynObjectValueItem[] values,
boolean mandatory,
boolean persistent) |
DynField |
addDynFieldDate(String name) |
DynField |
addDynFieldDouble(String name) |
DynField |
addDynFieldFile(String name) |
DynField |
addDynFieldFloat(String name) |
DynField |
addDynFieldFolder(String name) |
DynField |
addDynFieldInt(String name) |
DynField |
addDynFieldList(String name) |
DynField |
addDynFieldLong(String name) |
DynField |
addDynFieldMap(String name) |
DynField |
addDynFieldObject(String name) |
DynField |
addDynFieldRange(String name,
int type,
Object defaultValue,
Object min,
Object max) |
DynField |
addDynFieldRange(String name,
int type,
Object defaultValue,
Object min,
Object max,
boolean mandatory,
boolean persistent) |
DynField |
addDynFieldSet(String name) |
DynField |
addDynFieldSingle(String name,
int type,
Object defaultValue) |
DynField |
addDynFieldSingle(String name,
int type,
Object defaultValue,
boolean mandatory,
boolean persistent) |
DynField |
addDynFieldString(String name) |
DynField |
addDynFieldURI(String name) |
DynField |
addDynFieldURL(String name) |
void |
addDynMethod(DynMethod dynMethod) |
boolean |
allowAutomaticValues()
Incicates if attibutes with automatic values are allowed in the source
|
Object |
clone()
Creates a copy of the object.
|
boolean |
equals(Object other) |
void |
extend(DynClass dynClass) |
void |
extend(DynStruct struct) |
void |
extend(DynStruct[] structs) |
void |
extend(String dynClassName) |
void |
extend(String namespace,
String dynClassName) |
Object |
get(String name)
Returns an attribute descriptor given its name.
|
FeatureAttributeDescriptor |
getAttributeDescriptor(int index)
Returns a
FeatureAttributeDescriptor given the attribute index. |
FeatureAttributeDescriptor |
getAttributeDescriptor(String name)
Returns a
FeatureAttributeDescriptor given the attribute name,
or null if an attribute with the given name does not exist. |
FeatureAttributeDescriptor[] |
getAttributeDescriptors()
Returns an Array of the FeatureAttributeDescriptor
|
FeatureType |
getCopy()
Returns a new copy of this FeatureType
|
DynField |
getDeclaredDynField(String name) |
DynField[] |
getDeclaredDynFields() |
DynMethod |
getDeclaredDynMethod(String name) |
DynMethod[] |
getDeclaredDynMethods() |
FeatureAttributeDescriptor |
getDefaultGeometryAttribute()
Returns the default geometry FeatureAttributeDescriptor.
|
int |
getDefaultGeometryAttributeIndex()
Returns the index of the attribute that will be used as default
geometry attribute.
|
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).
|
IProjection |
getDefaultSRS()
Returns the SRS in which the default geometry attribute is expressed.
|
FeatureAttributeDescriptor |
getDefaultTimeAttribute()
Returns the default time FeatureAttributeDescriptor.
|
String |
getDescription() |
DynField |
getDynField(String name) |
DynField[] |
getDynFields() |
DynMethod |
getDynMethod(int code) |
DynMethod |
getDynMethod(String name) |
DynMethod[] |
getDynMethods() |
EditableFeatureType |
getEditable()
Returns an editable instance of this FeatureType.
|
String |
getFullName() |
String |
getId()
Returns this FeatureType identifier.
|
int |
getIndex(String name)
Given the name of an attribute, this method returns
its position in this FeatureType.
|
protected Iterator |
getIterator(Iterator iter) |
String |
getName() |
String |
getNamespace() |
FeatureAttributeDescriptor[] |
getPrimaryKey()
Returns an Array of the FeatureAttributeDescriptor that compounds the
primary key
|
FeatureRules |
getRules()
Returns a
FeatureRules containing
all rules applicable to features of this type. |
List |
getSRSs()
Returns a list with the SRSs in which this FeatureType geometries are
expressed.
|
FeatureType |
getSubtype(String[] names) |
FeatureType |
getSubtype(String[] names,
String[] constantsNames) |
DynClass[] |
getSuperDynClasses() |
DynStruct[] |
getSuperDynStructs() |
boolean |
hasEmulators() |
boolean |
hasEvaluators()
Indicates whether this FeatureType has any assigned
Evaluator (s). |
boolean |
hasOID()
Indicates whether
Feature (s) of this FeatureType have an OID defined. |
protected void |
initialize(DefaultFeatureType other,
boolean copyAttributes) |
protected void |
intitalizeAddAttibute(DefaultFeatureAttributeDescriptor attr) |
boolean |
isExtendable(DynStruct dynStruct) |
boolean |
isInstance(DynObject dynObject) |
boolean |
isSubtypeOf(FeatureType featureType) |
Iterator |
iterator()
Returns an iterator over this FeatureType's attributes.
|
DynObject |
newInstance() |
void |
remove(DynStruct superDynStruct)
Removes a given dynStruct from the current superDynClasses of this
dynClass.
|
void |
removeAll(DynStruct[] superDynStruct) |
void |
removeDynField(String name) |
void |
removeDynMethod(String name) |
void |
setDescription(String description) |
void |
setNamespace(String namespace) |
String |
toString() |
void |
validate(DynObject object) |
void |
validateFeature(Feature feature,
int mode) |
add, add, addAll, addAll, clear, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeRange, retainAll, set, size, subList, toArray, toArray, trimToSize
hashCode
containsAll
finalize, getClass, notify, notifyAll, wait, wait, wait
get, size
containsAll, hashCode
protected boolean hasEvaluators
protected boolean hasEmulators
protected String defaultGeometryAttributeName
protected int defaultGeometryAttributeIndex
protected int defaultTimeAttributeIndex
protected boolean hasOID
protected boolean allowAtomaticValues
protected FeatureAttributeDescriptor[] pk
protected String internalID
protected DefaultFeatureType(String id)
protected DefaultFeatureType()
protected DefaultFeatureType(DefaultFeatureType other)
protected DefaultFeatureType(DefaultFeatureType other, boolean copyAttributes)
protected void initialize(DefaultFeatureType other, boolean copyAttributes)
protected void intitalizeAddAttibute(DefaultFeatureAttributeDescriptor attr)
public String getId()
FeatureType
getId
in interface FeatureType
public Object get(String name)
FeatureType
get
in interface FeatureType
name
- of the attributeFeatureAttributeDescriptor
.public FeatureAttributeDescriptor getAttributeDescriptor(String name)
FeatureType
FeatureAttributeDescriptor
given the attribute name,
or null if an attribute with the given name does not exist.getAttributeDescriptor
in interface FeatureType
name
- of the attributeFeatureAttributeDescriptor
public FeatureAttributeDescriptor getAttributeDescriptor(int index)
FeatureType
FeatureAttributeDescriptor
given the attribute index.getAttributeDescriptor
in interface FeatureType
index
- of the attributeFeatureAttributeDescriptor
public FeatureType getCopy()
FeatureType
getCopy
in interface FeatureType
public Object clone()
Cloneable
clone
in class ArrayList<FeatureAttributeDescriptor>
Object#clone()}.
public int getDefaultGeometryAttributeIndex()
FeatureType
getDefaultGeometryAttributeIndex
in interface FeatureType
public String getDefaultGeometryAttributeName()
FeatureType
getDefaultGeometryAttributeName
in interface FeatureType
public EditableFeatureType getEditable()
FeatureType
getEditable
in interface FeatureType
EditableFeatureType
public int getIndex(String name)
FeatureType
getIndex
in interface FeatureType
name
- of the attributepublic FeatureRules getRules()
FeatureType
FeatureRules
containing
all rules applicable to features of this type.getRules
in interface FeatureType
FeatureRules
containing all rules
applicable to features of this type.public boolean hasEvaluators()
FeatureType
Evaluator
(s).
Evaluators are used to obtain the values for calculated
attributes.hasEvaluators
in interface FeatureType
Evaluator
(s).public boolean hasEmulators()
public List getSRSs()
FeatureType
Geometry
.getSRSs
in interface FeatureType
public IProjection getDefaultSRS()
FeatureType
getDefaultSRS
in interface FeatureType
public void validateFeature(Feature feature, int mode) throws DataException
DataException
public FeatureType getSubtype(String[] names) throws DataException
DataException
public FeatureType getSubtype(String[] names, String[] constantsNames) throws DataException
DataException
public boolean isSubtypeOf(FeatureType featureType)
public boolean hasOID()
FeatureType
Feature
(s) of this FeatureType have an OID defined.
An OID is the Feature unique identifier.
Some stores provide their own OIDs which are always unique
(such as Postgre) while others don't support this concept and
then it is the library who creates runtime ad-hoc OIDs as
it see fits, but then integrity of this OIDs among different
work sessions cannot be guaranteed (this is the case for shape
files).hasOID
in interface FeatureType
public String toString()
toString
in class AbstractCollection<FeatureAttributeDescriptor>
public Iterator iterator()
FeatureType
FeatureAttributeDescriptor
.iterator
in interface Iterable<FeatureAttributeDescriptor>
iterator
in interface Collection<FeatureAttributeDescriptor>
iterator
in interface List<FeatureAttributeDescriptor>
iterator
in interface FeatureType
iterator
in class ArrayList<FeatureAttributeDescriptor>
FeatureAttributeDescriptor
s.public boolean allowAutomaticValues()
FeatureType
allowAutomaticValues
in interface FeatureType
public FeatureAttributeDescriptor[] getAttributeDescriptors()
FeatureType
getAttributeDescriptors
in interface FeatureType
public FeatureAttributeDescriptor[] getPrimaryKey()
FeatureType
getPrimaryKey
in interface FeatureType
public FeatureAttributeDescriptor getDefaultGeometryAttribute()
FeatureType
getDefaultGeometryAttribute
in interface FeatureType
public boolean equals(Object other)
equals
in interface Collection<FeatureAttributeDescriptor>
equals
in interface List<FeatureAttributeDescriptor>
equals
in class AbstractList<FeatureAttributeDescriptor>
public DynField addDynField(String name)
addDynField
in interface DynStruct
public DynField getDeclaredDynField(String name)
getDeclaredDynField
in interface DynStruct
public DynField[] getDeclaredDynFields()
getDeclaredDynFields
in interface DynStruct
public String getDescription()
getDescription
in interface DynStruct
public DynField getDynField(String name)
getDynField
in interface DynStruct
public DynField[] getDynFields()
getDynFields
in interface DynStruct
public void removeDynField(String name)
removeDynField
in interface DynStruct
public void addDynMethod(DynMethod dynMethod)
addDynMethod
in interface DynClass
public void extend(DynClass dynClass)
public DynMethod getDeclaredDynMethod(String name) throws DynMethodException
getDeclaredDynMethod
in interface DynClass
DynMethodException
public DynMethod[] getDeclaredDynMethods() throws DynMethodException
getDeclaredDynMethods
in interface DynClass
DynMethodException
public DynMethod getDynMethod(String name) throws DynMethodException
getDynMethod
in interface DynClass
DynMethodException
public DynMethod getDynMethod(int code) throws DynMethodException
getDynMethod
in interface DynClass
DynMethodException
public DynMethod[] getDynMethods() throws DynMethodException
getDynMethods
in interface DynClass
DynMethodException
public DynClass[] getSuperDynClasses()
getSuperDynClasses
in interface DynClass
public boolean isInstance(DynObject dynObject)
isInstance
in interface DynStruct
public DynObject newInstance()
newInstance
in interface DynStruct
public void removeDynMethod(String name)
removeDynMethod
in interface DynClass
public DynField addDynFieldChoice(String name, int type, Object defaultValue, DynObjectValueItem[] values, boolean mandatory, boolean persistent)
addDynFieldChoice
in interface DynStruct
#addDynFieldChoice(String)
public DynField addDynFieldRange(String name, int type, Object defaultValue, Object min, Object max, boolean mandatory, boolean persistent)
addDynFieldRange
in interface DynStruct
#addDynFieldRange(String)
public DynField addDynFieldSingle(String name, int type, Object defaultValue, boolean mandatory, boolean persistent)
addDynFieldSingle
in interface DynStruct
DynStruct.addDynFieldString(String)
public void validate(DynObject object) throws DynObjectValidateException
validate
in interface DynStruct
DynObjectValidateException
public DynField addDynFieldLong(String name)
addDynFieldLong
in interface DynStruct
public DynField addDynFieldChoice(String name, int type, Object defaultValue, DynObjectValueItem[] values)
addDynFieldChoice
in interface DynStruct
#addDynFieldChoice(String)
public DynField addDynFieldRange(String name, int type, Object defaultValue, Object min, Object max)
addDynFieldRange
in interface DynStruct
#addDynFieldRange(String)
public DynField addDynFieldSingle(String name, int type, Object defaultValue)
addDynFieldSingle
in interface DynStruct
DynStruct.addDynFieldString(String)
public DynField addDynFieldString(String name)
addDynFieldString
in interface DynStruct
public DynField addDynFieldInt(String name)
addDynFieldInt
in interface DynStruct
public DynField addDynFieldDouble(String name)
addDynFieldDouble
in interface DynStruct
public DynField addDynFieldFloat(String name)
addDynFieldFloat
in interface DynStruct
public DynField addDynFieldBoolean(String name)
addDynFieldBoolean
in interface DynStruct
public DynField addDynFieldList(String name)
addDynFieldList
in interface DynStruct
public DynField addDynFieldMap(String name)
addDynFieldMap
in interface DynStruct
public DynField addDynFieldObject(String name)
addDynFieldObject
in interface DynStruct
public DynField addDynFieldSet(String name)
addDynFieldSet
in interface DynStruct
public DynField addDynFieldArray(String name)
addDynFieldArray
in interface DynStruct
public DynField addDynFieldDate(String name)
addDynFieldDate
in interface DynStruct
public String getFullName()
getFullName
in interface DynStruct
public String getNamespace()
getNamespace
in interface DynStruct
public DynStruct[] getSuperDynStructs()
getSuperDynStructs
in interface DynStruct
public void setDescription(String description)
setDescription
in interface DynStruct
public void setNamespace(String namespace)
setNamespace
in interface DynStruct
public DynField addDynFieldFile(String name)
addDynFieldFile
in interface DynStruct
public DynField addDynFieldFolder(String name)
addDynFieldFolder
in interface DynStruct
public DynField addDynFieldURL(String name)
addDynFieldURL
in interface DynStruct
public DynField addDynFieldURI(String name)
addDynFieldURI
in interface DynStruct
public boolean isExtendable(DynStruct dynStruct)
isExtendable
in interface DynStruct
public void extend(DynStruct[] structs)
public void remove(DynStruct superDynStruct)
DynStruct
public void removeAll(DynStruct[] superDynStruct)
public FeatureAttributeDescriptor getDefaultTimeAttribute()
FeatureType
getDefaultTimeAttribute
in interface FeatureType