/** * Return a name for this selector to be used as the name for the whole path if not explicitly * specified. In complex selector expressions, this is typically delegated to the first * occurrence of an atomic selector. */ @Override public String getName(NodeBackend<Node> nodeRDFBackend) { return nodeRDFBackend.stringValue(property); }
/** * Return a name for this selector to be used as the name for the whole path if not explicitly * specified. In complex selector expressions, this is typically delegated to the first * occurrence of an atomic selector. */ @Override public String getName(NodeBackend<Node> nodeRDFBackend) { return nodeRDFBackend.stringValue(property); }
@Override public String getAsString() throws TemplateModelException { return backend.stringValue(node); } };
@Override public String getAsString() throws TemplateModelException { return backend.stringValue(node); } };
@Override public String getPathExpression(NodeBackend<Node> backend) { if (property != null) { return String.format("^<%s>", backend.stringValue(property)); } else { return "^*"; } }
@Override public String getPathExpression(NodeBackend<Node> backend) { if (property != null) { return String.format("^<%s>", backend.stringValue(property)); } else { return "^*"; } }
@Override public String getPathExpression(NodeBackend<Node> backend) { if (property != null) { return String.format("<%s>", backend.stringValue(property)); } else { return "*"; } }
@Override public String getPathExpression(NodeBackend<Node> backend) { if (property != null) { return String.format("<%s>", backend.stringValue(property)); } else { return "*"; } }
/** * Return a name for this selector to be used as the name for the whole path if not explicitly * specified. In complex selector expressions, this is typically delegated to the first * occurrence of an atomic selector. */ @Override public String getName(NodeBackend<Node> backend) { if(property != null) { return backend.stringValue(property); } else { throw new UnsupportedOperationException("cannot use wildcards in unnamed field definitions because the name is undefined"); } }
/** * Return a name for this selector to be used as the name for the whole path if not explicitly * specified. In complex selector expressions, this is typically delegated to the first * occurrence of an atomic selector. */ @Override public String getName(NodeBackend<Node> backend) { if(property != null) { return backend.stringValue(property); } else { throw new UnsupportedOperationException("cannot use wildcards in unnamed field definitions because the name is undefined"); } }
@Override public String getPathExpression(NodeBackend<Node> rdfBackend) { if (rdfBackend.isURI(node)) { return String.format("is-a <%s>", rdfBackend.stringValue(node)); } else if (rdfBackend.isLiteral(node)) { return String.format("is-a \"%s\"", rdfBackend.stringValue(node)); } else { // TODO Can this happen? return String.format("is-a %s", rdfBackend.stringValue(node)); } }
@Override public String getPathExpression(NodeBackend<Node> rdfBackend) { if (rdfBackend.isURI(node)) { return String.format("is-a <%s>", rdfBackend.stringValue(node)); } else if (rdfBackend.isLiteral(node)) { return String.format("is-a \"%s\"", rdfBackend.stringValue(node)); } else { // TODO Can this happen? return String.format("is-a %s", rdfBackend.stringValue(node)); } }
protected boolean isNil(NodeBackend<Node> backend, Node node) { return backend.isURI(node) && backend.stringValue(node).equals(RDF + "nil"); }
public NodeTransformer<?,Node> getTransformer(Node node) throws ParseException { return getTransformer(backend.stringValue(node)); }
public NodeTransformer<?,Node> getTransformer(Node node) throws ParseException { return getTransformer(backend.stringValue(node)); }
protected boolean isNil(NodeBackend<Node> backend, Node node) { return backend.isURI(node) && backend.stringValue(node).equals(RDF + "nil"); }
/** * Return the representation of the NodeFunction or NodeSelector in the RDF Path Language * * @param rdfBackend * @return */ @Override public String getPathExpression(NodeBackend<Node> rdfBackend) { if (rdfBackend.isURI(node)) { return String.format("%s is <%s>", path.getPathExpression(rdfBackend), rdfBackend.stringValue(node)); } else if (rdfBackend.isLiteral(node)) { return String.format("%s is \"%s\"", path.getPathExpression(rdfBackend), rdfBackend.stringValue(node)); } else { // TODO Can this happen? return String.format("%s is %s", path.getPathExpression(rdfBackend), rdfBackend.stringValue(node)); } }
/** * Return the representation of the NodeFunction or NodeSelector in the RDF Path Language * * @param rdfBackend * @return */ @Override public String getPathExpression(NodeBackend<Node> rdfBackend) { if (rdfBackend.isURI(node)) { return String.format("%s is <%s>", path.getPathExpression(rdfBackend), rdfBackend.stringValue(node)); } else if (rdfBackend.isLiteral(node)) { return String.format("%s is \"%s\"", path.getPathExpression(rdfBackend), rdfBackend.stringValue(node)); } else { // TODO Can this happen? return String.format("%s is %s", path.getPathExpression(rdfBackend), rdfBackend.stringValue(node)); } }