Nicolas Rouquette
Nicolas Rouquette

Reputation: 458

Which RDF formats does GraphDB supports for preserving target graphs?

The GraphDB import settings has an option for 'Target graphs' with 3 possible values:

There is a tooltip documentation that says:

Data is imported into one or more graphs. Some RDF formats may specify graphs, while others do not support that. The latter are treated as if they specify the default graph.

Which RDF formats does GraphDB recognizes for specifying a graph?

In particular, is Owl serialized in RDF/XML one such format?

When I import a zip file of multiple *.owl files in RDF/XML format, I get all the triples loaded into the default graph even though I chose the 'from data' import option.

Can someone explain me how to import ontologies into GraphDB with graphs from the data?

Upvotes: 0

Views: 358

Answers (1)

Radostin Nanov
Radostin Nanov

Reputation: 208

GraphDB is built on top of RDF4J and supports the same formats as it does.

.owl files do not support named graphs, unfortunately. This is by design, rather than a GraphDB-specific behaviour.

As for the formats that do support named graphs, and can be imported into RDF4J/GraphDB, here's a list:

  • TriX - XML-based RDF serialization. File extensions .xml or .trix.
  • TriG - extension on Turtle. File extension .trig.
  • TriG* - TriG with RDF-star support. File extension .trigs.
  • Binary RDF - for binary RDF documents. File extension .brf.
  • N-Quads - a line-based syntax for triples, with context support. File extension .nq.
  • JSON-LD - JSON serialization for linked data. File extension .jsonld.
  • RDF/JSON - another JSON serialization. File extension .rj.

Given that you have .owl files, which are serialized with XML, I'd suggest that the easiest thing would be to conver them to TriX and go from there.

Upvotes: 2

Related Questions