jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [07/13] jena git commit: JENA-1011: Add StreamRDF start/finish.
Date Thu, 20 Aug 2015 19:03:01 GMT
JENA-1011: Add StreamRDF start/finish.


Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/c08f31d6
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/c08f31d6
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/c08f31d6

Branch: refs/heads/JENA-491-construct-quads
Commit: c08f31d666ede682e6a0d93e9fb0ba001c25276b
Parents: f98247d
Author: Andy Seaborne <andy@apache.org>
Authored: Thu Aug 20 19:08:25 2015 +0100
Committer: Andy Seaborne <andy@apache.org>
Committed: Thu Aug 20 19:17:07 2015 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/jena/riot/lang/JsonLDReader.java   | 2 ++
 .../src/main/java/org/apache/jena/riot/lang/ReaderTriX.java     | 5 ++---
 2 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/c08f31d6/jena-arq/src/main/java/org/apache/jena/riot/lang/JsonLDReader.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/lang/JsonLDReader.java b/jena-arq/src/main/java/org/apache/jena/riot/lang/JsonLDReader.java
index e7b758e..4c85264 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/lang/JsonLDReader.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/lang/JsonLDReader.java
@@ -82,6 +82,7 @@ public class JsonLDReader implements ReaderRIOT
     }
     
     private void read$(Object jsonObject, String baseURI, ContentType ct, final StreamRDF
output, Context context) {
+        output.start() ;
         try {       	
             JsonLdTripleCallback callback = new JsonLdTripleCallback() {
                 @Override
@@ -129,6 +130,7 @@ public class JsonLDReader implements ReaderRIOT
             errorHandler.error(e.getMessage(), -1, -1); 
             throw new RiotException(e) ;
         }
+        output.finish() ;
     }
 
     private LabelToNode  labels     = SyntaxLabels.createLabelToNode() ;

http://git-wip-us.apache.org/repos/asf/jena/blob/c08f31d6/jena-arq/src/main/java/org/apache/jena/riot/lang/ReaderTriX.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/lang/ReaderTriX.java b/jena-arq/src/main/java/org/apache/jena/riot/lang/ReaderTriX.java
index 208a53a..8637e35 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/lang/ReaderTriX.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/lang/ReaderTriX.java
@@ -72,8 +72,6 @@ public class ReaderTriX implements ReaderRIOT {
 <!ATTLIST typedLiteral datatype CDATA #REQUIRED> 
      */
     
-
-    
     private ErrorHandler errorHandler = ErrorHandlerFactory.getDefaultErrorHandler() ;
     private ParserProfile parserProfile = null ;
     
@@ -114,7 +112,7 @@ public class ReaderTriX implements ReaderRIOT {
         State state = OUTER ;
         Node g = null ;
         List<Node> terms = new ArrayList<>() ; 
-        
+        output.start() ;
         try { 
             while(parser.hasNext()) {
                 int event = parser.next() ;
@@ -228,6 +226,7 @@ public class ReaderTriX implements ReaderRIOT {
         } catch (XMLStreamException ex) {
             staxError(parser.getLocation(), "XML error: "+ex.getMessage()) ;
         }
+        output.finish() ;
     }
     
     private void add(Collection<Node> acc, Node node, int max, XMLStreamReader parser)
{


Mime
View raw message