[
https://issues.apache.org/jira/browse/JENA-1876?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17072567#comment-17072567
]
Andy Seaborne edited comment on JENA-1876 at 4/1/20, 9:24 AM:
--------------------------------------------------------------
This is
https://stackoverflow.com/questions/60948678/using-jena-to-parse-json-ld-file-i-am-not-seeing-the-rdfscontainer-informatio
This is a question you may get on better emailing [email protected] . See
https://jena.apache.org/help_and_support/index.html for subscribing.
You'll need to show the JSON-LD in full for it to make sense.
rdfs:Container (NB capital "C") is the superclass of rdf:Bag, rdf:Seq, rdf:Alt.
Applications get a bag by using {{Resource.as(Bag.class)}}.
The RDF must have the right triples e.g. a bag member is using property
{{rdf:_1}] etc.
was (Author: andy.seaborne):
This is
https://stackoverflow.com/questions/60948678/using-jena-to-parse-json-ld-file-i-am-not-seeing-the-rdfscontainer-informatio?noredirect=1#comment107849155_60948678
This is a question you may get on better emailing [email protected] . See
https://jena.apache.org/help_and_support/index.html for subscribing.
You'll need to show the JSON-LD in full for it to make sense.
rdfs:Container (NB capital "C") is the superclass of rdf:Bag, rdf:Seq, rdf:Alt.
Applications get a bag by using {{Resource.as(Bag.class)}}.
The RDF must have the right triples e.g. a bag member is using property
{{rdf:_1}] etc.
> 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)