A list for the developers of CellML tools

Text archives Help


[cellml-dev] Java CVTerm implementation


Chronological Thread 
  • From: ak.miller at auckland.ac.nz (Andrew Miller)
  • Subject: [cellml-dev] Java CVTerm implementation
  • Date: Wed, 07 Apr 2010 14:01:22 +1200

Hi Allyson, Morgan, and other interested people,

The RDF containers library for the CellML API has now been pushed to the
sourceforge repository, and in addition, I have now implemented a Java
wrapper around the functionality for adding controlled vocabulary terms.
I have aimed to make the wrapper as similar to the one from libSBML.

The RDF containers library has proper unit tests. The CVTerm
implementation does not - it may or may not actually work as it has
never been tested (I expect it will change in response to feedback from
Morgan and Allyson anyway).

I have checked out Saint from the svn repository. CVTerm.java builds
properly through Maven when you put it in
src/main/java/uk/ac/cisban/saint/parsing/cellml/CVTerm.java (I get
failures later on compiling GWT, but that seems to be an entirely
different issue).

It is slightly different from the libSBML version. Firstly, the way you
create it is different... through the constructor:
CVTerm(cellml_api.Model model, ModelQualifierType type)
to annotate models, and
CVTerm(cellml_api.CellMLElement element, BiolQualifierType type)
to annotate components or variables.

Getting resource URIs is different (and hopefully better). Instead of
getting a count of resource URIs, you instead use:
public String[] getResourceURIs()
So you can do something like:
for (resource : myCVTerm->getResourceURIs())
{
}

Also, once you have created a CVTerm, the model qualifier type is
read-only - you have to create a new CVTerm to change it (from my
cursory examination of the Saint source code, I don't think this
matters). Because of this, clone() doesn't make sense, and also isn't
provided. The getResources() is also SBML specific so not provided.
hasRequiredAttributes is not provided because the qualifier must be
provided at CVTerm creation time, so is not necessary.

From what I can tell, it should be fairly straightforward to use this
code with Saint. However, please let me know if any changes are required.

Best wishes,
Andrew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CVTerm.java
Type: text/x-java
Size: 10479 bytes
Desc: not available
URL:
<http://www.cellml.org/pipermail/cellml-tools-developers/attachments/20100407/1a648581/attachment.java>




Archive powered by MHonArc 2.6.18.

Top of page