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 SOMSchema

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

All Implemented Interfaces:
  Serializable

public class SOMSchema
extends SOMObject

<schema> The SOMSchema object is the building block for the Schema Object Model, SOM. The top level <schema> element is represented by the SOMSchema object and all sub-elements are linked underneath this object.

A schema is represented in XML by one or more schema documents, that is, one or more schema element information items. A schema document contains representations for a collection of schema components, e.g. type definitions and element declarations, which have a common {target namespace}.

The SOM allows the output of XML but is represented internally by a hierarchy of objects known as the Schema Object Model. SOMSchema is the object that represents the top level schema element to which everything must be added.

Version:
  1.0
Author:
  sharpe
See Also:
  Serialized Form

Field Summary
`static String` | `NAMESPACE_2001`
`static String` | `NAMESPACE_OCT2000`

Constructor Summary
`SOMSchema()` Create an empty top schema level object
`SOMSchema(InputSource inputSource, boolean canonical, boolean debugMessages)` Load a schema from an XML instance document in a file.
`SOMSchema(Reader xml)` Load a schema from stringified XML using the default SAX parser.
`SOMSchema(String xmlString)` Load a schema from serialized XML using the default SAX parser.
`SOMSchema(String xmlString, boolean canonical, boolean debugMessages)` Load a schema from stringified XML using the default SAX parser.
`SOMSchema(String xmlString, String encoding)` Load a schema from stringified XML using the default SAX parser.
`SOMSchema(XMLReader parser, InputSource inputSource, boolean canonical, boolean debugMessages)` Load a schema from an XML instance document in a file.

