org.jscience.ml.gml.xml.schema
Class SchemaNode

java.lang.Object
  extended by org.jscience.ml.gml.xml.schema.SchemaNode
All Implemented Interfaces:
java.lang.Cloneable

public class SchemaNode
extends java.lang.Object
implements java.lang.Cloneable

Represents a node in a schema graph. A node is either a reference to another node, or contains info about a new schema construct.


Constructor Summary
SchemaNode(java.lang.String schemaType, QName name, QName type)
          Constructor for a new XML schema construct (not a reference).
SchemaNode(java.lang.String schemaType, SchemaNode reference)
          Constructor for a reference.
 
Method Summary
 void add(SchemaNode childNode)
          Adds a child node.
 void addToTypeChain(QName type)
          DOCUMENT ME!
 java.lang.Object clone()
          Clones all information except the parent.
 SchemaNode deepClone()
          DOCUMENT ME!
 SchemaNode getChildAt(int index)
          DOCUMENT ME!
 int getChildCount()
          DOCUMENT ME!
 boolean getIsAbstract()
          DOCUMENT ME!
 QName getName()
          DOCUMENT ME!
 SchemaNode getParent()
          DOCUMENT ME!
 SchemaNode getReferencedConstruct()
          DOCUMENT ME!
 boolean getSubst()
          DOCUMENT ME!
 QName getSubstGroup()
          DOCUMENT ME!
 QName getType()
          DOCUMENT ME!
 java.util.Vector getTypeChain()
          DOCUMENT ME!
 java.lang.String getXmlSchemaType()
          DOCUMENT ME!
 boolean isReference()
          DOCUMENT ME!
 boolean isSuperTypeOrThisType(QName otherType)
          Determines if the given type is a super type or this type.
 void remove(SchemaNode childNode)
          DOCUMENT ME!
 void setIsAbstract(boolean isAbstract)
          DOCUMENT ME!
 void setName(QName name)
          DOCUMENT ME!
 void setParent(SchemaNode newParent)
          DOCUMENT ME!
 void setReferencedConstruct(SchemaNode reference)
          DOCUMENT ME!
 void setSubst(boolean subst)
          DOCUMENT ME!
 void setSubstGroup(QName substGroup)
          DOCUMENT ME!
 void setType(QName type)
          DOCUMENT ME!
 void setTypeChain(java.util.Vector typeChain)
          DOCUMENT ME!
 java.lang.String toString()
          DOCUMENT ME!
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SchemaNode

public SchemaNode(java.lang.String schemaType,
                  SchemaNode reference)
Constructor for a reference.

Parameters:
schemaType - DOCUMENT ME!
reference - DOCUMENT ME!
Throws:
java.lang.IllegalStateException - DOCUMENT ME!

SchemaNode

public SchemaNode(java.lang.String schemaType,
                  QName name,
                  QName type)
Constructor for a new XML schema construct (not a reference).

Parameters:
schemaType - DOCUMENT ME!
name - DOCUMENT ME!
type - DOCUMENT ME!
Method Detail

isReference

public boolean isReference()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getReferencedConstruct

public SchemaNode getReferencedConstruct()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setReferencedConstruct

public void setReferencedConstruct(SchemaNode reference)
DOCUMENT ME!

Parameters:
reference - DOCUMENT ME!
Throws:
java.lang.IllegalStateException - DOCUMENT ME!

clone

public java.lang.Object clone()
Clones all information except the parent. The type chain is copied to a new vector.

Overrides:
clone in class java.lang.Object
Returns:
DOCUMENT ME!

deepClone

public SchemaNode deepClone()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getChildCount

public int getChildCount()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getChildAt

public SchemaNode getChildAt(int index)
DOCUMENT ME!

Parameters:
index - DOCUMENT ME!
Returns:
DOCUMENT ME!

getParent

public SchemaNode getParent()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setParent

public void setParent(SchemaNode newParent)
DOCUMENT ME!

Parameters:
newParent - DOCUMENT ME!

add

public void add(SchemaNode childNode)
Adds a child node. If the node is a child of another node, the link is dereferenced. This node becomes the parent of this new child.

Parameters:
childNode - DOCUMENT ME!
Throws:
java.lang.IllegalStateException - DOCUMENT ME!

remove

public void remove(SchemaNode childNode)
DOCUMENT ME!

Parameters:
childNode - DOCUMENT ME!
Throws:
java.lang.IllegalStateException - DOCUMENT ME!

getXmlSchemaType

public java.lang.String getXmlSchemaType()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setSubst

public void setSubst(boolean subst)
DOCUMENT ME!

Parameters:
subst - DOCUMENT ME!
Throws:
java.lang.IllegalStateException - DOCUMENT ME!

getSubst

public boolean getSubst()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setIsAbstract

public void setIsAbstract(boolean isAbstract)
DOCUMENT ME!

Parameters:
isAbstract - DOCUMENT ME!
Throws:
java.lang.IllegalStateException - DOCUMENT ME!

getIsAbstract

public boolean getIsAbstract()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setType

public void setType(QName type)
DOCUMENT ME!

Parameters:
type - DOCUMENT ME!
Throws:
java.lang.IllegalStateException - DOCUMENT ME!

getType

public QName getType()
DOCUMENT ME!

Returns:
DOCUMENT ME!

addToTypeChain

public void addToTypeChain(QName type)
DOCUMENT ME!

Parameters:
type - DOCUMENT ME!
Throws:
java.lang.IllegalStateException - DOCUMENT ME!

getTypeChain

public java.util.Vector getTypeChain()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setTypeChain

public void setTypeChain(java.util.Vector typeChain)
DOCUMENT ME!

Parameters:
typeChain - DOCUMENT ME!
Throws:
java.lang.IllegalStateException - DOCUMENT ME!

isSuperTypeOrThisType

public boolean isSuperTypeOrThisType(QName otherType)
Determines if the given type is a super type or this type.

Parameters:
otherType - DOCUMENT ME!
Returns:
DOCUMENT ME!

setName

public void setName(QName name)
DOCUMENT ME!

Parameters:
name - DOCUMENT ME!
Throws:
java.lang.IllegalStateException - DOCUMENT ME!

getName

public QName getName()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setSubstGroup

public void setSubstGroup(QName substGroup)
DOCUMENT ME!

Parameters:
substGroup - DOCUMENT ME!
Throws:
java.lang.IllegalStateException - DOCUMENT ME!

getSubstGroup

public QName getSubstGroup()
DOCUMENT ME!

Returns:
DOCUMENT ME!

toString

public java.lang.String toString()
DOCUMENT ME!

Overrides:
toString in class java.lang.Object
Returns:
DOCUMENT ME!