Skip to content

Commit

Permalink
T18011 JenaUtils.read support jsonld
Browse files Browse the repository at this point in the history
  • Loading branch information
michielrogissart-cognizone committed Sep 6, 2023
1 parent e0700ff commit cd0509f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,10 @@ private static String getRdfSyntax(org.springframework.core.io.Resource resource
// .ttl is extension for text/turtle
return "TURTLE";
}
if("jsonld".equals(extension)) {
// .jsonld is extension for application/ld+json
return "JSONLD";
}

// any other extension falls back to RDF XML
return null;
Expand Down
5 changes: 5 additions & 0 deletions cogni-sem/src/main/java/zone/cogni/sem/jena/JenaUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
import java.util.function.Supplier;
import java.util.stream.Collectors;

@Deprecated
public class JenaUtils {
private static final Logger log = LoggerFactory.getLogger(JenaUtils.class);

Expand Down Expand Up @@ -272,6 +273,10 @@ private static String getRdfSyntax(Resource resource) {
// .ttl is extension for text/turtle
return "TURTLE";
}
if("jsonld".equals(extension)) {
// .jsonld is extension for application/ld+json
return "JSONLD";
}

// any other extension falls back to RDF XML
return null;
Expand Down

0 comments on commit cd0509f

Please sign in to comment.