Method Summary
`SOMAnnotation` | `addAnnotation()` create a new empty annotation element within this schema.
`SOMAnnotation` | `addAnnotation(SOMAnnotation annotation)` add an annotation to the schema tree.
`void` | `addAttribute(String name, String value)` add attributes to the <schema> element.
`SOMAttribute` | `addAttributeElement(SOMAttribute child)` Adds a previously created <attribute> object to the root of the schema object model.
`SOMAttribute` | `addAttributeElement(String name)` Creates a SOMAttribute object with the given name and adds the <attribute> to the root level of this schema.
`SOMAttributeGroup` | `addAttributeGroup(SOMAttributeGroup child)` Adds a previously created <attributeGroup> object to the root of the schema object model.
`SOMAttributeGroup` | `addAttributeGroup(String name)` Creates a SOMAttributeGroup object with the given name and adds the <attributeGroup> to the root level of this schema.
`SOMComplexType` | `addComplexType(SOMComplexType child)` Adds the complexType to the root level of this schema.
`SOMComplexType` | `addComplexType(String name)` Creates a SOMComplexType object with the given name and adds the to the root level of this schema.
`SOMDocumentation` | `addDocumentation(String info)` adds a documentation element to a new annotation element for this schema.
`SOMElement` | `addElement(SOMElement child)` Adds a previously created <element> object to the root of the schema object model.
`SOMElement` | `addElement(String name)` Creates a SOMElement object with the given name and adds the <element> to the root level of this schema.
`SOMGroup` | `addGroup(SOMGroup child)` Adds a previously created <roup> object to the root of the schema object model.
`SOMGroup` | `addGroup(String name)` Creates a SOMGroup object with the given name and adds the <group> to the root level of this schema.
`SOMSimpleType` | `addSimpleType(SOMSimpleType child)` Adds the simpleType to the root level of this schema.
`SOMSimpleType` | `addSimpleType(String name)` Creates a SOMSimpleType object with the given name and adds the object to the root level of this schema.
`void` | `addUnresolvedType(SOMUnresolvedType type)`
`IDocument` | `createDefaultDocument(DefaultDocumentOptions options)` create an XML instance document template based on this schema model.
`Iterator` | `getAnnotations()` Returns an Iterator over all the annotations contained at the root level of this schema.
`Iterator` | `getAttributeElements()` Returns an Iterator over all the attributes contained at the root level of this schema.
`String` | `getAttributeFormDefault()` get the attributeFormDefault for this schema, or null if no attributeFormDefault was specified.
`Iterator` | `getAttributeGroups()` Returns an Iterator over all the attributeGroups contained at the root level of this schema.
`Iterator` | `getAttributes()` Returns an Iterator over all the attributes in the schema element.
`Iterator` | `getComplexTypes()` Returns an Iterator over all the complexTypes contained at the root level of this schema.
`String` | `getDefaultNameSpace()` get the schema xmlns:xsd attribute.
`SOMElement` | `getElement(String locationString)` Lookup an element within this schema.
`String` | `getElementFormDefault()` get the elementFormDefault for this schema, or null if no elementFormDefault was specified.
`Iterator` | `getElements()` Returns an Iterator over all the elements contained at the root level of this schema.
`Iterator` | `getGroups()` Returns an Iterator over all the groups contained at the root level of this schema.
`String` | `getID()` Returns a printable element tag for this Schema Object
`static String` | `getLocalName(Node node)` return the local part of the name for the given node.
`static String` | `getLocalPartFromName(String name)` return the local name portion of a qualified name.
`static String` | `getPrefixFromName(String name)` return the prefix portion of a qualified name, or null if the given name is not qualified.
`Iterator` | `getSimpleTypes()` Returns an Iterator over all the simpleTypes contained at the root level of this schema.
`String` | `getTargetNamespace()` get the targetNamespace for this schema, or null if no targetNamespace was specified.
`boolean` | `hasUnresolvedReferences()`
`boolean` | `hasUnresolvedTypes()`
`boolean` | `isAttributeFormDefaultQualified()` Is attributeFormDefault == 'qualified'
`boolean` | `isElementFormDefaultQualified()` Is elementFormDefault == 'qualified'
`boolean` | `isValid(Document doc, List errorList)` Validates an XML Document against an XML Schema.
`boolean` | `isValid(IDocument doc, List errorList)` Validates an XML Document against an XML Schema.
`boolean` | `isValid(Node rootElement, List errorList)` Validates an XML Document against an XML Schema.
`boolean` | `isValidatingContent()` current content validation setting.
`SOMAttributeGroup` | `lookupAttrGrpReference(String registeredName)` Returns a reference to an attributeGroup previously added to this schema object.
`SOMElement` | `lookupElement(String registeredName)` Returns a reference to an SOMElement previously added to this schema object.
`SOMReference` | `lookupReference(String registeredName)` Returns a reference to an element previously added to this schema object.
`SOMType` | `lookupTypeReference(String registeredTypeName)` Returns a reference to a type previously added to this schema object.
`static void` | `main(String[] args)`
`SOMAnnotation` | `removeAnnotation(SOMAnnotation note)` remove an annotation and all of its children from the root level of this schema
`SOMAttribute` | `removeAttribute(String name)` remove an attribute from the root level of this schema
`SOMComplexType` | `removeComplexType(String name)` remove a complexType from the root level of this schema
`SOMElement` | `removeElement(String name)` remove an element from the root level of this schema
`SOMGroup` | `removeGroup(String name)` remove an group from the root level of this schema
`SOMSimpleType` | `removeSimpleType(String name)` remove a simpleType from the root level of this schema
`void` | `resolveReferences()` Resolve unresolved elements in this schema.
`void` | `resolveTypes()` Resolve unresolved element types in this schema.
`void` | `setAttributeFormDefault(String value)` set the attributeFormDefault for this schema,.
`void` | `setContentValidation(boolean value)` toggle element and attribute content validation.
`void` | `setDefaultNamespace(String xmlns_xsd)` manually override the XMLSchema namespace - NOT RECOMMENDED.
`void` | `setElementFormDefault(String value)` set the elementFormDefault for this schema.
`void` | `setTargetNamespace(String targetNamespace)` set the targetNamespace for this schema.
`void` | `toXML(Writer rtn, int indent)` For debugging, display, and printing purposes, the XML Schema Object model can be represented as a character string.

