com.pnp.xfeature.documenttree
Class Node

java.lang.Object
  extended by com.pnp.xfeature.documenttree.Node

public class Node
extends java.lang.Object

A Node can represent a sequence, a choice or an element.

Author:
Valerio B?rker

Constructor Summary
Node(java.lang.String name, short compositor, int size, int maxOccurs, int minOccurs)
          Constructor
 
Method Summary
 void addChild(Node child)
          Adds a child node to the node.
 short getCompositor()
          Returns the type of the node.
 Node[] getChildren()
          Returns the children nodes of the node.
 int getMaxOccurs()
          Returns the maxOccurs of the node.
 int getMinOccurs()
          Returns the minOccurs of the node.
 java.lang.String getName()
          Returns the name of the node.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Node

public Node(java.lang.String name,
            short compositor,
            int size,
            int maxOccurs,
            int minOccurs)
Constructor

Parameters:
name - name of the node
compositor - type of the node
size - number of children
maxOccurs - maxOccurs of node
minOccurs - minOccurs of node
Method Detail

getName

public java.lang.String getName()
Returns the name of the node.

Returns:
name of the node

getCompositor

public short getCompositor()
Returns the type of the node.

Returns:
type of the node

getChildren

public Node[] getChildren()
Returns the children nodes of the node.

Returns:
children nodes

addChild

public void addChild(Node child)
Adds a child node to the node.

Parameters:
child - child node

getMaxOccurs

public int getMaxOccurs()
Returns the maxOccurs of the node.

Returns:
maxOccurs

getMinOccurs

public int getMinOccurs()
Returns the minOccurs of the node.

Returns:
minOccurs


Copyright © 2004 - 2008 ETH Zurich and P&P Software GmbH, All Rights Reserved.