/** Parse a string to obtain a SPARQL expression */ public static Expr parseExpr(String s) { return parseExpr(s, null) ; }
public WonMessageQueryBuilder isProposesToCancelMessage() { delegate.having(SSE.parseExpr("(bound(?proposesToCancel))")); return this; }
public WonConversationQueryBuilder isProposesToCancelMessage() { delegate.having(SSE.parseExpr("(bound(?proposesToCancel))")); return this; }
public WonMessageQueryBuilder isProposesMessage() { delegate.having(SSE.parseExpr("(bound(?proposes))")); return this; }
public WonMessageQueryBuilder isAcceptsMessage() { delegate.having(SSE.parseExpr("(bound(?accepts))")); return this; }
public WonConversationQueryBuilder isRetractsMessage() { delegate.having(SSE.parseExpr("(bound(?retracts))")); return this; }
public WonConversationQueryBuilder isRejectsMessage() { delegate.having(SSE.parseExpr("(bound(?reject))")); return this; }
public WonConversationQueryBuilder isProposesMessage() { delegate.having(SSE.parseExpr("(bound(?proposes))")); return this; }
public WonConversationQueryBuilder isAcceptsMessage() { delegate.having(SSE.parseExpr("(bound(?accepts))")); return this; }
public static void exprPrefix(String string, Binding binding) { try { Expr expr = SSE.parseExpr(string) ; evalPrint(expr, binding) ; } catch (SSEParseException ex) { System.err.println("Parse error: "+ex.getMessage()) ; return ; } } }
public WonMessageQueryBuilder noFailureResponses() { delegate.having(SSE.parseExpr("(!= ?msgType msg:FailureResponse)", delegate.getPrefixMapping())); return this; }
public WonConversationQueryBuilder noSuccessResponses() { delegate.having(SSE.parseExpr("(!= ?msgType msg:SuccessResponse)", delegate.getPrefixMapping())); return this; }
public WonMessageQueryBuilder noSuccessResponses() { delegate.having(SSE.parseExpr("(!= ?msgType msg:SuccessResponse)", delegate.getPrefixMapping())); return this; }
public WonConversationQueryBuilder noFailureResponses() { delegate.having(SSE.parseExpr("(!= ?msgType msg:FailureResponse)", delegate.getPrefixMapping())); return this; }
@Test public void test_10() { SSE.parseExpr("1") ; } @Test public void test_11() { SSE.parseExpr("(+ 1 2)") ; }
@Test public void testBuildExpr_02() { Expr e = SSE.parseExpr("(isNumeric ?x)") ; assertTrue(e instanceof E_IsNumeric) ; }
@Test public void testBuildExpr_01() { Expr e = SSE.parseExpr("(sameTerm (?x) (?y))") ; assertTrue(e instanceof E_SameTerm) ; }
private static void evalExpr(String exprString, String bindingStr, boolean expected) { Binding binding = binding(bindingStr) ; Expr expr = SSE.parseExpr(exprString) ; NodeValue nv = expr.eval(binding, LibTestExpr.createTest()) ; boolean b = XSDFuncOp.booleanEffectiveValue(nv) ; assertEquals(exprString, expected, b) ; }