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

chore: use supplied URI as IRI when adding conformsTo to RDF #197

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.3.2</version>
<version>3.3.3</version>
<relativePath/>
</parent>

Expand All @@ -29,8 +29,8 @@
<maven.exec.skip>false</maven.exec.skip>
<!--end standard properties-->

<kotlin.version>2.0.0</kotlin.version>
<testcontainers.version>1.20.0</testcontainers.version>
<kotlin.version>2.0.20</kotlin.version>
<testcontainers.version>1.20.1</testcontainers.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -88,7 +88,7 @@
<dependency>
<groupId>net.logstash.logback</groupId>
<artifactId>logstash-logback-encoder</artifactId>
<version>7.4</version>
<version>8.0</version>
</dependency>

<!-- Kotlin dependencies -->
Expand All @@ -112,7 +112,7 @@
<dependency>
<groupId>org.eclipse.parsson</groupId>
<artifactId>jakarta.json</artifactId>
<version>1.1.6</version>
<version>1.1.7</version>
</dependency>

<!-- TEST -->
Expand Down Expand Up @@ -142,7 +142,7 @@
<dependency>
<groupId>org.wiremock</groupId>
<artifactId>wiremock-standalone</artifactId>
<version>3.9.0</version>
<version>3.9.1</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -282,7 +282,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.3.1</version>
<version>3.4.0</version>
<configuration>
<useSystemClassLoader>false</useSystemClassLoader>
<argLine>${surefire.jacoco.args}</argLine>
Expand All @@ -296,7 +296,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.3.1</version>
<version>3.4.0</version>
<configuration>
<argLine>${failsafe.jacoco.args}</argLine>
<groups>contract</groups>
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/no/fdk/dataset_catalog/rdf/RDFUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ fun Resource.addConformsTo(conformsTo: Collection<SkosConcept>?): Resource {
conformsTo?.forEach {
if (!it.uri.isNullOrEmpty()) {
addProperty(DCTerms.conformsTo,
model.safeCreateResource()
model.safeCreateResource(it.uri)
NilsOveTen marked this conversation as resolved.
Show resolved Hide resolved
.addProperty(RDF.type, DCTerms.Standard)
.safeAddLinkedProperty(RDFS.seeAlso, it.uri)
.safeAddLiteralByLang(DCTerms.title, it.prefLabel)
Expand Down
29 changes: 17 additions & 12 deletions src/test/resources/catalog_2.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,19 @@
<http://localhost:5050/catalogs/987654321/datasets/72a54592-692c-4cfa-a938-cd1a56a2ed8d/distributions/d1>
a dcat:Distribution ;
dcat:accessService <http://www.hjem.no/> ;
dct:conformsTo [ a dct:Standard ;
rdfs:seeAlso <https://www.kartverket.no/geodataarbeid/standarder/sosi/> ;
dct:title "SOSI"@nb
] ;
dct:conformsTo <https://www.kartverket.no/geodataarbeid/standarder/sosi/> ;
dct:description "Dette er beskrivelsen av distribusjonen. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Vestibulum id ligula porta felis euismod semper con desbit arum. Se dokumentasjon for denne distribusjonen."@nb ;
dct:format <http://publications.europa.eu/resource/authority/file-type/JSON> ;
dcat:mediaType <https://www.iana.org/assignments/media-types/application/json> ;
dct:license <https://data.norge.no/nlod/no/2.0> ;
dcat:accessURL <http://www.detteerentredjelenke.no/til-en-tredje-nedlasting> , <http://www.detteerenannenlenke.no/til-en-annen-nedlasting> , <http://www.detteerenlenke.no/til-nedlasting> ;
foaf:page <http://lenke/til/mer/info> .

<https://www.kartverket.no/geodataarbeid/standarder/sosi/>
a dct:Standard ;
rdfs:seeAlso <https://www.kartverket.no/geodataarbeid/standarder/sosi/> ;
dct:title "SOSI"@nb .

<http://localhost:5050/catalogs/987654321/datasets/72a54592-692c-4cfa-a938-cd1a56a2ed8d>
a dcat:Dataset ;
dct:identifier "http://localhost:5050/catalogs/987654321/datasets/72a54592-692c-4cfa-a938-cd1a56a2ed8d" ;
Expand Down Expand Up @@ -118,14 +120,7 @@
] ;
dct:accessRights <http://publications.europa.eu/resource/authority/access-right/RESTRICTED> ;
dct:accrualPeriodicity <http://publications.europa.eu/resource/authority/frequency/ANNUAL> ;
dct:conformsTo [ a dct:Standard ;
rdfs:seeAlso <https://www.kartverket.no/geodataarbeid/standarder/sosi/> ;
dct:title "SOSI"@nb
] ,
[ a dct:Standard ;
rdfs:seeAlso <https://www.w3.org/2004/02/skos/> ;
dct:title "SKOS"@nb
] ;
dct:conformsTo <https://www.w3.org/2004/02/skos/> , <https://www.kartverket.no/geodataarbeid/standarder/sosi/> ;
dct:description "Datasettet avgrenser område for virkeområdet til lov 6. juni 2009 nr. 35 om naturområder i Oslo og nærliggende kommuner (markaloven) som trådte i kraft 1. september 2009. Markalovens virkeområde er fastsatt i forskrift 4. september 2015 nr. 1032 om justering av markagrensen fastlegger markalovens geografiske virkeområde med tilhørende kart."@nb ;
dct:issued "2012-01-01"^^xsd:date ;
dct:language <http://publications.europa.eu/resource/authority/language/ENG> , <http://publications.europa.eu/resource/authority/language/NOR> ;
Expand Down Expand Up @@ -192,6 +187,16 @@
] ;
foaf:page <http://uri1> .

<https://www.kartverket.no/geodataarbeid/standarder/sosi/>
a dct:Standard ;
rdfs:seeAlso <https://www.kartverket.no/geodataarbeid/standarder/sosi/> ;
dct:title "SOSI"@nb .

<https://www.w3.org/2004/02/skos/>
a dct:Standard ;
rdfs:seeAlso <https://www.w3.org/2004/02/skos/> ;
dct:title "SKOS"@nb .

<https://data-david.github.io/Begrep/begrep/Enhet>
a skos:Concept ;
skos:altLabel "orgnr"@no , "orgzip"@en ;
Expand Down
Loading