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 (FileManager subclass) to do content negotiation and
stuff. FileManager did a poor job at conneg, that's true, but I think
RDFDataMgr is not a great solution either:
- RDFDataMgr is not a subclass of FileManager, so it cannot be used
with OntDocumentManager?
- why static methods? Cannot override :(
- is it possible to specify qualified media types for content
negotiation? I mean different "q" values for different media types in
the "Accept" header. I have an example that does that (which I'm now
upgrading to Jena's new classes):
https://github.com/Graphity/graphity-browser/blob/master/src/main/java/org/graphity/client/locator/LocatorLinkedData.java
- was a separate class necessary at all, if conneg can be handled by a
Locator, as the example above shows?

The JavaDoc states that "RDFDataMgr superceeds the FileManager" - but
it doesn't look like it can be simply used as a replacement?
http://jena.apache.org/documentation/io/rdf-input.html#example-2-using-the-rdfdatamgr

Martynas

On Fri, Dec 6, 2013 at 1:01 AM, Andy Seaborne <[email protected]> wrote:
> 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 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 mimeType)
>>      {
>>          if ( mimeType == null )
>>              return null ;
>>          return LANGS.get(mimeType.toLowerCase()) ;
>>      }
>>
>>     public static final Map<String, String> LANGS = new HashMap<>() ;
>>      static
>>      {
>>          LANGS.put(WebContent.contentTypeRDFXML, WebContent.langRDFXML);
>> LANGS.put(WebContent.contentTypeTurtle, WebContent.langTurtle);
>>        // snip
>>      }
>>
>>
>> Martynas
>>
>> On Thu, Dec 5, 2013 at 11:45 PM, Martynas Jusevičius
>> <[email protected]> wrote:
>>>
>>> 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
>
>

Reply via email to