public static EdgeImpl create(String label, Node sub, Node obj) { EdgeImpl edge = new EdgeImpl(label); edge.add(sub); edge.add(obj); return edge; }
public static EdgeImpl create(String label, Node sub, Node obj) { EdgeImpl edge = new EdgeImpl(label); edge.add(sub); edge.add(obj); return edge; }
public static EdgeImpl create(Node prop, Node sub, Node obj) { String name = TOP; if (prop.isConstant()) { name = prop.getLabel(); } EdgeImpl edge = new EdgeImpl(name); edge.add(sub); edge.add(obj); if (prop.isVariable()) { //edge.setEdgeNode(prop); edge.setEdgeVariable(prop); } else { edge.setEdgeNode(prop); } return edge; }
public static EdgeImpl create(Node prop, Node sub, Node obj) { String name = TOP; if (prop.isConstant()) { name = prop.getLabel(); } EdgeImpl edge = new EdgeImpl(name); edge.add(sub); edge.add(obj); if (prop.isVariable()) { //edge.setEdgeNode(prop); edge.setEdgeVariable(prop); } else { edge.setEdgeNode(prop); } return edge; }
@Override public Edge compile(Triple tt, boolean reuse) { EdgeImpl edge = new EdgeImpl(tt); Node subject = getNode(tt.getSubject(), reuse); if (tt.getVariable() != null) { Node variable = getNode(tt.getVariable()); edge.setEdgeVariable(variable); } Node predicate = getNode(tt.getProperty(), reuse); // PRAGMA: // ?x rdf:type c:Image // in this case we want each triple rdf:type c:Image to have its own c:Image Node // to accept type subsumption // if it would be same Node, it would need to be bound to same value // cf Neurolog pb // TODO: fix it for relax Node object = getNode(tt.getObject(), reuse); edge.add(subject); edge.add(object); edge.setEdgeNode(predicate); if (tt.getArgs() != null) { for (Atom arg : tt.getArgs()) { Node sup = getNode(arg); edge.add(sup); } } return edge; }
@Override public Edge compile(Triple tt, boolean reuse) { EdgeImpl edge = new EdgeImpl(tt); Node subject = getNode(tt.getSubject(), reuse); if (tt.getVariable() != null) { Node variable = getNode(tt.getVariable()); edge.setEdgeVariable(variable); } Node predicate = getNode(tt.getProperty(), reuse); // PRAGMA: // ?x rdf:type c:Image // in this case we want each triple rdf:type c:Image to have its own c:Image Node // to accept type subsumption // if it would be same Node, it would need to be bound to same value // cf Neurolog pb // TODO: fix it for relax Node object = getNode(tt.getObject(), reuse); edge.add(subject); edge.add(object); edge.setEdgeNode(predicate); if (tt.getArgs() != null) { for (Atom arg : tt.getArgs()) { Node sup = getNode(arg); edge.add(sup); } } return edge; }