Refine search
public PatternTriple(Triple triple) { this(triple.getSubject(), triple.getPredicate(), triple.getObject()) ; }
private Map<Node, List<Node>> groupByPredicates(Collection<Triple> cluster) { SortedMap<Node, List<Node>> x = new TreeMap<Node, List<Node>>(compPredicates) ; for ( Triple t : cluster ) { Node p = t.getPredicate() ; if ( ! x.containsKey(p) ) x.put(p, new ArrayList<Node>()) ; x.get(p).add(t.getObject()) ; } return x ; }
/** * Register a new relation instance in the cache */ public synchronized void addRelation(Triple t) { originalTriples.add(t); addRelation(t.getSubject(), t.getObject()); }
public Quad(Node graph, Triple triple) { this(graph, triple.getSubject(), triple.getPredicate(), triple.getObject()) ; }
protected Set<String> getAllVariables(Triple t) { Set<String> ret = new HashSet<String>(); Node s = t.getSubject(); Node o = t.getObject(); if (s.isVariable()) { ret.add(s.getName()); } if (o.isVariable()) { ret.add(o.getName()); } return ret; }
@Override public boolean accept(Triple triple) { return triple.getPredicate().equals(subject) || triple.getPredicate().equals(predicate) || triple.getPredicate().equals(object) || ( triple.getPredicate().equals(rdfType) && triple.getObject().equals(statement) ) ; }} ;
public PatternTriple(Triple triple) { this(triple.getSubject(), triple.getPredicate(), triple.getObject()) ; }
@Override public boolean accept( Triple t) { if (t.getSubject().isLiteral()) return true; Node n = t.getObject(); return n.isLiteral() && n.getLiteralDatatype() == FunctorDatatype.theFunctorDatatype; } };
protected boolean isTripleAbsentFromAbox(Triple qt) { Node pred = qt.getPredicate(); if (pred.isURI() && isGeneratedRole(pred.getURI())) { return true; } else if (pred.isURI() && pred.getURI().equals(RDFConstants.RDF_TYPE)) { Node obj = qt.getObject(); if (obj.isURI() && isGeneratedClass(obj.getURI())) { return true; } } return false; }
public Quad(Node graph, Triple triple) { this(graph, triple.getSubject(), triple.getPredicate(), triple.getObject()) ; }
/** Check a triple - assumes individual nodes are legal */ public boolean check(Triple triple, long line, long col) { return checkTriple(triple.getSubject(), triple.getPredicate(), triple.getObject(), line, col) ; }
/** * Return true if the triple is already in either the graph or the stack. * I.e. it has already been deduced. */ @Override public boolean contains(Triple t) { // Can't use stackCache.contains because that does not do semantic equality return contains(t.getSubject(), t.getPredicate(), t.getObject()); }
/** * Return true if the triple is already in either the graph or the stack. * I.e. it has already been deduced. */ @Override public boolean contains(Triple t) { // Can't use stackCache.contains because that does not do semantic equality return contains(t.getSubject(), t.getPredicate(), t.getObject()); }
static public void output(Writer out, Triple triple, Prologue prologue, NodeToLabel labelPolicy) { Node s = triple.getSubject() ; Node p = triple.getPredicate() ; Node o = triple.getObject() ; output(out, s, p, o, null, prologue, labelPolicy) ; }
static public void output(Writer out, Triple triple, Node graphNode, Prologue prologue, NodeToLabel labelPolicy) { Node s = triple.getSubject() ; Node p = triple.getPredicate() ; Node o = triple.getObject() ; output(out, s, p, o, graphNode, prologue, labelPolicy) ; }
/** * @see com.hp.hpl.jena.reasoner.rulesys.RuleContext#contains(com.hp.hpl.jena.graph.Triple) */ @Override public boolean contains(Triple t) { return contains(t.getSubject(), t.getPredicate(), t.getObject()); }
/** Check a triple - assumes individual nodes are legal */ public boolean check(Triple triple, long line, long col) { return checkTriple(triple.getSubject(), triple.getPredicate(), triple.getObject(), line, col) ; }
static public void output(Writer out, Triple triple, Node graphNode, Prologue prologue, NodeToLabel labelPolicy) { Node s = triple.getSubject() ; Node p = triple.getPredicate() ; Node o = triple.getObject() ; output(out, s, p, o, graphNode, prologue, labelPolicy) ; }
static public void output(Writer out, Triple triple, Prologue prologue, NodeToLabel labelPolicy) { Node s = triple.getSubject() ; Node p = triple.getPredicate() ; Node o = triple.getObject() ; output(out, s, p, o, null, prologue, labelPolicy) ; }
@Override public void triple(Triple triple) { dsg.add(Quad.defaultGraphNodeGenerated, triple.getSubject(), triple.getPredicate(), triple.getObject()) ; //throw new IllegalStateException("Triple passed to dataset parsing") ; }