com.bea.schema
Class SOMSimpleType

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

public class SOMSimpleType
extends SOMUserDefinedType

This object defines a simple user defined schema type.

Simple Type definitions provide for:

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
SOMSimpleType()
           
SOMSimpleType(String name)
           
 
Method Summary
 SOMList add(SOMList list)
           
 SOMRestriction add(SOMRestriction restrict)
           
 SOMUnion add(SOMUnion p_union)
           
 SOMList addList(SOMType type)
          add a new SOMList constraint.
 SOMRestriction addRestriction(SOMType type)
          add a new SOMRestriction constraint.
 String createDefault()
           
 Vector getAllowedFacets()
          By default, all sub-classes of SOMType do not allow facets (restrictions).
 SOMObject getConstraint()
          The generic constraint - for the type specific constraint, use getRestriction(), getList(), or getUnion().
 String getID()
          <xsd:anyType>
 SOMList getList()
          Access the object of this object.
 SOMRestriction getRestriction()
          Access the object of this object.
 SOMUnion getUnion()
          Access the object of this object.
 SOMObject removeConstraint()
          remove the previously set constraint.
 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, getAttributes, getName, isElementalType, isUserDefinedType, removeAnnotation, setName
 
Methods inherited from class com.bea.schema.type.SOMType
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

SOMSimpleType

public SOMSimpleType()

SOMSimpleType

public SOMSimpleType(String name)
Method Detail

getID

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

Overrides:
getID in class SOMType

removeConstraint

public SOMObject removeConstraint()
remove the previously set constraint. If a constraint was previously added, it will be removed from this tree and returned.

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

addRestriction

public SOMRestriction addRestriction(SOMType type)
add a new SOMRestriction constraint. If a constraint was already set, it will be removed bofore the new restriction constraint is added.

Parameters:
type - the restriction base type
Returns:
the newly created restriction object

addList

public SOMList addList(SOMType type)
add a new SOMList constraint. If a constraint was already set, it will be removed bofore the new list constraint is added.

Parameters:
type - the list item type
Returns:
the newly created list object

add

public SOMRestriction add(SOMRestriction restrict)

add

public SOMList add(SOMList list)

add

public SOMUnion add(SOMUnion p_union)

getRestriction

public SOMRestriction getRestriction()
Access the object of this object. If the restriction is not set or the constraint for this simpleType is a union or list, null is returned.

Returns:
SOMRestriction object or null if no is present.

getList

public SOMList getList()
Access the object of this object. If the list is not set or the constraint for this simpleType is a union or restriction, null is returned.

Returns:
SOMList object or null if no is present.

getUnion

public SOMUnion getUnion()
Access the object of this object. If the union is not set or the constraint for this simpleType is a list or restriction, null is returned.

Returns:
SOMUnion object or null if no is present.

getConstraint

public SOMObject getConstraint()
The generic constraint - for the type specific constraint, use getRestriction(), getList(), or getUnion(). The object returned will be null or an instance of SOMRestriction, SOMList, or SOMUnion.

Returns:
the constraint for this simpleType
See Also:
getRestriction(), getList(), getUnion(), SOMRestriction, SOMList, SOMUnion

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

getAllowedFacets

public Vector getAllowedFacets()
Description copied from class: SOMType
By default, all sub-classes of SOMType do not allow facets (restrictions). For types that do allow facets, the getAllowedFacets() method returns an Enumeration of String objects for the names of allowable facets.

Overrides:
getAllowedFacets in class SOMType
Returns:
Vector of String objects for the names of allowable facets or null if facets are not allowed for this type.

createDefault

public String createDefault()