public class FernMLAnnotationManager extends Object implements AnnotationManager
AnnotationManager for FernMLNetworks. 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)
AnnotationManagercontainsNetworkAnnotation in interface AnnotationManagertyp - field name of the annotationpublic String getNetworkAnnotation(String typ)
AnnotationManagergetNetworkAnnotation in interface AnnotationManagertyp - name of the fieldpublic Collection<String> getNetworkAnnotationTypes()
AnnotationManagergetNetworkAnnotationTypes in interface AnnotationManagerpublic void setNetworkAnnotation(String typ, String annotation)
AnnotationManagersetNetworkAnnotation in interface AnnotationManagertyp - name of the fieldannotation - network annotationpublic boolean containsReactionAnnotation(int reaction,
String typ)
AnnotationManagercontainsReactionAnnotation in interface AnnotationManagerreaction - index of the reactiontyp - field name of the annotationpublic String getReactionAnnotation(int reaction, String typ)
AnnotationManagergetReactionAnnotation in interface AnnotationManagerreaction - index of the reactiontyp - name of the fieldpublic Collection<String> getReactionAnnotationTypes(int reaction)
AnnotationManagergetReactionAnnotationTypes in interface AnnotationManagerreaction - index of the reactionpublic void setReactionAnnotation(int reaction,
String typ,
String annotation)
AnnotationManagersetReactionAnnotation in interface AnnotationManagerreaction - index of the reactiontyp - name of the fieldannotation - reaction annotationpublic boolean containsSpeciesAnnotation(int species,
String typ)
AnnotationManagercontainsSpeciesAnnotation in interface AnnotationManagerspecies - index of the speciestyp - field name of the annotationpublic String getSpeciesAnnotation(int species, String typ)
AnnotationManagergetSpeciesAnnotation in interface AnnotationManagerspecies - index of the speciestyp - name of the fieldpublic Collection<String> getSpeciesAnnotationTypes(int species)
AnnotationManagergetSpeciesAnnotationTypes in interface AnnotationManagerspecies - index of the speciespublic void setSpeciesAnnotation(int species,
String typ,
String annotation)
AnnotationManagersetSpeciesAnnotation in interface AnnotationManagerspecies - index of the speciestyp - name of the fieldannotation - species annotationCopyright © 2007–2021. All rights reserved.