File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
src/main/java/edu/kit/scc/dem/wapsrv/service Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 77import java .util .Calendar ;
88import java .util .List ;
99import java .util .Map ;
10- import org .apache .commons .rdf .api .BlankNodeOrIRI ;
11- import org .apache .commons .rdf .api .Dataset ;
12- import org .apache .commons .rdf .api .Graph ;
13- import org .apache .commons .rdf .api .Literal ;
10+ import org .apache .commons .rdf .api .*;
1411import org .apache .commons .rdf .simple .Types ;
1512import org .slf4j .Logger ;
1613import org .slf4j .LoggerFactory ;
@@ -452,6 +449,14 @@ public boolean isIriDeleted(String iri) {
452449 repository .readRdfTransaction (ds -> {
453450 Graph graph = ds .getGraph (node ).get ();
454451 result [0 ] = graph .contains (node , WapVocab .deleted , null );
452+ if (result [0 ]) {
453+ Triple deletedTriple = graph .stream (node , WapVocab .deleted , null ).findFirst ().orElseThrow ();
454+ Literal falseLiteral = repository .getRdf ().createLiteral ("false" , Types .XSD_BOOLEAN );
455+ if (deletedTriple .getObject ().equals (falseLiteral )) {
456+ //deleted flag is present but value is set to false
457+ result [0 ] = false ;
458+ }
459+ }
455460 });
456461 log .info ("check deleted result for: '" + iri + "' is: '" + result [0 ] + "'" );
457462 return result [0 ];
You can’t perform that action at this time.
0 commit comments