com.ihr.xbrl.om.taxonomy
Class XSDComposition

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.Vector<XSDParticle>
              extended by 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
static int ALL
          cType is one of this
static java.lang.String anonymousTypeName
          This is the default value for type names
static int CHOICE
           
static int EMPTY
           
static int SEQUENCE
           
static int UNBOUNDED
           
 
Constructor Summary
XSDComposition(int type, int minOccurs, int maxOccurs)
          Creates an XSDCompositor programatically
XSDComposition(com.saxonica.schema.UserComplexType uct, DTSContainer dts, int minOccurs, int maxOccurs)
           
 
Method Summary
 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)
           
 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, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Field Detail

UNBOUNDED

public static final int 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
See Also:
Constant Field Values

SEQUENCE

public static final int SEQUENCE
See Also:
Constant Field Values

EMPTY

public static final int 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)
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:
node -

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 - namespace
Returns:
org.jdom.Element
Throws:
XBRLSerializationException

generateAttributeDecls

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

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 -
Returns:
boolean


Copyright 2006-2009 Reporting Standard S.L., C/ Torrecilla del Puerto 1, 28043, Madrid, Espaņa