Closed cboettig closed 7 years ago
Looks like the trick is simply to make sure the name and mimeType match the names and q 1.0
mimeTypes listed here: http://librdf.org/raptor/api/raptor-formats-types-by-parser.html. e.g. for nquads:
test <- new("Parser", world, name="nquads", mimeType="text/x-nquads")
Is it possible to parse other serialization formats? I see the arguments for initializing a new parser include options to specify the "parser factory"
name
andmimeType
, but can't find a list of supported formats in the package docs or at http://librdf.org/docs/api/redland-parser.html . Probably just missing something obvious. Anyway, I tried:but no go. More generally, if other serializations are supported, I assume that it would be possible to use
redland
to convert between them? Or is there an easier / alternate way to do that in R? Thanks!(Context: the
jsonld
R wrapper hasjsonld_to_rdf
which defaults tonquads
and I can't figure out how to get it to do other formats either, though I try specifyingoptions=list(format="application/rdf+xml"
...).