jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r1621853 - in /jena/trunk/jena-arq/src: main/java/org/apache/jena/riot/ main/java/org/apache/jena/riot/system/ test/java/org/apache/jena/riot/thrift/
Date Mon, 01 Sep 2014 17:21:05 GMT
Author: andy
Date: Mon Sep  1 17:21:04 2014
New Revision: 1621853

URL: http://svn.apache.org/r1621853
Log:
Regularize naming.

Modified:
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/Lang.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/RDFFormat.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/RDFLanguages.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/RDFParserRegistry.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/RDFWriterRegistry.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/system/StreamRDFWriter.java
    jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/thrift/TestStreamRDFThrift.java

Modified: jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/Lang.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/Lang.java?rev=1621853&r1=1621852&r2=1621853&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/Lang.java (original)
+++ jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/Lang.java Mon Sep  1 17:21:04 2014
@@ -79,7 +79,7 @@ public class Lang 
     public static Lang NQ ;
 
     //** The RDF syntax "RDF Thrift" : see http://jena.apache.org/documentation/io */ 
-    public static Lang THRIFT ;
+    public static Lang RDFTHRIFT ;
 
     /** "CSV" - CSV data read into an RDF model with simple conversion : See Jena-625 */
     public static Lang CSV ;

Modified: jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/RDFFormat.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/RDFFormat.java?rev=1621853&r1=1621852&r2=1621853&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/RDFFormat.java (original)
+++ jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/RDFFormat.java Mon Sep  1 17:21:04
2014
@@ -37,7 +37,9 @@ public class RDFFormat {
     public static RDFFormatVariant ASCII          = new RDFFormatVariant("ascii") ;
     /** Use UTF-8 output (N-triples, N-Quads) */
     public static RDFFormatVariant UTF8           = new RDFFormatVariant("utf-8") ;
-
+    /** Variant for RDF Thrift using values */
+    public static final RDFFormatVariant ValueEncoding = new RDFFormatVariant("Value") ;
+    
     public static RDFFormat        TURTLE_PRETTY  = new RDFFormat(Lang.TURTLE, PRETTY) ;
     public static RDFFormat        TURTLE         = TURTLE_PRETTY ;
     public static RDFFormat        TTL            = TURTLE_PRETTY ;
@@ -74,13 +76,9 @@ public class RDFFormat {
     public static RDFFormat        RDFXML_PLAIN   = new RDFFormat(Lang.RDFXML, PLAIN) ;
 
     public static RDFFormat        RDFJSON        = new RDFFormat(Lang.RDFJSON) ;
-    
-    
-    /** Variant for Thrift using values */
-    public static final RDFFormatVariant ValueEncoding = new RDFFormatVariant("Value") ;
-    
+
     /**
-     * RDF Thrift output. This format is failful representation of RDF writtern
+     * RDF Thrift output. This format is faithful representation of RDF writtern
      * and it is suitable for database dumps. It does not encode numeric
      * literals as values (see {@linkplain #RDF_THRIFT_VALUES}).
      *

Modified: jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/RDFLanguages.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/RDFLanguages.java?rev=1621853&r1=1621852&r2=1621853&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/RDFLanguages.java (original)
+++ jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/RDFLanguages.java Mon Sep  1 17:21:04
2014
@@ -173,7 +173,7 @@ public class RDFLanguages
         Lang.NQUADS     = RDFLanguages.NQUADS ;
         Lang.NQ         = RDFLanguages.NQ ;
         Lang.TRIG       = RDFLanguages.TRIG ;
-        Lang.THRIFT     = RDFLanguages.THRIFT ;
+        Lang.RDFTHRIFT     = RDFLanguages.THRIFT ;
         Lang.CSV        = RDFLanguages.CSV ;
         Lang.RDFNULL    = RDFLanguages.RDFNULL ;
     }

Modified: jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/RDFParserRegistry.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/RDFParserRegistry.java?rev=1621853&r1=1621852&r2=1621853&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/RDFParserRegistry.java (original)
+++ jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/RDFParserRegistry.java Mon Sep
 1 17:21:04 2014
@@ -102,10 +102,6 @@ public class RDFParserRegistry
         registerLangQuads(NQUADS,       parserFactory) ;
         registerLangQuads(TRIG,         parserFactory) ;
         registerLangQuads(THRIFT,       parserFactoryThrift) ;
-        
-        
-
-        //registerLangQuads(THRIFT,        parserFactoryThrift) ;
     }
 
     /** Register a language and it's parser factory.
@@ -210,16 +206,14 @@ public class RDFParserRegistry
             return new JsonLDReader() ;
         }
     }
-    // ---- reader 
-    // to StreamRDF
+ 
     private static class ReaderRIOTFactoryThrift implements ReaderRIOTFactory {
         @Override
         public ReaderRIOT create(Lang language) {
-            return new ReaderRIOT_RDFBin() ;
+            return new ReaderRDFThrift() ;
         }}
     
-    // XXX Where? ==> lang
-    private static class ReaderRIOT_RDFBin implements ReaderRIOT {
+    private static class ReaderRDFThrift implements ReaderRIOT {
         @Override
         public void read(InputStream in, String baseURI, ContentType ct, StreamRDF output,
Context context) {
             BinRDF.inputStreamToStream(in, output) ;

Modified: jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/RDFWriterRegistry.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/RDFWriterRegistry.java?rev=1621853&r1=1621852&r2=1621853&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/RDFWriterRegistry.java (original)
+++ jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/RDFWriterRegistry.java Mon Sep
 1 17:21:04 2014
@@ -142,7 +142,7 @@ public class RDFWriterRegistry
          register(Lang.TRIG,        RDFFormat.TRIG) ;
          register(Lang.NQUADS,      RDFFormat.NQUADS) ;
          register(Lang.RDFNULL,     RDFFormat.RDFNULL) ;
-         register(Lang.THRIFT,      RDFFormat.RDF_THRIFT) ;
+         register(Lang.RDFTHRIFT,      RDFFormat.RDF_THRIFT) ;
 
          // Writer factories.
          register(RDFFormat.TURTLE_PRETTY,  wgfactory) ;

Modified: jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/system/StreamRDFWriter.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/system/StreamRDFWriter.java?rev=1621853&r1=1621852&r2=1621853&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/system/StreamRDFWriter.java (original)
+++ jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/system/StreamRDFWriter.java Mon
Sep  1 17:21:04 2014
@@ -113,7 +113,7 @@ public class StreamRDFWriter {
         register(Lang.TRIG,         RDFFormat.TRIG_BLOCKS) ;
         register(Lang.NTRIPLES,     RDFFormat.NTRIPLES) ;
         register(Lang.NQUADS,       RDFFormat.NQUADS) ;
-        register(Lang.THRIFT,       RDFFormat.RDF_THRIFT) ;
+        register(Lang.RDFTHRIFT,       RDFFormat.RDF_THRIFT) ;
         
         register(RDFFormat.TURTLE_BLOCKS,   streamWriterFactoryBlocks) ;
         register(RDFFormat.TURTLE_FLAT,     streamWriterFactoryFlat) ;

Modified: jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/thrift/TestStreamRDFThrift.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/thrift/TestStreamRDFThrift.java?rev=1621853&r1=1621852&r2=1621853&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/thrift/TestStreamRDFThrift.java
(original)
+++ jena/trunk/jena-arq/src/test/java/org/apache/jena/riot/thrift/TestStreamRDFThrift.java
Mon Sep  1 17:21:04 2014
@@ -97,14 +97,14 @@ public class TestStreamRDFThrift extends
 
     @Test public void graph_02() {
         ByteArrayOutputStream out = new ByteArrayOutputStream() ;
-        StreamRDFWriter.write(out, graph, Lang.THRIFT) ;
+        StreamRDFWriter.write(out, graph, Lang.RDFTHRIFT) ;
 
         byte[] bytes = out.toByteArray() ;
         ByteArrayInputStream in = new ByteArrayInputStream(bytes) ;
         
         
         Graph g2 = GraphFactory.createGraphMem() ;
-        RDFDataMgr.read(g2, in, Lang.THRIFT) ;
+        RDFDataMgr.read(g2, in, Lang.RDFTHRIFT) ;
         boolean b = IsoMatcher.isomorphic(graph, g2) ;
         assertTrue(b) ;
         
@@ -138,7 +138,7 @@ public class TestStreamRDFThrift extends
     @Test public void dataset_02() {
         DatasetGraph dsg1 = datasetGraph ;
         ByteArrayOutputStream out = new ByteArrayOutputStream() ;
-        StreamRDFWriter.write(out, dsg1, Lang.THRIFT) ;
+        StreamRDFWriter.write(out, dsg1, Lang.RDFTHRIFT) ;
         
         byte[] bytes = out.toByteArray() ;
         ByteArrayInputStream in = new ByteArrayInputStream(bytes) ;



Mime
View raw message