<?xml version="1.0"?>\r
+<!--\r
+ History: Originally created from EMBL_common_V1.0\r
+ Updated on 24th April 2007 for WsDBFetch Service move to EMBL_Services_V1.1.xsd\r
+ -->
+ \r
<mapping xmlns="http://castor.exolab.org/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
xsi:schemaLocation="http://castor.exolab.org/ castor-mapping.xsd">\r
<!-- -->\r
<field name="name">\r
<bind-xml name="name" node="attribute"/>\r
</field>\r
- <field name="value">
- <bind-xml node="text"/>
+ <field name="evidence" type="string" collection="array">\r
+ <bind-xml name="evidence" node="element"/>\r
+ </field>\r
+ <field name="values" type="string" collection="array">\r
+ <bind-xml name="value" node="element"/>\r
</field>\r
</class>\r
<class name="jalview.datamodel.xdb.embl.EmblFeatureLocations">\r
Qualifier q = (Qualifier) quals.next();
if (q.getName().equals("translation"))
{
- prseq=q.getValue();
+ prseq=q.getValues()[0];
}
else
if (q.getName().equals("protein_id"))
{
- prid=q.getValue();
+ prid=q.getValues()[0];
}
else
if (q.getName().equals("codon_start"))
{
- prstart = Integer.parseInt(q.getValue());
+ prstart = Integer.parseInt(q.getValues()[0]);
}
else
if (q.getName().equals("product")){
- prname = q.getValue();
+ prname = q.getValues()[0];
} else {
// throw anything else into the additional properties hash
- vals.put(q.getName(), q.getValue());
+ vals.put(q.getName(), q.getValues().toString());
}
}
}
return record;
}
public static void main(String args[]) {
- EmblFile myfile = EmblFile.getEmblFile(new File("C:\\Documents and Settings\\JimP\\workspace-3.2\\Jalview Release\\schemas\\embleRecord.xml"));
+ EmblFile myfile = EmblFile.getEmblFile(new File("C:\\Documents and Settings\\JimP\\workspace-3.2\\Jalview Release\\schemas\\embleRecordV1.1.xml"));
if (myfile!=null && myfile.entries!=null && myfile.entries.size()>0)
System.out.println(myfile.entries.size()+" Records read.");
}
public class Qualifier {
String name;
- String value;
+ String[] values;
+ String[] evidence;
/**
* @return the name
*/
this.name = name;
}
/**
- * @return the value
+ * @return the values
*/
- public String getValue() {
- return value;
+ public String[] getValues() {
+ return values;
}
/**
- * @param value the value to set
+ * @param values the values to set
*/
- public void setValue(String value) {
- this.value = value;
+ public void setValues(String[] values) {
+ this.values = values;
+ }
+ public void addEvidence(String qevidence)
+ {
+ if (evidence==null)
+ {
+ evidence = new String[1];
+ }
+ else
+ {
+ String[] temp = new String[evidence.length+1];
+ System.arraycopy(evidence,0,temp,0,evidence.length);
+ evidence = temp;
+ }
+ evidence[evidence.length-1] = qevidence;
+ }
+ public void addValues(String value)
+ {
+ if (values==null)
+ {
+ values = new String[1];
+ }
+ else
+ {
+ String[] temp = new String[values.length+1];
+ System.arraycopy(values,0,temp,0,values.length);
+ values = temp;
+ }
+ values[values.length-1] = value;
+ }
+ /**
+ * @return the evidence
+ */
+ public String[] getEvidence()
+ {
+ return evidence;
+ }
+ /**
+ * @param evidence the evidence to set
+ */
+ public void setEvidence(String[] evidence)
+ {
+ this.evidence = evidence;
}
-
}