com.bea.document.internal
Class DocumentDefinition

java.lang.Object
  extended bycom.bea.document.internal.DocumentDefinition
All Implemented Interfaces:
IDocumentDefinition, Serializable

public class DocumentDefinition
extends Object
implements IDocumentDefinition

This interface embodies all the metadata about a document type. It includes the document schema (structure and usage), and the format(s) (wire format).

See Also:
Serialized Form

Constructor Summary
DocumentDefinition()
          Create a DocumentDefinition with no name, schema, or formats.
DocumentDefinition(boolean isNull)
          Create a DocumentDefinition with no name, schema, or formats, and with the given null indicator.
 
Method Summary
 IDocument createDefaultDocument()
          Create a document which conforms to the schema for this document definition, and which contains any default data for elements or attributes in the schema.
 IDocument createDefaultDocument(DefaultDocumentOptions options)
          Using the specified options, create a new IDocument object which conforms to the structure prescribed by this schema, and contains any default values which have been specified.
 boolean equals(Object obj)
          Compares the current DocumentDefinition to another object.
 Timestamp getCreatedDate()
           
 String getDescription()
          Get the description for this object.
 SOMSchema getDocumentSchema()
          Get the document schema for this document definition.
 String getDocumentSchemaName()
          Get the name of the document schema for this document definition.
 Timestamp getModifiedDate()
           
 String getName()
          Get the name of this object.
 String getRootElementName()
          Get the root element name for this document definition.
 boolean isNull()
          Indicates whether this IDocumentDefinition represents a null (non-existent) document.
 void setCreatedDate(Timestamp createdDate)
           
 void setDescription(String desc)
          Set the description for this object.
 void setDocumentSchema(SOMSchema schema)
          Set the document schema for this document definition.
 void setDocumentSchemaName(String schemaName)
          Set the name of the document schema for this document definition.
 void setModifiedDate(Timestamp modifiedDate)
           
 void setName(String name)
          Set the name of this object.
 void setRootElementName(String rootElementName)
          Set the root element name for this document definition.
 String toString()
          Render this document definition as a String.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DocumentDefinition

public DocumentDefinition()
Create a DocumentDefinition with no name, schema, or formats.


DocumentDefinition

public DocumentDefinition(boolean isNull)
Create a DocumentDefinition with no name, schema, or formats, and with the given null indicator. Passing isNull == true will indicate that this document definition describes a null or non-existent document.

Method Detail

toString

public String toString()
Render this document definition as a String.


isNull

public boolean isNull()
Description copied from interface: IDocumentDefinition
Indicates whether this IDocumentDefinition represents a null (non-existent) document. If this method returns true, no meaningful return values can be given from the getDocumentSchemaName(), getDocumentSchema(), or getRootElementName() methods (they will throw IllegalStateException if called). Calling createDefaultDocument() on such a document definition will yield an empty IDocument instance with no root element.
A document definition for a null document might be used to indicate that no request or response is provided from an ApplicationView service.

Specified by:
isNull in interface IDocumentDefinition

setName

public void setName(String name)
Description copied from interface: IDocumentDefinition
Set the name of this object.

Specified by:
setName in interface IDocumentDefinition

getName

public String getName()
Description copied from interface: IDocumentDefinition
Get the name of this object.

Specified by:
getName in interface IDocumentDefinition

setDescription

public void setDescription(String desc)
Description copied from interface: IDocumentDefinition
Set the description for this object.

Specified by:
setDescription in interface IDocumentDefinition

getDescription

public String getDescription()
Description copied from interface: IDocumentDefinition
Get the description for this object.

Specified by:
getDescription in interface IDocumentDefinition

setCreatedDate

public void setCreatedDate(Timestamp createdDate)

getCreatedDate

public Timestamp getCreatedDate()

equals

public boolean equals(Object obj)
Compares the current DocumentDefinition to another object. This method returns true only when the object is an instanceof DocumentDefinition, and when its schema, and root element name are equal.


setModifiedDate

public void setModifiedDate(Timestamp modifiedDate)

getModifiedDate

public Timestamp getModifiedDate()

getDocumentSchema

public SOMSchema getDocumentSchema()
Description copied from interface: IDocumentDefinition
Get the document schema for this document definition. If this method is called on an object for which isNull() returns true, this method will throw an IllegalStateException.

Specified by:
getDocumentSchema in interface IDocumentDefinition

setDocumentSchema

public void setDocumentSchema(SOMSchema schema)
Description copied from interface: IDocumentDefinition
Set the document schema for this document definition. If this method is called on an object for which isNull() returns true, this method has no effect.

Specified by:
setDocumentSchema in interface IDocumentDefinition

getDocumentSchemaName

public String getDocumentSchemaName()
Get the name of the document schema for this document definition.

Specified by:
getDocumentSchemaName in interface IDocumentDefinition

setDocumentSchemaName

public void setDocumentSchemaName(String schemaName)
Set the name of the document schema for this document definition.

Specified by:
setDocumentSchemaName in interface IDocumentDefinition

getRootElementName

public String getRootElementName()
Get the root element name for this document definition.

Specified by:
getRootElementName in interface IDocumentDefinition

setRootElementName

public void setRootElementName(String rootElementName)
Set the root element name for this document definition.

Specified by:
setRootElementName in interface IDocumentDefinition

createDefaultDocument

public IDocument createDefaultDocument()
                                throws Exception
Description copied from interface: IDocumentDefinition
Create a document which conforms to the schema for this document definition, and which contains any default data for elements or attributes in the schema. If this method is called on an object for which isNull() returns true, this returns an empty IDocument with no root element (getDocumentElement() returns null).

Specified by:
createDefaultDocument in interface IDocumentDefinition
Throws:
Exception

createDefaultDocument

public IDocument createDefaultDocument(DefaultDocumentOptions options)
                                throws Exception
Description copied from interface: IDocumentDefinition
Using the specified options, create a new IDocument object which conforms to the structure prescribed by this schema, and contains any default values which have been specified. The options argument allows the user to control the creation of the default document. The options argument should be reused if possible because this method may cache information in it for increased performance. This method will recreate any needed information if a cached version is not present, however. If this method is called on an object for which isNull() returns true, this returns an empty IDocument with no root element (getDocumentElement() returns null).

Specified by:
createDefaultDocument in interface IDocumentDefinition
Throws:
Exception