com.bea.schema
Class SOMComplexType

java.lang.Object
  extended bycom.bea.schema.SOMObject
      extended bycom.bea.schema.type.SOMType
          extended bycom.bea.schema.SOMUserDefinedType
              extended bycom.bea.schema.SOMComplexType
All Implemented Interfaces:
Serializable

public class SOMComplexType
extends SOMUserDefinedType

<complexType> This class acts as a wrapper to complexType elements. A Complex Type is a set of attribute declarations and a content type that respectively pertain to the attributes and children of the element type that's being specified

Version:
1.0
Author:
sharpe
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.bea.schema.type.SOMType
ANYURI, BASE64BINARY, BINARY, BOOLEAN, BYTE, CDATA, CENTURY, DATE, DATETIME, DECIMAL, DOUBLE, DURATION, ENTITIES, ENTITY, FLOAT, GDAY, GMONTH, GMONTHDAY, GYEAR, GYEARMONTH, HEXBINARY, ID, IDREF, IDREFS, INT, INTEGER, LANGUAGE, LONG, MONTH, NAME, NCNAME, NEGATIVEINTEGER, NMTOKEN, NMTOKENS, NONNEGATIVEINTEGER, NONPOSITIVEINTEGER, NORMALIZEDSTRING, NOTATION, NUMBER, POSITIVEINTEGER, QNAME, RECURRINGDATE, RECURRINGDAY, RECURRINGDURATION, SHORT, STRING, TIME, TIMEDURATION, TIMEINSTANT, TIMEPERIOD, TOKEN, UNSIGNEDBYTE, UNSIGNEDINT, UNSIGNEDLONG, UNSIGNEDSHORT, URIREFERENCE, YEAR
 
Constructor Summary
SOMComplexType()
           
SOMComplexType(String name)
           
 
Method Summary
 SOMAttribute addAttribute(SOMAttribute attribute)
          add an <attribute> to this complexType.
 SOMAttribute addAttribute(String name)
           
 SOMAttribute addAttribute(String name, SOMType type)
           
 SOMAttributeGroup addAttributeGroup(SOMAttributeGroup attributeGrp)
          add an <attributeGroup> to this complexType.
 SOMComplexContent addComplexContent(SOMExtension extension)
           
 SOMComplexContent addComplexContent(SOMRestriction restriction)
           
 SOMSequence addSequence()
           
 SOMSimpleContent addSimpleContent(SOMExtension extension)
           
 SOMSimpleContent addSimpleContent(SOMRestriction restriction)
           
 boolean contains(SOMObject child)
          Determine if an object is child of this element.
 void createDefault(DefaultDocumentOptions options, Element current)
           
 String getAbstract()
           
 Iterator getAttributeElements()
          returns an iterator over SOMAttribute(s) children
 Iterator getAttributeGroups()
          returns an iterator over SOMAttributeGroup(s) children
 Map getAttributes(boolean getAll)
          retrieve the attributes for this schema element.
 String getBlock()
           
 SOMSimpleContent getContent()
          a reference to the content type for this complexType
 String getFinal()
           
 SOMGroupType getGroup()
          a reference to the group for this complexType
 String getID()
          <xsd:anyType>
 String getMixed()
           
 Iterator listAttributesExtended()
          iterator over all attribute elements for this complexType.
 SOMAttribute removeAttribute(SOMAttribute attr)
          remove an attribute sub-element.
 SOMAttributeGroup removeAttributeGroup(SOMAttributeGroup attr)
          remove an attribute sub-element.
 SOMSimpleContent removeContent()
          remove the previously set content, simpleContent or complexContent.
 SOMGroupType removeGroup()
          remove the previously set group-type.
 void setAbstract(String p_abstract)
          set the abstract attribute for this complexType
 void setBlock(String p_block)
           
 SOMSimpleContent setContent(SOMSimpleContent p_content)
          Method for setting simpleContent or complexContent within the complexType.
 void setFinal(String p_final)
           
 SOMGroupType setGroup(SOMGroupType p_group)
           
 void setMixed(boolean p_mixed)
           
 void setMixed(String p_mixed)
           
 void toXML(Writer rtn, int indent)
          Outputs a formatted XML representation of SOMObject.
 
Methods inherited from class com.bea.schema.SOMUserDefinedType
addAnnotation, addAnnotation, addDocumentation, getAnnotation, getName, isElementalType, isUserDefinedType, removeAnnotation, setName
 
Methods inherited from class com.bea.schema.type.SOMType
getAllowedFacets, getType
 
Methods inherited from class com.bea.schema.SOMObject
addPrefixMapping, getContainmentXPath, getEffectivePrefixMappings, getID_UQ, getParent, getParentName, getParentSchema, getPrefixForTargetNamespace, getPrefixMapping, getTargetNamespace, getURIForPrefix, isCircularReference, isSchemaChild, msg, msg, removeNamespaceQualifier, removePrefixMapping, setIndent, setParent, setTargetNamespace, toString, toXML, toXML, toXML
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SOMComplexType

