jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r1488004 - /jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/resultset/JSONInputIterator.java
Date Thu, 30 May 2013 20:51:29 GMT
Author: andy
Date: Thu May 30 20:51:29 2013
New Revision: 1488004

URL: http://svn.apache.org/r1488004
Log:
Remove deprecations:
+ use org.apache.jena.riot.ParseException, not org.openjena.riot.RiotParseException;
+ use NodeFactory, not Node.create*
JENA-267

Modified:
    jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/resultset/JSONInputIterator.java

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/resultset/JSONInputIterator.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/resultset/JSONInputIterator.java?rev=1488004&r1=1488003&r2=1488004&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/resultset/JSONInputIterator.java
(original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/resultset/JSONInputIterator.java
Thu May 30 20:51:29 2013
@@ -34,10 +34,11 @@ import org.apache.jena.atlas.iterator.Pe
 import org.apache.jena.atlas.json.io.parser.TokenizerJSON;
 import org.apache.jena.riot.tokens.Token;
 import org.apache.jena.riot.tokens.TokenType;
-import org.openjena.riot.RiotParseException;
+import org.apache.jena.riot.RiotParseException ;
 
 import com.hp.hpl.jena.datatypes.TypeMapper;
 import com.hp.hpl.jena.graph.Node;
+import com.hp.hpl.jena.graph.NodeFactory;
 import com.hp.hpl.jena.query.QueryException;
 import com.hp.hpl.jena.rdf.model.AnonId;
 import com.hp.hpl.jena.sparql.core.Var;
@@ -542,17 +543,17 @@ public class JSONInputIterator extends Q
 			
 			//Generate a Node based on the properties we saw
 			if (type.equals("uri")) {
-				return Node.createURI(value);
+				return NodeFactory.createURI(value);
 			} else if (type.equals("literal")) {
 				if (datatype != null) {
-					return Node.createLiteral(value, TypeMapper.getInstance().getSafeTypeByName(datatype));
+					return NodeFactory.createLiteral(value, TypeMapper.getInstance().getSafeTypeByName(datatype));
 				} else if (lang != null) {
-					return Node.createLiteral(value, lang, false);
+					return NodeFactory.createLiteral(value, lang, false);
 				} else {
-					return Node.createLiteral(value);
+					return NodeFactory.createLiteral(value);
 				}
 			} else if (type.equals("bnode")) {
-				return Node.createAnon(new AnonId(value));
+				return NodeFactory.createAnon(new AnonId(value));
 			} else {
 				exception(pos, "Encountered a Node object with an invalid type value '%s', expected one
of uri, literal or bnode", type);
 			}



Mime
View raw message