#77 Creation of unneccessary xmlns declarations for CVTerms

jsbml 1.0
closed-fixed
annotation (1)
8
2014-12-12
2014-03-08
Andreas Dräger
No

When creating CVTerms, JSBML adds too many xmlns declarations to the RDF definition. In the following example xmlns:bqmodel is not required, because the annotation is for a species.

species.addCVTerm(new CVTerm(Qualifier.BQB_IS, 
    "http://identifiers.org/obo.chebi/CHEBI:28013", 
    "http://identifiers.org/kegg.compound/C05378"));

Generated XML code:

<annotation>
    <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:bqmodel="http://biomodels.net/model-qualifiers/" 
             xmlns:bqbiol="http://biomodels.net/biology-qualifiers/">
    <rdf:Description rdf:about="#_6f215984-24d7-4854-b895-fb59d7002c44">
    <bqbiol:is>
    <rdf:Bag>
    <rdf:li rdf:resource="http://identifiers.org/obo.chebi/CHEBI:28013"/>
    <rdf:li rdf:resource="http://identifiers.org/kegg.compound/C05378"/>
    </rdf:Bag>
    </bqbiol:is>
    </rdf:Description>
    </rdf:RDF>
    </annotation>

BTW, the indentation could be improved.

Discussion

    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,11 +1,20 @@
     When creating CVTerms, JSBML adds too many xmlns declarations to the RDF definition. In the following example xmlns:bqmodel is not required, because the annotation is for a species.
    
    -species.addCVTerm(new CVTerm(Qualifier.BQB_IS, "http://identifiers.org/obo.chebi/CHEBI:28013", "http://identifiers.org/kegg.compound/C05378"));
    +~~~~~~
    +:::java
    +species.addCVTerm(new CVTerm(Qualifier.BQB_IS, 
    +    "http://identifiers.org/obo.chebi/CHEBI:28013", 
    +    "http://identifiers.org/kegg.compound/C05378"));
    +~~~~~~
    
     Generated XML code:
    
    +~~~~~~
    +:::xml
     <annotation>
    -   <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:bqmodel="http://biomodels.net/model-qualifiers/" xmlns:bqbiol="http://biomodels.net/biology-qualifiers/">
    +   <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    +             xmlns:bqmodel="http://biomodels.net/model-qualifiers/" 
    +             xmlns:bqbiol="http://biomodels.net/biology-qualifiers/">
        <rdf:Description rdf:about="#_6f215984-24d7-4854-b895-fb59d7002c44">
        <bqbiol:is>
        <rdf:Bag>
    @@ -16,5 +25,5 @@
        </rdf:Description>
        </rdf:RDF>
        </annotation>
    -
    +~~~~~~
     BTW, the indentation could be improved.
    
    • status: unread --> open-accepted
    • Priority: 5 --> 8
     
  • Indeed, not a too big problem though. The indentation will be fixed soon.

     
    • status: open-accepted --> closed-fixed
     
  • This was fixed in the 1.0 release.