#31 Easier access to qualfiers information

jsbml 1.0
closed-fixed
None
5
2017-03-09
2012-07-12
No

The following methods to accessing information about the qualifiers used in CVTerms would be highly appreciated (name given for indication purposes only):

* Get the qualifier's name
for example: cvterm.getModelQualifier().getName()
which would return 'isDescribedBy', 'is', 'occursIn', ...

* Get qualifier's type
for example: cvterm.getModelQualifier().getType()
which could return 'model' or 'biology'

The fact to need to do:
if (cvterm.getQualifierType().toString().equals("MODEL_QUALIFIER"))
{
do something
}
else
{
do something else
}

is really cumbersome.

Thanks.

Discussion

  • Nicolas Rodriguez

    I would agree that the methods in the CVTerm class are not really nice and easy to use.

    I would be in favor to deprecate getModelQualifier() and getBiologicalQualifier() and the related set/unset methods to have only a getQualifier() method that return a CVTerm.Qualifier enum. From this enum value, we can infer the qualifier type so we don't really need to store the CVTerm.Type directly in the CVTerm.

    We could add a method in the CVTerm Qualifier enum, named getType() that would return a CVTerm.Type and deprecate most of the methods related to CVTerm.Type in CVTerm.

    The set of non deprecated methods would then be much more simple and easy to use and understand (I think).
    Nico

     
  • Nicolas Rodriguez

    • status: open --> closed-fixed
    • assigned_to: Nicolas Rodriguez
    • Group: --> jsbml 1.0
     
  • Nicolas Rodriguez

    We did improve the CVTerm API, although all of the old methods are still there.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks