Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.schema
Class SOMGroupType

    java.lang.Object
      com.bea.schema.SOMObject
          com.bea.schema.SOMGroupType

All Implemented Interfaces:
  Serializable

Direct Known Subclasses:
  SOMAll, SOMAny, SOMChoice, SOMGroup, SOMSequence

public abstract class SOMGroupType
extends SOMObject

Abstract base class for all schema group types

See Also:
  Serialized Form

Constructor Summary
`SOMGroupType()`

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.
`SOMElement` | `addElement(String name)`
`SOMElement` | `addElement(String name, SOMType type)`
`boolean` | `contains(SOMObject child)` Determine if an object is child of this element.
`abstract void` | `createDefault(DefaultDocumentOptions options, Element current)`
`SOMAnnotation` | `getAnnotation()` get the annotation for this group.
`Map` | `getAttributes(boolean getAll)` retrieve the attributes for this schema element.
`Iterator` | `getChildren()` get the iterator over the child elements of this group-type
`String` | `getChildrenString()` list the children in a comma separated string.
`int` | `getMaxOccurs()` maxOccurs attribute
`String` | `getMaxOccursString()` String representation of maxOccurs attribute
`int` | `getMinOccurs()` minOccurs attribute.
`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(String maxOccurs)` The maxOccurs attribute for schema element.
`void` | `setMinOccurs(int minOccurs)` The minOccurs attribute.
`void` | `setMinOccurs(String minOccurs)` The minOccurs attribute.
`void` | `toXML(Writer rtn, int indent)` Outputs a formatted XML representation of SOMObject.

Methods inherited from class com.bea.schema.SOMObject
`addPrefixMapping, getContainmentXPath, getEffectivePrefixMappings, getID_UQ, getID, 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

### SOMGroupType

    public SOMGroupType()

Method Detail

### addElement

    public SOMElement addElement(String name)

### addElement

    public SOMElement addElement(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 Iterator getChildren()

  get the iterator over the child elements of this group-type

  Returns:
    an iterator over the elements in proper sequence

### getChildrenString

    public 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 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 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(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(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 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(Writer rtn,
                      int indent)
               throws IOException

  Description copied from class: `SOMObject`
  Outputs a formatted XML representation of SOMObject.

  Specified by:
    `toXML` in class `SOMObject`
  Parameters:
    `rtn` - printable XML Schema
    `indent` - the indent level for formatting at which to start this schema object.
  Throws:
    `IOException` - if IOExcpetion is thrown by underlying java.io.Writer

### createDefault

    public abstract void createDefault(DefaultDocumentOptions options,
                                       Element current)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD