WebLogic Integration


com.bea.wlai.common
Class SchemaDescriptor

java.lang.Object
  |
  +--com.bea.wlai.common.AbstractDescriptor
        |
        +--com.bea.wlai.common.SchemaDescriptor

public class SchemaDescriptor
extends AbstractDescriptor
implements ISchemaDescriptor

Represents the metadata for an Schema Document

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

Constructor Summary
SchemaDescriptor()
          For use by Serialize code.
SchemaDescriptor(INamespace parentNamespace, java.lang.String name, SOMSchema documentSchema)
          Construct a new SchemaDescriptor in the given namespace, with the given name, and contents.
SchemaDescriptor(INamespace parentNamespace, java.lang.String name, SOMSchema documentSchema, java.lang.String description)
          Construct a new SchemaDescriptor in the given namespace, with the given name, contents, and description.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compare this object to the given object and determine if they are equal.
 void fromXML(IDocument doc)
          Extract the data for this descriptor from the given IDocument instance, replacing all contents of the current descriptor with the new data.
 java.lang.String getDescription()
          Return a description of the object that this descriptor represents and the service's intended use.
 INamespace getParentNamespace()
          Get this descriptor's parent namespace.
 QualifiedName getQualifiedName()
          Return a QualifiedName representing this descriptor's name and parent namespace.
 SOMSchema getSchema()
          Get the SOMSchema that this descriptor contains
 void setDescription(java.lang.String description)
          Set the description of the object that this descriptor represents and its intended use.
 void setName(java.lang.String name)
          Set this descriptor's name.
 void setParentNamespace(INamespace parent)
          Set this descriptor's parent namespace.
 void setSchema(SOMSchema documentSchema)
          Set the SOMSchema that this descriptor contains
 void toXML(IDocument doc)
          Output an XML representation of this descriptor into an IDocument instance.
 
Methods inherited from class com.bea.wlai.common.AbstractDescriptor
fromXML, fromXML, getName, isReadOnly, makeReadOnly, toXML, toXML
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SchemaDescriptor

public SchemaDescriptor()
For use by Serialize code.

SchemaDescriptor

public SchemaDescriptor(INamespace parentNamespace,
                        java.lang.String name,
                        SOMSchema documentSchema)
                 throws java.lang.IllegalArgumentException
Construct a new SchemaDescriptor in the given namespace, with the given name, and contents.

SchemaDescriptor

public SchemaDescriptor(INamespace parentNamespace,
                        java.lang.String name,
                        SOMSchema documentSchema,
                        java.lang.String description)
                 throws java.lang.IllegalArgumentException
Construct a new SchemaDescriptor in the given namespace, with the given name, contents, and description.
Method Detail

equals

public boolean equals(java.lang.Object obj)
Compare this object to the given object and determine if they are equal. For Schema descriptors, this means that both objects match in name and parent namespace.

Returns:
True if the two objects are equal, false otherwise.
Overrides:
equals in class java.lang.Object

getQualifiedName

public QualifiedName getQualifiedName()
Return a QualifiedName representing this descriptor's name and parent namespace.

Returns:
A QualifiedName representing the descriptor's name and parent namespace. This should never be null.

setName

public void setName(java.lang.String name)
             throws java.lang.IllegalArgumentException
Set this descriptor's name. This method does not change the namespace to which the descriptor belongs, just its name.

Parameters:
name - The new name for this descriptor. Null is not allowed.
Throws:
java.lang.IllegalArgumentException - If the name param is null.
Overrides:
setName in class AbstractDescriptor

getDescription

public java.lang.String getDescription()
Return a description of the object that this descriptor represents and the service's intended use.

Returns:
A description of this object and its intended use, or null if no description has been set.
Overrides:
getDescription in class AbstractDescriptor

setDescription

public void setDescription(java.lang.String description)
Set the description of the object that this descriptor represents and its intended use.

Parameters:
description - A description of the object that this descriptor represents and its intended use, or null if no description is known.
Overrides:
setDescription in class AbstractDescriptor

getParentNamespace

public INamespace getParentNamespace()
Get this descriptor's parent namespace.

Returns:
This descriptor's parent namespace. This can only be null when the namespace is the root namespace, or the object does not yet exist in a namespace.

setParentNamespace

public void setParentNamespace(INamespace parent)
Set this descriptor's parent namespace.

Parameters:
parent - This descriptor's parent namespace. Setting this parameter to null should be avoided, and indicates that the descriptor has no parent.

getSchema

public SOMSchema getSchema()
Get the SOMSchema that this descriptor contains
Specified by:
getSchema in interface ISchemaDescriptor

Returns:
SOMSchema for this descriptor, or null if none has been set.

setSchema

public void setSchema(SOMSchema documentSchema)
Set the SOMSchema that this descriptor contains
Specified by:
setSchema in interface ISchemaDescriptor

Parameters:
documentSchema - - The document schema for this descriptor, or null if none is known.

toXML

public void toXML(IDocument doc)
           throws DocumentException
Output an XML representation of this descriptor into an IDocument instance.

Parameters:
doc - An IDocument instance to receive the data for this descriptor.
Throws:
DocumentException - If any error occurs while processing the XML for this descriptor.
Overrides:
toXML in class AbstractDescriptor

fromXML

public void fromXML(IDocument doc)
             throws DocumentException
Extract the data for this descriptor from the given IDocument instance, replacing all contents of the current descriptor with the new data.

Parameters:
doc - An IDocument instance from which the data for this descriptor will be extracted.
Throws:
DocumentException - If any error occurs while processing the XML for this descriptor.
Overrides:
fromXML in class AbstractDescriptor

WebLogic Integration

WebLogic Integration (WLI)