Package com.hp.hpl.jena.sparql.expr

Examples of com.hp.hpl.jena.sparql.expr.ValueSpaceClassification


        throw new ExprEvalTypeException("Operator '-' : Undefined subtraction: "+nv1+" and "+nv2) ;
    }

    public static NodeValue multiplicationNV(NodeValue nv1, NodeValue nv2)
    {
        ValueSpaceClassification vs1 = nv1.getValueSpace() ;
        ValueSpaceClassification vs2 = nv2.getValueSpace() ;
       
        if ( vs1.equals(VSPACE_NUM) && vs2.equals(VSPACE_NUM) )
            return XSDFuncOp.numMultiply(nv1, nv2) ;

        if ( vs1.equals(VSPACE_DURATION) && vs2.equals(VSPACE_NUM) )
        {
            // ONLY defined for dayTime.
            Duration dur = nv1.getDuration() ;
            boolean valid = XSDFuncOp.isDayTime(dur) ;
            if ( ! valid )
View Full Code Here


    public static boolean sameAs(NodeValue nv1, NodeValue nv2)
    {
        if ( nv1 == null || nv2 == null )
            throw new ARQInternalErrorException("Attempt to sameValueAs on a null") ;
       
        ValueSpaceClassification compType = classifyValueOp(nv1, nv2) ;
       
        // Special case - date/dateTime comparison is affected by timezones and may be
        // interdeterminate based on the value of the dateTime/date.

        switch (compType)
View Full Code Here

        if ( nv1 == null )
            return Expr.CMP_LESS ;
        if ( nv2 == null )
            return Expr.CMP_GREATER ;
       
        ValueSpaceClassification compType = classifyValueOp(nv1, nv2) ;
       
        // Special case - date/dateTime comparison is affected by timezones and may be
        // interdeterminate based on the value of the dateTime/date.
        // Do this first,
       
View Full Code Here

        throw new ARQInternalErrorException("Compare failure "+nv1+" and "+nv2) ;
    }

    public static ValueSpaceClassification classifyValueOp(NodeValue nv1, NodeValue nv2)
    {
        ValueSpaceClassification c1 = nv1.getValueSpace() ;
        ValueSpaceClassification c2 = nv2.getValueSpace() ;
        if ( c1 == c2 ) return c1 ;
        if ( c1 == VSPACE_UNKNOWN || c2 == VSPACE_UNKNOWN )
            return VSPACE_UNKNOWN ;
       
        // Known values spaces but incompatible 
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.sparql.expr.ValueSpaceClassification

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.