Andy, is that correct?

On Tue, May 17, 2022 at 1:33 PM Martynas Jusevičius
<marty...@atomgraph.com> wrote:
>
> On Tue, May 17, 2022 at 1:19 PM Andy Seaborne <a...@apache.org> wrote:
> >
> > RDFLanguages is a general registry of names (Lang's) in the system.
> >
> > It is not for functionality.
> >
> > RDFParserRegistry
> > RDFWriterRegistry
> > RowSetReaderRegistry, ResultSetReaderRegistry
> > RowSetWriterRegistry, ResultSetWriterRegistry
> > StreamRDFWriter
> >
> > A Lang needs looking up in a registry to see if there is support for it.
>
> Thanks, I didn't know these existed.
>
> But there are no RDFParserRegistry::getRegistered or
> ResultSetReaderRegistry::getRegistered methods?
>
> So do I still need to iterate RDFLanguages::getRegistered and check
> each Lang against
> RDFParserRegistry::isRegistered/ResultSetReaderRegistry::isRegistered?
>
> >
> >      Andy
> >
> > On 17/05/2022 09:54, Martynas Jusevičius wrote:
> > > Hi,
> > >
> > > After upgrading from 4.3.2 to 4.5.0, some of our RDF writing code
> > > started failing.
> > >
> > > It seems that this is due to RDFLanguages.isTriples(Lang.SHACLC)
> > > returning true, which messes up our content negotiation as it attempts
> > > to write Models as SHACLC. Can this be rectified?
> > >
> > > The RDFLanguages registry is a bit of an oxymoron in general. Right
> > > now it's a bag of all sorts of syntaxes Jena supports, half of which
> > > are not even "RDF languages". We need to iterate and filter the
> > > languages just to know which ones can be used to read/write Models,
> > > which can be used for ResultSets etc.:
> > > https://github.com/AtomGraph/Core/blob/master/src/main/java/com/atomgraph/core/MediaTypes.java#L86
> > > Wouldn't it make sense to have separate registries depending on the
> > > entity types they apply to?
> > >
> > > Thanks.
> > >
> > > Martynas

Reply via email to