|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectPropertyTypeImpl
AttributeTypeImpl
ComplexTypeImpl
public class ComplexTypeImpl
Base class for complex types.
Field Summary |
---|
Fields inherited from class AttributeTypeImpl |
---|
identified |
Fields inherited from class PropertyTypeImpl |
---|
binding, description, isAbstract, name, restrictions, superType, userData |
Constructor Summary | |
---|---|
ComplexTypeImpl(Name name,
Collection<PropertyDescriptor> properties,
boolean identified,
boolean isAbstract,
List<Filter> restrictions,
AttributeType superType,
InternationalString description)
|
Method Summary | |
---|---|
boolean |
equals(Object o)
Override of equals. |
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)
Describe a single property by unqualified name. |
Collection<PropertyDescriptor> |
getDescriptors()
The property descriptor which compose the complex type. |
boolean |
isInline()
Indicates ability of XPath to notice this attribute. |
String |
toString()
|
Methods inherited from class AttributeTypeImpl |
---|
createDefaultValue, getSuper, hashCode, isIdentified, parse |
Methods inherited from class PropertyTypeImpl |
---|
getDescription, getName, getRestrictions, getUserData, isAbstract |
Methods inherited from class Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface AttributeType |
---|
getSuper, isIdentified |
Methods inherited from interface PropertyType |
---|
getDescription, getName, getRestrictions, getUserData, hashCode, isAbstract |
Constructor Detail |
---|
public ComplexTypeImpl(Name name, Collection<PropertyDescriptor> properties, boolean identified, boolean isAbstract, List<Filter> restrictions, AttributeType superType, InternationalString description)
Method Detail |
---|
public Class<Collection<Property>> getBinding()
PropertyType
This value is never null
.
getBinding
in interface ComplexType
getBinding
in interface PropertyType
getBinding
in class PropertyTypeImpl
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 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 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 boolean equals(Object o)
AttributeTypeImpl
equals
in interface PropertyType
equals
in class AttributeTypeImpl
o
- the object to be tested for equality.
public String toString()
toString
in class AttributeTypeImpl
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |