public class VPFFeatureType extends Object implements SimpleFeatureType
| Constructor and Description |
|---|
VPFFeatureType(VPFFeatureClass cFeatureClass)
A constructor for feature types with no information in a char.vdt file.
|
VPFFeatureType(VPFFeatureClass cFeatureClass,
SimpleFeature cFeature)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
static void |
debugFeature(SimpleFeature feature) |
static void |
debugFeatureType(SimpleFeatureType featureType) |
boolean |
equals(Object obj)
Equality based on property
PropertyType.getName(). |
int |
getAttributeCount()
Returns the number of attributes composing the feature type
This method is convenience for
getAttributes().size(). |
List<AttributeDescriptor> |
getAttributeDescriptors()
The list of attribute descriptors which make up the feature type.
|
Class<Collection<Property>> |
getBinding()
Override and type narrow to Collection
|
CoordinateReferenceSystem |
getCoordinateReferenceSystem()
The coordinate reference system of the feature.
|
VPFCoverage |
getCoverage() |
InternationalString |
getDescription()
Human readable description of this property type.
|
AttributeDescriptor |
getDescriptor(int index)
Returns the attribute descriptor at the specified index.
|
AttributeDescriptor |
getDescriptor(Name name)
Returns the attribute descriptor which matches the specified name.
|
AttributeDescriptor |
getDescriptor(String name)
Returns the attribute descriptor which matches the specified name.
|
Collection<PropertyDescriptor> |
getDescriptors()
The property descriptor which compose the complex type.
|
String |
getDirectoryName() |
String |
getFaccCode()
The FACC code, a two-letter, 3-number code identifying the feature type
|
VPFFeatureClass |
getFeatureClass() |
List |
getFileList()
Returns a list of file objects
|
GeometryDescriptor |
getGeometryDescriptor()
Describe the default geometric attribute for this feature.
|
Name |
getName()
The name of the property type.
|
List<Filter> |
getRestrictions()
List of restrictions used define valid values for properties of this property type.
|
AttributeType |
getSuper()
Override of
PropertyType.getSuper() which type narrows to AttributeType. |
AttributeType |
getType(int index)
Returns the type of the attribute at the specified index.
|
AttributeType |
getType(Name name)
Returns the type of the attribute which matches the specified name.
|
AttributeType |
getType(String name)
Returns the type of the attribute which matches the specified name.
|
String |
getTypeName()
The local name for this FeatureType.
|
List<AttributeType> |
getTypes()
Returns the types of all the attributes which make up the feature.
|
Map<Object,Object> |
getUserData()
A map of "user data" which enables applications to store "application-specific" information
against a property type.
|
int |
hashCode()
Hashcode override based on
PropertyType.getName(). |
int |
indexOf(Name name)
Returns the index of the attribute which matches the specified name.
|
int |
indexOf(String name)
Returns the index of the attribute which matches the specified name.
|
boolean |
isAbstract()
Flag indicating if the type is abstract or not.
|
boolean |
isIdentified()
Features are always identified.
|
boolean |
isInline()
Indicates ability of XPath to notice this attribute.
|
List<SimpleFeature> |
readAllRows() |
public VPFFeatureType(VPFFeatureClass cFeatureClass, SimpleFeature cFeature)
cFeatureClass - The owning feature classcFeature - A Feature from the CHAR.VDT file with more detailed information
for this feature typepublic VPFFeatureType(VPFFeatureClass cFeatureClass)
cFeatureClass - The owning feature classpublic static void debugFeature(SimpleFeature feature)
public static void debugFeatureType(SimpleFeatureType featureType)
public int getAttributeCount()
SimpleFeatureTypeThis method is convenience for getAttributes().size().
getAttributeCount in interface SimpleFeatureTypepublic VPFCoverage getCoverage()
VPFCoverage that this FeatureType belongs to.public String getDirectoryName()
String path for the directory containing the VPFFeatureClass
that this FeatureType belongs to.public VPFFeatureClass getFeatureClass()
public List<SimpleFeature> readAllRows() throws IOException
IOExceptionpublic List getFileList()
List containing VPFFile objects.public String getTypeName()
SimpleFeatureTypeSpecifically this method returns getName().getLocalPart().
getTypeName in interface SimpleFeatureTypeList containing the ColumnPair objects which identify the
file joins for the VPFFeatureClass that this FeatureType
belongs to.public boolean isAbstract()
PropertyTypeisAbstract in interface PropertyTypetrue if the type is abstract, otherwise false.public String getFaccCode()
public boolean equals(Object obj)
PropertyTypePropertyType.getName().equals in interface PropertyTypeequals in class Objecttrue if other is a PropertyType with the same namepublic int hashCode()
PropertyTypePropertyType.getName().hashCode in interface PropertyTypehashCode in class Objectpublic AttributeDescriptor getDescriptor(int index)
SimpleFeatureTypeThis method is convenience for:
return (AttributeDescriptor) ((List) getProperties()).get(index);
getDescriptor in interface SimpleFeatureTypeindex - The index of the descriptor to return.public List<AttributeDescriptor> getAttributeDescriptors()
SimpleFeatureTypeThis method is a convenience for:
return (List<AttributeDescriptor>) getProperties();
getAttributeDescriptors in interface SimpleFeatureTypepublic AttributeDescriptor getDescriptor(Name name)
SimpleFeatureTypeThis method is convenience for:
return (AttributeDescriptor) getProperty(name);
This method returns null if no such attribute exists.
getDescriptor in interface SimpleFeatureTypegetDescriptor in interface ComplexTypename - The name of the descriptor to return.null if no such
attribute exists.public AttributeDescriptor getDescriptor(String name)
SimpleFeatureTypeThis method is convenience for:
return (AttributeDescriptor) getProperty(name);
This method returns null if no such attribute exists.
getDescriptor in interface SimpleFeatureTypegetDescriptor in interface ComplexTypename - The name of the descriptor to return.null if no such
attribute exists.public AttributeType getType(Name name)
SimpleFeatureTypeThis method is convenience for:
return (AttributeType) getProperty(name).getType();
If there is no such attribute which matches name, null is returned.
getType in interface SimpleFeatureTypename - The name of the attribute whose type to return.null.public AttributeType getType(String name)
SimpleFeatureTypeThis method is convenience for:
return (AttributeType) getProperty(name).getType();
If there is no such attribute which matches name, null is returned.
getType in interface SimpleFeatureTypename - The name of the attribute whose type to return.null.public AttributeType getType(int index)
SimpleFeatureTypeThis method is convenience for:
return (AttributeType)((List)getProperties()).get(index)).getType();
getType in interface SimpleFeatureTypeindex - The index of the attribute whose type to return.public List<AttributeType> getTypes()
SimpleFeatureTypeThis method is convenience for:
List types = new ArrayList();
for (Property p : getProperties()) {
types.add(p.getType());
}
return types;
getTypes in interface SimpleFeatureTypepublic CoordinateReferenceSystem getCoordinateReferenceSystem()
FeatureTypeThis value is derived from the default geometry attribute:
((GeometryType)getDefaultGeometry().getType()).getCRS();
This method will return null in the case where no default geometric attribute
is defined.
getCoordinateReferenceSystem in interface FeatureTypenull.public GeometryDescriptor getGeometryDescriptor()
FeatureTypeThis method returns null in the case where no such attribute exists.
getGeometryDescriptor in interface FeatureTypenull.public Class<Collection<Property>> getBinding()
ComplexTypegetBinding in interface ComplexTypegetBinding in interface PropertyTypepublic Collection<PropertyDescriptor> getDescriptors()
ComplexTypeA complex type can be composed of attributes and associations which means this collection
returns instances of AttributeDescriptor and AssociationDescriptor.
getDescriptors in interface ComplexTypepublic boolean isInline()
ComplexTypeThis facility is used to "hide" an attribute from XPath searches, while the compelx contents will still be navigated no additional nesting will be considered. It will be as if the content were "folded" inline resulting in a flatter nesting structure.
Construct described using Java Interfaces:
interface TestSample {
String name;
List measurement;
}
interface Measurement {
long timestamp;
Point point;
long reading;
}
The above is can hold the following information:
[ name="survey1",
measurements=(
[timestamp=3,point=(2,3), reading=4200],
[timestamp=9,point=(2,4), reading=445600],
)
]
Out of the box this is represented to XPath as the following tree:
root/name: survey1
root/measurement[0]/timestamp:3
root/measurement[0]/point: (2,3)
root/measurement[0]/reading: 4200
root/measurement[1]/timestamp:9
root/measurement[2]/point: (2,4)
root/measurement[3]/reading: 445600
By inlining Measurement we can achive the following:
root/name: survey1
root/timestamp[0]:3
root/point[0]: (2,3)
root/reading[0]: 4200
root/timestamp[1]:9
root/point[1]: (2,4)
root/reading[1] 445600
isInline in interface ComplexTypepublic List<Filter> getRestrictions()
PropertyTypeEach restriction is a Filter object in which the property is passed through. If
Filter.evaluate(Object) returns true the restriction is met. If
false is returned then the restriction has not been met and the property should be
considered invalid. Remember to check getSuper().getRestrictions() as well.
This method returns an empty set in the case of no restrictions and should not return
null.
getRestrictions in interface PropertyTypepublic AttributeType getSuper()
AttributeTypePropertyType.getSuper() which type narrows to AttributeType.getSuper in interface AttributeTypegetSuper in interface PropertyTypenull.PropertyType.getSuper()public boolean isIdentified()
FeatureTypeisIdentified in interface AttributeTypeisIdentified in interface FeatureTypetrueAttribute#getID()public InternationalString getDescription()
PropertyTypegetDescription in interface PropertyTypepublic Name getName()
PropertyTypeNote that this is not the same name as Property.getName(), which is the name of
the instance of the type, not the type itself.
The returned name is a qualified name made up of two parts. The first a namespace uri
(Name.getNamespaceURI(), and the second a local part (Name.getLocalPart().
This value is never null.
getName in interface PropertyTypepublic Map<Object,Object> getUserData()
PropertyTypeAs an example, consider an application that builds a PropertyType from an xml schema. A useful bit of information to attach to the PropertyType is the original schema itself, in whatever construct it might be stored in:
XSDComplexTypeDefinition complexTypeDef = ...;
PropertyType type = buildPropertyType( complexTypeDef );
type.getUserData().put( XSDComplexTypeDefintion.class, complexTypeDef );
getUserData in interface PropertyTypepublic int indexOf(String name)
SimpleFeatureType-1 is returned in the instance there is no attribute matching the specified name.
indexOf in interface SimpleFeatureTypename - The name of the attribute whose index to return.public int indexOf(Name name)
SimpleFeatureType-1 is returned in the instance there is no attribute matching the specified name.
indexOf in interface SimpleFeatureTypename - The name of the attribute whose index to return.Copyright © 1996–2021 Geotools. All rights reserved.