WebLogic Integration


com.bea.schema
Class SOMRestriction

java.lang.Object
  |
  +--com.bea.schema.SOMObject
        |
        +--com.bea.schema.SOMExtension
              |
              +--com.bea.schema.SOMRestriction

public class SOMRestriction
extends SOMExtension

<restriction> A restricting construct for schema components. The XML representation for restricting a type schema component is either a <restriction>, a <list> or a <union> element information item.

The restriction element provides the ability to add facets to a simpleType definition.

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

Constructor Summary
protected SOMRestriction(org.xml.sax.Attributes attrs)
           
  SOMRestriction(SOMType base)
           
 
Method Summary
 SOMAttribute addAttribute(SOMAttribute attribute)
           
 SOMAttributeGroup addAttributeGroup(SOMAttributeGroup attribute)
           
protected  SOMObject addChild(java.lang.String tagName, org.xml.sax.Attributes attrs)
           
 java.lang.String createDefault()
          Limited implementation.
 java.util.Iterator getFacets()
          returns all facets in this restriction.
 java.lang.String getID()
           
 SOMType getType()
          returns the type that is being restricted.
 SOMFacet removeFacet(java.lang.String facet)
          remove a facet element from this restriction element.
 SOMFacet setDuration(java.lang.String val)
          Deprecated.  
 SOMFacet setEncoding(java.lang.String val)
          Deprecated.  
 SOMFacet setEnumeration(java.lang.String val)
           
 SOMFacet setFacet(java.lang.String facet_name, java.lang.String value)
          Use the setFacet method to place restrictions on a previously defined type.
 SOMFacet setFractionDigits(java.lang.String val)
           
 SOMFacet setLength(java.lang.String val)
           
 SOMFacet setMaxExclusive(java.lang.String val)
           
 SOMFacet setMaxInclusive(java.lang.String val)
           
 SOMFacet setMaxLength(java.lang.String val)
           
 SOMFacet setMinExclusive(java.lang.String val)
           
 SOMFacet setMinInclusive(java.lang.String val)
           
 SOMFacet setMinLength(java.lang.String val)
           
 void setParent(SOMObject parent)
           
 SOMFacet setPattern(java.lang.String val)
           
 SOMFacet setPeriod(java.lang.String val)
          Deprecated.  
 SOMFacet setPrecision(java.lang.String val)
          Deprecated.  
 SOMFacet setScale(java.lang.String val)
          Deprecated.  
 SOMFacet setTotalDigits(java.lang.String val)
           
 void setType(SOMType type)
           
 SOMFacet setWhiteSpace(java.lang.String val)
           
protected  void toXMLChildren(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.SOMExtension
addAnnotation, addAttribute, addAttribute, contains, createDefault, getAnnotation, getAttributeElements, getAttributeGroups, getAttributes, getBase, listAttributesExtended, removeAllAttributeGroups, removeAllAttributes, removeAnnotation, removeAttribute, removeAttributeGroup, setBase, setBase, toXML
 
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, 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

SOMRestriction

public SOMRestriction(SOMType base)

SOMRestriction

protected SOMRestriction(org.xml.sax.Attributes attrs)
Method Detail

setType

public void setType(SOMType type)

getType

public SOMType getType()
returns the type that is being restricted. The <restriction> can have a type defined by simpleType or base, but not both. simpleType children are not yet supported.

Returns:
the restricted type

getID

public java.lang.String getID()

Overrides:
getID in class SOMExtension

getFacets

public java.util.Iterator getFacets()
returns all facets in this restriction. Iterates over a collection of SOMFacet.

Returns:
Iterator of SOMFacet's

setFacet

public SOMFacet setFacet(java.lang.String facet_name,
                         java.lang.String value)
                  throws java.lang.ArrayIndexOutOfBoundsException
Use the setFacet method to place restrictions on a previously defined type. Using the constants defined in SOMFacet, this method creates a valid facet object and adds it to this restriction.

For example, would be created using the arguments setFacet(SOMFacet.maxExclusive, "100");

Parameters:
facet_type -  
value - a value for the new facet.
Returns:
a reference to the newly created facet.
Throws:
java.lang.ArrayIndexOutOfBoundsException - If the facet_type is not a valid index defined in SOMFacet, ArrayIndexOutOfBoundsException will be thrown.

setLength

public SOMFacet setLength(java.lang.String val)

setMinLength

public SOMFacet setMinLength(java.lang.String val)

setMaxLength

public SOMFacet setMaxLength(java.lang.String val)

setPattern

public SOMFacet setPattern(java.lang.String val)

setEnumeration

public SOMFacet setEnumeration(java.lang.String val)

setWhiteSpace

public SOMFacet setWhiteSpace(java.lang.String val)

setMaxInclusive

public SOMFacet setMaxInclusive(java.lang.String val)

setMaxExclusive

public SOMFacet setMaxExclusive(java.lang.String val)

setMinExclusive

public SOMFacet setMinExclusive(java.lang.String val)

setMinInclusive

public SOMFacet setMinInclusive(java.lang.String val)

setTotalDigits

public SOMFacet setTotalDigits(java.lang.String val)

setFractionDigits

public SOMFacet setFractionDigits(java.lang.String val)

setPrecision

public SOMFacet setPrecision(java.lang.String val)
Deprecated.  

Since:
3/16/2001

setScale

public SOMFacet setScale(java.lang.String val)
Deprecated.  

Since:
3/16/2001

setEncoding

public SOMFacet setEncoding(java.lang.String val)
Deprecated.  

Since:
3/16/2001

setDuration

public SOMFacet setDuration(java.lang.String val)
Deprecated.  

Since:
3/16/2001

setPeriod

public SOMFacet setPeriod(java.lang.String val)
Deprecated.  

Since:
3/16/2001

removeFacet

public SOMFacet removeFacet(java.lang.String facet)
remove a facet element from this restriction element. For example, removeFacet(SOMFacet.length)

Parameters:
facet - the facet name from SOMFacet declared facets
Returns:
the removed facet element, or null if facet wasn't found

addChild

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

Overrides:
addChild in class SOMExtension

addAttribute

public SOMAttribute addAttribute(SOMAttribute attribute)

Overrides:
addAttribute in class SOMExtension

addAttributeGroup

public SOMAttributeGroup addAttributeGroup(SOMAttributeGroup attribute)

Overrides:
addAttributeGroup in class SOMExtension

setParent

public void setParent(SOMObject parent)

Overrides:
setParent in class SOMObject

toXMLChildren

protected void toXMLChildren(java.io.Writer rtn,
                             int indent)
                      throws java.io.IOException

Overrides:
toXMLChildren in class SOMExtension

createDefault

public java.lang.String createDefault()
Limited implementation. Returns default content for the base type.

validate

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

Overrides:
validate in class SOMExtension

WebLogic Integration

WebLogic Integration (WLI)