You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@jena.apache.org by GitBox <gi...@apache.org> on 2020/11/17 10:06:44 UTC

[GitHub] [jena] afs opened a new pull request #867: JENA-1997: Remove old Turtle/N3 writer

afs opened a new pull request #867:
URL: https://github.com/apache/jena/pull/867


   Remaining Turtle parser supports jena-core tests.
   Rename private TTL parser as org.apache.jena.ttl
   Remove deprecated RDFFactoryF methods - includes changes to ModelCom.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] afs commented on a change in pull request #867: JENA-1997: Remove old Turtle/N3 writer

Posted by GitBox <gi...@apache.org>.
afs commented on a change in pull request #867:
URL: https://github.com/apache/jena/pull/867#discussion_r525308454



##########
File path: jena-core/src/main/java/org/apache/jena/rdf/model/impl/RDFWriterFImpl.java
##########
@@ -69,63 +72,15 @@ public RDFWriter getWriter(String lang) {
         }
     }
 
-    /**
-     * Use RIOT to add custom RDF parsers. See
-     * {@code RDFWriterRegistry.registerLang}
-     * 
-     * @deprecated Register with RIOT.
-     */
-    @Override
-    @Deprecated
-    public String setWriterClassName(String lang, String className) {
-        return setBaseWriterClassName(lang, className);
-    }
-
-    /**
-     * Use RIOT to add custom RDF parsers. See
-     * {@code RDFWriterRegistry.registerLang}
-     * 
-     * @deprecated Register with RIOT.
-     */
-    @Deprecated
-    public static String setBaseWriterClassName(String lang, String className) {
-        if ( rewiredAlternative != null )
-            Log.error(RDFWriterFImpl.class, "Rewired RDFWriterFImpl2 - configuration changes have no effect on writing");
-        String oldClassName = currentEntry(lang);
-        try {
-            @SuppressWarnings("unchecked")
-            Class<? extends RDFWriter> newClass = (Class<? extends RDFWriter>)Class.forName(className, false,
-                                                                                            Thread.currentThread().getContextClassLoader());
-            custom.put(lang, newClass);
-            return oldClassName;
-        }
-        catch (ClassNotFoundException e) {
-            throw new ConfigException("Reader not found on classpath", e);
-        }
-        catch (Exception e) {
-            throw new JenaException(e);
-        }
-    }
-
-    @Override
-    public void resetRDFWriterF() {
-        reset();
-    }
-
-    @Override
-    public String removeWriter(String lang) throws IllegalArgumentException {
-        return remove(lang);
-    }
-
-    static { // static initializer - set default readers
+    static { 
         reset();
     }
 
     private static void reset() {
         Class<? extends RDFWriter> rdfxmlWriter = org.apache.jena.rdfxml.xmloutput.impl.Basic.class;
         Class<? extends RDFWriter> rdfxmlAbbrevWriter = org.apache.jena.rdfxml.xmloutput.impl.Abbreviated.class;
         Class<? extends RDFWriter> ntWriter = org.apache.jena.rdf.model.impl.NTripleWriter.class;
-        Class<? extends RDFWriter> ttlWriter = org.apache.jena.n3.N3TurtleJenaWriter.class;
+//        Class<? extends RDFWriter> ttlWriter = org.apache.jena.n3.N3TurtleJenaWriter.class;

Review comment:
       OK - my original attempt was merely comment out the wiring in of the writer leaving the code ... but turned into removal (we have git!) when I found all the "deprecated" that didn't actually do anything anymore.
   
   Thanks.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] afs commented on pull request #867: JENA-1997: Remove old Turtle/N3 writer

Posted by GitBox <gi...@apache.org>.
afs commented on pull request #867:
URL: https://github.com/apache/jena/pull/867#issuecomment-768569329


   Hi @amatiushkin - I'm curious as to what is behind your question. Does it affect you?
   
   See [JENA-1997|https://issues.apache.org/jira/browse/JENA-1997] the ticket that gives some background.
   
   To be clear: The proper writer is in jena/ARQ/RIOT.
   
   The old (jena-core) is writer isn't compliant with the RDF 1.1 Turtle space. It is not accessible unless:
   - the app uses jena-core only
   - the app reconfigures the internal RIOT wiring in unsupported ways
   
   And it isn't N3, and never was, despite its name.
   
   If you are interested in developing N3 support, Jena does have th enecessary RDF term extension `Node_Graph` for representing N3 formulae.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] amatiushkin commented on pull request #867: JENA-1997: Remove old Turtle/N3 writer

Posted by GitBox <gi...@apache.org>.
amatiushkin commented on pull request #867:
URL: https://github.com/apache/jena/pull/867#issuecomment-770312243


   @afs I was looking for API to parse input on older version 3.15-ish and then discovered this change which got me puzzled. 
   
   Now I have more context, so it is all good.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] kinow commented on pull request #867: JENA-1997: Remove old Turtle/N3 writer

