I've fixed up the index.mdtext as best I can - svn is back in read-write mdoe.

Having to add a string literals as

"'string'"

is a tad confusing IMO.  Could this be documented?

        Andy


On 05/12/14 08:32, Claude Warren wrote:
Andy,

I went back over the code and the addWhere clause in question takes 3
objects.  It runs each of those through a makeNode() method which
determines what type of Node it should be.

Null = Node.ANY
FrontsNode = Node
Node = Node
String -> attempt to parse as prefix:localName fail to default
default -> createLiteral.

So in the example it should be a quoted string.

Code below.

public Node makeNode(Object o) {
         if (o == null) {
             return Node.ANY;
         }
         if (o instanceof FrontsNode) {
             return ((FrontsNode) o).asNode();
         }

         if (o instanceof Node) {
             return (Node) o;
         }
         if (o instanceof String) {
             try {
                 return NodeFactoryExtra.parseNode((String) o, PrefixMapFactory
                         .createForInput(query.getPrefixMapping()));
             } catch (RiotException e) {
                 // expected in some cases -- do nothing
             }

         }
         return NodeFactory.createLiteral(LiteralLabelFactory.create(o));
     }

Reply via email to