You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by rv...@apache.org on 2015/01/14 11:32:13 UTC

[71/93] [abbrv] jena git commit: Fix RIOT initialization.

Fix RIOT initialization.

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

Branch: refs/heads/hadoop-rdf
Commit: 6a121cab4b8464453da71943a6539889849cdb0e
Parents: 10296ff
Author: Andy Seaborne <an...@apache.org>
Authored: Wed Jan 7 10:17:44 2015 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Wed Jan 7 10:17:44 2015 +0000

----------------------------------------------------------------------
 jena-core/src/main/java/jena/rdfcat.java | 61 ++++++++-------------------
 1 file changed, 17 insertions(+), 44 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/6a121cab/jena-core/src/main/java/jena/rdfcat.java
----------------------------------------------------------------------
diff --git a/jena-core/src/main/java/jena/rdfcat.java b/jena-core/src/main/java/jena/rdfcat.java
index 8b94f80..13d257f 100644
--- a/jena-core/src/main/java/jena/rdfcat.java
+++ b/jena-core/src/main/java/jena/rdfcat.java
@@ -24,24 +24,25 @@ package jena;
 // Imports
 ///////////////
 
-import static jena.cmdline.CmdLineUtils.setLog4jConfiguration;
+import static jena.cmdline.CmdLineUtils.setLog4jConfiguration ;
 
-import java.io.OutputStream;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.*;
+import java.io.OutputStream ;
+import java.util.* ;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import jena.cmdline.ArgDecl ;
+import jena.cmdline.ArgHandler ;
+import jena.cmdline.CommandLine ;
+import org.slf4j.Logger ;
+import org.slf4j.LoggerFactory ;
 
-import com.hp.hpl.jena.rdf.model.*;
-import com.hp.hpl.jena.rdf.model.impl.RDFWriterFImpl;
-import com.hp.hpl.jena.shared.NoWriterForLangException;
-import com.hp.hpl.jena.util.FileManager;
-import com.hp.hpl.jena.util.FileUtils;
-import com.hp.hpl.jena.vocabulary.*;
-
-import jena.cmdline.*;
+import com.hp.hpl.jena.rdf.model.* ;
+import com.hp.hpl.jena.rdf.model.impl.IO_Ctl ;
+import com.hp.hpl.jena.rdf.model.impl.RDFWriterFImpl ;
+import com.hp.hpl.jena.shared.NoWriterForLangException ;
+import com.hp.hpl.jena.util.FileManager ;
+import com.hp.hpl.jena.util.FileUtils ;
+import com.hp.hpl.jena.vocabulary.OWL ;
+import com.hp.hpl.jena.vocabulary.RDFS ;
 
 
 /**
@@ -445,35 +446,7 @@ public class rdfcat
      * Enable the new RIOT parser subsystem if it is available
      */
     private void enableRIOTParser() {
-        try {
-            Class<?> sysRIOT = Class.forName( "org.openjena.riot.SysRIOT" );
-            Method initMethod = sysRIOT.getMethod( "init" );
-            initMethod.invoke( null );
-        }
-        catch (ClassNotFoundException e) {
-            // log if we're in debug mode, but otherwise ignore
-//            log.debug( "Did not initialise RIOT parser: " +  e.getMessage(), e );
-        }
-        catch (SecurityException e) {
-            // log if we're in debug mode, but otherwise ignore
-            log.debug( "Did not initialise RIOT parser: " +  e.getMessage(), e );
-        }
-        catch (NoSuchMethodException e) {
-            // log if we're in debug mode, but otherwise ignore
-            log.debug( "Did not initialise RIOT parser: " +  e.getMessage(), e );
-        }
-        catch (IllegalArgumentException e) {
-            // log if we're in debug mode, but otherwise ignore
-            log.debug( "Did not initialise RIOT parser: " +  e.getMessage(), e );
-        }
-        catch (IllegalAccessException e) {
-            // log if we're in debug mode, but otherwise ignore
-            log.debug( "Did not initialise RIOT parser: " +  e.getMessage(), e );
-        }
-        catch (InvocationTargetException e) {
-            // log if we're in debug mode, but otherwise ignore
-            log.debug( "Did not initialise RIOT parser: " +  e.getMessage(), e );
-        }
+        IO_Ctl.init(); 
     }
 
     //==============================================================================