Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| WebLogic Integration
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.schema
Class DefaultDocumentOptions

    java.lang.Object
      |
      +--com.bea.schema.DefaultDocumentOptions

public class DefaultDocumentOptions
extends java.lang.Object

Structure for passing options to createDefaultDocument in SOMSchema. This class is used to pass parameters to the createDefaultDocument method in SOMSchema. In order to create a document based on a SOMSchema, the root element name from the schema is required, and space to create the document, targetDocument. Options:

- forceMinOccurs
- rootName
- targetDocument

Example:

         SOMSchema mySchema ...
         ...

         DefaultDocumentOptions options = new DefaultDocumentOptions();
         options.setRootName("purchaseOrder");
         options.setForceMinOccurs(2);

         mySchema.createDefaultDocument(options);
         ...

Author:
  Copyright © 2000, 2001 BEA Systems, Inc. All Rights Reserved.
See Also:
  `SOMSchema.createDefaultDocument(com.bea.schema.DefaultDocumentOptions)`

Constructor Summary
`DefaultDocumentOptions()`

Method Summary
`boolean` | `getForceAttrValues()` Force Attribute values.
`int` | `getForceMinOccurs()` Force minOccurs value.
`SOMElement` | `getRootElement()` Get the SOMElement that will act as the root element for the new document.
`java.lang.String` | `getRootName()` the name of the root element set by setRootName
`java.lang.String` | `getSchemaLocation()`
`org.w3c.dom.Document` | `getTargetDocument()` the document.
`IDocument` | `getTargetIDocument()` the document.
`java.lang.String` | `getTargetNamespace()`
`void` | `setForceAttrValues(boolean forceAttrValues)` Force Element attributes.
`void` | `setForceMinOccurs(int forceMinOccurs)` Force minimum occurs (minOccurs).
`void` | `setRootElement(SOMElement rootElem)` Specify a SOMElement that will act as the root element for the new document.
`void` | `setRootName(java.lang.String rootName)` specify the name of the element from the schema to be used as the root element for the new document.
`void` | `setSchemaLocation(java.lang.String schemaLocation)` set xsi document attribute.
`void` | `setSchemaLocation(java.lang.String targetNamespace, java.lang.String schemaLocation)` set xsi document attribute.
`void` | `setTargetDocument(org.w3c.dom.Document targetDocument)` set a target document holder for the default document to be created.
`void` | `setTargetDocument(IDocument targetDocument)` set a target document holder for the default document to be created.

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

Constructor Detail

### DefaultDocumentOptions

    public DefaultDocumentOptions()

Method Detail

### setRootName

    public void setRootName(java.lang.String rootName)

  specify the name of the element from the schema to be used as the root element for the new document.

  Parameters:
    `rootName` - the name of an element in the root of the SOMSchema

### getRootName

    public java.lang.String getRootName()

  the name of the root element set by setRootName

  Returns:
    the name of the root element set by setRootName or null if none has been set

### setRootElement

    public void setRootElement(SOMElement rootElem)

  Specify a SOMElement that will act as the root element for the new document. This element can be any SOMElement in the SOMSchema.

  Parameters:
    `rootElem` - the SOMElement that will act as the root element for the new document.

### getRootElement

    public SOMElement getRootElement()

  Get the SOMElement that will act as the root element for the new document.

  Returns:
    the SOMElement set by setRootElement or null if none has been set

### setTargetDocument

    public void setTargetDocument(IDocument targetDocument)

  set a target document holder for the default document to be created. The document should be empty, createDefaultDocument will fill the document.

  Parameters:
    `targetDocument` - an empty DOM Document

### setTargetDocument

    public void setTargetDocument(org.w3c.dom.Document targetDocument)

  set a target document holder for the default document to be created. The document should be empty, createDefaultDocument will fill the document.

  Parameters:
    `targetDocument` - an empty DOM Document

### getTargetIDocument

    public IDocument getTargetIDocument()

  the document. DefaultDocumentOptions maintains a reference to the target IDocument. This reference is used by SOMSchema as the target space in which to create the instance document.

  Returns:
    the target DOM Document or null if none has been set

### getTargetDocument

    public org.w3c.dom.Document getTargetDocument()

  the document. DefaultDocumentOptions maintains a reference to the target IDocument. This reference is used by SOMSchema as the target space in which to create the instance document.

  Returns:
    the target DOM Document or null if none has been set

### setForceMinOccurs

    public void setForceMinOccurs(int forceMinOccurs)

  Force minimum occurs (minOccurs). When the minOccurs attribute for a schema element is equal to zero, createDefaultDocument will not output a place holder for this element unless forceMinOccurs is set to a value greater than zero. The maxOccurs attribute will still be enforced as the maximum number of occurances for an element. For example, if a given element has a minOccurs of zero and a maxOccurs of one, with forceMinOccurs set to 5 would cause the element to appear one time in accordance with the maxOccurs attribute. But, if forceMinOccurs is not set or set to zero, the element will not appear at all in accordance with the minOccurs attribute.

  Parameters:
    `forceMinOccurs` - a signed positive integer or -1 if you do not want to force minOccurs

### getForceMinOccurs

    public int getForceMinOccurs()

  Force minOccurs value.

  Returns:
    the value set by setForceMinOccurs() method

### setForceAttrValues

    public void setForceAttrValues(boolean forceAttrValues)

  Force Element attributes. By default, element attributes that do not have a fixed or default value are not created in the default document. To force the attribute to show up in the default document, set forceAttrValues to true.

  Parameters:
    `forceAttrValues` - true to force default element attributes to appear

### getForceAttrValues

    public boolean getForceAttrValues()

  Force Attribute values.

  Returns:
    the value set by setForceAttrValues() method

### setSchemaLocation

    public void setSchemaLocation(java.lang.String targetNamespace,
                                  java.lang.String schemaLocation)

  set xsi document attribute. Using this method will add the xmlns:xsi attribute to the default document's root element. Example: options.setSchemaLocation("http://www.bea.com/xml/schema", "http://www.bea.com/xml/schema.xsd"); results in the following (if the SOMSchema used the 2001 namespace):

       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       targetNamespace="http://www.bea.com/xml/schema"
       xsi:schemaLocation="http://www.bea.com/xml/schema.xsd"

  Parameters:
    `schemaLocation` - the URL of the schema

### setSchemaLocation

    public void setSchemaLocation(java.lang.String schemaLocation)

  set xsi document attribute. Using this method will add the xmlns:xsi attribute to the default document's root element. Example: options.setSchemaLocation("http://www.bea.com/xml/schema"); results in the following (if the SOMSchema used the 2001 namespace):

       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:noNamespaceSchemaLocation="http://www.bea.com/xml/schema"

  Parameters:
    `schemaLocation` - the URL of the schema

### getSchemaLocation

    public java.lang.String getSchemaLocation()

### getTargetNamespace

    public java.lang.String getTargetNamespace()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| WebLogic Integration
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

WebLogic Integration (WLI)