public class FernMLAnnotationManager extends Object implements AnnotationManager
AnnotationManager
for FernMLNetwork
s. The data is not copied but maintained
within the tree (which should not be an efficiency issue except you want to use the annotations
to store user data of reactions / species and do this very excessive - so don't do that). This
avoids problems when saving the
FernMLNetwork
again.Constructor and Description |
---|
FernMLAnnotationManager(org.jdom.Element rootElement)
Create the
AnnotationManager from the root element of the jdom tree. |
Modifier and Type | Method and Description |
---|---|
boolean |
containsNetworkAnnotation(String typ)
Returns true iff the network contains an annotation of the specified type.
|
boolean |
containsReactionAnnotation(int reaction,
String typ)
Returns true iff the reaction contains an annotation of the specified type.
|
boolean |
containsSpeciesAnnotation(int species,
String typ)
Returns true iff the species contains an annotation of the specified type.
|
String |
getNetworkAnnotation(String typ)
Gets the network annotation of the specified field.
|
Collection<String> |
getNetworkAnnotationTypes()
Gets the names of the network reaction.
|
String |
getReactionAnnotation(int reaction,
String typ)
Gets the reaction annotation of the specified field.
|
Collection<String> |
getReactionAnnotationTypes(int reaction)
Gets the names of the species reaction.
|
String |
getSpeciesAnnotation(int species,
String typ)
Gets the species annotation of the specified field.
|
Collection<String> |
getSpeciesAnnotationTypes(int species)
Gets the names of the species annotations.
|
void |
setNetworkAnnotation(String typ,
String annotation)
Sets the network annotation of the specified field.
|
void |
setReactionAnnotation(int reaction,
String typ,
String annotation)
Sets the reaction annotation of the specified field.
|
void |
setSpeciesAnnotation(int species,
String typ,
String annotation)
Sets the species annotation of the specified field.
|
public FernMLAnnotationManager(org.jdom.Element rootElement)
AnnotationManager
from the root element of the jdom tree.rootElement
- the root element of the jdom treepublic boolean containsNetworkAnnotation(String typ)
AnnotationManager
containsNetworkAnnotation
in interface AnnotationManager
typ
- field name of the annotationpublic String getNetworkAnnotation(String typ)
AnnotationManager
getNetworkAnnotation
in interface AnnotationManager
typ
- name of the fieldpublic Collection<String> getNetworkAnnotationTypes()
AnnotationManager
getNetworkAnnotationTypes
in interface AnnotationManager
public void setNetworkAnnotation(String typ, String annotation)
AnnotationManager
setNetworkAnnotation
in interface AnnotationManager
typ
- name of the fieldannotation
- network annotationpublic boolean containsReactionAnnotation(int reaction, String typ)
AnnotationManager
containsReactionAnnotation
in interface AnnotationManager
reaction
- index of the reactiontyp
- field name of the annotationpublic String getReactionAnnotation(int reaction, String typ)
AnnotationManager
getReactionAnnotation
in interface AnnotationManager
reaction
- index of the reactiontyp
- name of the fieldpublic Collection<String> getReactionAnnotationTypes(int reaction)
AnnotationManager
getReactionAnnotationTypes
in interface AnnotationManager
reaction
- index of the reactionpublic void setReactionAnnotation(int reaction, String typ, String annotation)
AnnotationManager
setReactionAnnotation
in interface AnnotationManager
reaction
- index of the reactiontyp
- name of the fieldannotation
- reaction annotationpublic boolean containsSpeciesAnnotation(int species, String typ)
AnnotationManager
containsSpeciesAnnotation
in interface AnnotationManager
species
- index of the speciestyp
- field name of the annotationpublic String getSpeciesAnnotation(int species, String typ)
AnnotationManager
getSpeciesAnnotation
in interface AnnotationManager
species
- index of the speciestyp
- name of the fieldpublic Collection<String> getSpeciesAnnotationTypes(int species)
AnnotationManager
getSpeciesAnnotationTypes
in interface AnnotationManager
species
- index of the speciespublic void setSpeciesAnnotation(int species, String typ, String annotation)
AnnotationManager
setSpeciesAnnotation
in interface AnnotationManager
species
- index of the speciestyp
- name of the fieldannotation
- species annotationCopyright © 2007–2021. All rights reserved.