[
https://issues.apache.org/jira/browse/JENA-1876?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
David closed JENA-1876.
-----------------------
Resolution: Not A Problem
I am seeing the [http://www.w3.org/2000/01/rdf-schema#container] come through
as a String as the object of the triple for type predicates. Closing the issue
> Parsing json-ld in Jena and type : rdfs:container does not come through as a
> statement
> ----------------------------------------------------------------------------------------
>
> Key: JENA-1876
> URL: https://issues.apache.org/jira/browse/JENA-1876
> Project: Apache Jena
> Issue Type: Bug
> Components: Base
> Reporter: David
> Priority: Major
>
> I have a jsonld file that I am parsing using Jena. The file has @type @id
> "rdfs:label" and "rdfs:comment" and also ranges and domains. I have a test
> java program like this
> {noformat}
> Model m = ModelFactory.createDefaultModel();
> Reader fileReader = new FileReader(fileName);
> Model model = m.read(fileReader, null, "JSON-LD");
> StmtIterator it = model.listStatements();
> Set<String> set = new HashSet<>();
> System.out.println("Labels");
> while (it.hasNext()) {
> Statement statement = it.next();
> {noformat}
> .... It seems to pick up all the content but does not see the @type
> statements with rdfs:container. How do I pick up these statements using this
> parser?
> A fragment of the json-ld is \{ "@id": "aaa:bbb", "@type": [ "rdfs:container"
> ], "rdfs:label": { "@language": "en", "@value": "cccc" }, "rdfs:comment": \{
> "@language": "en", "@value": "dddd." }, "rdfs:member": [ \{ "@id":
> "aaaa:eeee" }, \{ "@id": "aaaa:fffff" } ],
> When the type is rdfs:class - I get a statement coming through with predicate
> "type" and the object as the RDFClass, but when the type is rdfs:container -
> as in the above example I do not get a statement through. I was expecting a
> statement to come through with the predicate of "type" and a subject with
> localName of bbb and an object specifying the container class. I do not see
> such a statement. How to I detect in the parser that the presence of the
> rdfs:container? The presence of the container tag is very meaningful for our
> parser. We are looking at alternative ways of representing this sort of
> information in the model because of this issue.
> I notice Jena has the concept of Container :
> [https://jena.apache.org/documentation/javadoc/jena/org/apache/jena/rdf/model/Container.html].
> I can see write orientated methods that refer to this.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)