public static NodeImpl createNode(Atom at) { return new NodeImpl(at); }
public static NodeImpl createNode(Atom at) { return new NodeImpl(at); }
List<Node> nodes(List<Constant> from) { List<Node> nodes = new ArrayList<Node>(); for (Constant cst : from) { nodes.add(new NodeImpl(cst)); } return nodes; }
List<Node> nodes(List<Constant> from) { List<Node> nodes = new ArrayList<Node>(); for (Constant cst : from) { nodes.add(new NodeImpl(cst)); } return nodes; }
public static NodeImpl createVariable(String name) { return new NodeImpl(Variable.create(name)); }
public static NodeImpl createResource(String name) { return new NodeImpl(Constant.create(name)); }
public static NodeImpl createConstant(String name, String datatype, String lang) { return new NodeImpl(Constant.create(name, null, lang)); }
public static NodeImpl createVariable(String name) { return new NodeImpl(Variable.create(name)); }
public static NodeImpl createConstant(String name) { return new NodeImpl(Constant.create(name, RDFS.xsdstring)); }
public static NodeImpl createConstant(String name) { return new NodeImpl(Constant.create(name, RDFS.xsdstring)); }
public static NodeImpl createConstant(String name, String datatype) { return new NodeImpl(Constant.create(name, datatype)); }
public static NodeImpl createResource(String name) { return new NodeImpl(Constant.create(name)); }
public static NodeImpl createConstant(String name, String datatype) { return new NodeImpl(Constant.create(name, datatype)); }
public static NodeImpl createConstant(String name, String datatype, String lang) { return new NodeImpl(Constant.create(name, null, lang)); }
/** * isReuse = true means reuse existing Node if any * Generate a new Node for resources and for literals * For resources it is to enable to approximate match a query Class with * different target classes */ Node getNode(Atom at, boolean isReuse) { if (at.isVariable()) { Node node = varTable.get(at.getName()); if (node == null) { node = new NodeImpl(at); varTable.put(at.getName(), node); } return node; } else if (at.isResource() && isReuse) { Node node = resTable.get(at.getName()); if (node == null) { node = new NodeImpl(at); resTable.put(at.getName(), node); } return node; } return new NodeImpl(at); }
/** * isReuse = true means reuse existing Node if any * Generate a new Node for resources and for literals * For resources it is to enable to approximate match a query Class with * different target classes */ Node getNode(Atom at, boolean isReuse) { if (at.isVariable()) { Node node = varTable.get(at.getName()); if (node == null) { node = new NodeImpl(at); varTable.put(at.getName(), node); } return node; } else if (at.isResource() && isReuse) { Node node = resTable.get(at.getName()); if (node == null) { node = new NodeImpl(at); resTable.put(at.getName(), node); } return node; } return new NodeImpl(at); }