Class ComplexTypeImpl
- All Implemented Interfaces:
AttributeType,ComplexType,PropertyType
- Direct Known Subclasses:
FeatureTypeImpl
- Author:
- gabriel, Ben Caradoc-Davies, CSIRO Exploration and Mining
-
Field Summary
Fields inherited from class AttributeTypeImpl
identifiedFields inherited from class PropertyTypeImpl
binding, description, isAbstract, name, restrictions, superType, userData -
Constructor Summary
ConstructorsConstructorDescriptionComplexTypeImpl(Name name, Collection<PropertyDescriptor> properties, boolean identified, boolean isAbstract, List<Filter> restrictions, AttributeType superType, InternationalString description) -
Method Summary
Modifier and TypeMethodDescriptionbooleanOverride of equals.The java class that values of properties of the property type are bound to.getDescriptor(String name) Describe a single property by unqualified name.getDescriptor(Name name) Describe a single property by name.The property descriptor which compose the complex type.booleanisInline()Indicates ability of XPath to notice this attribute.toString()Methods inherited from class AttributeTypeImpl
createDefaultValue, getSuper, hashCode, isIdentified, parseMethods inherited from class PropertyTypeImpl
getDescription, getName, getRestrictions, getUserData, isAbstractMethods inherited from interface AttributeType
getSuper, isIdentifiedMethods inherited from interface PropertyType
getDescription, getName, getRestrictions, getUserData, hashCode, isAbstract
-
Constructor Details
-
ComplexTypeImpl
public ComplexTypeImpl(Name name, Collection<PropertyDescriptor> properties, boolean identified, boolean isAbstract, List<Filter> restrictions, AttributeType superType, InternationalString description)
-
-
Method Details
-
getBinding
Description copied from interface:PropertyTypeThe java class that values of properties of the property type are bound to.This value is never
null.- Specified by:
getBindingin interfaceComplexType- Specified by:
getBindingin interfacePropertyType- Overrides:
getBindingin classPropertyTypeImpl- Returns:
- The binding of the property type.
-
getDescriptors
Description copied from interface:ComplexTypeThe property descriptor which compose the complex type.A complex type can be composed of attributes and associations which means this collection returns instances of
AttributeDescriptorandAssociationDescriptor.- Specified by:
getDescriptorsin interfaceComplexType- Returns:
- Collection of descriptors representing the composition of the complex type.
-
getDescriptor
Description copied from interface:ComplexTypeDescribe a single property by name.This method returns
nullif no such property is found.- Specified by:
getDescriptorin interfaceComplexType- Parameters:
name- The name of the property to get.- Returns:
- The property matching the specified name, or
null.
-
getDescriptor
Description copied from interface:ComplexTypeDescribe a single property by unqualified name.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
nullif no such property is found.- Specified by:
getDescriptorin interfaceComplexType- Parameters:
name- The name of the property to get.- Returns:
- The property matching the specified name, or
null.
-
isInline
public boolean isInline()Description copied from interface:ComplexTypeIndicates ability of XPath to notice this attribute.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:
The above is can hold the following information:interface TestSample { String name; Listmeasurement; } interface Measurement { long timestamp; Point point; long reading; }
Out of the box this is represented to XPath as the following tree:[ name="survey1", measurements=( [timestamp=3,point=(2,3), reading=4200], [timestamp=9,point=(2,4), reading=445600], ) ]
By inlining Measurement we can achive the following: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: 445600root/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- Specified by:
isInlinein interfaceComplexType- Returns:
- true if attribute is to be considered transparent by XPath queries
-
equals
Description copied from class:AttributeTypeImplOverride of equals.- Specified by:
equalsin interfacePropertyType- Overrides:
equalsin classAttributeTypeImpl- Parameters:
o- the object to be tested for equality.- Returns:
- whether other is equal to this attribute Type.
-
toString
- Overrides:
toStringin classAttributeTypeImpl
-