Examples of RDFDatatype


Examples of com.hp.hpl.jena.datatypes.RDFDatatype

    public static Node checkAndGetStringLiteral(String label, NodeValue nv)
    {
        Node n = nv.asNode() ;
        if ( ! n.isLiteral() )
            throw new ExprEvalException(label+": Not a literal: "+nv) ;
        RDFDatatype dt = n.getLiteralDatatype() ;
        String lang = n.getLiteralLanguage() ;
       
        if ( dt != null && ! dt.equals(XSDDatatype.XSDstring) )
            throw new ExprEvalException(label+": Not a string literal: "+nv) ;
        return n ;
    }
View Full Code Here

Examples of com.hp.jena.datatypes.RDFDatatype

    Node v = eval( item, val ), t = eval( item, type );
    if (!t.isIRI()) return false;
    if (v.isBlank()) return true;
    if (v.isLiteral())
        {
        RDFDatatype dtype = TypeMapper.getInstance().getSafeTypeByName(t.getIRI().asString() );
        RDFDatatype vType = v.getLiteralDatatype();
        return dtype != null && dtype.isValidLiteral( t.asLiteral() );
        }
    else
        return false;
    }
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.