Class 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 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 isOrdered
      If 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 is Boolean
      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)
      Overrides:
      equals in class Relation
    • 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()
      Overrides:
      hashCode in class Relation
    • 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()
      Overrides:
      toString in class Relation
    • 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)
      Specified by:
      append in interface org.jvnet.jaxb.lang.ToString
      Overrides:
      append in class Relation
    • 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:
      appendFields in interface org.jvnet.jaxb.lang.ToString
      Overrides:
      appendFields in class Relation
    • 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:
      withDatatype in class Relation
    • 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:
      withMultiplicity in class Relation
    • 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:
      withVodmlId in class Relation
    • 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)
      Overrides:
      withName in class Relation
    • 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:
      withDescription in class Relation
    • 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)
      Overrides:
      withId in class Relation
    • mergeFrom

      @Generated(value="com.sun.tools.xjc.Driver", comments="JAXB RI v4.0.4", date="2024-08-01T13:15:43+01:00") public void mergeFrom(Object left, Object right)
      Specified by:
      mergeFrom in interface org.jvnet.jaxb.lang.MergeFrom
      Overrides:
      mergeFrom in class Relation
    • mergeFrom

      @Generated(value="com.sun.tools.xjc.Driver", comments="JAXB RI v4.0.4", date="2024-08-01T13:15:43+01:00") public void mergeFrom(org.jvnet.jaxb.locator.ObjectLocator leftLocator, org.jvnet.jaxb.locator.ObjectLocator rightLocator, Object left, Object right, org.jvnet.jaxb.lang.MergeStrategy strategy)
      Specified by:
      mergeFrom in interface org.jvnet.jaxb.lang.MergeFrom
      Overrides:
      mergeFrom in class Relation
    • 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:
      createNewInstance in interface org.jvnet.jaxb.lang.MergeFrom