Package org.javastro.ivoa.entities.vodml
Class Composition
java.lang.Object
org.javastro.ivoa.entities.vodml.ReferableElement
org.javastro.ivoa.entities.vodml.Role
org.javastro.ivoa.entities.vodml.Relation
org.javastro.ivoa.entities.vodml.Composition
- All Implemented Interfaces:
org.jvnet.jaxb.lang.MergeFrom,org.jvnet.jaxb.lang.ToString
@Generated(value="com.sun.tools.xjc.Driver",
comments="JAXB RI v4.0.4",
date="2024-08-01T13:15:43+01:00")
public class Composition
extends Relation
implements org.jvnet.jaxb.lang.MergeFrom, org.jvnet.jaxb.lang.ToString
This type implements a composition relation between the parent and child ObjectTypes.
Its instances are ONLY used to set the composition field on an ObjectType.
It is a rule that an object type can only be the target of a single composition definition.
A subclass can be assigned a target to a composition if a
baseclass is already assigned such a target, but only if the composition is explicitly 'subsetted'.
A composition is assumed to be a set, i.e.
a given object (as identified by its identifier!) cannot occur
multiple times in the composition.
The composition
may be ordered, which implies that the order in which objects have been added
to
the parent is to be preserved. As clients can always do an explicit sort on any of the child objects' attributes,
it seems not necessary to add functionality for
declaring a composition is
sorted on one or more attributes.
Through the uniqueInCollection constraint that can be assigned to attributes, a composition can impose the
constraint that different objects in the composition
must have distinct values of the
attribute to which that constraint is assigned.
It would be better probably to add the capability to assign such constraints to this composition type.
This would
also give more flexibility in for example creating explicit (named) keys, or defining
multi-attribute uniqueness constraints.
Java class for Composition complex type
.The following schema fragment specifies the expected content contained within this class.
<complexType name="Composition">
<complexContent>
<extension base="{http://www.ivoa.net/xml/VODML/v1}Relation">
<sequence>
<element name="isOrdered" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
</sequence>
</extension>
</complexContent>
</complexType>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BooleanIf true, this composition preserves the ordering of object insertions.Fields inherited from class org.javastro.ivoa.entities.vodml.Role
datatype, multiplicityFields inherited from class org.javastro.ivoa.entities.vodml.ReferableElement
description, id, name, vodmlId -
Constructor Summary
ConstructorsConstructorDescriptionDefault no-arg constructorComposition(String vodmlId, String name, String description, String id, ElementRef datatype, Multiplicity multiplicity, Boolean isOrdered) Fully-initialising value constructor -
Method Summary
Modifier and TypeMethodDescriptionappend(org.jvnet.jaxb.locator.ObjectLocator locator, StringBuilder buffer, org.jvnet.jaxb.lang.ToStringStrategy strategy) appendFields(org.jvnet.jaxb.locator.ObjectLocator locator, StringBuilder buffer, org.jvnet.jaxb.lang.ToStringStrategy strategy) booleaninthashCode()If true, this composition preserves the ordering of object insertions.voidvoidmergeFrom(org.jvnet.jaxb.locator.ObjectLocator leftLocator, org.jvnet.jaxb.locator.ObjectLocator rightLocator, Object left, Object right, org.jvnet.jaxb.lang.MergeStrategy strategy) voidsetIsOrdered(Boolean value) Sets the value of the isOrdered property.toString()withDatatype(ElementRef value) withDescription(String value) withIsOrdered(Boolean value) withMultiplicity(Multiplicity value) withVodmlId(String value) Methods inherited from class org.javastro.ivoa.entities.vodml.Role
getDatatype, getMultiplicity, setDatatype, setMultiplicityMethods inherited from class org.javastro.ivoa.entities.vodml.ReferableElement
getDescription, getId, getName, getVodmlId, setDescription, setId, setName, setVodmlId
-
Field Details
-
isOrdered
@Generated(value="com.sun.tools.xjc.Driver", comments="JAXB RI v4.0.4", date="2024-08-01T13:15:43+01:00") protected Boolean isOrderedIf true, this composition preserves the ordering of object insertions.
-
-
Constructor Details
-
Composition
public Composition()Default no-arg constructor -
Composition
public Composition(String vodmlId, String name, String description, String id, ElementRef datatype, Multiplicity multiplicity, Boolean isOrdered) Fully-initialising value constructor
-
-
Method Details
-
isIsOrdered
@Generated(value="com.sun.tools.xjc.Driver", comments="JAXB RI v4.0.4", date="2024-08-01T13:15:43+01:00") public Boolean isIsOrdered()If true, this composition preserves the ordering of object insertions.- Returns:
- possible object is
Boolean
-
setIsOrdered
@Generated(value="com.sun.tools.xjc.Driver", comments="JAXB RI v4.0.4", date="2024-08-01T13:15:43+01:00") public void setIsOrdered(Boolean value) Sets the value of the isOrdered property.- Parameters:
value- allowed object isBoolean- See Also:
-
equals
@Generated(value="com.sun.tools.xjc.Driver", comments="JAXB RI v4.0.4", date="2024-08-01T13:15:43+01:00") public boolean equals(Object object) -
hashCode
@Generated(value="com.sun.tools.xjc.Driver", comments="JAXB RI v4.0.4", date="2024-08-01T13:15:43+01:00") public int hashCode() -
toString
@Generated(value="com.sun.tools.xjc.Driver", comments="JAXB RI v4.0.4", date="2024-08-01T13:15:43+01:00") public String toString() -
append
@Generated(value="com.sun.tools.xjc.Driver", comments="JAXB RI v4.0.4", date="2024-08-01T13:15:43+01:00") public StringBuilder append(org.jvnet.jaxb.locator.ObjectLocator locator, StringBuilder buffer, org.jvnet.jaxb.lang.ToStringStrategy strategy) -
appendFields
@Generated(value="com.sun.tools.xjc.Driver", comments="JAXB RI v4.0.4", date="2024-08-01T13:15:43+01:00") public StringBuilder appendFields(org.jvnet.jaxb.locator.ObjectLocator locator, StringBuilder buffer, org.jvnet.jaxb.lang.ToStringStrategy strategy) - Specified by:
appendFieldsin interfaceorg.jvnet.jaxb.lang.ToString- Overrides:
appendFieldsin classRelation
-
withIsOrdered
@Generated(value="com.sun.tools.xjc.Driver", comments="JAXB RI v4.0.4", date="2024-08-01T13:15:43+01:00") public Composition withIsOrdered(Boolean value) -
withDatatype
@Generated(value="com.sun.tools.xjc.Driver", comments="JAXB RI v4.0.4", date="2024-08-01T13:15:43+01:00") public Composition withDatatype(ElementRef value) - Overrides:
withDatatypein classRelation
-
withMultiplicity
@Generated(value="com.sun.tools.xjc.Driver", comments="JAXB RI v4.0.4", date="2024-08-01T13:15:43+01:00") public Composition withMultiplicity(Multiplicity value) - Overrides:
withMultiplicityin classRelation
-
withVodmlId
@Generated(value="com.sun.tools.xjc.Driver", comments="JAXB RI v4.0.4", date="2024-08-01T13:15:43+01:00") public Composition withVodmlId(String value) - Overrides:
withVodmlIdin classRelation
-
withName
@Generated(value="com.sun.tools.xjc.Driver", comments="JAXB RI v4.0.4", date="2024-08-01T13:15:43+01:00") public Composition withName(String value) -
withDescription
@Generated(value="com.sun.tools.xjc.Driver", comments="JAXB RI v4.0.4", date="2024-08-01T13:15:43+01:00") public Composition withDescription(String value) - Overrides:
withDescriptionin classRelation
-
withId
@Generated(value="com.sun.tools.xjc.Driver", comments="JAXB RI v4.0.4", date="2024-08-01T13:15:43+01:00") public Composition withId(String value) -
mergeFrom
-
mergeFrom
-
createNewInstance
@Generated(value="com.sun.tools.xjc.Driver", comments="JAXB RI v4.0.4", date="2024-08-01T13:15:43+01:00") public Object createNewInstance()- Specified by:
createNewInstancein interfaceorg.jvnet.jaxb.lang.MergeFrom
-