X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2Fxdb%2Fembl%2FQualifier.java;h=9020bbe5a6e779accfa87951db2162f83cd5b75d;hb=17e77c3f2949a0729322b4a8d907f3f34b6a9914;hp=37a0239258c03e9fbb9e6a8062db42646ede13c0;hpb=586c640e0c55327a34d72c3cab6eb8052abc3029;p=jalview.git diff --git a/src/jalview/datamodel/xdb/embl/Qualifier.java b/src/jalview/datamodel/xdb/embl/Qualifier.java index 37a0239..9020bbe 100644 --- a/src/jalview/datamodel/xdb/embl/Qualifier.java +++ b/src/jalview/datamodel/xdb/embl/Qualifier.java @@ -1,73 +1,119 @@ +/* + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9) + * Copyright (C) 2015 The Jalview Authors + * + * This file is part of Jalview. + * + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 + * of the License, or (at your option) any later version. + * + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Jalview. If not, see . + * The Jalview Authors are detailed in the 'AUTHORS' file. + */ package jalview.datamodel.xdb.embl; -public class Qualifier { - String name; - String[] values; - String[] evidence; - /** - * @return the name - */ - public String getName() { - return name; - } - /** - * @param name the name to set - */ - public void setName(String name) { - this.name = name; - } - /** - * @return the values - */ - public String[] getValues() { - return values; - } - /** - * @param values the values to set - */ - public void setValues(String[] values) { - this.values = values; - } - public void addEvidence(String qevidence) +/** + * Data model for a <qualifier> child element of a <feature> read + * from an EMBL query reply + * + * @see embl_mapping.xml + */ +public class Qualifier +{ + String name; + + String[] values; + + String[] evidence; + + /** + * @return the name + */ + public String getName() + { + return name; + } + + /** + * @param name + * the name to set + */ + public void setName(String name) + { + this.name = name; + } + + /** + * @return the values + */ + public String[] getValues() + { + return values; + } + + /** + * @param values + * the values to set + */ + public void setValues(String[] values) + { + this.values = values; + } + + public void addEvidence(String qevidence) + { + // TODO - not used? can remove? + if (evidence == null) { - 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; + evidence = new String[1]; } - public void addValues(String value) + else { - 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; + String[] temp = new String[evidence.length + 1]; + System.arraycopy(evidence, 0, temp, 0, evidence.length); + evidence = temp; } - /** - * @return the evidence - */ - public String[] getEvidence() + evidence[evidence.length - 1] = qevidence; + } + + public void addValues(String value) + { + // TODO - not used? can remove? + if (values == null) { - return evidence; + values = new String[1]; } - /** - * @param evidence the evidence to set - */ - public void setEvidence(String[] evidence) + else { - this.evidence = evidence; + 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; + } }