xdrs_impl.genericdb
Class Node

java.lang.Object
  extended byxdrs_impl.genericdb.Node
Direct Known Subclasses:
Directory, Leaf

public class Node
extends java.lang.Object

This class represents a generic Node. It should be the parent of all types that are to be stored.

Version:
$Revision: 1.1 $ $Date: 2005/05/06 21:31:05 $ (GMT)
Author:
matt

Constructor Summary
Node(java.lang.String name, java.lang.String type, java.lang.String typeNamespace, org.gjt.xpp.XmlNode metadata, java.lang.String dataHtml, java.lang.String reference)
          Create a node with the given description.
Node(org.gjt.xpp.XmlNode node)
          Create a node for the given XML representation.
 
Method Summary
 java.lang.String getDataHtml()
          Get the node's html.
 int getId()
          Get the node's id.
 org.gjt.xpp.XmlNode getMetadata()
          Get the node's metadata.
 java.lang.String getName()
          Get the node's name.
 java.lang.String getReference()
          Get the node's reference.
 java.lang.String getType()
          Get the node's type.
 java.lang.String getTypeNamespace()
          Get the node's type's namespace.
 org.gjt.xpp.XmlNode getXmlNodeRepresentation()
          Get an XML representation of the node.
protected  void setDataHtml(java.lang.String dataHtml)
          Set the node's html.
 void setId(int id)
          Set the node's id.
protected  void setMetadata(org.gjt.xpp.XmlNode metadata)
          Set the node's metadata.
protected  void setName(java.lang.String name)
          Set the node's name.
protected  void setReference(java.lang.String reference)
          Set the node's reference.
protected  void setType(java.lang.String type, java.lang.String typeNamespace)
          Set the node's type and type's namespace.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Node

public Node(org.gjt.xpp.XmlNode node)
     throws org.gjt.xpp.XmlPullParserException,
            soaprmi.RemoteException
Create a node for the given XML representation.

Parameters:
node - An XML representation of a node.
Throws:
org.gjt.xpp.XmlPullParserException
soaprmi.RemoteException

Node

public Node(java.lang.String name,
            java.lang.String type,
            java.lang.String typeNamespace,
            org.gjt.xpp.XmlNode metadata,
            java.lang.String dataHtml,
            java.lang.String reference)
     throws soaprmi.RemoteException,
            org.gjt.xpp.XmlPullParserException
Create a node with the given description. This does not setup the node's attributes, so they should be set separately. Also, the node's id should be set separately.

Parameters:
name - The node's name.
type - The node's type.
typeNamespace - The node's type's namespace.
metadata - The node's metadata.
dataHtml - The node's html.
reference - An external reference to the node.
Throws:
soaprmi.RemoteException
org.gjt.xpp.XmlPullParserException
Method Detail

getXmlNodeRepresentation

public org.gjt.xpp.XmlNode getXmlNodeRepresentation()
                                             throws org.gjt.xpp.XmlPullParserException
Get an XML representation of the node.

Returns:
An XML representation of the node.
Throws:
org.gjt.xpp.XmlPullParserException

getName

public java.lang.String getName()
Get the node's name.

Returns:
The node's name.

getType

public java.lang.String getType()
Get the node's type.

Returns:
The node's type.

getTypeNamespace

public java.lang.String getTypeNamespace()
Get the node's type's namespace.

Returns:
The node's type's namespace.

getMetadata

public org.gjt.xpp.XmlNode getMetadata()
Get the node's metadata.

Returns:
The node's metadata.

getDataHtml

public java.lang.String getDataHtml()
Get the node's html.

Returns:
The node's html.

getReference

public java.lang.String getReference()
Get the node's reference.

Returns:
The node's reference.

getId

public int getId()
Get the node's id.

Returns:
The node's id.

setId

public void setId(int id)
Set the node's id.

Parameters:
id - The node's id.

setName

protected void setName(java.lang.String name)
                throws soaprmi.RemoteException
Set the node's name. It cannot be null, empty, or contain a "/".

Parameters:
name - The node's name.
Throws:
soaprmi.RemoteException

setType

protected void setType(java.lang.String type,
                       java.lang.String typeNamespace)
Set the node's type and type's namespace.

Parameters:
type - The node's type.
typeNamespace - The node's type's namespace.

setDataHtml

protected void setDataHtml(java.lang.String dataHtml)
Set the node's html.

Parameters:
dataHtml - The node's html.

setMetadata

protected void setMetadata(org.gjt.xpp.XmlNode metadata)
                    throws org.gjt.xpp.XmlPullParserException
Set the node's metadata.

Parameters:
metadata - The node's metadata.
Throws:
org.gjt.xpp.XmlPullParserException

setReference

protected void setReference(java.lang.String reference)
Set the node's reference.

Parameters:
reference - The node's reference.