You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@jena.apache.org by "Andy Seaborne (Jira)" <ji...@apache.org> on 2023/05/07 16:07:00 UTC

[jira] [Comment Edited] (JENA-2353) Update outdated documentation to remove deprecated method warnings

    [ https://issues.apache.org/jira/browse/JENA-2353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17720314#comment-17720314 ] 

Andy Seaborne edited comment on JENA-2353 at 5/7/23 4:06 PM:
-------------------------------------------------------------

The "rdfxml_howto.html" page says at the top "Legacy Documentation : may not be up-to-date".

The preferred way is to use APIs for all available languages – RIOT in jena-arq (The fact the RDF/XML parser is in jena-core is a legacy situation) and use either:
 * RDFDataMgr - cover many common cases directly
 * RDFParser / RDFWriter - for detailed control over the parser or writer, especially for reading and controlling HTTP headers.

[https://jena.apache.org/documentation/io/rdf-input.html]

[https://jena.apache.org/documentation/io/rdf-output.html]

The source of the Jena website is at [https://github.com/aache/jena-site|https://github.com/apache/jena-site] and I/O documentation [https://github.com/apache/jena-site/tree/main/source/documentation/io] if you'd like to help improving it.

 


was (Author: andy.seaborne):
The "rdfxml_howto.html" page says at the top "Legacy Documentation : may not be up-to-date".

The preferred way is to use APIs for all available languages – RIOT in jena-arq (The fact the RDF/XML parser is on jena-core is a legacy situation) and use either:
 * RDFDataMgr - cover many common cases directly
 * RDFParser / RDFWriter - for detailed control over the parser, especially in regard to HTTP headers, or writer.

[https://jena.apache.org/documentation/io/rdf-input.html]

[https://jena.apache.org/documentation/io/rdf-output.html]

The source of the Jena website is at [https://github.com/aache/jena-site|https://github.com/apache/jena-site] and I/O documentation [https://github.com/apache/jena-site/tree/main/source/documentation/io] if you'd like to help improving it.

 

> Update outdated documentation to remove deprecated method warnings
> ------------------------------------------------------------------
>
>                 Key: JENA-2353
>                 URL: https://issues.apache.org/jira/browse/JENA-2353
>             Project: Apache Jena
>          Issue Type: Task
>          Components: Jena
>    Affects Versions: Jena 4.7.0, Jena 4.8.0
>         Environment: Ubuntu Linux, JDK 17, Maven
>            Reporter: Jan Hendriks
>            Priority: Major
>              Labels: documentation, easyfix
>         Attachments: JenaDeprecated.png
>
>
> The documentation on the Jena page states at several places (i.e. in the "Jena RDF/XML How-To" at [https://jena.apache.org/documentation/io/rdfxml_howto.html|https://jena.apache.org/documentation/io/rdfxml_howto.html)]) some code like
> {code:java}
> Model m = ModelFactory.createDefaultModel();
> RDFReader arp = m.getReader(); {code}
> or
> {code:java}
> Model m = ModelFactory.createDefaultModel();
> RDFReader arp = m.getReader("RDF/XML"); {code}
> However, according to the Javadoc of "Model" (see [https://jena.apache.org/documentation/javadoc/jena/org.apache.jena.core/org/apache/jena/rdf/model/Model.html#getReader()] and [https://jena.apache.org/documentation/javadoc/jena/org.apache.jena.core/org/apache/jena/rdf/model/Model.html#getReader(java.lang.String)]) these methods as well as their corresponding "getWriter()" methods are "deprecated".
> There is no documentation (neiter in the Javadoc itself nor on the website) on the proper new replacement.
> IDEs like IntelliJ complain about this deprecation (see screenshot).
> Please update the Javadoc as well as the documentation on how to properly get a Reader and Writer object, or whether to ignore the deprecation warning (i.e. because only the overwritten method in "Model" is deprecated).
>  
> h2. Reproducer
> JenaTest.java
> {code:java}
> package de.playground.jenatests;
> import org.apache.jena.rdf.model.Model;
> import org.apache.jena.rdf.model.ModelFactory;
> import org.apache.jena.rdf.model.RDFReaderI;
> public class JenaTest {
>     public static void main(String[] args) {
>         Model model = ModelFactory.createDefaultModel();
>         RDFReaderI r = model.getReader("RDF/XML");
>     }
> } {code}
> Maven pom.xml
> {code:java}
> <?xml version="1.0" encoding="UTF-8"?>
> <project xmlns="http://maven.apache.org/POM/4.0.0"
>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
>     <modelVersion>4.0.0</modelVersion>
>     <groupId>de.playground</groupId>
>     <artifactId>jena-test</artifactId>
>     <version>1.0.0</version>
>     <build>
>         <sourceDirectory>src</sourceDirectory>
>         <plugins>
>             <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-compiler-plugin</artifactId>
>                 <version>3.7.0</version>
>             </plugin>
>         </plugins>
>     </build>
>     <dependencies>
>       <dependency>
>         <groupId>org.apache.jena</groupId>
>         <artifactId>jena-core</artifactId>
>         <version>4.7.0</version>
>       </dependency>
>     </dependencies>
> </project> {code}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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