Commit 59188028 authored by Christian Willms's avatar Christian Willms
Browse files

read blank nodes from multiple nt files

parent 5ae632f5
......@@ -16,7 +16,7 @@ public class Hfc {
* I'm making _all_ the potentially relevant object directly accessable
*/
private Namespace _namespace = null;
private TupleStore _tupleStore = null;
public TupleStore _tupleStore = null;
private RuleStore _ruleStore = null;
private ForwardChainer _forwardChainer = null;
......
......@@ -341,7 +341,7 @@ public class Query {
} else if (token.equals("\"")) {
this.tupleStore.parseAtom(st, tuple);
} else if (token.equals("_")) {
TupleStore.parseBlankNode(st, tuple);
this.tupleStore.parseBlankNode(st, tuple);
} else if (token.equals("[")) { // check for exclusive interval
QRelationFactory.parseInterval(true, st, tuple);
} else if (token.equals("(")) {// check for inclusive interval
......
......@@ -1640,11 +1640,12 @@ public final class TupleStore {
* i.e., no whitespaces are allowed inside the name of the blank node;
* since, blank nodes make no reference to a namespace, we make this a static method
*/
protected static void parseBlankNode (StringTokenizer st, ArrayList<String> tuple) {
protected void parseBlankNode (StringTokenizer st, ArrayList<String> tuple) {
// the leading '_' char has already been consumed, so consume tokens until we
// find the next whitespace char
StringBuilder sb = new StringBuilder("_");
sb.append(st.nextToken()); // the rest of the blank node
if (blankNodeSuffix != null) sb.append('X').append(blankNodeSuffix);
tuple.add(sb.toString());
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment