Back to index

wims  3.65+svn20090927
Public Member Functions | Private Attributes
WIMSchem.ds.TrivialDOM.Node Class Reference
Collaboration diagram for WIMSchem.ds.TrivialDOM.Node:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Node (String NodeName)
Node Parent ()
void SetParent (Node Parent)
String NodeName ()
void SetNodeName (String Name)
String Attribute (String Attr)
void SetAttribute (String Attr, String Value)
String[] GetAttributeNames ()
int NumChildren ()
int ChildType (int N)
Node GetChildNode (int N)
Text GetChildText (int N)
void Clear ()
void DeleteChild (int N)
void SetText (String Txt, boolean Preserve)
String GetText ()
void AppendChild (Node Nod)
void AppendChild (Text Txt)
void InsertChild (int N, Node Nod)
void InsertChild (int N, Text Txt)
Node AppendNode (String Name)
Text AppendText (String Txt, boolean Preserve)

Private Attributes

Node parentNode = null
String nodeName
Hashtable< String, String > nodeAttr
ArrayList< Object > children

Detailed Description

Definition at line 30 of file TrivialDOM.java.


Constructor & Destructor Documentation

WIMSchem.ds.TrivialDOM.Node.Node ( String  NodeName) [inline]

Definition at line 37 of file TrivialDOM.java.

       {
           nodeName=NodeName;
           nodeAttr=new Hashtable<String,String>();
           children=new ArrayList<Object>();
       }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Function Documentation

Definition at line 91 of file TrivialDOM.java.

{Nod.SetParent(this); children.add(Nod);}

Here is the call graph for this function:

Definition at line 92 of file TrivialDOM.java.

{Txt.SetParent(this); children.add(Txt);}

Here is the call graph for this function:

Node WIMSchem.ds.TrivialDOM.Node.AppendNode ( String  Name) [inline]

Definition at line 96 of file TrivialDOM.java.

       {
           Node nod=new Node(Name);
           nod.SetParent(this);
           children.add(nod); 
           return nod;
       }

Here is the call graph for this function:

Here is the caller graph for this function:

Text WIMSchem.ds.TrivialDOM.Node.AppendText ( String  Txt,
boolean  Preserve 
) [inline]

Definition at line 103 of file TrivialDOM.java.

       {
           Text txt=new Text(Txt,Preserve); 
           txt.SetParent(this);
           children.add(txt); 
           return txt;
       }

Here is the call graph for this function:

Here is the caller graph for this function:

String WIMSchem.ds.TrivialDOM.Node.Attribute ( String  Attr) [inline]

Definition at line 49 of file TrivialDOM.java.

{return nodeAttr.containsKey(Attr) ? nodeAttr.get(Attr) : null;}
int WIMSchem.ds.TrivialDOM.Node.ChildType ( int  N) [inline]

Definition at line 59 of file TrivialDOM.java.

       {
           Object child=children.get(N);
           if (child instanceof Node) return TYPE_NODE;
           if (child instanceof Text) return TYPE_TEXT;
           return 0;
       }

Here is the caller graph for this function:

Definition at line 69 of file TrivialDOM.java.

{children.clear();}

Here is the caller graph for this function:

void WIMSchem.ds.TrivialDOM.Node.DeleteChild ( int  N) [inline]

Definition at line 70 of file TrivialDOM.java.

{children.remove(N);}

Definition at line 51 of file TrivialDOM.java.

       {
           Set<String> attr=nodeAttr.keySet();
           String[] names=new String[attr.size()];
           return attr.toArray(names);
       }

Definition at line 66 of file TrivialDOM.java.

{return (Node)children.get(N);}

Here is the caller graph for this function:

Definition at line 67 of file TrivialDOM.java.

{return (Text)children.get(N);}

Here is the caller graph for this function:

Definition at line 80 of file TrivialDOM.java.

       {
           String txt="";
           for (int n=0;n<NumChildren();n++)
           {
              if (ChildType(n)==TYPE_TEXT) txt+=GetChildText(n).Get();
              else txt+=GetChildNode(n).GetText();
           }
           return txt;
       }

Here is the call graph for this function:

Here is the caller graph for this function:

void WIMSchem.ds.TrivialDOM.Node.InsertChild ( int  N,
Node  Nod 
) [inline]

Definition at line 93 of file TrivialDOM.java.

{Nod.SetParent(this); children.add(N,Nod);}

Here is the call graph for this function:

void WIMSchem.ds.TrivialDOM.Node.InsertChild ( int  N,
Text  Txt 
) [inline]

Definition at line 94 of file TrivialDOM.java.

{Txt.SetParent(this); children.add(N,Txt);}

Here is the call graph for this function:

Definition at line 47 of file TrivialDOM.java.

{return nodeName;}

Here is the caller graph for this function:

Definition at line 58 of file TrivialDOM.java.

{return children.size();}

Here is the caller graph for this function:

Definition at line 44 of file TrivialDOM.java.

{return parentNode;}

Here is the caller graph for this function:

void WIMSchem.ds.TrivialDOM.Node.SetAttribute ( String  Attr,
String  Value 
) [inline]

Definition at line 50 of file TrivialDOM.java.

{nodeAttr.put(Attr,Value);}

Here is the caller graph for this function:

void WIMSchem.ds.TrivialDOM.Node.SetNodeName ( String  Name) [inline]

Definition at line 48 of file TrivialDOM.java.

{nodeName=Name;}

Here is the caller graph for this function:

void WIMSchem.ds.TrivialDOM.Node.SetParent ( Node  Parent) [inline]

Definition at line 45 of file TrivialDOM.java.

Here is the call graph for this function:

Here is the caller graph for this function:

void WIMSchem.ds.TrivialDOM.Node.SetText ( String  Txt,
boolean  Preserve 
) [inline]

Definition at line 72 of file TrivialDOM.java.

       {
           Clear();
           Text txt=new Text(Txt,Preserve);
           txt.SetParent(this);
           children.add(txt);
       }

Here is the call graph for this function:


Member Data Documentation

ArrayList<Object> WIMSchem.ds.TrivialDOM.Node.children [private]

Definition at line 35 of file TrivialDOM.java.

Hashtable<String,String> WIMSchem.ds.TrivialDOM.Node.nodeAttr [private]

Definition at line 34 of file TrivialDOM.java.

Definition at line 33 of file TrivialDOM.java.

Definition at line 32 of file TrivialDOM.java.


The documentation for this class was generated from the following file: