|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectPropertyTypeImpl
AttributeTypeImpl
ComplexTypeImpl
FeatureTypeImpl
SimpleFeatureTypeImpl
DefaultFeatureType
public class DefaultFeatureType
A basic implementation of FeatureType.
modules/library/legacy (gt-legacy.jar)
Field Summary | |
---|---|
static FeatureType |
EMPTY
An feature type with no attributes |
Fields inherited from class AttributeTypeImpl |
---|
identified |
Fields inherited from class PropertyTypeImpl |
---|
binding, description, isAbstract, name, restrictions, superType, userData |
Constructor Summary | |
---|---|
DefaultFeatureType(Name name,
Collection types,
Collection superTypes,
GeometryAttributeType defaultGeom)
Constructs a new DefaultFeatureType. |
|
DefaultFeatureType(Name name,
List schema,
GeometryDescriptor defaultGeometry,
boolean isAbstract,
List restrictions,
AttributeType superType,
InternationalString description)
|
|
DefaultFeatureType(String typeName,
String namespace,
Collection types,
Collection superTypes,
GeometryAttributeType defaultGeom)
|
|
DefaultFeatureType(String typeName,
URI namespace,
Collection types,
Collection superTypes,
GeometryAttributeType defaultGeom)
|
Method Summary | |
---|---|
Feature |
create(Object[] attributes)
Creates a new feature, with a generated unique featureID. |
Feature |
create(Object[] attributes,
String featureID)
Creates a new feature, with the proper featureID, using this FeatureType. |
Feature |
duplicate(Feature original)
|
boolean |
equals(Object other)
Override of equals. |
int |
find(AttributeType type)
Find the position of a given AttributeType. |
int |
find(String attName)
Find the position of an AttributeType which matches the given String. |
FeatureType[] |
getAncestors()
Obtain an array of this FeatureTypes ancestors. |
int |
getAttributeCount()
Returns the number of attributes at the first 'level' of the schema. |
AttributeType |
getAttributeType(int position)
Gets the attributeType at the specified index. |
AttributeType |
getAttributeType(String xPath)
Gets the attributeType at this xPath, if the specified attributeType does not exist then null is returned. |
AttributeType[] |
getAttributeTypes()
|
GeometryAttributeType |
getGeometryDescriptor()
Gets the primary geometry AttributeType. |
URI |
getNamespace()
Gets the global schema namespace. |
String |
getTypeName()
Gets the type name for this schema. |
boolean |
hasAttributeType(String xPath)
This is only used twice in the whole geotools code base, and one of those is for a test, so we're removing it from the interface. |
int |
hashCode()
Override of hashcode. |
boolean |
isAbstract()
Is this FeatureType an abstract type? |
boolean |
isDescendedFrom(FeatureType type)
A convenience method for calling FeatureType f1; FeatureType f2;
f1.isDescendedFrom(f2.getNamespace(),f2.getName()); |
boolean |
isDescendedFrom(URI nsURI,
String typeName1)
Test to determine whether this FeatureType is descended from the given FeatureType. |
Methods inherited from class SimpleFeatureTypeImpl |
---|
getAttributeDescriptors, getDescriptor, getDescriptor, getDescriptor, getType, getType, getType, getTypes, indexOf, indexOf |
Methods inherited from class FeatureTypeImpl |
---|
getCoordinateReferenceSystem |
Methods inherited from class ComplexTypeImpl |
---|
getBinding, getDescriptors, isInline, toString |
Methods inherited from class AttributeTypeImpl |
---|
createDefaultValue, getSuper, isIdentified, parse |
Methods inherited from class PropertyTypeImpl |
---|
getDescription, getName, getRestrictions, getUserData |
Methods inherited from class Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface SimpleFeatureType |
---|
getAttributeDescriptors, getDescriptor, getDescriptor, getDescriptor, getType, getType, getType, getTypes, indexOf, indexOf |
Methods inherited from interface FeatureType |
---|
getCoordinateReferenceSystem, isIdentified |
Methods inherited from interface ComplexType |
---|
getBinding, getDescriptors, isInline |
Methods inherited from interface AttributeType |
---|
getSuper |
Methods inherited from interface PropertyType |
---|
getDescription, getName, getRestrictions, getUserData |
Field Detail |
---|
public static final FeatureType EMPTY
Constructor Detail |
---|
public DefaultFeatureType(String typeName, String namespace, Collection types, Collection superTypes, GeometryAttributeType defaultGeom) throws SchemaException, NullPointerException
SchemaException
NullPointerException
public DefaultFeatureType(String typeName, URI namespace, Collection types, Collection superTypes, GeometryAttributeType defaultGeom) throws NullPointerException
NullPointerException
public DefaultFeatureType(Name name, Collection types, Collection superTypes, GeometryAttributeType defaultGeom) throws NullPointerException
Attributes from the superTypes will be copied to the list of attributes for this feature type.
typeName
- The name to give this FeatureType.namespace
- The namespace of the new FeatureType.types
- The attributeTypes to use for validation.superTypes
- The ancestors of this FeatureType.defaultGeom
- The attributeType to set as the defaultGeometry.
SchemaException
- For problems making the FeatureType.
NullPointerException
- If typeName is null.public DefaultFeatureType(Name name, List schema, GeometryDescriptor defaultGeometry, boolean isAbstract, List restrictions, AttributeType superType, InternationalString description)
Method Detail |
---|
public Feature create(Object[] attributes) throws IllegalAttributeException
attributes
- the array of attribute values
IllegalAttributeException
- if this FeatureType does not validate
the attributes.public Feature create(Object[] attributes, String featureID) throws IllegalAttributeException
attributes
- the array of attribute values.featureID
- the feature ID.
IllegalAttributeException
- if this FeatureType does not validate
the attributes.public Feature duplicate(Feature original) throws IllegalAttributeException
IllegalAttributeException
public GeometryAttributeType getGeometryDescriptor()
getGeometryDescriptor
in interface FeatureType
getGeometryDescriptor
in class FeatureTypeImpl
public AttributeType getAttributeType(String xPath)
xPath
- XPath pointer to attribute type.
public int find(AttributeType type)
type
- The type to search for.
public int find(String attName)
attName
- the name to look for
public AttributeType getAttributeType(int position)
position
- the position of the attribute to check.
public AttributeType[] getAttributeTypes()
public URI getNamespace()
public String getTypeName()
getTypeName
in interface SimpleFeatureType
getTypeName
in class SimpleFeatureTypeImpl
public boolean hasAttributeType(String xPath)
xPath
- XPath pointer to attribute type.
public int getAttributeCount()
getAttributeCount
in interface SimpleFeatureType
getAttributeCount
in class SimpleFeatureTypeImpl
public int hashCode()
AttributeTypeImpl
hashCode
in interface PropertyType
hashCode
in class FeatureTypeImpl
public boolean equals(Object other)
AttributeTypeImpl
equals
in interface PropertyType
equals
in class FeatureTypeImpl
other
- the object to be tested for equality.
public FeatureType[] getAncestors()
public boolean isAbstract()
isAbstract
in interface PropertyType
isAbstract
in class PropertyTypeImpl
public boolean isDescendedFrom(FeatureType type)
FeatureType f1; FeatureType f2;
f1.isDescendedFrom(f2.getNamespace(),f2.getName());
type
- The type to compare to.
public boolean isDescendedFrom(URI nsURI, String typeName1)
nsURI
- The namespace URI to use.typeName1
- The typeName.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |