10981099110011011102110311041105110611071108
Literal value; if (type.equals("int")) { value = new IntegerLiteral(Integer.parseInt(datatype[2])); } else if (type.equals("float")) { value = new DecimalLiteral(new BigDecimal(datatype[2])); } else { log.error("Unknown type: " + type); return; }
403404405406407408409410411412413
case OWL_REAL: case XSD_DECIMAL: if(useSimpleFloats) { res = new FloatLiteral(Float.parseFloat(literal)); } else { res = new DecimalLiteral(new BigDecimal(literal)); } break; default: problems.add("Unsupported literal " + l); }
11031104110511061107110811091110111111121113
90919293949596
public static Literal createDoubleLiteral(double value) { return new DoubleLiteral(value); } public static Literal createDecimalLiteral(double value) { return new DecimalLiteral(value); }
949596979899100
public static Literal createDecimalLiteral(double value) { return new DecimalLiteral(value); } public static Literal createDecimalLiteral(BigDecimal value) { return new DecimalLiteral(value); }