public void test() { PathTest test = new PathTest(); assertTrue(test.pathAccessible("regular file path")); assertFalse(test.pathAccessible("hidden file path")); }
@Override public Expr evaluate(NodeTest nodeTest, ElementGroup elementGroup, Var var, LDPathEvaluatorConfiguration evaluatorConfiguration) { OrTest orTest = (OrTest) nodeTest; Expr expr1 = LDPathEvaluator.evaluate(orTest.getLeft(), elementGroup, var, evaluatorConfiguration); Expr expr2 = LDPathEvaluator.evaluate(orTest.getRight(), elementGroup, var, evaluatorConfiguration); return new E_LogicalOr(expr1, expr2); } }
@Override public Expr evaluate(NodeTest nodeTest, ElementGroup elementGroup, Var var, LDPathEvaluatorConfiguration evaluatorConfiguration) { AndTest andTest = (AndTest) nodeTest; Expr expr1 = LDPathEvaluator.evaluate(andTest.getLeft(), elementGroup, var, evaluatorConfiguration); Expr expr2 = LDPathEvaluator.evaluate(andTest.getRight(), elementGroup, var, evaluatorConfiguration); return new E_LogicalAnd(expr1, expr2); } }
final public PathTest PathTest() throws ParseException { NodeSelector path; if (jj_2_66(2147483647)) { path = PathSelector(); } else if (jj_2_67(2147483647)) { path = TestingSelector(); } else if (jj_2_68(2147483647)) { path = AtomicSelector(); } else { jj_consume_token(-1); throw new ParseException(); } {if (true) return new PathTest(path);} throw new Error("Missing return statement in function"); }
final public IsATest IsATest() throws ParseException { Node node; jj_consume_token(IS_A); node = Node(); {if (true) return new IsATest(resolveResource("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"), node);} throw new Error("Missing return statement in function"); }
final public AndTest AndTest() throws ParseException { NodeTest left, right; left = AtomicNodeTest(); jj_consume_token(AND); right = NodeTest(); {if (true) return new AndTest(left,right);} throw new Error("Missing return statement in function"); }
final public LiteralTypeTest LiteralTypeTest() throws ParseException { URI type; jj_consume_token(TYPE); type = Uri(); {if (true) return new LiteralTypeTest(type);} throw new Error("Missing return statement in function"); }
final public NotTest NotTest() throws ParseException { NodeTest delegate; jj_consume_token(NOT); delegate = NodeTest(); {if (true) return new NotTest(delegate);} throw new Error("Missing return statement in function"); }
final public PathEqualityTest PathEqualityTest() throws ParseException { NodeSelector path; Node node; path = Selector(); jj_consume_token(IS); node = Node(); {if (true) return new PathEqualityTest(path,node);} throw new Error("Missing return statement in function"); }
final public LiteralLanguageTest LiteralLanguageTest() throws ParseException { Token lang; jj_consume_token(LANG); lang = jj_consume_token(IDENTIFIER); {if (true) return new LiteralLanguageTest(lang.image);} throw new Error("Missing return statement in function"); }
final public OrTest OrTest() throws ParseException { NodeTest left, right; left = AtomicNodeTest(); jj_consume_token(OR); right = NodeTest(); {if (true) return new OrTest(left,right);} throw new Error("Missing return statement in function"); }
@Override public Expr evaluate(NodeTest nodeTest, ElementGroup elementGroup, Var var, LDPathEvaluatorConfiguration evaluatorConfiguration) { NotTest notTest = (NotTest) nodeTest; return new E_LogicalNot(LDPathEvaluator.evaluate(notTest.getDelegate(), elementGroup, var, evaluatorConfiguration)); }
final public PathTest PathTest() throws ParseException { NodeSelector path; if (jj_2_66(2147483647)) { path = PathSelector(); } else if (jj_2_67(2147483647)) { path = TestingSelector(); } else if (jj_2_68(2147483647)) { path = AtomicSelector(); } else { jj_consume_token(-1); throw new ParseException(); } {if (true) return new PathTest(path);} throw new Error("Missing return statement in function"); }
final public IsATest IsATest() throws ParseException { Node node; jj_consume_token(IS_A); node = Node(); {if (true) return new IsATest(resolveResource("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"), node);} throw new Error("Missing return statement in function"); }
final public AndTest AndTest() throws ParseException { NodeTest left, right; left = AtomicNodeTest(); jj_consume_token(AND); right = NodeTest(); {if (true) return new AndTest(left,right);} throw new Error("Missing return statement in function"); }
final public LiteralTypeTest LiteralTypeTest() throws ParseException { URI type; jj_consume_token(TYPE); type = Uri(); {if (true) return new LiteralTypeTest(type);} throw new Error("Missing return statement in function"); }
final public NotTest NotTest() throws ParseException { NodeTest delegate; jj_consume_token(NOT); delegate = NodeTest(); {if (true) return new NotTest(delegate);} throw new Error("Missing return statement in function"); }
final public PathEqualityTest PathEqualityTest() throws ParseException { NodeSelector path; Node node; path = Selector(); jj_consume_token(IS); node = Node(); {if (true) return new PathEqualityTest(path,node);} throw new Error("Missing return statement in function"); }
final public LiteralLanguageTest LiteralLanguageTest() throws ParseException { Token lang; jj_consume_token(LANG); lang = jj_consume_token(IDENTIFIER); {if (true) return new LiteralLanguageTest(lang.image);} throw new Error("Missing return statement in function"); }
final public OrTest OrTest() throws ParseException { NodeTest left, right; left = AtomicNodeTest(); jj_consume_token(OR); right = NodeTest(); {if (true) return new OrTest(left,right);} throw new Error("Missing return statement in function"); }