org.opengis.feature
Interface FeatureAttributeDescriptor
-
public interface FeatureAttributeDescriptorDescriptor that gives the name, data type, and cardinality of an attribute from aFeatureType.Author's note: In the OGC Feature abstract model, attributes have both a name and a type. Then the type itself has a name and a datatype. This is apparently done so that attributes of different names, perhaps in different types of Features, can share a type. However, this seems a little confusing. Here, the name of the Feature attribute and its datatype are rolled into one object.
- Since:
- GeoAPI 2.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description DataTypegetDataType()Returns a constant fromDataType.intgetMaximumOccurrences()Returns the maximum number of occurrences of this attribute on a given feature.intgetMinimumOccurrences()Returns the minimum number of occurrences of this attribute on a given feature.java.lang.StringgetName()Returns the name of this attribute.java.lang.ClassgetObjectClass()For attributes of typeOBJECT, this returns the JavaClassobject that class or interface that all values of this attribute can be cast to.intgetPrecision()For attributes of typeDECIMAL, this returns the maximum number of places after the decimal point.intgetSize()Returns a number that indicates the size of a given attribute.booleanisPrimaryKey()Returnstrueif this attribute forms all or part of the unique identifying value for the feature it is contained by.
-
-
-
Method Detail
-
getName
java.lang.String getName()
Returns the name of this attribute. This is the name that can be used to retrieve the value of an attribute and usually maps to either an XML element name or a column name in a relational database.
-
getDataType
DataType getDataType()
Returns a constant fromDataType. The return value of this method indicates how the return values ofgetSize(),getPrecision(), andgetObjectClass()should be interpreted. For attributes whose maximum cardinality is greater than one, this should return the data type of the individual elements of the collection.
-
getSize
int getSize()
-
getPrecision
int getPrecision()
For attributes of typeDECIMAL, this returns the maximum number of places after the decimal point. For other types, this must always return zero.
-
getObjectClass
java.lang.Class getObjectClass()
For attributes of typeOBJECT, this returns the JavaClassobject that class or interface that all values of this attribute can be cast to.
-
getMinimumOccurrences
int getMinimumOccurrences()
Returns the minimum number of occurrences of this attribute on a given feature. The vast majority of data sources and data consumers will only function with this value being zero or one. If the minimum number of occurrences is zero, this is equivalent, in SQL terms, to the attribute being nillable.
-
getMaximumOccurrences
int getMaximumOccurrences()
Returns the maximum number of occurrences of this attribute on a given feature. The vast majority of data sources and data consumers will only function with this value being one. A value ofInteger.MAX_VALUEindicates that the maximum number of occurrences is unbounded.
-
isPrimaryKey
boolean isPrimaryKey()
Returnstrueif this attribute forms all or part of the unique identifying value for the feature it is contained by. The primary key attributes uniquely identify this feature from other features of the same type. This is different from the feature's ID, which must uniquely identify theFeatureamong all feature types.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG