NodeValue extends ExprNode { public static NodeValue makeNode(Node n) { NodeValue nv = nodeToNodeValue(n) ; return nv ; } protected  NodeValue(); protected  NodeValue(Node n); static NodeValue parse(String string); static NodeValue makeInteger(long i); static NodeValue makeInteger(BigInteger i); static NodeValue makeInteger(String lexicalForm); static NodeValue makeFloat(float f); static NodeValue makeDouble(double d); static NodeValue makeString(String s); static NodeValue makeSortKey(String s, String collation); static NodeValue makeLangString(String s, String lang); static NodeValue makeDecimal(BigDecimal d); static NodeValue makeDecimal(long i); static NodeValue makeDecimal(double d); static NodeValue makeDecimal(String lexicalForm); static NodeValue makeDateTime(String lexicalForm); static NodeValue makeDate(String lexicalForm); static NodeValue makeDateTime(Calendar cal); static NodeValue makeDateTime(XMLGregorianCalendar cal); static NodeValue makeDate(Calendar cal); static NodeValue makeDate(XMLGregorianCalendar cal); static NodeValue makeDuration(String lexicalForm); static NodeValue makeDuration(Duration duration); static NodeValue makeNodeDuration(Duration duration, Node node); static NodeValue makeBoolean(boolean b); static NodeValue booleanReturn(boolean b); static NodeValue makeNode(Node n); static NodeValue makeNode(String lexicalForm, RDFDatatype dtype); static NodeValue makeNode(String lexicalForm, String langTag, Node datatype); static NodeValue makeNode(String lexicalForm, String langTag, String datatype); static NodeValue makeNodeBoolean(boolean b); static NodeValue makeNodeBoolean(String lexicalForm); static NodeValue makeNodeInteger(long v); static NodeValue makeNodeInteger(String lexicalForm); static NodeValue makeNodeFloat(float f); static NodeValue makeNodeFloat(String lexicalForm); static NodeValue makeNodeDouble(double v); static NodeValue makeNodeDouble(String lexicalForm); static NodeValue makeNodeDecimal(BigDecimal decimal); static NodeValue makeNodeDecimal(String lexicalForm); static NodeValue makeNodeString(String string); static NodeValue makeNodeDateTime(Calendar date); static NodeValue makeNodeDateTime(String lexicalForm); static NodeValue makeNodeDate(Calendar date); static NodeValue makeNodeDate(String lexicalForm); @Override NodeValue eval(Binding binding, FunctionEnv env); @Override Expr copySubstitute(Binding binding); @Override Expr applyNodeTransform(NodeTransform transform); Node evalNode(Binding binding, ExecutionContext execCxt); @Override boolean isConstant(); @Override NodeValue getConstant(); boolean isIRI(); boolean isBlank(); static boolean sameAs(NodeValue nv1, NodeValue nv2); static boolean notSameAs(Node n1, Node n2); static boolean notSameAs(NodeValue nv1, NodeValue nv2); static int compareAlways(NodeValue nv1, NodeValue nv2); static int compare(NodeValue nv1, NodeValue nv2); static ValueSpaceClassification classifyValueOp(NodeValue nv1, NodeValue nv2); ValueSpaceClassification getValueSpace(); static Node toNode(NodeValue nv); final Node asNode(); Node getNode(); String getDatatypeURI(); boolean hasNode(); boolean isBoolean(); boolean isString(); boolean isLangString(); boolean isSortKey(); boolean isNumber(); boolean isInteger(); boolean isDecimal(); boolean isFloat(); boolean isDouble(); boolean hasDateTime(); boolean isDateTime(); boolean isDate(); boolean isLiteral(); boolean isTime(); boolean isDuration(); @Deprecated boolean isYearMonth(); boolean isYearMonthDuration(); boolean isDayTimeDuration(); boolean isGYear(); boolean isGYearMonth(); boolean isGMonth(); boolean isGMonthDay(); boolean isGDay(); boolean getBoolean(); String getString(); String getLang(); NodeValueSortKey getSortKey(); BigInteger getInteger(); BigDecimal getDecimal(); float getFloat(); double getDouble(); XMLGregorianCalendar getDateTime(); Duration getDuration(); static void raise(ExprException ex); @Override void visit(ExprVisitor visitor); final String asUnquotedString(); final String asQuotedString(); final String asQuotedString(SerializationContext context); String asString(); @Override int hashCode(); @Override boolean equals(Expr other, boolean bySyntax); abstract void visit(NodeValueVisitor visitor); Expr apply(ExprTransform transform); @Override String toString(); static boolean VerboseWarnings; static boolean VerboseExceptions; static final NodeValue TRUE; static final NodeValue FALSE; static final NodeValue nvZERO; static final NodeValue nvONE; static final NodeValue nvTEN; static final NodeValue nvNaN; static final NodeValue nvINF; static final NodeValue nvNegINF; static final NodeValue nvEmptyString; @Deprecated
    static final NodeValue nvNothing; static final String xsdNamespace; static DatatypeFactory xmlDatatypeFactory; }
@Test public void testEBV7() { Node x = NodeFactory.createLiteral("", "en"); NodeValue v = NodeValue.makeNode(x); assertFalse("Not EBV false: " + v, XSDFuncOp.booleanEffectiveValue(v)); }
@Test public void testEBV8() { Node x = NodeFactory.createLiteral("not empty", "en"); NodeValue v = NodeValue.makeNode(x); assertTrue("Not EBV true: " + v, XSDFuncOp.booleanEffectiveValue(v)); }
@Test public void testEBV9() { assertTrue ( ebvDouble(0.01d) ); assertFalse( ebvDouble(0.0d) ); assertFalse( ebvDouble(-0.0d) ); assertFalse( ebvDouble(Double.NaN) ); assertTrue ( ebvDouble(Double.MIN_NORMAL) ); assertTrue ( ebvDouble(Double.MIN_VALUE) ); assertTrue ( ebvDouble(Double.MAX_VALUE) ); assertTrue ( ebvDouble(Double.POSITIVE_INFINITY) ); assertTrue ( ebvDouble(Double.NEGATIVE_INFINITY) ); Node x = NodeFactory.createLiteral("NaN", XSDDatatype.XSDdouble); NodeValue v = NodeValue.makeNode(x); assertFalse(XSDFuncOp.booleanEffectiveValue(v)); }
@Test public void testEBV10() { assertTrue ( ebvFloat(0.01f) ); assertFalse( ebvFloat(0.0f) ); assertFalse( ebvFloat(-0.0f) ); assertFalse( ebvFloat(Float.NaN) ); assertTrue ( ebvFloat(Float.MIN_NORMAL) ); assertTrue ( ebvFloat(Float.MIN_VALUE) ); assertTrue ( ebvFloat(Float.MAX_VALUE) ); assertTrue ( ebvFloat(Float.POSITIVE_INFINITY) ); assertTrue ( ebvFloat(Float.NEGATIVE_INFINITY) ); Node x = NodeFactory.createLiteral("NaN", XSDDatatype.XSDfloat); NodeValue v = NodeValue.makeNode(x); assertFalse(XSDFuncOp.booleanEffectiveValue(v)); }
@Test public void testEquals4() { NodeValue nv1 = NodeValue.makeNode(org.apache.jena.graph.NodeFactory.createURI("http: NodeValue nv2 = NodeValue.makeNode(org.apache.jena.graph.NodeFactory.createURI("http: assertEquals("Not NodeValue.equals()", nv1, nv2); }