Re: Alternative to org.openjena.riot.WebContent?

2013-12-06 Thread Rob Vesse
Having contentTypeToLang() return null is the designed behaviour because its useful in a number of cases. Where ARQ and Fuseki use it internally they typically try and convert a Content-Type into a Lang, see if that returns null and if it does attempt alternative means of detecting the language e.

Re: Alternative to org.openjena.riot.WebContent?

2013-12-06 Thread Martynas Jusevičius
I tried supplying bogus Lang name to Model.read()/Model.write() and I'm getting NoReaderForLangException/NoWriterForLangException. Failing to map content type to Lang is not exactly the same situation however :) I cannot wrap the whole block in try/catch, still need to check if RDFLanguages.conten

Re: Alternative to org.openjena.riot.WebContent?

2013-12-06 Thread Andy Seaborne
On 06/12/13 12:08, Martynas Jusevičius wrote: Thanks Andy. Yes looks like I have some upgrading to do... Can you provide more info about that FileManager adapter and how it works with OntDocumentManager? AdapterFileManager extends FielManager. (But the old FileManager still works albeit old w

Re: Alternative to org.openjena.riot.WebContent?

2013-12-06 Thread Martynas Jusevičius
Thanks Andy. Yes looks like I have some upgrading to do... Can you provide more info about that FileManager adapter and how it works with OntDocumentManager? Regarding static methods, I don't have a use case at hand, I was just wondering if that's a good design decision. I'm always trying to leav

Re: Alternative to org.openjena.riot.WebContent?

2013-12-06 Thread Andy Seaborne
On 06/12/13 00:21, Martynas Jusevičius wrote: I was using SPIN API 1.3.0, I think it depends on ARQ 2.9.2. Now I switched to SPIN API 1.3.1 that depends on Jena 2.11.0. TopQuadrant only jump in large version steps so you may well find that many small steps have become one large step for you.

Re: Alternative to org.openjena.riot.WebContent?

2013-12-05 Thread Martynas Jusevičius
I was using SPIN API 1.3.0, I think it depends on ARQ 2.9.2. Now I switched to SPIN API 1.3.1 that depends on Jena 2.11.0. I found the Lang class - there seems to be some overlap in functionality as well? I also started looking at RDFDataMgr, to see wether it could replace my DataManager (FileMan

Re: Alternative to org.openjena.riot.WebContent?

2013-12-05 Thread Andy Seaborne
Which version were you using? org.apache.jena.riot.WebContent WebContent.contentTypeToLang but better: RDFLanguages.contentTypeToLang(String) and use constants not Strings. Andy On 05/12/13 22:57, Martynas Jusevičius wrote: Or rather, what functionality can replace langFromContentTy

Re: Alternative to org.openjena.riot.WebContent?

2013-12-05 Thread Martynas Jusevičius
Or rather, what functionality can replace langFromContentType() that I was using to convert media type to Jena syntax name: String syntax = langFromContentType(in.getMimeType()); model.read(in.getInput(), filenameOrURI, syntax); public static String langFromContentType(String mimeTyp

Alternative to org.openjena.riot.WebContent?

2013-12-05 Thread Martynas Jusevičius
Hey, I'm using constants from org.openjena.riot.WebContent, such as WebContent.contentTypeRDFXML, WebContent.langRDFXML etc. After upgrading to Jena 2.11.0 (as part of SPIN API 1.3.1), the WebContent class is not there anymore. What can I use instead? Thanks. Martynas