public boolean add(Resource subj, URI pred, Value obj, Resource... contexts) { if (subj == null || pred == null || obj == null) throw new UnsupportedOperationException("Incomplete statement"); boolean changed = false; for (Value ctx : notEmpty(contexts)) { if (ctx == null || ctx instanceof Resource) { Statement st = new TreeStatement(subj, pred, obj, (Resource) ctx); for (StatementTree tree : trees) { changed |= tree.add(st); } } } return changed; }
@Override public boolean add(Resource subj, IRI pred, Value obj, Resource... contexts) { if (subj == null || pred == null || obj == null) throw new UnsupportedOperationException("Incomplete statement"); boolean changed = false; for (Value ctx : notEmpty(contexts)) { if (ctx == null || ctx instanceof Resource) { Statement st = new TreeStatement(subj, pred, obj, (Resource)ctx); for (StatementTree tree : trees) { changed |= tree.add(st); } } } return changed; }
SortedSet<Statement> subSet(Statement lo, boolean loInclusive, Statement hi, boolean hiInclusive) { return new SubSet(this, new TreeStatement(lo), loInclusive, new TreeStatement(hi), hiInclusive); }
SortedSet<Statement> subSet(Statement lo, boolean loInclusive, Statement hi, boolean hiInclusive) { return new SubSet(this, new TreeStatement(lo), loInclusive, new TreeStatement(hi), hiInclusive); }
private Statement after(Value subj, Value pred, Value obj, Value ctx) { Resource s = subj instanceof Resource ? (Resource) subj : AFTER; URI p = pred instanceof URI ? (URI) pred : AFTER; Value o = obj instanceof Value ? obj : AFTER; Resource c = ctx instanceof Resource ? (Resource) ctx : AFTER; return new TreeStatement(s, p, o, c); }
private Statement after(Value subj, Value pred, Value obj, Value ctx) { Resource s = subj instanceof Resource ? (Resource)subj : AFTER; IRI p = pred instanceof IRI ? (IRI)pred : AFTER; Value o = obj instanceof Value ? obj : AFTER; Resource c = ctx instanceof Resource ? (Resource)ctx : AFTER; return new TreeStatement(s, p, o, c); }
private Statement before(Value subj, Value pred, Value obj, Value ctx) { Resource s = subj instanceof Resource ? (Resource) subj : BEFORE; URI p = pred instanceof URI ? (URI) pred : BEFORE; Value o = obj instanceof Value ? obj : BEFORE; Resource c = ctx instanceof Resource ? (Resource) ctx : BEFORE; return new TreeStatement(s, p, o, c); }
private Statement before(Value subj, Value pred, Value obj, Value ctx) { Resource s = subj instanceof Resource ? (Resource)subj : BEFORE; IRI p = pred instanceof IRI ? (IRI)pred : BEFORE; Value o = obj instanceof Value ? obj : BEFORE; Resource c = ctx instanceof Resource ? (Resource)ctx : BEFORE; return new TreeStatement(s, p, o, c); }