Package org.openrdf.model

Examples of org.openrdf.model.Literal.integerValue()


            else if (datatype.equals(XMLSchema.DECIMAL)) {
              BigDecimal decimalValue = literal.decimalValue();
              booleanValue = !decimalValue.equals(BigDecimal.ZERO);
            }
            else if (datatype.equals(XMLSchema.INTEGER)) {
              BigInteger integerValue = literal.integerValue();
              booleanValue = !integerValue.equals(BigInteger.ZERO);
            }
            else if (XMLDatatypeUtil.isIntegerDatatype(datatype)) {
              booleanValue = literal.longValue() != 0L;
            }
View Full Code Here


                } else if (type.equals(XMLSchema.LONG)) {
                    return l.longValue();
                } else if (type.equals(XMLSchema.INT)) {
                    return l.intValue();
                } else if (type.equals(XMLSchema.INTEGER)) {
                    return l.integerValue();
                } else if (type.equals(XMLSchema.BYTE)) {
                    return l.byteValue();
                } else if (type.equals(XMLSchema.BOOLEAN)) {
                    return l.booleanValue();
                } else if (type.equals(XMLSchema.SHORT)) {
View Full Code Here

        else if (XMLDatatypeUtil.isNumericDatatype(datatype)) {
          // FIXME: decimals, floats and doubles must be processed
          // separately, see
          // http://www.w3.org/TR/xpath-functions/#casting-from-primitive-to-primitive
          try {
            BigInteger integerValue = literal.integerValue();
            return valueFactory.createLiteral(integerValue.toString(), XMLSchema.INTEGER);
          }
          catch (NumberFormatException e) {
            throw new ValueExprEvaluationException(e.getMessage(), e);
          }
View Full Code Here

            else if (datatype.equals(XMLSchema.DECIMAL)) {
              BigDecimal decimalValue = literal.decimalValue();
              booleanValue = !decimalValue.equals(BigDecimal.ZERO);
            }
            else if (datatype.equals(XMLSchema.INTEGER)) {
              BigInteger integerValue = literal.integerValue();
              booleanValue = !integerValue.equals(BigInteger.ZERO);
            }
            else if (XMLDatatypeUtil.isIntegerDatatype(datatype)) {
              booleanValue = literal.longValue() != 0L;
            }
View Full Code Here

            if (null == datatype) {
                return l.getLabel();
            } else if (XMLSchema.STRING.equals(datatype)) {
                return l.getLabel();
            } else if (XMLSchema.INTEGER.equals(datatype)) {
                return l.integerValue();
            } else if (XMLSchema.INT.equals(datatype)) {
                return l.intValue();
            } else if (XMLSchema.ANYURI.equals(datatype)) {
                try {
                    return new java.net.URI(l.getLabel());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.