Posted by GitBox <gi...@apache.org>.
kinow commented on pull request #867:
URL: https://github.com/apache/jena/pull/867#issuecomment-768543397


   @amatiushkin there's some explanation in the linked JIRA issue https://issues.apache.org/jira/browse/JENA-1997


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] afs commented on pull request #867: JENA-1997: Remove old Turtle/N3 writer

Posted by GitBox <gi...@apache.org>.
afs commented on pull request #867:
URL: https://github.com/apache/jena/pull/867#issuecomment-770353780


   `RDFDataMgr` for most tasks for read and write.
   
   Then `RDFparser` and `RDFWriter` and their builders, for detailed control and setup.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] afs edited a comment on pull request #867: JENA-1997: Remove old Turtle/N3 writer

Posted by GitBox <gi...@apache.org>.
afs edited a comment on pull request #867:
URL: https://github.com/apache/jena/pull/867#issuecomment-729691565


   The build failure is an artifact of Travis.
   It has passed (same commit) on a different Travis account.
   
   (The ASF GH/Travis integration is work-in-progress at the moment - and a lot of projects are triggering builds)
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] amatiushkin commented on pull request #867: JENA-1997: Remove old Turtle/N3 writer

Posted by GitBox <gi...@apache.org>.
amatiushkin commented on pull request #867:
URL: https://github.com/apache/jena/pull/867#issuecomment-768531179


   @afs Would you mind to share some context why this have been removed?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] afs commented on pull request #867: JENA-1997: Remove old Turtle/N3 writer

Posted by GitBox <gi...@apache.org>.
afs commented on pull request #867:
URL: https://github.com/apache/jena/pull/867#issuecomment-729691565


   The build failure is an artifact of Travis.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] afs merged pull request #867: JENA-1997: Remove old Turtle/N3 writer

Posted by GitBox <gi...@apache.org>.
afs merged pull request #867:
URL: https://github.com/apache/jena/pull/867


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] kinow commented on a change in pull request #867: JENA-1997: Remove old Turtle/N3 writer

Posted by GitBox <gi...@apache.org>.
kinow commented on a change in pull request #867:
URL: https://github.com/apache/jena/pull/867#discussion_r525049095



##########
File path: jena-core/src/main/java/org/apache/jena/rdf/model/impl/RDFWriterFImpl.java
##########
@@ -69,63 +72,15 @@ public RDFWriter getWriter(String lang) {
         }
     }
 
-    /**
-     * Use RIOT to add custom RDF parsers. See
-     * {@code RDFWriterRegistry.registerLang}
-     * 
-     * @deprecated Register with RIOT.
-     */
-    @Override
-    @Deprecated
-    public String setWriterClassName(String lang, String className) {
-        return setBaseWriterClassName(lang, className);
-    }
-
-    /**
-     * Use RIOT to add custom RDF parsers. See
-     * {@code RDFWriterRegistry.registerLang}
-     * 
-     * @deprecated Register with RIOT.
-     */
-    @Deprecated
-    public static String setBaseWriterClassName(String lang, String className) {
-        if ( rewiredAlternative != null )
-            Log.error(RDFWriterFImpl.class, "Rewired RDFWriterFImpl2 - configuration changes have no effect on writing");
-        String oldClassName = currentEntry(lang);
-        try {
-            @SuppressWarnings("unchecked")
-            Class<? extends RDFWriter> newClass = (Class<? extends RDFWriter>)Class.forName(className, false,
-                                                                                            Thread.currentThread().getContextClassLoader());
-            custom.put(lang, newClass);
-            return oldClassName;
-        }
-        catch (ClassNotFoundException e) {
-            throw new ConfigException("Reader not found on classpath", e);
-        }
-        catch (Exception e) {
-            throw new JenaException(e);
-        }
-    }
-
-    @Override
-    public void resetRDFWriterF() {
-        reset();
-    }
-
-    @Override
-    public String removeWriter(String lang) throws IllegalArgumentException {
-        return remove(lang);
-    }
-
-    static { // static initializer - set default readers
+    static { 
         reset();
     }
 
     private static void reset() {
         Class<? extends RDFWriter> rdfxmlWriter = org.apache.jena.rdfxml.xmloutput.impl.Basic.class;
         Class<? extends RDFWriter> rdfxmlAbbrevWriter = org.apache.jena.rdfxml.xmloutput.impl.Abbreviated.class;
         Class<? extends RDFWriter> ntWriter = org.apache.jena.rdf.model.impl.NTripleWriter.class;
-        Class<? extends RDFWriter> ttlWriter = org.apache.jena.n3.N3TurtleJenaWriter.class;
+//        Class<? extends RDFWriter> ttlWriter = org.apache.jena.n3.N3TurtleJenaWriter.class;

Review comment:
       Can be removed too? And commented code below as well?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org