A list for the developers of CellML tools

Text archives Help


[cellml-dev] RDF libraries in CDA


Chronological Thread 
  • From: j.marsh at auckland.ac.nz (Justin Marsh)
  • Subject: [cellml-dev] RDF libraries in CDA
  • Date: Wed, 09 Sep 2009 10:09:58 +1200

Hi Morgan,

We are looking into what libSBML provides with regards to annotation
services; it would help if we knew exactly what of this functionality
you are interested in. At the moment, my assumption is that you are
interested in extracting, editing and inserting controlled vocabulary
terms that reference specific elements, from those elements, with a
possible specialisation of interface for a few common usages, such as
model revision history and authorship.

However, providing a bridge between the RDF service in the CDA and some
other RDF library which can process SPARQL queries, for instance, may be
of more interest to you.

Best Regards,
Justin.

Morgan Taschuk wrote:
> Hi,
>
>> Personally, I prefer to use a more feature rich RDF library and use
>> SPARQL queries to find items of interest. Although I believe the
>> intention with the RDF service in the CDA is to provide wrappers for
>> the types of functionality typically required with CellML models -
>> which should include MIRIAM style annotations. Not sure when that will
>> happen though, I suspect it is currently quite high on the priority
>> list for the CDA developers.
>
> I'm not very familiar with RDF/XML, so I'd prefer not to have to learn an
> RDF library well enough to implement it for CellML annotation, especially
> if I will just be duplicating efforts with the CDA developers team.
> Unfortunately, we will have to wait to implement CellML support in Saint
> until the CDA supports the programmatic addition of annotation, for
> instance in a manner similar to libSBML.
>
> Sincerely,
> Morgan Taschuk
>
>
> ________________________________________
> From: cellml-tools-developers-bounces at cellml.org
> [cellml-tools-developers-bounces at cellml.org] On Behalf Of David
> Nickerson [david.nickerson at gmail.com]
> Sent: 10 August 2009 10:54
> To: A list for the developers of CellML tools
> Subject: Re: [cellml-dev] RDF libraries in CDA
> Hi Morgan,
>> However, I believe my first issue is still valid. Is the hierarchy of the
>> RDF somehow preserved by the parser? All of the child nodes seem to look
>> to the same BlankNode regardless of their hierarchical depth. Is it
>> implicit by the ordering that if a BlankNode has a Bag, the following URIs
>> are contained within the bag? I'm concerned primarily because I need to be
>> able to programmatically write the RDF.
>>
> I'm wondering if maybe you are maybe confusing RDF/XML serialization
> with the RDF triples provided by the RDF service of the CDA. For
> example, if you read a model into OpenCell and then write it out, I
> think all the metadata is serialized back into RDF/XML reflecting all
> the blank nodes explicitly rather than the hierarchical RDF/XML
> typically written by hand (i.e., the examples Matt sent through the
> other day).
> I can't recall the details, but I think for rdf:Bag's you need to
> navigate through the rdf:li blank nodes to find the objects contained
> in the bag. Then for rdf:Collection's you need to use the rdf:first
> and rdf:rest properties to navigate through the members of the
> collection (until you hit the rdf:nil). Its quite different to
> navigating through an XML DOM.
> Personally, I prefer to use a more feature rich RDF library and use
> SPARQL queries to find items of interest. Although I believe the
> intention with the RDF service in the CDA is to provide wrappers for
> the types of functionality typically required with CellML models -
> which should include MIRIAM style annotations. Not sure when that will
> happen though, I suspect it is currently quite high on the priority
> list for the CDA developers.
>
> Cheers,
> Andre.
> _______________________________________________
> cellml-tools-developers mailing list
> cellml-tools-developers at cellml.org
> http://www.cellml.org/mailman/listinfo/cellml-tools-developers________________________________________
> From: cellml-tools-developers-bounces at cellml.org
> [cellml-tools-developers-bounces at cellml.org] On Behalf Of Andrew Miller
> [ak.miller at auckland.ac.nz]
> Sent: 07 August 2009 20:51
> To: A list for the developers of CellML tools
> Subject: Re: [cellml-dev] RDF libraries in CDA
> Morgan Taschuk wrote:
>> Hi everyone,
>>
>> Sorry for the second email, but I tweaked my code and now I have
>> different output.
>>
>> For issue 1 re: depth of RDF parsing, I tweaked things so that the
>> objects were no longer null, but BlankNodes for some reason.
>>
>> The RDF is still as follows.
>>
>> <rdf:Description rdf:about="#_cyclin">
>> <rdfs:label>cyclin</rdfs:label>
>> <bqbiol:isVersionOf>
>> <rdf:Bag>
>> <rdf:li rdf:resource="urn:miriam:interpro:IPR006670"/>
>> </rdf:Bag>
>> </bqbiol:isVersionOf>
>> </rdf:Description>
>>
>> But now I realize that the triples actually look like this:
>>
>> Triple
>> subject #_cyclin
>> predicate http://www.w3.org/TR/1999/PR-rdf-schema-19990303#label
>> object PlainLiteral:en cyclin
>>
>> Triple
>> subject #_cyclin
>> predicate http://biomodels.net/biology-qualifiers/isVersionOf
>> object Blank Node
>>
>> Triple
>> subject Blank Node+
>> predicate http://www.w3.org/1999/02/22-rdf-syntax-ns#type
>> object http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag
>>
>> Triple
>> subject Blank Node+
>> predicate http://www.w3.org/1999/02/22-rdf-syntax-ns#_1
>> object urn:miriam:interpro:IPR006670
>>
>> Triple
>> subject Blank Node+
>> predicate http://www.w3.org/1999/02/22-rdf-syntax-ns#type
>> object http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag
>>
>> Triple
>> subject Blank Node+
>> predicate http://www.w3.org/1999/02/22-rdf-syntax-ns#_1
>> object urn:miriam:interpro:IPR006670
>>
>>
>>
>> Where the object:BlankNode in the second subject:#_cyclin obviously
>> corresponds to the subject:BlankNode+ triples for the other four. I
>> found that I can link the two if I call getTriplesInto on the BlankNode+
>> subjects. However, the hierarchy doesn't seem to be preserved: BlankNode
>> links to both the URIReference to the Bag and to the InterPro reference.
>>
>> As for issue 2, I see now that (due to fixing my bug in my code)
>> attributes are returned as objects. But, related to the problem above,
>> the RDF parser doesn't always seem to notice the attributes. For
>> example, in the following RDF:
>>
>> <rdf:Description rdf:about="rdf:#$XwCaL2">
>> <rdf:first rdf:about="aboutFirst">
>> <rdfs:comment rdfs:about="aboutComment">
>> here is a test for a nested comment.
>> </rdfs:comment>
>> </rdf:first>
>> </rdf:Description>
>>
>>
>> The parser sees the rdfs:comment tag, and the rdfs:about attribute, but
>> not the rdf:about attribute or the comment itself.
>>
>> subject rdf:#$XwCaL2
>> predicate http://www.w3.org/1999/02/22-rdf-syntax-ns#first
>> object Blank Node
>> >>>>>>>>>>>>>>>is linked to >>>>>>>>>>>>>
>> subject Blank Node
>> predicate http://www.w3.org/TR/1999/PR-rdf-schema-19990303#about
>> object PlainLiteral:en aboutComment
>>
>>
>>
>> subject rdf:#$XwCaL2
>> predicate http://www.w3.org/1999/02/22-rdf-syntax-ns#first
>> object Blank Node
>> >>>>>>>>>>>>>>>is linked to >>>>>>>>>>>>>
>> subject Blank Node
>> predicate http://www.w3.org/1999/02/22-rdf-syntax-ns#type
>> object http://www.w3.org/TR/1999/PR-rdf-schema-19990303#comment
>>
>>
>> Why would it return the contents of the Bag in the first example, but
>> not the comment in the second example? Unfortunately, calling
>> getTriplesWhereSubject() on the URIReference comment object returns no
>> triples.
>
> Your second example is not valid RDF/XML. Try going to:
> http://www.w3.org/RDF/Validator/
> and entering your example in the box as follows:
> <?xml version="1.0"?>
> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
> xmlns:dc="http://purl.org/dc/elements/1.1/";
> xmlns:rdfs="http://www.w3.org/TR/1999/PR-rdf-schema-19990303#";>
> <rdf:Description rdf:about="rdf:#$XwCaL2">
> <rdf:first rdf:about="aboutFirst">
> <rdfs:comment rdfs:about="aboutComment">
> here is a test for a nested comment.
> </rdfs:comment>
> </rdf:first>
> </rdf:Description>
> </rdf:RDF>
>
> The CellML API RDF/XML parser is written to closely follow the RDF/XML
> specification, and it does not have validation features, so it won't
> tell you if your RDF/XML is invalid. It merely aims to do the minimum
> work needed to parse a valid RDF/XML document into the correct triples,
> while not crashing on invalid ones. In this case, it sees the
> rdfs:about, so it doesn't even look for the text child, as it would not
> be valid for that to be there.
> Best wishes,
> Andrew
>> Thanks again.
>>
>> Sincerely,
>> Morgan Taschuk
>>
>>
>>
>>
>> Morgan Taschuk wrote:
>>> Hello all,
>>>
>>> I'm attempting to use the CDA library (in Java) to parse some RDF that
>>> Matt provided. I have two questions: one relating to the depth of the
>>> parsing, and one related to retrieving information from the triples.
>>>
>>>
>>> 1) How deep does the RDF parsing go? For example, the RDF looks like
>>> this:
>>>
>>> <rdf:Description rdf:about="#_cyclin">
>>> <rdfs:label>cyclin</rdfs:label>
>>> <bqbiol:isVersionOf>
>>> <rdf:Bag>
>>> <rdf:li rdf:resource="urn:miriam:interpro:IPR006670"/>
>>> </rdf:Bag>
>>> </bqbiol:isVersionOf>
>>> </rdf:Description>
>>>
>>>
>>> When I try to parse the triples, I get the following values for the
>>> RDF triples:
>>>
>>> Triple
>>> subject #_cyclin
>>> predicate http://biomodels.net/biology-qualifiers/isVersionOf
>>> object null
>>>
>>> Triple
>>> subject #_cyclin
>>> predicate http://www.w3.org/TR/1999/PR-rdf-schema-19990303#label
>>> object PlainLiteral: cyclin
>>>
>>> Nothing I try will give me a value for the first object that should be
>>> a least a URIResource to rdf:Bag. While the code theoretically
>>> indicates that this could be so, the object never appears to be
>>> anything but a Literal or null. Does the RDF parser not read the
>>> entire hierarchy of the RDF?
>>>
>>> 2) When I have a section of RDF such as the following:
>>>
>>> <rdf:Description rdf:about="rdf:#$XwCaL2">
>>> <rdf:first rdf:resource="rdf:#$YwCaL2"/>
>>> </rdf:Description>
>>>
>>>
>>> This is the what the triple looks like:
>>> Triple
>>> subject rdf:#$XwCaL2
>>> predicate http://www.w3.org/1999/02/22-rdf-syntax#first
>>> object null
>>>
>>>
>>> How do I retrieve the attributes from the URLResource predicate, in
>>> this case, rdf:resource="rdf:#$YxCaL2" ?
>>>
>>>
>>> Thanks very much in advance for your help.
>>>
>>> Sincerely,
>>> Morgan Taschuk
>>> _______________________________________________
>>> cellml-tools-developers mailing list
>>> cellml-tools-developers at cellml.org
>>> http://www.cellml.org/mailman/listinfo/cellml-tools-developers
>> _______________________________________________
>> cellml-tools-developers mailing list
>> cellml-tools-developers at cellml.org
>> http://www.cellml.org/mailman/listinfo/cellml-tools-developers
> _______________________________________________
> cellml-tools-developers mailing list
> cellml-tools-developers at cellml.org
> http://www.cellml.org/mailman/listinfo/cellml-tools-developers
> _______________________________________________
> cellml-tools-developers mailing list
> cellml-tools-developers at cellml.org
> http://www.cellml.org/mailman/listinfo/cellml-tools-developers
> _______________________________________________
> cellml-tools-developers mailing list
> cellml-tools-developers at cellml.org
> http://www.cellml.org/mailman/listinfo/cellml-tools-developers





Archive powered by MHonArc 2.6.18.

Top of page