Examples of DateLiteral


Examples of au.csiro.ontology.model.DateLiteral

                    } else {
                        res = new BigIntegerLiteral(new BigInteger(literal));
                    }
                    break;
                case XSD_DATE_TIME:
                    res = new DateLiteral(DatatypeConverter.parseDateTime(literal));
                    break;
                case OWL_RATIONAL:
                case OWL_REAL:
                case XSD_DECIMAL:
                    if(useSimpleFloats) {
View Full Code Here

Examples of au.csiro.ontology.model.DateLiteral

    public static Literal createBigIntegerLiteral(BigInteger value) {
        return new BigIntegerLiteral(value);
    }

    public static Literal createDateLiteral(Calendar value) {
        return new DateLiteral(value);
    }
View Full Code Here

Examples of au.csiro.snorocket.core.model.DateLiteral

     * @param l The literal in the ontology model format.
     * @return The literal in the internal model format.
     */
    private au.csiro.snorocket.core.model.AbstractLiteral transformLiteral(Literal l) {
        if(l instanceof au.csiro.ontology.model.DateLiteral) {
            return new DateLiteral(((au.csiro.ontology.model.DateLiteral) l).getValue());
        } else if(l instanceof au.csiro.ontology.model.DecimalLiteral) {
            return new DecimalLiteral(((au.csiro.ontology.model.DecimalLiteral) l).getValue());
        } else if(l instanceof au.csiro.ontology.model.IntegerLiteral) {
            return new IntegerLiteral(((au.csiro.ontology.model.IntegerLiteral) l).getValue());
        } else if(l instanceof au.csiro.ontology.model.StringLiteral) {
View Full Code Here

Examples of au.csiro.snorocket.core.model.DateLiteral

     * @param l The literal in the ontology model format.
     * @return The literal in the internal model format.
     */
    private au.csiro.snorocket.core.model.AbstractLiteral transformLiteral(Literal l) {
        if(l instanceof au.csiro.ontology.model.DateLiteral) {
            return new DateLiteral(((au.csiro.ontology.model.DateLiteral) l).getValue());
        } else if(l instanceof au.csiro.ontology.model.DecimalLiteral) {
            return new DecimalLiteral(((au.csiro.ontology.model.DecimalLiteral) l).getValue());
        } else if(l instanceof au.csiro.ontology.model.IntegerLiteral) {
            return new IntegerLiteral(((au.csiro.ontology.model.IntegerLiteral) l).getValue());
        } else if(l instanceof au.csiro.ontology.model.StringLiteral) {
View Full Code Here

Examples of com.facebook.presto.sql.tree.DateLiteral

    @Test
    public void testDate()
            throws Exception
    {
        assertExpression("DATE '2012-03-22'", new DateLiteral("2012-03-22"));
    }
View Full Code Here

Examples of com.facebook.presto.sql.tree.DateLiteral

    @Test
    public void testDate()
            throws Exception
    {
        assertExpression("DATE '2012-03-22'", new DateLiteral("2012-03-22"));
    }
View Full Code Here

Examples of com.facebook.presto.sql.tree.DateLiteral

    @Test
    public void testDate()
            throws Exception
    {
        assertExpression("DATE '2012-03-22'", new DateLiteral("2012-03-22"));
    }
View Full Code Here

Examples of org.apache.expreval.expr.literal.DateLiteral

    public DateFunction(final ConstantType constantType) {
        super(FunctionType.DATECONSTANT, null);
        this.constantType = constantType;
        switch (this.getConstantType()) {
            case NOW:
                this.dateValue = new DateLiteral(DateLiteral.getNow());
                break;
            case MINDATE:
            case MAXDATE:
                this.dateValue = new DateLiteral(constantType.getValue());
                break;
        }
    }
View Full Code Here

Examples of org.apache.expreval.expr.literal.DateLiteral

            }

            case LONGTODATE: {
                final Number num = (Number)this.getExprArg(0).getValue(conn, object);
                final long val = num.longValue();
                this.dateValue = new DateLiteral(val);
                return this.dateValue.getValue(conn, object);
            }

            default:
                throw new HBqlException("Invalid function: " + this.getFunctionType());
View Full Code Here

Examples of org.apache.expreval.expr.literal.DateLiteral

        if (val instanceof String)
            return new StringLiteral((String)val);

        if (val instanceof Date)
            return new DateLiteral((Date)val);

        if (val instanceof Object)
            return new ObjectLiteral(val);

        throw new InvalidTypeException("Parameter " + this.getParamName()
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.