jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r1449177 - in /jena/Experimental/riot-output/src/main/java: dev/PROJECT_RiotWriter.java riot/writer/TurtleShell.java riot/writer/WriterStreamRDFBase.java
Date Fri, 22 Feb 2013 19:26:33 GMT
Author: andy
Date: Fri Feb 22 19:26:33 2013
New Revision: 1449177

URL: http://svn.apache.org/r1449177
Log:
Cleaning up.

Modified:
    jena/Experimental/riot-output/src/main/java/dev/PROJECT_RiotWriter.java
    jena/Experimental/riot-output/src/main/java/riot/writer/TurtleShell.java
    jena/Experimental/riot-output/src/main/java/riot/writer/WriterStreamRDFBase.java

Modified: jena/Experimental/riot-output/src/main/java/dev/PROJECT_RiotWriter.java
URL: http://svn.apache.org/viewvc/jena/Experimental/riot-output/src/main/java/dev/PROJECT_RiotWriter.java?rev=1449177&r1=1449176&r2=1449177&view=diff
==============================================================================
--- jena/Experimental/riot-output/src/main/java/dev/PROJECT_RiotWriter.java (original)
+++ jena/Experimental/riot-output/src/main/java/dev/PROJECT_RiotWriter.java Fri Feb 22 19:26:33
2013
@@ -21,10 +21,11 @@ package dev;
 public class PROJECT_RiotWriter
 {
     // JSON-LD
+    
+    // ready to migrate.
 
-    // Check WriterStreamRDFBase for unused. 
-    // INDENT_MIN_S, INDENT_MAX_S mentioned in WriterStreamRDFBlocks 
-    // vs LONG_SUBJECT
+    // Check WriterStreamRDFBase for unused.
+    // Prefixes for datasetgraphs
     
     // RDFDataMgr.write(filename)
     

Modified: jena/Experimental/riot-output/src/main/java/riot/writer/TurtleShell.java
URL: http://svn.apache.org/viewvc/jena/Experimental/riot-output/src/main/java/riot/writer/TurtleShell.java?rev=1449177&r1=1449176&r2=1449177&view=diff
==============================================================================
--- jena/Experimental/riot-output/src/main/java/riot/writer/TurtleShell.java (original)
+++ jena/Experimental/riot-output/src/main/java/riot/writer/TurtleShell.java Fri Feb 22 19:26:33
2013
@@ -71,9 +71,6 @@ public abstract class TurtleShell
     // the state variables for writing a single graph. 
     private final class ShellGraph {
         // Per graph member variables.
-        // TODO (maybe) writeNodePrtty on the subject but this requires including
-        // subjects 'nestedObjects' and 'lists'
-        
         private final Graph graph ; 
         private final Set<Node> nestedObjects ;           // Blank nodes that have
one incoming triple
         private final Set<Node> freeBnodes ;              // Blank nodes subjects that
are not referenced
@@ -536,7 +533,7 @@ public abstract class TurtleShell
     // Low is outptu first.
     static Comparator<Triple> comparatorTriples = new CompareTriples() ;
     
-    static class CompareTriples implements Comparator<Triple>
+    static final class CompareTriples implements Comparator<Triple>
     {
         private static int classification(Triple triple)
         {
@@ -568,7 +565,7 @@ public abstract class TurtleShell
         }
     }
 
-    final void writeNode(Node node)
+    protected final void writeNode(Node node)
     {
         nodeFmt.format(out, node) ;
     }

Modified: jena/Experimental/riot-output/src/main/java/riot/writer/WriterStreamRDFBase.java
URL: http://svn.apache.org/viewvc/jena/Experimental/riot-output/src/main/java/riot/writer/WriterStreamRDFBase.java?rev=1449177&r1=1449176&r2=1449177&view=diff
==============================================================================
--- jena/Experimental/riot-output/src/main/java/riot/writer/WriterStreamRDFBase.java (original)
+++ jena/Experimental/riot-output/src/main/java/riot/writer/WriterStreamRDFBase.java Fri Feb
22 19:26:33 2013
@@ -74,6 +74,13 @@ public abstract class WriterStreamRDFBas
         return RiotLib.create(output) ;
     }
     
+    private void reset$() 
+    {
+        activeTripleData = false ;
+        activeQuadData = false ;
+        lastWasDirective = false ;
+    }
+
     @Override
     public final void start()
     {
@@ -103,8 +110,8 @@ public abstract class WriterStreamRDFBas
     }
 
     @Override
-    public void tuple(Tuple<Node> tuple)
-    {}
+    public final void tuple(Tuple<Node> tuple)
+    { throw new UnsupportedOperationException("Tuple<Node>") ; } 
 
     @Override
     public final void base(String base)
@@ -124,33 +131,23 @@ public abstract class WriterStreamRDFBas
         pMap.add(prefix, iri) ;
     }
 
-    protected abstract void startData() ;
-    protected abstract void endData() ;
-
     protected void outputNode(Node n)
     {
         fmt.format(out, n) ;
     }
+
+    // Subclass contract
     
-    private void reset$() 
-    {
-        activeTripleData = false ;
-        activeQuadData = false ;
-        lastWasDirective = false ;
-    }
-    
+    protected abstract void startData() ;
+
+    protected abstract void endData() ;
+
+    protected abstract void print(Quad quad) ;
+
+    protected abstract void print(Triple triple) ;
+
     protected abstract void reset() ;
 
-//    protected void printPre()
-//    {
-//        // Directive -> data transition.
-//        if ( lastWasDirective )
-//        {
-//            reset$() ;
-//            out.print('\n') ;
-//        }
-//    }
-    
     protected void DEBUG(String fmt, Object...args)
     {
         int loc = out.getCol() ;            // Absolute
@@ -162,8 +159,4 @@ public abstract class WriterStreamRDFBas
         out.ensureStartOfLine();
         out.pad(loc, true) ;
     }
-    
-    protected abstract void print(Quad quad) ;
-    
-    protected abstract void print(Triple triple) ;
 }



Mime
View raw message