@Override public NodeValue eval(NodeValue x, NodeValue y) { int r = NodeValue.compare(x, y) ; return NodeValue.booleanReturn( r == Expr.CMP_GREATER || r == Expr.CMP_EQUAL ) ; }
@Override public NodeValue eval(NodeValue x, NodeValue y) { int r = NodeValue.compare(x, y) ; return NodeValue.booleanReturn( r == Expr.CMP_LESS ) ; }
@Override public NodeValue evalSpecial(Binding binding, FunctionEnv env) { boolean b = super.evalNotOneOf(binding, env) ; return NodeValue.booleanReturn(b) ; }
@Override protected NodeValue eval(Binding binding, QueryIterator qIter, FunctionEnv env) { boolean b = qIter.hasNext() ; return NodeValue.booleanReturn(b) ; }
@Override public NodeValue eval(NodeValue x, NodeValue y) { int r = NodeValue.compare(x, y) ; return NodeValue.booleanReturn( r == Expr.CMP_LESS || r == Expr.CMP_EQUAL ) ; }
/** {@literal F&O} fn:not */ public static NodeValue not(NodeValue nv) { boolean b = XSDFuncOp.booleanEffectiveValue(nv) ; return NodeValue.booleanReturn(!b) ; }
@Override public NodeValue eval(NodeValue x, NodeValue y) { int r = NodeValue.compare(x, y) ; return NodeValue.booleanReturn( r == Expr.CMP_GREATER ) ; }
@Override public NodeValue eval(NodeValue x, NodeValue y) { // Note: notSameValueAs means "known to be different" // sameValueAs means "know to be the same value" // so they are not opposites boolean b = NodeValue.sameAs(x, y) ; return NodeValue.booleanReturn(b) ; }
@Override public NodeValue eval(NodeValue x, NodeValue y) { // Note: notSameValueAs means "known to be different" // sameValueAs means "know to be the same value" // so they are not opposites boolean b = NodeValue.notSameAs(x, y) ; return NodeValue.booleanReturn(b) ; }
@Override protected NodeValue eval(Binding binding, QueryIterator qIter, FunctionEnv env) { boolean b = qIter.hasNext() ; return NodeValue.booleanReturn(!b) ; }
@Override public NodeValue evalSpecial(Binding binding, FunctionEnv env) { boolean b = super.evalOneOf(binding, env) ; return NodeValue.booleanReturn(b) ; }
@Override protected NodeValue evalSpecial(Binding binding, FunctionEnv env) { return NodeValue.booleanReturn(checkAccess(binding)); }
/** {@literal F&O} fn:boolean */ public static NodeValue booleanEffectiveValueAsNodeValue(NodeValue nv) { if ( nv.isBoolean() ) // "Optimization" (saves on object churn) return nv ; return NodeValue.booleanReturn(booleanEffectiveValue(nv)) ; }
public static NodeValue isIRI(NodeValue nv) { return NodeValue.booleanReturn(isIRI(nv.asNode())) ; }
public static NodeValue isURI(NodeValue nv) { return NodeValue.booleanReturn(isIRI(nv.asNode())) ; }
public static NodeValue isLiteral(NodeValue nv) { return NodeValue.booleanReturn(isLiteral(nv.asNode())) ; }
public static NodeValue sameTerm(NodeValue nv1, NodeValue nv2) { return NodeValue.booleanReturn(sameTerm(nv1.asNode(), nv2.asNode())) ; }
public static NodeValue strStartsWith(NodeValue string, NodeValue match) { checkTwoArgumentStringLiterals("strStarts", string, match) ; String lex1 = string.asNode().getLiteralLexicalForm() ; String lex2 = match.asNode().getLiteralLexicalForm() ; return NodeValue.booleanReturn(lex1.startsWith(lex2)) ; }
public static NodeValue strEndsWith(NodeValue string, NodeValue match) { checkTwoArgumentStringLiterals("strEnds", string, match) ; String lex1 = string.asNode().getLiteralLexicalForm() ; String lex2 = match.asNode().getLiteralLexicalForm() ; return NodeValue.booleanReturn(lex1.endsWith(lex2)) ; }
public static NodeValue strContains(NodeValue string, NodeValue match) { checkTwoArgumentStringLiterals("contains", string, match) ; String lex1 = string.asNode().getLiteralLexicalForm() ; String lex2 = match.asNode().getLiteralLexicalForm() ; boolean x = StrUtils.contains(lex1, lex2) ; return NodeValue.booleanReturn(x) ; }