com.ihr.xbrl.om.taxonomy

## Class XSDComposition

- java.lang.Object
- - java.util.AbstractCollection<E>
  - - java.util.AbstractList<E>
    - - java.util.Vector<XSDParticle>
      - - com.ihr.xbrl.om.taxonomy.XSDComposition

- All Implemented Interfaces:
    XSDParticle, java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<XSDParticle>, java.util.Collection<XSDParticle>, java.util.List<XSDParticle>, java.util.RandomAccess

      public class XSDComposition
      extends java.util.Vector<XSDParticle>
      implements XSDParticle

  This class represents the content model for tuples. A Tuple contains one XSDCompositor extracted from its data type or generated programaticaly
  Author:
    Ignacio
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `ALL` cType is one of this.
    `static java.lang.String` | `anonymousTypeName` This is the default value for type names.
    `static int` | `CHOICE` The Constant CHOICE.
    `static int` | `EMPTY` The Constant EMPTY.
    `static int` | `SEQUENCE` The Constant SEQUENCE.
    `static int` | `UNBOUNDED` The Constant UNBOUNDED.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `XSDComposition(int type, int minOccurs, int maxOccurs)` Creates an XSDCompositor programatically.
    `XSDComposition(com.saxonica.schema.UserComplexType uct, DTSContainer dts, int minOccurs, int maxOccurs)` Instantiates a new XSD composition.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `addAttribute(XSDAttributeDefinition newAttribute)` Adds an attribute definition to this complex type definition Attributes are internally stored in a HashSet so no duplicate attribute definitions are allowed.
    `static XSDComposition` | `createCompositor(DTSContainer dts, net.sf.saxon.om.NodeInfo node)` Creates an XSDCompositor structure from a NodeInfo node pointing to the first XSDCompositor element (xsd:all, xsd:choice or xsd:sequence) Return null if the XSDCompositor structure cannot be created.
    `boolean` | `delAttribute(XSDAttributeDefinition attribute)` Removed an attribute definition to this complex type definition Attributes are internally stored in a HashSet so no duplicate attribute definition are allowed.
    `java.util.Collection<org.jdom.Element>` | `generateAttributeDecls(org.jdom.Namespace xsNs)` Generate attribute decls.
    `org.jdom.Element` | `generateElement(org.jdom.Namespace xsNs)` Creates the structure to be serialized as tuple content.
    `int` | `getMaxoccurs()` value of the maxOccurs.
    `int` | `getMinoccurs()` value of the minOccurs.
    `int` | `getType()` one of ALL, CHOICE or SEQUENCE.
    `int` | `setMaxoccurs(int newValue)` Sets the value of the maxOccurs on this particle.
    `int` | `setMinoccurs(int newValue)` Sets the value of the minOccurs on this particle.

    - ### Methods inherited from class java.util.Vector

      `add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### UNBOUNDED

          public static final int UNBOUNDED

      The Constant UNBOUNDED.
      See Also:
        Constant Field Values

    - #### anonymousTypeName

          public static final java.lang.String anonymousTypeName

      This is the default value for type names.
      See Also:
        Constant Field Values

    - #### ALL

          public static final int ALL

      cType is one of this.
      See Also:
        Constant Field Values

    - #### CHOICE

          public static final int CHOICE

      The Constant CHOICE.
      See Also:
        Constant Field Values

    - #### SEQUENCE

          public static final int SEQUENCE

      The Constant SEQUENCE.
      See Also:
        Constant Field Values

    - #### EMPTY

          public static final int EMPTY

      The Constant EMPTY.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### XSDComposition

          public XSDComposition(int type,
                        int minOccurs,
                        int maxOccurs)

      Creates an XSDCompositor programatically.
      Parameters:
        `type` - int ALL, CHOICE or SEQUENCE
        `minOccurs` - int (default is 1)
        `maxOccurs` - int (default is 1) (use -1 for unbounded)

    - #### XSDComposition

          public XSDComposition(com.saxonica.schema.UserComplexType uct,
                        DTSContainer dts,
                        int minOccurs,
                        int maxOccurs)

      Instantiates a new XSD composition.
      Parameters:
        `uct` - the uct
        `dts` - the dts
        `minOccurs` - the min occurs
        `maxOccurs` - the max occurs

  - ### Method Detail

    - #### createCompositor

          public static XSDComposition createCompositor(DTSContainer dts,
                                        net.sf.saxon.om.NodeInfo node)

      Creates an XSDCompositor structure from a NodeInfo node pointing to the first XSDCompositor element (xsd:all, xsd:choice or xsd:sequence) Return null if the XSDCompositor structure cannot be created.
      Parameters:
        `dts` - the dts
        `node` - the node
      Returns:
        the XSD composition

    - #### getType

          public int getType()

      one of ALL, CHOICE or SEQUENCE.
      Returns:
        int

    - #### getMaxoccurs

          public int getMaxoccurs()

      value of the maxOccurs.
      Specified by:
        `getMaxoccurs` in interface `XSDParticle`
      Returns:
        int, XSDComposition.UNBOUNDED if unbounded

    - #### setMaxoccurs

          public int setMaxoccurs(int newValue)

      Description copied from interface: `XSDParticle`
      Sets the value of the maxOccurs on this particle.
      Specified by:
        `setMaxoccurs` in interface `XSDParticle`
      Parameters:
        `newValue` - the new value to set
      Returns:
        the previous value of the maxOccurs variable

    - #### getMinoccurs

          public int getMinoccurs()

      value of the minOccurs.
      Specified by:
        `getMinoccurs` in interface `XSDParticle`
      Returns:
        int

    - #### setMinoccurs

          public int setMinoccurs(int newValue)

      Description copied from interface: `XSDParticle`
      Sets the value of the minOccurs on this particle.
      Specified by:
        `setMinoccurs` in interface `XSDParticle`
      Parameters:
        `newValue` - the new value to set
      Returns:
        the previous value of the minOccurs variable

    - #### generateElement

          public org.jdom.Element generateElement(org.jdom.Namespace xsNs)
                                           throws XBRLSerializationException

      Creates the structure to be serialized as tuple content.
      Specified by:
        `generateElement` in interface `XSDParticle`
      Parameters:
        `xsNs` - the xs ns
      Returns:
        org.jdom.Element
      Throws:
        `XBRLSerializationException` - the XBRL serialization exception

    - #### generateAttributeDecls

          public java.util.Collection<org.jdom.Element> generateAttributeDecls(org.jdom.Namespace xsNs)
                                                                        throws XBRLSerializationException

      Generate attribute decls.
      Parameters:
        `xsNs` - the xs ns
      Returns:
        the collection
      Throws:
        `XBRLSerializationException` - the XBRL serialization exception

    - #### addAttribute

          public boolean addAttribute(XSDAttributeDefinition newAttribute)

      Adds an attribute definition to this complex type definition Attributes are internally stored in a HashSet so no duplicate attribute definitions are allowed. Attribute definitions are compared using the hashCode method of the attribute definition object.
      Parameters:
        `newAttribute` - XSDAttributeDefinition
      Returns:
        boolean value

    - #### delAttribute

          public boolean delAttribute(XSDAttributeDefinition attribute)

      Removed an attribute definition to this complex type definition Attributes are internally stored in a HashSet so no duplicate attribute definition are allowed. Attribute definitions are compared using the hashCode method of the attribute definition object.
      Parameters:
        `attribute` - the attribute
      Returns:
        boolean