WebLogic Integration


com.bea.schema
Class SOMGroupType

java.lang.Object
  |
  +--com.bea.schema.SOMObject
        |
        +--com.bea.schema.SOMGroupType
Direct Known Subclasses:
SOMAll, SOMAny, SOMChoice, SOMGroup, SOMSequence

public abstract class SOMGroupType
extends SOMObject

Abstract base class for all schema group types

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

Field Summary
protected  java.util.Vector m_childElements
           
 
Constructor Summary
  SOMGroupType()
           
protected SOMGroupType(org.xml.sax.Attributes attrs, SOMObject parent)
           
 
Method Summary
 SOMAll add(SOMAll newChild)
           
 SOMAny add(SOMAny newChild)
           
 SOMChoice add(SOMChoice newChild)
           
 SOMElement add(SOMElement newChild)
           
 SOMGroup add(SOMGroup newChild)
           
 SOMSequence add(SOMSequence newChild)
           
 SOMAnnotation addAnnotation(SOMAnnotation annotation)
          add an annotation.
protected  SOMObject addChild(java.lang.String tagName, org.xml.sax.Attributes attrs)
           
 SOMElement addElement(java.lang.String name)
           
 SOMElement addElement(java.lang.String name, SOMType type)
           
 boolean contains(SOMObject child)
          Determine if an object is child of this element.
abstract  void createDefault(DefaultDocumentOptions options, org.w3c.dom.Element current)
           
 SOMAnnotation getAnnotation()
          get the annotation for this group.
 java.util.Map getAttributes(boolean getAll)
          retrieve the attributes for this schema element.
 java.util.Iterator getChildren()
          get the iterator over the child elements of this group-type
 java.lang.String getChildrenString()
          list the children in a comma separated string.
 int getMaxOccurs()
          maxOccurs attribute
 java.lang.String getMaxOccursString()
          String representation of maxOccurs attribute
 int getMinOccurs()
          minOccurs attribute.
 java.lang.String getMinOccursString()
          String representation of the minOccurs attribute value
 SOMObject remove(SOMObject child)
          remove a child sub-element.
 SOMAnnotation removeAnnotation()
          set the annotation at this group to null.
 void setMaxOccurs(int maxOccurs)
          The maxOccurs attribute.
 void setMaxOccurs(java.lang.String maxOccurs)
          The maxOccurs attribute for schema element.
 void setMinOccurs(int minOccurs)
          The minOccurs attribute.
 void setMinOccurs(java.lang.String minOccurs)
          The minOccurs attribute.
protected abstract  boolean startsWith(org.w3c.dom.Node element)
          Attempt to determine if the element is the start of a group.
 void toXML(java.io.Writer rtn, int indent)
           
protected abstract  org.w3c.dom.Node validate(org.w3c.dom.Node element, java.util.List errorList)
           
protected  org.w3c.dom.Node validateOccurances(org.w3c.dom.Node element, java.util.List errorList)
           
 
Methods inherited from class com.bea.schema.SOMObject
addPrefixMapping, attributesToXML, collectEffectivePrefixMappings, doIndent, getContainmentXPath, getEffectivePrefixMappings, getID_UQ, getID, 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
 

Field Detail

m_childElements

protected java.util.Vector m_childElements
Constructor Detail

SOMGroupType

public SOMGroupType()

SOMGroupType

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

addChild

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

Overrides:
addChild in class SOMObject

addElement

public SOMElement addElement(java.lang.String name)

addElement

public SOMElement addElement(java.lang.String name,
                             SOMType type)

add

public SOMElement add(SOMElement newChild)

add

public SOMChoice add(SOMChoice newChild)

add

public SOMGroup add(SOMGroup newChild)

add

public SOMSequence add(SOMSequence newChild)

add

public SOMAll add(SOMAll newChild)

add

public SOMAny add(SOMAny newChild)

addAnnotation

public SOMAnnotation addAnnotation(SOMAnnotation annotation)
add an annotation. If the annotation exists in another tree, it will first be removed and then added to this tree.

Parameters:
annotation - a previously created annotation
Returns:
the annotation that was added.

getAnnotation

public SOMAnnotation getAnnotation()
get the annotation for this group.

Returns:
the annotation, or null if none was present

removeAnnotation

public SOMAnnotation removeAnnotation()
set the annotation at this group to null.

Returns:
the removed annotation, or null if none was present

remove

public SOMObject remove(SOMObject child)
remove a child sub-element. Removes an object from this tree that was previously added with one of the add() methods.

Parameters:
child - the object that it is be removed
Returns:
the object removed, or null if the object is not a sub-element of this group type

getChildren

public java.util.Iterator getChildren()
get the iterator over the child elements of this group-type

Returns:
an iterator over the elements in proper sequence

getChildrenString

public java.lang.String getChildrenString()
list the children in a comma separated string.

Returns:
list of names/id's

getMinOccurs

public int getMinOccurs()
minOccurs attribute.

Returns:
minOccurs value

getMinOccursString

public java.lang.String getMinOccursString()
String representation of the minOccurs attribute value

Returns:
minOccurs value in a String

getMaxOccurs

public int getMaxOccurs()
maxOccurs attribute

Returns:
maxOccurs value or -1 if "unbounded"

getMaxOccursString

public java.lang.String getMaxOccursString()
String representation of maxOccurs attribute

Returns:
a String representation of the maxOccurs value or "unbounded" if maxOccurs is -1

setMinOccurs

public void setMinOccurs(java.lang.String minOccurs)
The minOccurs attribute. The default value is '1'.

Parameters:
minOccurs - a nonNegativeInteger

setMinOccurs

public void setMinOccurs(int minOccurs)
The minOccurs attribute. The default value is '1'.

Parameters:
minOccurs - a nonNegativeInteger

setMaxOccurs

public void setMaxOccurs(java.lang.String maxOccurs)
The maxOccurs attribute for schema element. The default value is '1'.

Parameters:
maxOccurs - a nonNegativeInteger or "unbounded"

setMaxOccurs

public void setMaxOccurs(int maxOccurs)
The maxOccurs attribute. The default value is '1'.

Any negative number is treated as "unbounded"

Parameters:
maxOccurs - a nonNegativeInteger or -1 (unbounded)

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

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.

toXML

public void toXML(java.io.Writer rtn,
                  int indent)
           throws java.io.IOException

Overrides:
toXML in class SOMObject

createDefault

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

validate

protected abstract org.w3c.dom.Node validate(org.w3c.dom.Node element,
                                             java.util.List errorList)
                                      throws SOMValidationException

startsWith

protected abstract boolean startsWith(org.w3c.dom.Node element)
Attempt to determine if the element is the start of a group.

Parameters:
element - A DOM element
Returns:
true if the Node could start this group

validateOccurances

protected org.w3c.dom.Node validateOccurances(org.w3c.dom.Node element,
                                              java.util.List errorList)
                                       throws SOMValidationException

WebLogic Integration

WebLogic Integration (WLI)