WebLogic Integration


com.bea.schema
Class SOMComplexType

java.lang.Object
  |
  +--com.bea.schema.SOMObject
        |
        +--com.bea.schema.type.SOMType
              |
              +--com.bea.schema.SOMUserDefinedType
                    |
                    +--com.bea.schema.SOMComplexType

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

Author:
Copyright © 2000, 2001 BEA Systems, Inc. All Rights Reserved.
See Also:
Serialized Form

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()
           
protected SOMComplexType(org.xml.sax.Attributes attrs, SOMObject parent)
           
  SOMComplexType(java.lang.String name)
           
 
Method Summary
 SOMAttribute addAttribute(SOMAttribute attribute)
          add an <attribute> to this complexType.
 SOMAttribute addAttribute(java.lang.String name)
           
 SOMAttribute addAttribute(java.lang.String name, SOMType type)
           
 SOMAttributeGroup addAttributeGroup(SOMAttributeGroup attributeGrp)
          add an <attributeGroup> to this complexType.
protected  SOMObject addChild(java.lang.String tagName, org.xml.sax.Attributes attrs)
           
 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, org.w3c.dom.Element current)
           
 java.lang.String getAbstract()
           
 java.util.Iterator getAttributeElements()
          returns an iterator over SOMAttribute(s) children
 java.util.Iterator getAttributeGroups()
          returns an iterator over SOMAttributeGroup(s) children
 java.util.Map getAttributes(boolean getAll)
          retrieve the attributes for this schema element.
 java.lang.String getBlock()
           
 SOMSimpleContent getContent()
          a reference to the content type for this complexType
 java.lang.String getFinal()
           
 SOMGroupType getGroup()
          a reference to the group for this complexType
 java.lang.String getID()
           
 java.lang.String getMixed()
           
 java.util.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(java.lang.String p_abstract)
          set the abstract attribute for this complexType
 void setBlock(java.lang.String p_block)
           
 SOMSimpleContent setContent(SOMSimpleContent p_content)
          Method for setting simpleContent or complexContent within the complexType.
 void setFinal(java.lang.String p_final)
           
 SOMGroupType setGroup(SOMGroupType p_group)
           
 void setMixed(boolean p_mixed)
           
 void setMixed(java.lang.String p_mixed)
           
 void toXML(java.io.Writer rtn, int indent)
           
protected  void validate(org.w3c.dom.Node element, java.util.List errorList)
           
 
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, attributesToXML, collectEffectivePrefixMappings, doIndent, getContainmentXPath, getEffectivePrefixMappings, getID_UQ, getParent, getParentName, getParentSchema, getPrefixForTargetNamespace, getTargetNamespace, getURIForPrefix, isCircularReference, isSchemaChild, namespacePrefixesToXML, removeNamespaceQualifier, removePrefixMapping, setIndent, setParent, toString, toXML, toXML, toXML, trace, trace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SOMComplexType

public SOMComplexType()

SOMComplexType

public SOMComplexType(java.lang.String name)

SOMComplexType

protected SOMComplexType(org.xml.sax.Attributes attrs,
                         SOMObject parent)
Method Detail

getID

public java.lang.String getID()

Overrides:
getID in class SOMType

setAbstract

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

Parameters:
p_abstract - the value for the abstract attribute

setBlock

public void setBlock(java.lang.String p_block)

Parameters:
p_block -  
Returns:
Void

setFinal

public void setFinal(java.lang.String p_final)

Parameters:
p_final -  
Returns:
Void

setMixed

public void setMixed(java.lang.String p_mixed)

setMixed

public void setMixed(boolean p_mixed)

getAbstract

public java.lang.String getAbstract()

Returns:
AttributeAbstract

getBlock

public java.lang.String getBlock()

Returns:
AttributeBlock

getFinal

public java.lang.String getFinal()

Returns:
AttributeFinal

getMixed

public java.lang.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 java.util.Iterator getAttributeElements()
returns an iterator over SOMAttribute(s) children

Returns:
an Iterator of SOMAttributes.

getAttributeGroups

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

Returns:
an Iterator of SOMAttributeGroups.

listAttributesExtended

public java.util.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 java.util.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.

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

addChild

protected SOMObject addChild(java.lang.String tagName,
                             org.xml.sax.Attributes attrs)
                      throws org.xml.sax.SAXException

Overrides:
addChild in class SOMObject

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(java.lang.String name)

addAttribute

public SOMAttribute addAttribute(java.lang.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

Parameters:
attribute - the attributeGroup to add
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(java.io.Writer rtn,
                  int indent)
           throws java.io.IOException

Overrides:
toXML in class SOMType

createDefault

public void createDefault(DefaultDocumentOptions options,
                          org.w3c.dom.Element current)

validate

protected void validate(org.w3c.dom.Node element,
                        java.util.List errorList)

Overrides:
validate in class SOMUserDefinedType

WebLogic Integration

WebLogic Integration (WLI)