RDF and ontology mappings: Difference between revisions
Importing NeoWiki demo data |
Importing NeoWiki demo data |
||
| Line 4: | Line 4: | ||
* '''Ontology projections''' that re-express the data in an established vocabulary such as the [https://pro.europeana.eu/page/edm-documentation Europeana Data Model] (EDM). Each one is defined by a '''Mapping''' page. |
* '''Ontology projections''' that re-express the data in an established vocabulary such as the [https://pro.europeana.eu/page/edm-documentation Europeana Data Model] (EDM). Each one is defined by a '''Mapping''' page. |
||
Each export is produced on demand from the page's current data and downloads as a Turtle or TriG file. A projection can also be kept in a SPARQL store and queried live |
Each export is produced on demand from the page's current data and downloads as a Turtle or TriG file. A projection can also be kept in a SPARQL store and queried live. See [[SPARQL queries]] on wikis that have a store configured, such as the NeoWiki development stack. |
||
== The Mapping page == |
== The Mapping page == |
||
| Line 10: | Line 10: | ||
Each Mapping page targets one ontology, named by the page title, and holds an entry for every mapped Schema. [[Special:Mappings]] lists them all; this wiki ships one: |
Each Mapping page targets one ontology, named by the page title, and holds an entry for every mapped Schema. [[Special:Mappings]] lists them all; this wiki ships one: |
||
* [[Mapping:EDM]] |
* [[Mapping:EDM]]: the Person, City, Artwork and Artist Schemas, all mapped to EDM |
||
== Explore the projections == |
== Explore the projections == |
||
Follow these in order; each link downloads the projection so you can read it. |
Follow these in order; each link downloads the projection so you can read it. |
||
You don't need these links to reach an export: on any subject page, the Data tab offers per-projection downloads (Turtle or TriG) and a copy-IRI control, and the sidebar has a View RDF link. |
|||
# '''Pablo Picasso''', [{{SERVER}}{{SCRIPTPATH}}/rest.php/neowiki/v0/page/{{PAGEID:Pablo Picasso}}/rdf native] vs [{{SERVER}}{{SCRIPTPATH}}/rest.php/neowiki/v0/page/{{PAGEID:Pablo Picasso}}/rdf?projection=EDM EDM]: the native file has everything, including the two-layer "Born in" relation and the page metadata; the EDM file is an <code>edm:Agent</code> carrying only the mapped vocabulary, with the unmapped <code>Source</code> absent. |
# '''Pablo Picasso''', [{{SERVER}}{{SCRIPTPATH}}/rest.php/neowiki/v0/page/{{PAGEID:Pablo Picasso}}/rdf native] vs [{{SERVER}}{{SCRIPTPATH}}/rest.php/neowiki/v0/page/{{PAGEID:Pablo Picasso}}/rdf?projection=EDM EDM]: the native file has everything, including the two-layer "Born in" relation and the page metadata; the EDM file is an <code>edm:Agent</code> carrying only the mapped vocabulary, with the unmapped <code>Source</code> absent. |
||
# '''Málaga''', [{{SERVER}}{{SCRIPTPATH}}/rest.php/neowiki/v0/page/{{PAGEID:Málaga}}/rdf?projection=EDM EDM]: an <code>edm:Place</code> |
# '''Málaga''', [{{SERVER}}{{SCRIPTPATH}}/rest.php/neowiki/v0/page/{{PAGEID:Málaga}}/rdf?projection=EDM EDM]: an <code>edm:Place</code> with the very same entity IRI that Picasso's <code>rdaGr2:placeOfBirth</code> points at, because sibling projections share entity IRIs. |
||
# '''The Milkmaid''', [{{SERVER}}{{SCRIPTPATH}}/rest.php/neowiki/v0/page/{{PAGEID:The Milkmaid}}/rdf?projection=EDM EDM]: an <code>edm:ProvidedCHO</code> whose <code>dc:creator</code> is the IRI of [{{SERVER}}{{SCRIPTPATH}}/rest.php/neowiki/v0/page/{{PAGEID:Johannes Vermeer}}/rdf?projection=EDM Vermeer] (an <code>edm:Agent</code>) and whose <code>edm:currentLocation</code> is the Rijksmuseum. |
# '''The Milkmaid''', [{{SERVER}}{{SCRIPTPATH}}/rest.php/neowiki/v0/page/{{PAGEID:The Milkmaid}}/rdf?projection=EDM EDM]: an <code>edm:ProvidedCHO</code> whose <code>dc:creator</code> is the IRI of [{{SERVER}}{{SCRIPTPATH}}/rest.php/neowiki/v0/page/{{PAGEID:Johannes Vermeer}}/rdf?projection=EDM Vermeer] (an <code>edm:Agent</code>) and whose <code>edm:currentLocation</code> is the Rijksmuseum. |
||
# '''Johann Sebastian Bach''', [{{SERVER}}{{SCRIPTPATH}}/rest.php/neowiki/v0/page/{{PAGEID:Johann Sebastian Bach}}/rdf?projection=EDM EDM]: Bach's birth is modelled as its own Birth Subject instead of flat fields, so his <code>edm:Agent</code> projects sparse |
# '''Johann Sebastian Bach''', [{{SERVER}}{{SCRIPTPATH}}/rest.php/neowiki/v0/page/{{PAGEID:Johann Sebastian Bach}}/rdf?projection=EDM EDM]: Bach's birth is modelled as its own [[Birth of Johann Sebastian Bach|Birth Subject]] instead of flat fields, so his <code>edm:Agent</code> projects sparse. Same Person Schema as Picasso, a different modelling style. |
||
# '''ACME Inc''', [{{SERVER}}{{SCRIPTPATH}}/rest.php/neowiki/v0/page/{{PAGEID:ACME Inc}}/rdf?projection=EDM EDM]: its Company Schema has no EDM Mapping, so the EDM projection comes back empty |
# '''ACME Inc''', [{{SERVER}}{{SCRIPTPATH}}/rest.php/neowiki/v0/page/{{PAGEID:ACME Inc}}/rdf?projection=EDM EDM]: its Company Schema has no EDM Mapping, so the EDM projection comes back empty. An unmapped Schema is simply left out, so the projection stays conformant. |
||
== Learn more == |
== Learn more == |
||
* [[Special:Mappings]]: every ontology Mapping on this wiki |
|||
* [https://github.com/ProfessionalWiki/NeoWiki/blob/master/docs/rdf/rdf-export.md RDF export reference] |
* [https://github.com/ProfessionalWiki/NeoWiki/blob/master/docs/rdf/rdf-export.md RDF export reference] |
||
* [https://github.com/ProfessionalWiki/NeoWiki/blob/master/docs/rdf/ontology-mapping.md Ontology mapping reference] |
* [https://github.com/ProfessionalWiki/NeoWiki/blob/master/docs/rdf/ontology-mapping.md Ontology mapping reference] |
||
Revision as of 00:19, 24 July 2026
Every NeoWiki page's Subjects are available as RDF. The same data is offered in two ways:
- A native projection in NeoWiki's own vocabulary. Lossless, always available, no setup.
- Ontology projections that re-express the data in an established vocabulary such as the Europeana Data Model (EDM). Each one is defined by a Mapping page.
Each export is produced on demand from the page's current data and downloads as a Turtle or TriG file. A projection can also be kept in a SPARQL store and queried live. See SPARQL queries on wikis that have a store configured, such as the NeoWiki development stack.
The Mapping page
Each Mapping page targets one ontology, named by the page title, and holds an entry for every mapped Schema. Special:Mappings lists them all; this wiki ships one:
- Mapping:EDM: the Person, City, Artwork and Artist Schemas, all mapped to EDM
Explore the projections
Follow these in order; each link downloads the projection so you can read it.
You don't need these links to reach an export: on any subject page, the Data tab offers per-projection downloads (Turtle or TriG) and a copy-IRI control, and the sidebar has a View RDF link.
- Pablo Picasso, native vs EDM: the native file has everything, including the two-layer "Born in" relation and the page metadata; the EDM file is an
edm:Agentcarrying only the mapped vocabulary, with the unmappedSourceabsent. - Málaga, EDM: an
edm:Placewith the very same entity IRI that Picasso'srdaGr2:placeOfBirthpoints at, because sibling projections share entity IRIs. - The Milkmaid, EDM: an
edm:ProvidedCHOwhosedc:creatoris the IRI of Vermeer (anedm:Agent) and whoseedm:currentLocationis the Rijksmuseum. - Johann Sebastian Bach, EDM: Bach's birth is modelled as its own Birth Subject instead of flat fields, so his
edm:Agentprojects sparse. Same Person Schema as Picasso, a different modelling style. - ACME Inc, EDM: its Company Schema has no EDM Mapping, so the EDM projection comes back empty. An unmapped Schema is simply left out, so the projection stays conformant.
Learn more
- Special:Mappings: every ontology Mapping on this wiki
- RDF export reference
- Ontology mapping reference
- Person-to-EDM worked example
- Tell us what you need from RDF and ontology mapping: join the discussion.