public class CobraUtil
extends java.lang.Object
Constructor | Description |
---|---|
CobraUtil() |
Modifier and Type | Method | Description |
---|---|---|
static void |
appendCobraNotes(SBase sbase,
java.util.Properties properties) |
|
static java.util.Properties |
parseCobraNotes(SBase sbase) |
Parses the notes of the given
SBase element. |
static void |
writeCobraNotes(SBase sbase,
java.util.Properties properties) |
public static java.util.Properties parseCobraNotes(SBase sbase)
SBase
element.
The notes are expecting to have some 'p' elements with a content of the form 'KEY: VALUE'. The key will be used for the property name and the value will be the property value. The key is inserted even is the value is an empty String.
Below are examples for a species and a reaction:
<body xmlns="http://www.w3.org/1999/xhtml"> <p>FORMULA: H4N</p> <p>CHARGE: 1</p> <p>HEPATONET_1.0_ABBREVIATION: HC00765</p> <p>EHMN_ABBREVIATION: C01342</p> <p>INCHI: InChI=1S/H3N/h1H3/p+1</p> </body>
<body xmlns="http://www.w3.org/1999/xhtml"> <p>GENE_ASSOCIATION: 1594.1</p> <p>SUBSYSTEM: Vitamin D metabolism</p> <p>EC Number: </p> <p>Confidence Level: 4</p> <p>AUTHORS: PMID:14671156,PMID:9333115</p> <p>NOTES: based on Vitamins, G.F.M. Ball,2004, Blackwell publishing, 1st ed (book) pg.196 IT</p> </body>
sbase
- Properties
object that store all the KEY/VALUE pair found in the notes. If the given SBase
has no notes or if the notes are not of the expected format, an empty Properties
object is returned.public static void writeCobraNotes(SBase sbase, java.util.Properties properties)
SBase
element and writes the content of the Properties
object to the notes of the SBase
.sbase
- properties
- public static void appendCobraNotes(SBase sbase, java.util.Properties properties)
sbase
- props
-