Re: Replacement for CSVInput and TSVInput?
Thanks. On Mon, Dec 12, 2022 at 7:55 PM Andy Seaborne wrote: > > ResultsSetMgr which uses ResultsReader > > > On 12/12/2022 15:45, Martynas Jusevičius wrote: > > Hi, > > > > I'm upgrading Jena 4.5.0 to 4.6.1. > > > > I can see that org.apache.jena.sparql.resultset.CSVInput is gone and > > org.apache.jena.sparql.resultset.TSVInput is deprecated. > > > > What are the replacements for them? > > > > My code was the following: > > > > if > > (mediaType.isCompatible(com.atomgraph.core.MediaType.APPLICATION_SPARQL_RESULTS_XML_TYPE)) > > return > > ResultSetFactory.makeRewindable(ResultSetFactory.fromXML(in)); > > if > > (mediaType.isCompatible(com.atomgraph.core.MediaType.APPLICATION_SPARQL_RESULTS_JSON_TYPE)) > > return > > ResultSetFactory.makeRewindable(ResultSetFactory.fromJSON(in)); > > if > > (mediaType.isCompatible(com.atomgraph.core.MediaType.APPLICATION_SPARQL_RESULTS_CSV_TYPE)) > > return ResultSetFactory.makeRewindable(CSVInput.fromCSV(in)); > > if > > (mediaType.isCompatible(com.atomgraph.core.MediaType.APPLICATION_SPARQL_RESULTS_CSV_TYPE)) > > return ResultSetFactory.makeRewindable(TSVInput.fromTSV(in)); > > > > Thanks. > > > > Martynas > > atomgraph.com
Re: Replacement for CSVInput and TSVInput?
ResultsSetMgr which uses ResultsReader On 12/12/2022 15:45, Martynas Jusevičius wrote: Hi, I'm upgrading Jena 4.5.0 to 4.6.1. I can see that org.apache.jena.sparql.resultset.CSVInput is gone and org.apache.jena.sparql.resultset.TSVInput is deprecated. What are the replacements for them? My code was the following: if (mediaType.isCompatible(com.atomgraph.core.MediaType.APPLICATION_SPARQL_RESULTS_XML_TYPE)) return ResultSetFactory.makeRewindable(ResultSetFactory.fromXML(in)); if (mediaType.isCompatible(com.atomgraph.core.MediaType.APPLICATION_SPARQL_RESULTS_JSON_TYPE)) return ResultSetFactory.makeRewindable(ResultSetFactory.fromJSON(in)); if (mediaType.isCompatible(com.atomgraph.core.MediaType.APPLICATION_SPARQL_RESULTS_CSV_TYPE)) return ResultSetFactory.makeRewindable(CSVInput.fromCSV(in)); if (mediaType.isCompatible(com.atomgraph.core.MediaType.APPLICATION_SPARQL_RESULTS_CSV_TYPE)) return ResultSetFactory.makeRewindable(TSVInput.fromTSV(in)); Thanks. Martynas atomgraph.com
Replacement for CSVInput and TSVInput?
Hi, I'm upgrading Jena 4.5.0 to 4.6.1. I can see that org.apache.jena.sparql.resultset.CSVInput is gone and org.apache.jena.sparql.resultset.TSVInput is deprecated. What are the replacements for them? My code was the following: if (mediaType.isCompatible(com.atomgraph.core.MediaType.APPLICATION_SPARQL_RESULTS_XML_TYPE)) return ResultSetFactory.makeRewindable(ResultSetFactory.fromXML(in)); if (mediaType.isCompatible(com.atomgraph.core.MediaType.APPLICATION_SPARQL_RESULTS_JSON_TYPE)) return ResultSetFactory.makeRewindable(ResultSetFactory.fromJSON(in)); if (mediaType.isCompatible(com.atomgraph.core.MediaType.APPLICATION_SPARQL_RESULTS_CSV_TYPE)) return ResultSetFactory.makeRewindable(CSVInput.fromCSV(in)); if (mediaType.isCompatible(com.atomgraph.core.MediaType.APPLICATION_SPARQL_RESULTS_CSV_TYPE)) return ResultSetFactory.makeRewindable(TSVInput.fromTSV(in)); Thanks. Martynas atomgraph.com