Skip to content

Commit

Permalink
feat: change predicat for year property
Browse files Browse the repository at this point in the history
  • Loading branch information
EmmanuelDemey committed Nov 28, 2024
1 parent feec0f6 commit 9c3b566
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ private void createRdfOperation(Operation operation, IRI serieUri, ValidationSta
RdfUtils.addTripleDateTime(operationURI, DCTERMS.MODIFIED, operation.getModified(), model, RdfUtils.operationsGraph());

if(operation.getYear() != null){
RdfUtils.addTripleInt(operationURI, INSEE.YEAR, operation.getYear().toString(), model, RdfUtils.operationsGraph());
RdfUtils.addTripleInt(operationURI, DCTERMS.TEMPORAL, operation.getYear().toString(), model, RdfUtils.operationsGraph());
}

if (serieUri != null) {
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/fr/insee/rmes/persistance/ontologies/INSEE.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ private INSEE() {
private static IRI createIRI(String suffix) {
return factory.createIRI(NAMESPACE, suffix);
}
public static final IRI YEAR = INSEE.createIRI("year");

public static final IRI LAST_CODE_URI_SEGMENT = INSEE.createIRI("lastCodeUriSegment");
public static final IRI DISSEMINATIONSTATUS = INSEE.createIRI("disseminationStatus");
public static final IRI ADDITIONALMATERIAL = INSEE.createIRI("additionalMaterial");
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/request/operations/getOperation.ftlh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ WHERE { GRAPH <${OPERATIONS_GRAPH}> {
OPTIONAL { ?operation dcterms:modified ?modified } .
OPTIONAL{ ?report rdf:type sdmx-mm:MetadataReport . ?report sdmx-mm:target ?operation BIND(STRAFTER(STR(?report),'/rapport/') AS ?idSims) . }
OPTIONAL {?operation insee:validationState ?validationState .}
OPTIONAL {?operation insee:year ?year .}
OPTIONAL {?operation dcterms:temporal ?year .}
}
LIMIT 1
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ void shouldStoreYearProperty() throws RmesException {

verify(repositoryGestion, times(1)).loadSimpleObject(eq(operationIRI), model.capture());

Assertions.assertEquals("[(http://operation/2, http://www.w3.org/1999/02/22-rdf-syntax-ns#type, http://rdf.insee.fr/def/base#StatisticalOperation, http://operations-graph/) [http://operations-graph/], (http://operation/2, http://www.w3.org/2004/02/skos/core#prefLabel, \"prefLabelLg1\"@fr, http://operations-graph/) [http://operations-graph/], (http://operation/2, http://rdf.insee.fr/def/base#validationState, \"Unpublished\", http://operations-graph/) [http://operations-graph/], (http://operation/2, http://rdf.insee.fr/def/base#year, \"2024\"^^<http://www.w3.org/2001/XMLSchema#int>, http://operations-graph/) [http://operations-graph/]]", model.getValue().toString());
Assertions.assertEquals("[(http://operation/2, http://www.w3.org/1999/02/22-rdf-syntax-ns#type, http://rdf.insee.fr/def/base#StatisticalOperation, http://operations-graph/) [http://operations-graph/], (http://operation/2, http://www.w3.org/2004/02/skos/core#prefLabel, \"prefLabelLg1\"@fr, http://operations-graph/) [http://operations-graph/], (http://operation/2, http://rdf.insee.fr/def/base#validationState, \"Unpublished\", http://operations-graph/) [http://operations-graph/], (http://operation/2, http://purl.org/dc/terms/temporal, \"2024\"^^<http://www.w3.org/2001/XMLSchema#int>, http://operations-graph/) [http://operations-graph/]]", model.getValue().toString());

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,7 @@
"2008" ;
<http://rdf.insee.fr/def/base#validationState>
"Validated" ;
<http://rdf.insee.fr/def/base#year>
<http://purl.org/dc/terms/temporal>
"2024" ;
<http://www.w3.org/2004/02/skos/core#altLabel>
"EPCV scheme 2008"@en , "EPCV 2008"@fr ;
Expand Down

0 comments on commit 9c3b566

Please sign in to comment.