Package org.apache.jena.atlas.json

Examples of org.apache.jena.atlas.json.JsonValue


        JsonArray a = obj.get(kVars).getAsArray() ;
        Iterator<JsonValue> iter = a.iterator() ;
        List<Var> vars = new ArrayList<Var>() ;
        for ( ; iter.hasNext() ; )
        {
            JsonValue v = iter.next() ;
            if ( ! v.isString() )
                throw new ResultSetException("Entries in vars array must be strings") ;
            Var var = Var.alloc(v.getAsString().value()) ;
            vars.add(var) ;
        }
        return vars ;
    }
View Full Code Here


        throw new ResultSetException("Object key not recognized as valid for an RDF term: "+term) ;
    }
   
    private static String stringOrNull(JsonObject obj, String key)
    {
        JsonValue v = obj.get(key) ;
        if ( v == null ) return null ;
        if ( ! v.isString() )
            throw new ResultSetException("Not a string: key: "+key) ;
        return v.getAsString().value();
       
    }
View Full Code Here

TOP

Related Classes of org.apache.jena.atlas.json.JsonValue

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.