public void visit(OpPropFunc opPropFunc) {
   Table table = eval(opPropFunc.getSubOp());
   table =
       evaluator.propertyFunction(
           table,
           opPropFunc.getProperty(),
           opPropFunc.getSubjectArgs(),
           opPropFunc.getObjectArgs());
   push(table);
 }
 @Override
 public Op transform(OpPropFunc opPropFunc, Op subOp) {
   if (opPropFunc.getSubOp() != subOp)
     opPropFunc =
         new OpPropFunc(
             opPropFunc.getProperty(),
             opPropFunc.getSubjectArgs(),
             opPropFunc.getObjectArgs(),
             subOp);
   // Put the (graph) back round it so the property function works on the named graph.
   return new OpGraph(getNode(), opPropFunc);
 }
Exemplo n.º 3
0
    @Override
    public Op transform(OpPropFunc opPropFunc, Op subOp) {
      PropFuncArg sArgs = opPropFunc.getSubjectArgs();
      PropFuncArg oArgs = opPropFunc.getObjectArgs();

      PropFuncArg sArgs2 = substitute(sArgs, binding);
      PropFuncArg oArgs2 = substitute(oArgs, binding);

      if (sArgs2 == sArgs && oArgs2 == oArgs && opPropFunc.getSubOp() == subOp)
        return super.transform(opPropFunc, subOp);
      return new OpPropFunc(opPropFunc.getProperty(), sArgs2, oArgs2, subOp);
    }