Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix concept identifier for rdf format #185

Merged
merged 1 commit into from
Aug 18, 2022

Conversation

HassanAkbar
Copy link
Member

@HassanAkbar HassanAkbar commented Aug 18, 2022

Fix concept identifier for rdf format

Old Format

# baseURI: "/concepts/147/"
# imports: http://purl.org/dc/terms/
# imports: https://www.geolexica.org/api/rdf-profile
# imports: http://www.w3.org/2004/02/skos/core

@prefix : </concepts/147/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdf-profile: </api/rdf-profile#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

</concepts/147/>
  rdf:type owl:Ontology ;
  owl:imports dcterms: ;
  owl:imports </api/rdf-profile> ;
  owl:imports <http://www.w3.org/2004/02/skos/core> ;
.
:closure
  rdf:type skos:Concept ;
  rdf-profile:engOrigin rdf-profile:English ;
  rdf-profile:termID </api/concepts/147.ttl> ;
  rdfs:label "geospatial metadata instance" ;
  skos:notation "147" ;
  skos:definition """single and specific metadata document, typically created in conformance with a metadata standard"""@en ;
  skos:inScheme rdf-profile:GeolexicaConceptScheme ;
  skos:prefLabel "geospatial metadata instance"@en ;
  :classification "preferred" ;
.
:linked-data-api
  rdf:type dcterms:MediaTypeOrExtent ;
  skos:prefLabel "linked-data-api" ;
.

New format

# baseURI: "http://localhost:4000/concepts/"
# imports: http://purl.org/dc/terms/
# imports: https://www.geolexica.org/api/rdf-profile
# imports: http://www.w3.org/2004/02/skos/core

@base <http://localhost:4000/concepts/> .
@prefix : <http://localhost:4000/concepts/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdf-profile: </api/rdf-profile#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

<http://localhost:4000/concepts/>
  rdf:type owl:Ontology ;
  owl:imports dcterms: ;
  owl:imports </api/rdf-profile> ;
  owl:imports <http://www.w3.org/2004/02/skos/core> ;
.
<147>
  rdf:type skos:Concept ;
  rdf-profile:engOrigin rdf-profile:English ;
  rdf-profile:termID </api/concepts/147.ttl> ;
  rdfs:label "geospatial metadata instance" ;
  skos:notation "147" ;
  skos:definition """single and specific metadata document, typically created in conformance with a metadata standard"""@en ;
  skos:inScheme rdf-profile:GeolexicaConceptScheme ;
  skos:prefLabel "geospatial metadata instance"@en ;
  :classification "preferred" ;
.
:linked-data-api
  rdf:type dcterms:MediaTypeOrExtent ;
  skos:prefLabel "linked-data-api" ;
.

Turtle file output on SKOS Play

2022-08-18_14-04

closes #138

@ronaldtse
Copy link
Member

Thanks @HassanAkbar , let’s merge this first.

In the near future, we should use the rdf-ruby library to generate this content instead of using a liquid template. We used a liquid template because initially we were under a compressed deadline.

@HassanAkbar HassanAkbar merged commit 64de4f9 into main Aug 18, 2022
@HassanAkbar HassanAkbar deleted the fix_concept_identifier_for_rdf branch August 18, 2022 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix concept identifier for RDF/JSON-LD SKOS
2 participants