4.2 Models for data: triples and RDF

4.2.2 RDF serialisations

A table consisting of 3 columns (Subject, Predicate, Object) is one way to represent triples, but because RDF is not a syntax or a language, it can be written in multiple interchangeable ways, RDF serialisations. One option is RDFa in meta elements (see 4.1.2 LOD in a bibliographic context), which depends on existing HTML. Another common serialization is called Turtle. For instance, the statement "This is an inscription", using the classes and properties selected by the Epigraphy.info ontology working group using the Turtle notation, looks like this:

:NewIns a crm:E22_Human-made_Object . 

:NewIns is a made-up compact URL, where a custim namespace is defined with a blank prefix. "a" in Turtle is a notation for rdf:type (see 4.2.1 Triples). crm:E22_Human-made_Object is a class from the the CIDOC Conceptual Reference Model, picked as one of the vocabularies available which has more already defined classes for cultural heritage objects.

With the addition of all the prefixes you can create a valid Turtle statement:

@prefix crm: <http://erlangen-crm.org/current/> . 

@prefix : <http:/my.non.existing.prefix/> .

:NewIns a crm:E22_Human-made_Object .

If you paste this into a tool like EASY RDF Converter you can select another format. In RDF XML, this looks like:

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> 
 
 <rdf:Description rdf:about="http:/my.non.existing.prefix/NewIns"> 
 
 <rdf:type rdf:resource="http://erlangen-crm.org/current/E22_Human-made_Object"/> 
 
 </rdf:Description> 
 
</rdf:RDF>

In JSON-LD, another Linked Data notation for RDF, it looks like this:

[
{"@id":"http://erlangen-crm.org/current/E22_Human-made_Object"},
{"@id":"http:/my.non.existing.prefix/NewIns",
 "@type":["http://erlangen-crm.org/current/E22_Human-made_Object"]
}
]

The most applications consuming or producing RDF will offer multiple formats, like XML RDF, Turtle or JSON-LD.


References
  • Fernández, J. D., & Martínez-Prieto, M. A. (2018). RDF Serialization and Archival. In S. Sakr & A. Zomaya (Eds.), Encyclopedia of Big Data Technologies (pp. 1–11). Springer International Publishing. https://doi.org/10.1007/978-3-319-63962-8_286-1

Further reading
Resources