public class NonFeatureTypeProxy extends Object implements FeatureType
Constructor and Description |
---|
NonFeatureTypeProxy(AttributeType type,
FeatureTypeMapping mapping)
Sole constructor
|
NonFeatureTypeProxy(AttributeType type,
FeatureTypeMapping mapping,
Collection<PropertyDescriptor> schema) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o)
Equality based on property
PropertyType.getName() . |
Class |
getBinding()
The java class that values of properties of the property type are bound
to.
|
CoordinateReferenceSystem |
getCoordinateReferenceSystem()
The coordinate reference system of the feature.
|
InternationalString |
getDescription()
Human readable description of this property type.
|
PropertyDescriptor |
getDescriptor(Name name)
Describe a single property by name.
|
PropertyDescriptor |
getDescriptor(String name)
Describe a single property by unqualified name.
|
Collection<PropertyDescriptor> |
getDescriptors()
The property descriptor which compose the complex type.
|
GeometryDescriptor |
getGeometryDescriptor()
Describe the default geometric attribute for this feature.
|
Name |
getName()
The name of the property type.
|
Collection |
getOperations() |
List<Filter> |
getRestrictions()
List of restrictions used define valid values for properties of this
property type.
|
AttributeType |
getSubject() |
AttributeType |
getSuper()
Override of
PropertyType.getSuper() which type narrows to
AttributeType . |
Collection<PropertyDescriptor> |
getTypeDescriptors()
Return only the schema descriptors
|
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() . |
boolean |
isAbstract()
Flag indicating if the type is abstract or not.
|
boolean |
isIdentified()
Indicates if the type is identified or not.
|
boolean |
isInline()
Indicates ability of XPath to notice this attribute.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
isIdentified
getBinding, getDescriptor, isInline
getSuper
equals, getDescription, getName, getRestrictions, getUserData, hashCode, isAbstract
public NonFeatureTypeProxy(AttributeType type, FeatureTypeMapping mapping)
type
- The underlying non feature typepublic NonFeatureTypeProxy(AttributeType type, FeatureTypeMapping mapping, Collection<PropertyDescriptor> schema)
public AttributeType getSubject()
AttributeTypeProxy.getSubject()
public PropertyDescriptor getDescriptor(Name name)
ComplexType
This method returns null
if no such property is found.
getDescriptor
in interface ComplexType
name
- The name of the property to get.null
.public Collection<PropertyDescriptor> getDescriptors()
ComplexType
A complex type can be composed of attributes and associations which means
this collection returns instances of AttributeDescriptor
and
AssociationDescriptor
.
getDescriptors
in interface ComplexType
public Collection<PropertyDescriptor> getTypeDescriptors()
public CoordinateReferenceSystem getCoordinateReferenceSystem()
FeatureType
This 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 FeatureType
null
.public GeometryDescriptor getGeometryDescriptor()
FeatureType
This method returns null
in the case where no such attribute
exists.
getGeometryDescriptor
in interface FeatureType
null
.public PropertyDescriptor getDescriptor(String name)
ComplexType
Note: Special care should be taken when using this method in the case
that two properties with the same local name but different namespace uri
exist. For this reason using ComplexType.getDescriptor(Name)
is safer.
This method returns null
if no such property is found.
getDescriptor
in interface ComplexType
name
- The name of the property to get.null
.public boolean isInline()
ComplexType
This 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 ComplexType
public Class getBinding()
PropertyType
This value is never null
.
getBinding
in interface PropertyType
public Collection getOperations()
public List<Filter> getRestrictions()
PropertyType
Each 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 PropertyType
public AttributeType getSuper()
AttributeType
PropertyType.getSuper()
which type narrows to
AttributeType
.getSuper
in interface AttributeType
getSuper
in interface PropertyType
null
.PropertyType.getSuper()
public boolean isAbstract()
PropertyType
isAbstract
in interface PropertyType
true
if the type is abstract, otherwise false
.public boolean isIdentified()
AttributeType
If this method returns true
, then the corresponding
attribute must have a unique identifier, ie, Attribute#getID()
must return a value, and cannot be null
.
isIdentified
in interface AttributeType
true
if the attribute is identified, otherwise false
.Attribute#getID()
public InternationalString getDescription()
PropertyType
getDescription
in interface PropertyType
public Name getName()
PropertyType
Note 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 PropertyType
public Map<Object,Object> getUserData()
PropertyType
As 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 PropertyType
public boolean equals(Object o)
PropertyType
PropertyType.getName()
.
equals
in interface PropertyType
equals
in class Object
true
if other is a PropertyType with the same namepublic int hashCode()
PropertyType
PropertyType.getName()
.hashCode
in interface PropertyType
hashCode
in class Object
Copyright © 1996–2018 Geotools. All rights reserved.