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.

    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