public SOMComplexType()

SOMComplexType

public SOMComplexType(String name)
Method Detail

getID

public String getID()
Description copied from class: SOMType
<xsd:anyType>

Overrides:
getID in class SOMType

setAbstract

public void setAbstract(String p_abstract)
set the abstract attribute for this complexType

Parameters:
p_abstract - the value for the abstract attribute

setBlock

public void setBlock(String p_block)
Parameters:
p_block -
Returns:
Void

setFinal

public void setFinal(String p_final)
Parameters:
p_final -
Returns:
Void

setMixed

public void setMixed(String p_mixed)

setMixed

public void setMixed(boolean p_mixed)

getAbstract

public String getAbstract()
Returns:
AttributeAbstract

getBlock

public String getBlock()
Returns:
AttributeBlock

getFinal

public String getFinal()
Returns:
AttributeFinal

getMixed

public String getMixed()

getGroup

public SOMGroupType getGroup()
a reference to the group for this complexType

Returns:
a group type <group>, <all>, <choice>, or <sequence>, or null if no group is set

getContent

public SOMSimpleContent getContent()
a reference to the content type for this complexType

Returns:
a content type <simpleContent> or <complexContent>, or null if no content is set

getAttributeElements

public Iterator getAttributeElements()
returns an iterator over SOMAttribute(s) children

Returns:
an Iterator of SOMAttributes.

getAttributeGroups

public Iterator getAttributeGroups()
returns an iterator over SOMAttributeGroup(s) children

Returns:
an Iterator of SOMAttributeGroups.

listAttributesExtended

public Iterator listAttributesExtended()
iterator over all attribute elements for this complexType. The list of SOMAttributes includes any attributes contained in this complexType and in any attributeGroup children.

Returns:
list of SOMAttribute(s)

getAttributes

public Map getAttributes(boolean getAll)
retrieve the attributes for this schema element. If getAll is false, only the attributes that are not set to their default value are returned. If getAll is true, all possible attributes for this element will be returned.

Overrides:
getAttributes in class SOMUserDefinedType
Parameters:
getAll - get all attributes
Returns:
a Hashtable of attributes, where the attribute name and value are stored as strings.

addSimpleContent

public SOMSimpleContent addSimpleContent(SOMRestriction restriction)

addSimpleContent

public SOMSimpleContent addSimpleContent(SOMExtension extension)

addComplexContent

public SOMComplexContent addComplexContent(SOMRestriction restriction)

addComplexContent

public SOMComplexContent addComplexContent(SOMExtension extension)

setContent

public SOMSimpleContent setContent(SOMSimpleContent p_content)
Method for setting simpleContent or complexContent within the complexType. If the content type is simpleContent or complexContent, none of the group structures may exist outside the Content structure.

Parameters:
p_content - takes a SimpleContent object or ComplexContent object
Returns:
Void

setGroup

public SOMGroupType setGroup(SOMGroupType p_group)

addSequence

public SOMSequence addSequence()

addAttribute

public SOMAttribute addAttribute(String name)

addAttribute

public SOMAttribute addAttribute(String name,
                                 SOMType type)

addAttribute

public SOMAttribute addAttribute(SOMAttribute attribute)
add an <attribute> to this complexType. <attribute> is mutually exclusive with simpleContent and complexContent, as well as, attributeGroup

Parameters:
attribute - the attribute to add
Returns:
the attribute reference added

addAttributeGroup

public SOMAttributeGroup addAttributeGroup(SOMAttributeGroup attributeGrp)
add an <attributeGroup> to this complexType. <attributeGroup> is mutually exclusive with simpleContent and complexContent, as well as, attribute

Returns:
the attributeGroup reference added

removeGroup

public SOMGroupType removeGroup()
remove the previously set group-type.

Returns:
the removed group-type, or null if none was present

removeContent

public SOMSimpleContent removeContent()
remove the previously set content, simpleContent or complexContent.

Returns:
the removed content element, or null if none was present

removeAttribute

public SOMAttribute removeAttribute(SOMAttribute attr)
remove an attribute sub-element. Removes an attribute from this tree that was previously added.

Parameters:
attr -
Returns:
the attribute removed, or null if the object is not a sub-element

removeAttributeGroup

public SOMAttributeGroup removeAttributeGroup(SOMAttributeGroup attr)
remove an attribute sub-element. Removes an attribute from this tree that was previously added.

Parameters:
attr -
Returns:
the attribute removed, or null if the object is not a sub-element

contains

public boolean contains(SOMObject child)
Determine if an object is child of this element.

Parameters:
child - the object in question
Returns:
true if the child is contained within this structure

toXML

public void toXML(Writer rtn,
                  int indent)
           throws IOException
Description copied from class: SOMObject
Outputs a formatted XML representation of SOMObject.

Overrides:
toXML in class SOMType
Throws:
IOException

createDefault

public void createDefault(DefaultDocumentOptions options,
                          Element current)