|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.xqhs.graphs.representation.AbstractVisualizableGraphComponent
net.xqhs.graphs.graph.SimpleNode
net.xqhs.graphs.pattern.NodeP
public class NodeP
The NodeP is a node that is part of a GraphPattern and may be generic (used in graph matching to
match any node in the matched graph).
A generic node is characterized by a label equal to a specific symbol (usually a question mark) and an index, to identify a specific generic node in a graph.
| Field Summary | |
|---|---|
(package private) boolean |
generic
Indicates that the node is generic. |
(package private) int |
labelIndex
Indicates the identifier of the generic node. |
static java.lang.String |
NODEP_INDEX_MARK
The symbol used in the string representation between the label and the generic index. |
static java.lang.String |
NODEP_LABEL
The label of all generic nodes. |
| Fields inherited from class net.xqhs.graphs.graph.SimpleNode |
|---|
label |
| Fields inherited from class net.xqhs.graphs.representation.AbstractVisualizableGraphComponent |
|---|
representations |
| Constructor Summary | |
|---|---|
NodeP()
Creates a new generic NodeP, with an uninitialized index. |
|
NodeP(int genericIndex)
Creates a new generic NodeP, with a specified index. |
|
NodeP(java.lang.String label)
Creates a new, non-generic NodeP, with a specified label. |
|
| Method Summary | |
|---|---|
int |
genericIndex()
|
boolean |
isGeneric()
|
java.lang.String |
toString()
|
| Methods inherited from class net.xqhs.graphs.graph.SimpleNode |
|---|
getLabel |
| Methods inherited from class net.xqhs.graphs.representation.AbstractVisualizableGraphComponent |
|---|
addRepresentation, getFirstRepresentationForRoot, getRepresentations, getRepresentationsForRoot |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String NODEP_LABEL
public static final java.lang.String NODEP_INDEX_MARK
boolean generic
int labelIndex
Note: this can only be used in one graph at a time.
| Constructor Detail |
|---|
public NodeP()
NodeP, with an uninitialized index.
Note: the node needs to be indexed before being added to a graph. The add(node) method in
GraphPattern does that.
public NodeP(int genericIndex)
NodeP, with a specified index.
WARNING: use this with great caution.
genericIndex - - be absolutely certain this is not the same index with other nodes in the graphpublic NodeP(java.lang.String label)
NodeP, with a specified label. It calls the constructor in SimpleNode.
It is assumed that the label is not equal to NODEP_LABEL.
label - - the label for the new node| Method Detail |
|---|
public boolean isGeneric()
true is the node is generic.public int genericIndex()
public java.lang.String toString()
toString in class SimpleNode
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||