|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--xmltool.gui.Node
The Node class allows nodes to be created. It is a data structure for query elements.
| Field Summary | |
java.lang.String |
alpha
Scale parameter (e.g., mean) |
java.lang.String |
beta
Shape parameter (e.g., variance) |
java.awt.Color |
color
Color of node |
java.lang.String |
fileName
Name of file of node |
QCurve[] |
inEdge
Number of incoming edges |
java.awt.Point |
location
Position of node (coordinates of top left) |
static int |
MAX_LEVEL
|
static int |
N_QUERY
|
java.lang.String |
nodeName
Name of node |
int |
nodeType
Type of node (QUERY .. |
int |
numInEdges
Number of incoming edges |
int |
numOutEdges
Number of outgoing edges |
java.lang.String |
numTokens
Initial number of tokens (service units) |
static int |
OUT_DIAMETER
|
QCurve[] |
outEdge
Array of outgoing edges |
java.lang.String[] |
outProb
Probability of taking each outgoing edge |
ParsedData |
parsedData
|
java.awt.Polygon |
polyg
Complete coordinates of node |
static java.awt.Point |
T_QUERY
|
static int |
TOK_DIAMETER
|
static int |
TOK_RADIUS
|
static int[] |
X_QUERY
|
static int[] |
Y_QUERY
|
| Constructor Summary | |
Node()
Construct an empty node. |
|
Node(int nodeType,
java.awt.Point location)
Construct and initialize a node. |
|
| Method Summary | |
int |
getDialogsCount()
Get dialog count |
static int |
getQueryCount()
Get methods for the counters (e.g., getQueryCount for queries). |
java.lang.String |
getRoot()
Return the name of the root of the DTD. |
void |
incrementDialogsCount()
Increment dialog count, i.e. |
ParsedData |
isParsed(java.lang.String string)
Returns the reference of the ParsedData if it occurs more than once in the DTD, so that we dont have infinite looping. |
void |
loadNode(java.io.ObjectInputStream in)
Load this node's state. |
void |
loadNodeParsedData(java.io.ObjectInputStream in,
ParsedData pd)
Load this node's Parsed Data state. |
void |
makeLinks(ParsedData pd)
Method to make links for parent element to know its sub elements, if this element has already been parsed before and if it has subelements |
ParsedData |
recursiveIsParsed(ParsedData pd,
java.lang.String string)
This is doing the recursive job of traversing through the data structures and returns the answer needed by isParsed |
static void |
reset()
Reset the counters. |
void |
saveNode(java.io.ObjectOutputStream out)
Save this node's state. |
void |
saveNodeParsedData(java.io.ObjectOutputStream out,
ParsedData pd)
Save this node's Parsed Data state. |
void |
setDialogsCount(int c)
Set dialog count |
static void |
setQueryCount(int c)
Set methods for the counters (e.g., setQueryCount for queries). |
void |
unpack()
Unpack the node: polyg and color are derivable from nodeType and location. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
public static final int TOK_RADIUS
public static final int TOK_DIAMETER
public static final int OUT_DIAMETER
public static final int[] X_QUERY
public static final int[] Y_QUERY
public static final int N_QUERY
public static final java.awt.Point T_QUERY
public int nodeType
public java.awt.Point location
public static int MAX_LEVEL
public java.awt.Color color
public java.lang.String fileName
public java.lang.String nodeName
public ParsedData parsedData
public java.lang.String numTokens
public java.lang.String alpha
public java.lang.String beta
public int numOutEdges
public QCurve[] outEdge
public java.lang.String[] outProb
public int numInEdges
public QCurve[] inEdge
public java.awt.Polygon polyg
| Constructor Detail |
public Node()
public Node(int nodeType,
java.awt.Point location)
nodeType - type of nodelocation - location (top left) of node| Method Detail |
public static void reset()
public java.lang.String getRoot()
public static void setQueryCount(int c)
public static int getQueryCount()
public void unpack()
public void saveNode(java.io.ObjectOutputStream out)
throws java.io.IOException
out - output stream
public void saveNodeParsedData(java.io.ObjectOutputStream out,
ParsedData pd)
throws java.io.IOException
out - output streampublic void incrementDialogsCount()
public int getDialogsCount()
public void setDialogsCount(int c)
public void loadNode(java.io.ObjectInputStream in)
throws java.io.IOException,
java.lang.ClassNotFoundException
in - input stream
public void loadNodeParsedData(java.io.ObjectInputStream in,
ParsedData pd)
throws java.io.IOException,
java.lang.ClassNotFoundException
in - input streampublic void makeLinks(ParsedData pd)
pd - ParsedData under considerationpublic ParsedData isParsed(java.lang.String string)
string - name of element as in the DTD
public ParsedData recursiveIsParsed(ParsedData pd,
java.lang.String string)
pd - ParsedData for whom links are to be made as in isParsedstring - element name
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||