Methods inherited from class com.bea.schema.SOMObject
`addPrefixMapping, getContainmentXPath, getEffectivePrefixMappings, getID_UQ, getParent, getParentName, getParentSchema, getPrefixForTargetNamespace, getPrefixMapping, getURIForPrefix, isCircularReference, isSchemaChild, msg, msg, removeNamespaceQualifier, removePrefixMapping, setIndent, setParent, toString, toXML, toXML, toXML`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### NAMESPACE_OCT2000

    public static final String NAMESPACE_OCT2000

See Also:
  Constant Field Values

### NAMESPACE_2001

    public static final String NAMESPACE_2001

See Also:
  Constant Field Values

Constructor Detail

### SOMSchema

    public SOMSchema()

  Create an empty top schema level object

### SOMSchema

    public SOMSchema(String xmlString)
              throws SAXException

  Load a schema from serialized XML using the default SAX parser. A default SAXParser is loaded using JAXP SAXParserFactory. This constructor serves as the reverse process to the SOMSchema toString() method.

Parameters:
  `xmlString` - the XML in parsable string format
Throws:
  `SAXException`

### SOMSchema

    public SOMSchema(String xmlString,
                     String encoding)
              throws SAXException,
                     UnsupportedEncodingException

  Load a schema from stringified XML using the default SAX parser. A default SAXParser is loaded using JAXP SAXParserFactory. This constructor serves as the reverse process to the SOMSchema toXML(encoding) method.

Parameters:
  `xmlString` - the XML in parsable string format
  `encoding` -
Throws:
  `SAXException`
  `UnsupportedEncodingException`

### SOMSchema

    public SOMSchema(String xmlString,
                     boolean canonical,
                     boolean debugMessages)
              throws SAXException

  Load a schema from stringified XML using the default SAX parser. A default SAXParser is loaded using JAXP SAXParserFactory.

Parameters:
  `xmlString` - the XML in parsable string format
  `canonical` - for future use
  `debugMessages` - print debug messages for loading InputSource to SOMSchema to stdout

### SOMSchema

    public SOMSchema(Reader xml)
              throws SAXException

  Load a schema from stringified XML using the default SAX parser. A default SAXParser is loaded using JAXP SAXParserFactory.

### SOMSchema

    public SOMSchema(InputSource inputSource,
                     boolean canonical,
                     boolean debugMessages)
              throws SAXException

  Load a schema from an XML instance document in a file. A default SAXParser is loaded using JAXP SAXParserFactory. Example:

           SOMSchema mySchema = null;
           java.io.Reader myInput;
           ...
           org.xml.sax.InputSource myInputSource = new org.xml.sax.InputSource(myInput);

           try
           {
             mySchema = new SOMSchema(myInputSource, false, false);
           }
           catch (org.xml.sax.SAXException se)
           {
             System.err.println(se.getMessage());
           }
           catch ( Exception e )
           {
             e.printStackTrace();
           }

Parameters:
  `inputSource` - the input source to parse
  `canonical` - for future use
  `debugMessages` - print debug messages for loading InputSource to SOMSchema to stdout

### SOMSchema

    public SOMSchema(XMLReader parser,
                     InputSource inputSource,
                     boolean canonical,
                     boolean debugMessages)
              throws SAXException

  Load a schema from an XML instance document in a file.

Parameters:
  `parser` - a SAX parser
  `inputSource` - the input source to parse
  `canonical` - for future use
  `debugMessages` - print debug messages for loading InputSource to SOMSchema to stdout

Method Detail

### main

    public static void main(String[] args)

### addAttribute

    public void addAttribute(String name,
                             String value)

  add attributes to the <schema> element. addAttribute can be used to add additional namespace targets, as well as, any other xsd:schema attributes. For example, addAttribute("schemaLocation", "book.xsd"); would add the attribute to the schema as: <xsd:schema schemaLocation="book.xsd">

  Parameters:
    `name` - attribute name
    `value` - attribute value

### addAttributeElement

    public SOMAttribute addAttributeElement(String name)

  Creates a SOMAttribute object with the given name and adds the <attribute> to the root level of this schema. The object to the newly created element object is returned to you for modification, if necessary.

  Parameters:
    `name` - The name attribute for the created <attribute>
  Returns:
    The object reference of the newly created SOMAttribute

### addAttributeElement

    public SOMAttribute addAttributeElement(SOMAttribute child)

  Adds a previously created <attribute> object to the root of the schema object model.

  Parameters:
    `child` -
  Returns:
    object reference to the same object passed as a parameter

### addAttributeGroup

    public SOMAttributeGroup addAttributeGroup(String name)

  Creates a SOMAttributeGroup object with the given name and adds the <attributeGroup> to the root level of this schema. The object to the newly created element object is returned to you for modification, if necessary.

  Parameters:
    `name` - The name attribute for the created <attributeGroup>
  Returns:
    The object reference of the newly created SOMAttributeGroup

### addAttributeGroup

    public SOMAttributeGroup addAttributeGroup(SOMAttributeGroup child)

  Adds a previously created <attributeGroup> object to the root of the schema object model.

  Parameters:
    `child` -
  Returns:
    object reference to the same object passed as a parameter

### addGroup

    public SOMGroup addGroup(String name)

  Creates a SOMGroup object with the given name and adds the <group> to the root level of this schema. The object to the newly created element object is returned to you for modification, if necessary.

  Parameters:
    `name` - The name attribute for the created <group>
  Returns:
    The object reference of the newly created SOMGroup

### addGroup

    public SOMGroup addGroup(SOMGroup child)

  Adds a previously created <roup> object to the root of the schema object model. The group element must have a name attribute to be added at the root level of the schema.

  Parameters:
    `child` -
  Returns:
    object reference to the same object passed as a parameter

### addElement

    public SOMElement addElement(String name)

  Creates a SOMElement object with the given name and adds the <element> to the root level of this schema. The object to the newly created element object is returned to you for modification, if necessary. Elements added at this level can be used as root elements when creating an instance document.

  Parameters:
    `name` - The name attribute for the created <element>
  Returns:
    The object reference of the newly created SOMElement

### addElement

    public SOMElement addElement(SOMElement child)

  Adds a previously created <element> object to the root of the schema object model. Elements added at this level can be used as root elements when creating an instance document.

  Parameters:
    `child` -
  Returns:
    object reference to the same object passed as a parameter

### addComplexType

    public SOMComplexType addComplexType(String name)

  Creates a SOMComplexType object with the given name and adds the to the root level of this schema. The object to the newly created complexType object is returned to you for modification, if necessary.

  Parameters:
    `name` - at the root level of the schema must must have an identity/name.
  Returns:
    the newly create object

### addComplexType

    public SOMComplexType addComplexType(SOMComplexType child)

  Adds the complexType to the root level of this schema. If the complexType being added is already a member of a tree, it will first be removed and then added to this schema tree.

  Parameters:
    `child` - the complexType to add
  Returns:
    the complexType object

### addSimpleType

    public SOMSimpleType addSimpleType(String name)

  Creates a SOMSimpleType object with the given name and adds the object to the root level of this schema. A referemce to the newly created simpleType object is returned.

  Parameters:
    `name` - at the root level of the schema must must have an identity/name.
  Returns:
    the newly created object

### addSimpleType

    public SOMSimpleType addSimpleType(SOMSimpleType child)

  Adds the simpleType to the root level of this schema. If the simpleType being added is already a member of a tree, it will first be removed and then added to this schema tree.

  Parameters:
    `child` - the simpleType to add
  Returns:
    the simpleType object

### addDocumentation

    public SOMDocumentation addDocumentation(String info)

  adds a documentation element to a new annotation element for this schema. This method will create a new annotation at the root of this schema and then add the new documentation element to that annotation. Same as:

       SOMSchema mySchema ...
       ...
       SOMAnnotation note = mySchema.addAnnotation();
       note.addDocumentation(info);

  Parameters:
    `info` - The documentation string to be added
  Returns:
    a reference to the newly created documentation object

### addAnnotation

    public SOMAnnotation addAnnotation()

  create a new empty annotation element within this schema. The annotation object is created and then added to the SOMSchema tree.

  Returns:
    the newly created annotation object.

### addAnnotation

    public SOMAnnotation addAnnotation(SOMAnnotation annotation)

  add an annotation to the schema tree. 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.

### getID

    public String getID()

  Description copied from class: `SOMObject`
  Returns a printable element tag for this Schema Object

  Specified by:
    `getID` in class `SOMObject`
  Returns:
    String representation of the element tag

### getDefaultNameSpace

    public String getDefaultNameSpace()

  get the schema xmlns:xsd attribute.

  Returns:

### setDefaultNamespace

    public void setDefaultNamespace(String xmlns_xsd)

  manually override the XMLSchema namespace - NOT RECOMMENDED. If you are working with tools that do not support the namespace at http://www.w3.org/2001/XMLSchema, this method can be used to override the xmlns attribute for the SOMSchema. This is NOT recommended. The SOM is based on the March 3, 2001 XML Schema standard. Oct, 2000 types are available, but deprecated.

  Parameters:
    `xmlns_xsd` - namespace URL

### getComplexTypes

    public Iterator getComplexTypes()

  Returns an Iterator over all the complexTypes contained at the root level of this schema.

  Returns:
    an Iterator over the SOMComplexType's contained by this SOMSchema

### getSimpleTypes

    public Iterator getSimpleTypes()

  Returns an Iterator over all the simpleTypes contained at the root level of this schema.

  Returns:
    an Iterator over the SOMSimpleType's contained by this SOMSchema

### getElements

    public Iterator getElements()

  Returns an Iterator over all the elements contained at the root level of this schema.

  Returns:
    an Iterator over the SOMElement's contained by this SOMSchema

### getElement

    public SOMElement getElement(String locationString)

  Lookup an element within this schema. Using a virtual path, the reference to the SOMElement is returned. For example, using the virtual path string "/purchaseOrder/items/item" on the PurchaseOrder schema would return a reference to the SOMElement name="item".

  Virtual Path nodes must be separated by the forward slash, "/"

  Parameters:
    `locationString` - a virtual element path where nodes are separated by the forward slash, "/"
  Returns:
    SOMElement or null if locationString could not be resolved.

### getAttributeGroups

    public Iterator getAttributeGroups()

  Returns an Iterator over all the attributeGroups contained at the root level of this schema.

  Returns:
    an Iterator over the SOMAttributeGroup's contained by this SOMSchema

### getGroups

    public Iterator getGroups()

  Returns an Iterator over all the groups contained at the root level of this schema.

  Returns:
    an Iterator over the SOMGroup's contained by this SOMSchema

### getAttributeElements

    public Iterator getAttributeElements()

  Returns an Iterator over all the attributes contained at the root level of this schema.

  Returns:
    an Iterator over the SOMAttribute's contained by this SOMSchema

### getAttributes

    public Iterator getAttributes()

  Returns an Iterator over all the attributes in the schema element. The list will not contain the default namespace, but will include all attributes added with the addAttribute method. The Iterator remove method should be used to remove attributes from the schema element tag.

  Returns:
    an Iterator over the attributes in this schema tag

### hasUnresolvedReferences

    public boolean hasUnresolvedReferences()

### hasUnresolvedTypes

    public boolean hasUnresolvedTypes()

### addUnresolvedType

    public void addUnresolvedType(SOMUnresolvedType type)

### resolveReferences

    public void resolveReferences()

  Resolve unresolved elements in this schema. If SOMUnresolvedReferences were inserted into this schema during construction, using this method will attempt to resolve and replace unresolved element references with actual references. Use hasUnresolvedRefereces method to determine if any exist in this schema.

### resolveTypes

    public void resolveTypes()

  Resolve unresolved element types in this schema. If SOMUnresolvedTypes were inserted into this schema during construction, using this method will attempt to resolve and replace unresolved element references with actual references. Use hasUnresolvedTypes method to determine if any exist in this schema.

