public abstract class AbstractLazyComplexTypeImpl extends AbstractLazyAttributeTypeImpl implements ComplexType
ComplexTypeImpl with lazy evaluation of descriptors, to support
cyclically-defined types. Note that type equality is defined by name, so do not allow different
types with the same name to be put in any Collection.
Inspired by ComplexTypeImpl.
ComplexTypeImpl| Constructor and Description |
|---|
AbstractLazyComplexTypeImpl(Name name,
boolean identified,
boolean isAbstract,
List<Filter> restrictions,
InternationalString description)
Constructor arguments have the same meaning as in
ComplexTypeImpl. |
| Modifier and Type | Method and Description |
|---|---|
abstract Collection<PropertyDescriptor> |
buildDescriptors()
Subclasses must override this method to return the list of descriptors that define the
properties of this type.
|
Class<Collection<Property>> |
getBinding()
The java class that values of properties of the property type are bound to.
|
PropertyDescriptor |
getDescriptor(Name name)
Describe a single property by name.
|
PropertyDescriptor |
getDescriptor(String name)
The namespace-ignorant version of
getDescriptor(Name). |
Collection<PropertyDescriptor> |
getDescriptors()
The property descriptor which compose the complex type.
|
boolean |
isInline()
Indicates ability of XPath to notice this attribute.
|
String |
toString() |
buildSuper, equals, getDescription, getName, getRestrictions, getSuper, getUserData, hashCode, isAbstract, isIdentifiedgetSuper, isIdentifiedequals, getDescription, getName, getRestrictions, getUserData, hashCode, isAbstractpublic AbstractLazyComplexTypeImpl(Name name, boolean identified, boolean isAbstract, List<Filter> restrictions, InternationalString description)
ComplexTypeImpl.public abstract Collection<PropertyDescriptor> buildDescriptors()
If the type has no properties, return either an empty collection or null.
public Class<Collection<Property>> getBinding()
PropertyTypeThis value is never null.
getBinding in interface ComplexTypegetBinding in interface PropertyTypegetBinding in class AbstractLazyAttributeTypeImplAbstractLazyAttributeTypeImpl.getBinding()public 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 ComplexTypeComplexType.getDescriptors()public PropertyDescriptor getDescriptor(Name name)
ComplexTypeThis method returns null if no such property is found.
getDescriptor in interface ComplexTypename - The name of the property to get.null.ComplexType.getDescriptor(org.opengis.feature.type.Name)public 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 ComplexTypeComplexType.isInline()public String toString()
toString in class AbstractLazyAttributeTypeImplAbstractLazyAttributeTypeImpl.toString()public PropertyDescriptor getDescriptor(String name)
getDescriptor(Name). Note that we honour the same
permissive algorithm as ComplexTypeImpl: (1) try no-namespace, (2) try
container-namespace, (2) search for match ignoring namespace. *Shudder*. Warning: Any
code that uses this method instead of getDescriptor(Name) is * inherently unsafe.getDescriptor in interface ComplexTypename - The name of the property to get.null.ComplexType.getDescriptor(java.lang.String)Copyright © 1996–2021 Geotools. All rights reserved.