Package au.csiro.ontology.model

Examples of au.csiro.ontology.model.DecimalLiteral


            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;
            }
View Full Code Here


                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);
            }
View Full Code Here

            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;
            }
View Full Code Here

    public static Literal createDoubleLiteral(double value) {
        return new DoubleLiteral(value);
    }
   
    public static Literal createDecimalLiteral(double value) {
        return new DecimalLiteral(value);
    }
View Full Code Here

    public static Literal createDecimalLiteral(double value) {
        return new DecimalLiteral(value);
    }
   
    public static Literal createDecimalLiteral(BigDecimal value) {
        return new DecimalLiteral(value);
    }
View Full Code Here

TOP

Related Classes of au.csiro.ontology.model.DecimalLiteral

Copyright © 2018 www.massapicom. 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.