65 |
dir = 0; |
dir = 0; |
66 |
} |
} |
67 |
|
|
68 |
|
/** Create a nodespec for a node in a statement. |
69 |
|
* If dir is -1, a nodespec for the subject |
70 |
|
* is created, if dir is 1, a nodespec for the object. |
71 |
|
*/ |
72 |
|
public Nodespec(Statement stmt, int dir) { |
73 |
|
node = (dir<0) ? stmt.getSubject() : stmt.getObject(); |
74 |
|
prop = stmt.getPredicate(); |
75 |
|
this.dir = dir; |
76 |
|
} |
77 |
|
|
78 |
/** Create a nodespec for a node in the context. |
/** Create a nodespec for a node in the context. |
79 |
*/ |
*/ |
80 |
public Nodespec(RDFNode node, Property prop, int dir) { |
public Nodespec(RDFNode node, Property prop, int dir) { |
105 |
|
|
106 |
/** The node rendered in this cs. |
/** The node rendered in this cs. |
107 |
*/ |
*/ |
108 |
public RDFNode node; |
public final RDFNode node; |
109 |
|
|
110 |
/** The property through which the node |
/** The property through which the node |
111 |
* is related to the focus (<code>null</code> |
* is related to the focus (<code>null</code> |
112 |
* for the focus itself). |
* for the focus itself). |
113 |
*/ |
*/ |
114 |
public Property prop; |
public final Property prop; |
115 |
|
|
116 |
/** Larger than zero if the node is posward |
/** Larger than zero if the node is posward |
117 |
* from the focus; smaller than zero if the node |
* from the focus; smaller than zero if the node |
118 |
* is negward from the focus; zero if the node |
* is negward from the focus; zero if the node |
119 |
* <em>is</em> the focus. |
* <em>is</em> the focus. |
120 |
*/ |
*/ |
121 |
public int dir; |
public final int dir; |
122 |
} |
} |
123 |
} |
} |