### getAnnotations

    public Iterator getAnnotations()

  Returns an Iterator over all the annotations contained at the root level of this schema.

  Returns:
    an Iterator over the SOMAnnotations's contained by this SOMSchema

### getTargetNamespace

    public String getTargetNamespace()

  get the targetNamespace for this schema, or null if no targetNamespace was specified.

  Overrides:
    `getTargetNamespace` in class `SOMObject`

### setTargetNamespace

    public void setTargetNamespace(String targetNamespace)

  set the targetNamespace for this schema.

  Overrides:
    `setTargetNamespace` in class `SOMObject`

### getElementFormDefault

    public String getElementFormDefault()

  get the elementFormDefault for this schema, or null if no elementFormDefault was specified.

### setElementFormDefault

    public void setElementFormDefault(String value)

  set the elementFormDefault for this schema.

### getAttributeFormDefault

    public String getAttributeFormDefault()

  get the attributeFormDefault for this schema, or null if no attributeFormDefault was specified.

### setAttributeFormDefault

    public void setAttributeFormDefault(String value)

  set the attributeFormDefault for this schema,.

### isElementFormDefaultQualified

    public boolean isElementFormDefaultQualified()

  Is elementFormDefault == 'qualified'

### isAttributeFormDefaultQualified

    public boolean isAttributeFormDefaultQualified()

  Is attributeFormDefault == 'qualified'

### removeComplexType

    public SOMComplexType removeComplexType(String name)

  remove a complexType from the root level of this schema

  Parameters:
    `name` - name the complexType
  Returns:
    the complexType to which the name had been mapped in this schema, or null if the name did not have a mapping

### removeSimpleType

    public SOMSimpleType removeSimpleType(String name)

  remove a simpleType from the root level of this schema

  Parameters:
    `name` - name the simpleType
  Returns:
    the simpleType to which the name had been mapped in this schema, or null if the name did not have a mapping

### removeElement

    public SOMElement removeElement(String name)

  remove an element from the root level of this schema

  Parameters:
    `name` - name the element
  Returns:
    the element to which the name had been mapped in this schema, or null if the name did not have a mapping

### removeGroup

    public SOMGroup removeGroup(String name)

  remove an group from the root level of this schema

  Parameters:
    `name` - name the group
  Returns:
    the group to which the name had been mapped in this schema, or null if the name did not have a mapping

### removeAttribute

    public SOMAttribute removeAttribute(String name)

  remove an attribute from the root level of this schema

  Parameters:
    `name` - name the attribute
  Returns:
    the attribute to which the name had been mapped in this schema, or null if the name did not have a mapping

### removeAnnotation

    public SOMAnnotation removeAnnotation(SOMAnnotation note)

  remove an annotation and all of its children from the root level of this schema

  Parameters:
    `note` - The annotation object to be removed
  Returns:
    the annotation object removed, or null if the object was not found in this schema

### lookupTypeReference

    public SOMType lookupTypeReference(String registeredTypeName)

  Returns a reference to a type previously added to this schema object. By adding a type to the root level of this schema object, the type becomes registered within this schema. All types at the root level of a schema must have a name attribute. Therefore, this search restricts itself to types added to this schema object at the root level. The search order is simpleType then complexType.

  Parameters:
    `registeredTypeName` - The value of the "name" attribute for the registered type.
  Returns:
    The registered object for the given "name" or null if none is found.

### lookupReference

    public SOMReference lookupReference(String registeredName)

  Returns a reference to an element previously added to this schema object. By adding an element to the root level of this schema object, the element becomes registered within this schema. All elements at the root level of a schema must have a name attribute. Therefore, this search restricts itself to elements added to this schema object at the root level.

  Parameters:
    `registeredName` - The value of the "name" attribute for the registered element.
  Returns:
    The registered object for the given "name" or null if none is found.

### lookupElement

    public SOMElement lookupElement(String registeredName)

  Returns a reference to an SOMElement previously added to this schema object. By adding an element to the root level of this schema object, the element becomes registered within this schema. All elements at the root level of a schema must have a name attribute. Therefore, this search restricts itself to elements added to this schema object at the root level.

  Parameters:
    `registeredName` - The value of the "name" attribute for the registered attributeGroup element.
  Returns:
    The registered element for the given "name" or null if none is found.

### getLocalName

    public static String getLocalName(Node node)

  return the local part of the name for the given node.

### getPrefixFromName

    public static String getPrefixFromName(String name)

  return the prefix portion of a qualified name, or null if the given name is not qualified.

### getLocalPartFromName

    public static String getLocalPartFromName(String name)

  return the local name portion of a qualified name. This will always return a non-null result if the name parameter is not null and has length > 0.

### lookupAttrGrpReference

    public SOMAttributeGroup lookupAttrGrpReference(String registeredName)

  Returns a reference to an attributeGroup previously added to this schema object. By adding an attributeGroup to the root level of this schema object, the element becomes registered within this schema. All elements at the root level of a schema must have a name attribute. Therefore, this search restricts itself to elements added to this schema object at the root level.

  Parameters:
    `registeredName` - The value of the "name" attribute for the registered attributeGroup element.
  Returns:
    The registered object for the given "name" or null if none is found.

### isValidatingContent

    public boolean isValidatingContent()

  current content validation setting.

  Returns:
    true if isValid should validate element and attribute content

### setContentValidation

    public void setContentValidation(boolean value)

  toggle element and attribute content validation. Content validation for the isValid method defaults to true. When validating a document against this schema, validation of the document's structure can be isolated by toggling the content validation so that element content is ignored during validation.

  Parameters:
    `value` - use false to ignore document content

### isValid

    public boolean isValid(Document doc,
                           List errorList)

  Validates an XML Document against an XML Schema. If the document is valid, the isValid method returns true and the List of errors will be empty.

  The error list is cleared before beginning the validation. The List implementation used must support the clear() method.

  Elements of the list are instances of the class SOMValidationException.

  Parameters:
    `doc` - the document instance to be validated
    `errorList` - A list of SOMValidationException
  Returns:
    true if the document is valid within this schema

### isValid

    public boolean isValid(IDocument doc,
                           List errorList)

  Validates an XML Document against an XML Schema. If the document is valid, the isValid method returns true and the List of errors will be empty.

  The error list is cleared before beginning the validation. The List implementation used must support the clear() method.

  Elements of the list are instances of the class SOMValidationException.

  Parameters:
    `doc` - the document instance to be validated
    `errorList` - A list of SOMValidationException
  Returns:
    true if the document is valid within this schema

### isValid

    public boolean isValid(Node rootElement,
                           List errorList)

  Validates an XML Document against an XML Schema. If the document is valid, the isValid method returns true and the List of errors will be empty.

  The error list is cleared before beginning the validation. The List implementation used must support the clear() method.

  Elements of the list are instances of the class SOMValidationException.

  Parameters:
    `rootElement` - the document element to be validated
    `errorList` - A list of SOMValidationException
  Returns:
    true if the document is valid within this schema

### toXML

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

  For debugging, display, and printing purposes, the XML Schema Object model can be represented as a character string. The super class SOMObject's toString() method calls this method with an indent value of 0.

  Specified by:
    `toXML` in class `SOMObject`
  Parameters:
    `indent` - Indent level
    `rtn` - printable XML Schema
  Throws:
    `IOException` - if IOExcpetion is thrown by underlying java.io.Writer

### createDefaultDocument

    public IDocument createDefaultDocument(DefaultDocumentOptions options)

  create an XML instance document template based on this schema model. The instance document uses the options provided as the argument with one exception. If the target document is not specified in the options, one will be created for you from com.bea.document.DocumentFactory. The document returned is the same document contained in the options argument, DefaultDocumentOptions.

  Parameters:
    `options` - options must include a root element name
  Returns:
    the created document.

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