From: gmungoc Date: Thu, 13 Sep 2018 15:28:27 +0000 (+0100) Subject: JAL-3116 Uniprot XML unmarshalled using JAXB not Castor X-Git-Tag: Release_2_11_1_0~78^2~37 X-Git-Url: http://source.jalview.org/gitweb/?p=jalview.git;a=commitdiff_plain;h=88515cdb74e4603a40c8c1dca14107b5ca503e04 JAL-3116 Uniprot XML unmarshalled using JAXB not Castor --- diff --git a/resources/uniprot_mapping.xml b/resources/uniprot_mapping.xml deleted file mode 100755 index 68868c4..0000000 --- a/resources/uniprot_mapping.xml +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/schemas/uniprot.xsd b/schemas/uniprot.xsd new file mode 100644 index 0000000..13df214 --- /dev/null +++ b/schemas/uniprot.xsd @@ -0,0 +1,1072 @@ + + + + + + + + Describes a collection of UniProtKB entries. + + + + + + + + + + + + + + Describes a UniProtKB entry. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Describes the names for the protein and parts thereof. + Equivalent to the flat file DE-line. + + + + + + Describes names of "domains". + Equivalent to the flat file DE-line Includes: section. + + + + + + + + Describes names of processed products. + Equivalent to the flat file DE-line Contains: section. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Describes a gene. + Equivalent to the flat file GN-line. + + + + + + + + Describes different types of gene designations. + Equivalent to the flat file GN-line. + + + + + + + + + + + + + + + + + + + + + + + Describes the source organism. + + + + + Describes the names of the source organism. + Equivalent to the flat file OS-line. + + + + + Describes a cross-reference to the NCBI taxonomy database. + Equivalent to the flat file OX-line. + + + + + Describes the lineage of the source organism. + Equivalent to the flat file OC-line. + + + + + + + + + + + + + Describes different types of source organism names. + + + + + + + + + + + + + + + + + + + + + + + Describes non-nuclear gene locations (organelles and plasmids). + Equivalent to the flat file OG-line. + + + + + + + + + + + + + + + + + + + + + + + + + Indicates whether the name of a plasmid is known or unknown. + + + + + + + + + + + + + + + + + + + + Describes a citation and a summary of its content. + Equivalent to the flat file RN-, RP-, RC-, RX-, RG-, RA-, RT- and RL-lines. + + + + + + + + + + + + + + Describes different types of citations. + Equivalent to the flat file RX-, RG-, RA-, RT- and RL-lines. + + + + + Describes the title of a citation. + Equivalent to the flat file RT-line. + + + + + Describes the editors of a book (only used for books). + Equivalent to part of the flat file RL-line of books. + + + + + Describes the authors of a citation. + Equivalent to the flat file RA-line. + + + + + Describes the location (URL) of an online journal article. + No flat file equivalent. + + + + + Describes cross-references to bibliography databases (MEDLINE, PubMed, AGRICOLA) or other online resources (DOI). + Equivalent to the flat file RX-line. + + + + + + Describes the type of a citation. + + + + + + + + + + + + + + + + + + + + + Describes the name of an (online) journal or book. + + + + + Describes the volume of a journal or book. + + + + + Describes the first page of an article. + + + + + Describes the last page of an article. + + + + + Describes the publisher of a book. + + + + + Describes the city where a book was published. + + + + + Describes the database name of submissions. + + + + + Describes a patent number. + + + + + Describes the institute where a thesis was made. + + + + + Describes the country where a thesis was made. + + + + + + Describes the authors of a citation when these are represented by a consortium. + Equivalent to the flat file RG-line. + + + + + + + + + + + + + + + + + + Groups a citation's scope and source descriptions. + + + + + Describes the scope of a citation. + Equivalent to the flat file RP-line. + + + + + + + + Describes the source of the sequence according to the citation. + Equivalent to the flat file RC-line. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Describes different types of general annotations. + Equivalent to the flat file CC-line. + + + + + + + + + Used in 'cofactor' annotations. + + + + + + + Used in 'subcellular location' annotations. + + + + + + + Used in 'sequence caution' annotations. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Refers to the 'key' attribute of a 'reference' element. + + + + + + + + + Used in 'online information' annotations. + + + + + + + + + + Used in 'alternative products' annotations. + + + + + + + + Used in 'interaction' annotations. + + + + + + + + + Used in 'disease' annotations. + + + + + + + + + + + + + + + + + Used in 'mass spectrometry' and 'sequence caution' annotations. + + + + + + + + + + Describes the type of a general annotation. + Equivalent to the flat file CC comment topics (except for "DATABASE" which is translated to "online information"). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Describes the type of sequence location in 'RNA editing' annotations. Common values are "Not_applicable" and "Undetermined". + + + + + + Describes an optional name for an 'online information'. + + + + + + Describes the molecular mass in 'mass spectrometry' annotations. + + + + + Describes the error of the mass measurement in 'mass spectrometry' annotations. + + + + + Describes the experimental method in 'mass spectrometry' annotations. + + + + + + + + + Describes different types of biophysicochemical properties. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Describes a cofactor. + + + + + + + + + + + Describes the subcellular location and optionally the topology and orientation of a molecule. + + + + + + + + + + + Describes the type of events that cause alternative products. + + + + + + + + + + + + + + + + Describes isoforms in 'alternative products' annotations. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Describes a database cross-reference. + Equivalent to the flat file DR-line. + + + + + + + + + Describes the name of the database. + + + + + Describes a unique database identifier. + + + + + + + + + + + + + + + + Describes the evidence for the protein's existence. + Equivalent to the flat file PE-line. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Describes different types of sequence annotations. + Equivalent to the flat file FT-line. + + + + + Describes the original sequence in annotations that describe natural or artifical sequence variations. + + + + + Describes the variant sequence in annotations that describe natural or artifical sequence variations. + + + + + Describes the sequence coordinates of the annotation. + + + + + + Describes the type of a sequence annotation. + Equivalent to the flat file FT feature keys, but using full terms instead of acronyms. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Describes a sequence location as either a range with a begin and end or as a position. The 'sequence' attribute is only used when the location is not on the canonical sequence displayed in the current entry. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Describes a molecule by name or unique identifier. + + + + + + + + + + + + + Describes the evidence for an annotation. + No flat file equivalent. + + + + + + + + Describes the type of an evidence using the Evidence Code Ontology (http://www.obofoundry.org/cgi-bin/detail.cgi?id=evidence_code). + + + + + A unique key to link annotations (via 'evidence' attributes) to evidences. + + + + + + Describes the source of the data using a database cross-reference (or a 'ref' attribute when the source cannot be found in a public data source, such as PubMed, and is cited only within the UniProtKB entry). + + + + + + + + + Describes the source of the evidence, when it is not assigned by UniProt, but imported from an external database. + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/jalview/datamodel/xdb/uniprot/UniprotEntry.java b/src/jalview/datamodel/xdb/uniprot/UniprotEntry.java deleted file mode 100755 index a3537c9..0000000 --- a/src/jalview/datamodel/xdb/uniprot/UniprotEntry.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) - * Copyright (C) $$Year-Rel$$ 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.uniprot; - -import jalview.datamodel.PDBEntry; - -import java.util.Vector; - -/** - * Data model for an entry returned from a Uniprot query - * - * @see uniprot_mapping.xml - */ -public class UniprotEntry -{ - - UniprotSequence sequence; - - Vector name; - - Vector accession; - - Vector feature; - - Vector dbrefs; - - UniprotProteinName protName; - - public void setAccession(Vector items) - { - accession = items; - } - - public void setFeature(Vector items) - { - feature = items; - } - - public Vector getFeature() - { - return feature; - } - - public Vector getAccession() - { - return accession; - } - - public void setProtein(UniprotProteinName names) - { - protName = names; - } - - public UniprotProteinName getProtein() - { - return protName; - } - - public void setName(Vector na) - { - name = na; - } - - public Vector getName() - { - return name; - } - - public UniprotSequence getUniprotSequence() - { - return sequence; - } - - public void setUniprotSequence(UniprotSequence seq) - { - sequence = seq; - } - - public Vector getDbReference() - { - return dbrefs; - } - - public void setDbReference(Vector dbref) - { - this.dbrefs = dbref; - } - -} diff --git a/src/jalview/datamodel/xdb/uniprot/UniprotFeature.java b/src/jalview/datamodel/xdb/uniprot/UniprotFeature.java deleted file mode 100644 index 8bd5652..0000000 --- a/src/jalview/datamodel/xdb/uniprot/UniprotFeature.java +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) - * Copyright (C) $$Year-Rel$$ 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.uniprot; - -import java.util.Vector; - -/** - * A data model class for binding from Uniprot XML via uniprot_mapping.xml - */ -public class UniprotFeature -{ - private String type; - - private String description = null; - - private String original = null; - - private Vector variation = null; - - private String status; - - private int begin; - - private int end; - - public String getType() - { - return type; - } - - public void setType(String t) - { - this.type = t; - } - - public String getDescription() - { - return description; - } - - public void setDescription(String d) - { - this.description = d; - } - - public String getStatus() - { - return status; - } - - public void setStatus(String s) - { - this.status = s; - } - - public int getBegin() - { - return begin; - } - - public void setBegin(int b) - { - this.begin = b; - } - - public int getEnd() - { - return end; - } - - public void setEnd(int e) - { - this.end = e; - } - - public int getPosition() - { - return begin; - } - - public void setPosition(int p) - { - this.begin = p; - this.end = p; - } - - public String getOriginal() - { - return original; - } - - public void setOriginal(String original) - { - this.original = original; - } - - public Vector getVariation() - { - return variation; - } - - public void setVariation(Vector variant) - { - this.variation = variant; - } -} diff --git a/src/jalview/datamodel/xdb/uniprot/UniprotFile.java b/src/jalview/datamodel/xdb/uniprot/UniprotFile.java deleted file mode 100755 index 9cc0391..0000000 --- a/src/jalview/datamodel/xdb/uniprot/UniprotFile.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) - * Copyright (C) $$Year-Rel$$ 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.uniprot; - -import java.util.Vector; - -/** - * Data model of a retrieved Uniprot entry, as unmarshalled by Castor using a - * binding file (uniprot_mapping.xml) - */ -public class UniprotFile -{ - Vector _items; - - public void setUniprotEntries(Vector items) - { - _items = items; - } - - public Vector getUniprotEntries() - { - return _items; - } -} diff --git a/src/jalview/datamodel/xdb/uniprot/UniprotProteinName.java b/src/jalview/datamodel/xdb/uniprot/UniprotProteinName.java deleted file mode 100755 index 2335e71..0000000 --- a/src/jalview/datamodel/xdb/uniprot/UniprotProteinName.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) - * Copyright (C) $$Year-Rel$$ 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.uniprot; - -import java.util.Vector; - -/** - * Data model for protein name returned from a Uniprot query - * - * Protein names are read from the Uniprot XML element - * uniprot/entry/protein/recommendedName/fullName - * - * @see uniprot_mapping.xml - */ -public class UniprotProteinName -{ - private Vector names; - - public void setName(Vector names) - { - this.names = names; - } - - public Vector getName() - { - return names; - } - -} diff --git a/src/jalview/datamodel/xdb/uniprot/UniprotSequence.java b/src/jalview/datamodel/xdb/uniprot/UniprotSequence.java deleted file mode 100755 index bdba73f..0000000 --- a/src/jalview/datamodel/xdb/uniprot/UniprotSequence.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) - * Copyright (C) $$Year-Rel$$ 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.uniprot; - -/** - * Data model for the sequence returned by a Uniprot query - * - * @see uniprot_mapping.xml - */ -public class UniprotSequence -{ - private String _content = ""; - - /** - * Sets the content string, omitting any space characters - * - * @param seq - */ - public void setContent(String seq) - { - if (seq != null) - { - StringBuilder sb = new StringBuilder(seq.length()); - for (int i = 0; i < seq.length(); i++) - { - if (seq.charAt(i) != ' ') - { - sb.append(seq.charAt(i)); - } - } - _content = sb.toString(); - } - } - - public String getContent() - { - return _content; - } - -} diff --git a/src/jalview/ws/dbsources/Uniprot.java b/src/jalview/ws/dbsources/Uniprot.java index 167cd97..74a9ea4 100644 --- a/src/jalview/ws/dbsources/Uniprot.java +++ b/src/jalview/ws/dbsources/Uniprot.java @@ -29,28 +29,37 @@ import jalview.datamodel.PDBEntry; import jalview.datamodel.Sequence; import jalview.datamodel.SequenceFeature; import jalview.datamodel.SequenceI; -import jalview.datamodel.xdb.uniprot.UniprotEntry; -import jalview.datamodel.xdb.uniprot.UniprotFeature; -import jalview.datamodel.xdb.uniprot.UniprotFile; import jalview.schemes.ResidueProperties; import jalview.util.StringUtils; import jalview.ws.seqfetcher.DbSourceProxyImpl; +import jalview.xml.binding.uniprot.DbReferenceType; +import jalview.xml.binding.uniprot.Entry; +import jalview.xml.binding.uniprot.FeatureType; +import jalview.xml.binding.uniprot.LocationType; +import jalview.xml.binding.uniprot.PositionType; +import jalview.xml.binding.uniprot.PropertyType; import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.Reader; import java.net.URL; import java.net.URLConnection; import java.util.ArrayList; import java.util.List; import java.util.Vector; -import org.exolab.castor.mapping.Mapping; -import org.exolab.castor.xml.Unmarshaller; +import javax.xml.bind.JAXBContext; +import javax.xml.bind.JAXBException; +import javax.xml.stream.FactoryConfigurationError; +import javax.xml.stream.XMLInputFactory; +import javax.xml.stream.XMLStreamException; +import javax.xml.stream.XMLStreamReader; import com.stevesoft.pat.Regex; /** + * This class queries the Uniprot database for sequence data, unmarshals the + * returned XML, and converts it to Jalview Sequence records (including attached + * database references and sequence features) + * * @author JimP * */ @@ -60,11 +69,6 @@ public class Uniprot extends DbSourceProxyImpl private static final String BAR_DELIMITER = "|"; - /* - * Castor mapping loaded from uniprot_mapping.xml - */ - private static Mapping map; - /** * Constructor */ @@ -122,43 +126,6 @@ public class Uniprot extends DbSourceProxyImpl return "0"; // we really don't know what version we're on. } - /** - * Reads a file containing the reply to the EBI Fetch Uniprot data query, - * unmarshals it to a UniprotFile object, and returns the list of UniprotEntry - * data models (mapped from <entry> elements) - * - * @param fileReader - * @return - */ - public Vector getUniprotEntries(Reader fileReader) - { - UniprotFile uni = new UniprotFile(); - try - { - if (map == null) - { - // 1. Load the mapping information from the file - map = new Mapping(uni.getClass().getClassLoader()); - URL url = getClass().getResource("/uniprot_mapping.xml"); - map.loadMapping(url); - } - - // 2. Unmarshal the data - Unmarshaller unmar = new Unmarshaller(uni); - unmar.setIgnoreExtraElements(true); - unmar.setMapping(map); - if (fileReader != null) - { - uni = (UniprotFile) unmar.unmarshal(fileReader); - } - } catch (Exception e) - { - System.out.println("Error getUniprotEntries() " + e); - } - - return uni.getUniprotEntries(); - } - /* * (non-Javadoc) * @@ -176,25 +143,21 @@ public class Uniprot extends DbSourceProxyImpl String downloadstring = getDomain() + "/uniprot/" + queries + ".xml"; - URL url = null; - URLConnection urlconn = null; - url = new URL(downloadstring); - urlconn = url.openConnection(); + URL url = new URL(downloadstring); + URLConnection urlconn = url.openConnection(); InputStream istr = urlconn.getInputStream(); - Vector entries = getUniprotEntries( - new InputStreamReader(istr, "UTF-8")); - + List entries = getUniprotEntries(istr); if (entries != null) { - ArrayList seqs = new ArrayList<>(); - for (UniprotEntry entry : entries) + List seqs = new ArrayList<>(); + for (Entry entry : entries) { - seqs.add(uniprotEntryToSequenceI(entry)); + seqs.add(uniprotEntryToSequence(entry)); } - al = new Alignment(seqs.toArray(new SequenceI[0])); - + al = new Alignment(seqs.toArray(new SequenceI[seqs.size()])); } + stopQuery(); return al; } catch (Exception e) @@ -207,83 +170,124 @@ public class Uniprot extends DbSourceProxyImpl } /** + * Converts an Entry object (bound from Uniprot XML) to a Jalview Sequence * * @param entry - * UniprotEntry - * @return SequenceI instance created from the UniprotEntry instance + * @return */ - public SequenceI uniprotEntryToSequenceI(UniprotEntry entry) + SequenceI uniprotEntryToSequence(Entry entry) { String id = getUniprotEntryId(entry); + String seqString = entry.getSequence().getValue(); + + /* + * for backwards compatibility with Castor processing, + * remove any internal spaces + */ + if (seqString.indexOf(' ') > -1) + { + seqString = seqString.replaceAll(" ", ""); + } SequenceI sequence = new Sequence(id, - entry.getUniprotSequence().getContent()); + seqString); sequence.setDescription(getUniprotEntryDescription(entry)); + /* + * add a 'self' DBRefEntry for each accession + */ final String dbVersion = getDbVersion(); - ArrayList dbRefs = new ArrayList<>(); + List dbRefs = new ArrayList<>(); for (String accessionId : entry.getAccession()) { DBRefEntry dbRef = new DBRefEntry(DBRefSource.UNIPROT, dbVersion, accessionId); - - // mark dbRef as a primary reference for this sequence dbRefs.add(dbRef); } - Vector onlyPdbEntries = new Vector<>(); - for (PDBEntry pdb : entry.getDbReference()) + /* + * add a DBRefEntry for each dbReference element in the XML; + * also add a PDBEntry if type="PDB"; + * also add an EMBLCDS dbref if protein sequence id is given + * also add an Ensembl dbref " " " " " " + */ + Vector pdbRefs = new Vector<>(); + for (DbReferenceType dbref : entry.getDbReference()) { - DBRefEntry dbr = new DBRefEntry(); - dbr.setSource(pdb.getType()); - dbr.setAccessionId(pdb.getId()); - dbr.setVersion(DBRefSource.UNIPROT + ":" + dbVersion); + String type = dbref.getType(); + DBRefEntry dbr = new DBRefEntry(type, + DBRefSource.UNIPROT + ":" + dbVersion, dbref.getId()); dbRefs.add(dbr); - if ("PDB".equals(pdb.getType())) + if ("PDB".equals(type)) { - onlyPdbEntries.addElement(pdb); + pdbRefs.add(new PDBEntry(dbr)); } - if ("EMBL".equals(pdb.getType())) + if ("EMBL".equals(type)) { - // look for a CDS reference and add it, too. - String cdsId = (String) pdb.getProperty("protein sequence ID"); + /* + * e.g. Uniprot accession Q9BXM7 has + * + * + * + * + */ + String cdsId = getProperty(dbref.getProperty(), + "protein sequence ID"); if (cdsId != null && cdsId.trim().length() > 0) { // remove version String[] vrs = cdsId.split("\\."); - dbr = new DBRefEntry(DBRefSource.EMBLCDS, vrs.length > 1 ? vrs[1] - : DBRefSource.UNIPROT + ":" + dbVersion, vrs[0]); + String version = vrs.length > 1 ? vrs[1] + : DBRefSource.UNIPROT + ":" + dbVersion; + dbr = new DBRefEntry(DBRefSource.EMBLCDS, version, vrs[0]); dbRefs.add(dbr); } } - if ("Ensembl".equals(pdb.getType())) + if ("Ensembl".equals(type)) { - /*UniprotXML + /* + * e.g. Uniprot accession Q9BXM7 has * - * - * - * - * + * + * + * + * */ - String cdsId = (String) pdb.getProperty("protein sequence ID"); + String cdsId = getProperty(dbref.getProperty(), + "protein sequence ID"); if (cdsId != null && cdsId.trim().length() > 0) { dbr = new DBRefEntry(DBRefSource.ENSEMBL, DBRefSource.UNIPROT + ":" + dbVersion, cdsId.trim()); dbRefs.add(dbr); - } } } - sequence.setPDBId(onlyPdbEntries); + /* + * create features; they have either begin and end, or position, in XML + */ + sequence.setPDBId(pdbRefs); if (entry.getFeature() != null) { - for (UniprotFeature uf : entry.getFeature()) + for (FeatureType uf : entry.getFeature()) { - SequenceFeature copy = new SequenceFeature(uf.getType(), - getDescription(uf), uf.getBegin(), uf.getEnd(), "Uniprot"); - copy.setStatus(uf.getStatus()); - sequence.addSequenceFeature(copy); + LocationType location = uf.getLocation(); + int start = 0; + int end = 0; + if (location.getPosition() != null) + { + start = location.getPosition().getPosition().intValue(); + end = start; + } + else + { + start = location.getBegin().getPosition().intValue(); + end = location.getEnd().getPosition().intValue(); + } + SequenceFeature sf = new SequenceFeature(uf.getType(), + getDescription(uf), start, end, "Uniprot"); + sf.setStatus(uf.getStatus()); + sequence.addSequenceFeature(sf); } } for (DBRefEntry dbr : dbRefs) @@ -294,16 +298,15 @@ public class Uniprot extends DbSourceProxyImpl } /** - * Constructs a feature description from the description and (optionally) - * original and variant fields of the Uniprot XML feature + * A helper method that builds a sequence feature description * - * @param uf + * @param feature * @return */ - protected static String getDescription(UniprotFeature uf) + static String getDescription(FeatureType feature) { - String orig = uf.getOriginal(); - List variants = uf.getVariation(); + String orig = feature.getOriginal(); + List variants = feature.getVariation(); StringBuilder sb = new StringBuilder(); /* @@ -339,7 +342,11 @@ public class Uniprot extends DbSourceProxyImpl sb.append(orig); } - sb.append(Integer.toString(uf.getPosition())); + LocationType location = feature.getLocation(); + PositionType start = location.getPosition() == null + ? location.getBegin() + : location.getPosition(); + sb.append(Integer.toString(start.getPosition().intValue())); if (var.length() < 4) { @@ -367,7 +374,7 @@ public class Uniprot extends DbSourceProxyImpl } } } - String description = uf.getDescription(); + String description = feature.getDescription(); if (description != null) { sb.append(description); @@ -382,37 +389,57 @@ public class Uniprot extends DbSourceProxyImpl } /** + * A helper method that searches the list of properties for one with the given + * key, and if found returns the property value, else returns null * - * @param entry - * UniportEntry - * @return protein name(s) delimited by a white space character + * @param properties + * @param key + * @return */ - public static String getUniprotEntryDescription(UniprotEntry entry) + static String getProperty(List properties, String key) { - StringBuilder desc = new StringBuilder(32); - if (entry.getProtein() != null && entry.getProtein().getName() != null) + String value = null; + if (properties != null) { - boolean first = true; - for (String nm : entry.getProtein().getName()) + for (PropertyType prop : properties) { - if (!first) + if (key.equals(prop.getType())) { - desc.append(" "); + value = prop.getValue(); + break; } - first = false; - desc.append(nm); } } - return desc.toString(); + return value; + } + + /** + * Extracts xml element entry/protein/recommendedName/fullName + * + * @param entry + * @return + */ + static String getUniprotEntryDescription(Entry entry) + { + String desc = ""; + if (entry.getProtein() != null + && entry.getProtein().getRecommendedName() != null) + { + // fullName is mandatory if recommendedName is present + desc = entry.getProtein().getRecommendedName().getFullName() + .getValue(); + } + return desc; } /** - * + * Constructs a sequence id by concatenating all entry/name elements with '|' + * separator + * * @param entry - * UniprotEntry - * @return The accession id(s) and name(s) delimited by '|'. + * @return */ - public static String getUniprotEntryId(UniprotEntry entry) + static String getUniprotEntryId(Entry entry) { StringBuilder name = new StringBuilder(32); for (String n : entry.getName()) @@ -459,4 +486,35 @@ public class Uniprot extends DbSourceProxyImpl { return 0; } + + /** + * Reads the reply to the EBI Fetch Uniprot data query, unmarshals it to an + * Uniprot object, and returns the enclosed Entry objects, or null on any + * failure + * + * @param is + * @return + */ + public List getUniprotEntries(InputStream is) + { + List entries = null; + try + { + JAXBContext jc = JAXBContext + .newInstance("jalview.xml.binding.uniprot"); + XMLStreamReader streamReader = XMLInputFactory.newInstance() + .createXMLStreamReader(is); + javax.xml.bind.Unmarshaller um = jc.createUnmarshaller(); + jalview.xml.binding.uniprot.Uniprot uniprot = (jalview.xml.binding.uniprot.Uniprot) um.unmarshal(streamReader); + if (uniprot != null && !uniprot.getEntry().isEmpty()) + { + entries = uniprot.getEntry(); + } + } catch (JAXBException | XMLStreamException + | FactoryConfigurationError e) + { + e.printStackTrace(); + } + return entries; + } } diff --git a/src/jalview/xml/binding/uniprot/CitationType.java b/src/jalview/xml/binding/uniprot/CitationType.java new file mode 100644 index 0000000..cc5f14e --- /dev/null +++ b/src/jalview/xml/binding/uniprot/CitationType.java @@ -0,0 +1,527 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2018.09.13 at 10:18:53 AM BST +// + + +package jalview.xml.binding.uniprot; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; + + +/** + * Describes different types of citations. + * Equivalent to the flat file RX-, RG-, RA-, RT- and RL-lines. + * + *

Java class for citationType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="citationType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="title" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="editorList" type="{http://uniprot.org/uniprot}nameListType" minOccurs="0"/>
+ *         <element name="authorList" type="{http://uniprot.org/uniprot}nameListType" minOccurs="0"/>
+ *         <element name="locator" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="dbReference" type="{http://uniprot.org/uniprot}dbReferenceType" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="type" use="required">
+ *         <simpleType>
+ *           <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *             <enumeration value="book"/>
+ *             <enumeration value="journal article"/>
+ *             <enumeration value="online journal article"/>
+ *             <enumeration value="patent"/>
+ *             <enumeration value="submission"/>
+ *             <enumeration value="thesis"/>
+ *             <enumeration value="unpublished observations"/>
+ *           </restriction>
+ *         </simpleType>
+ *       </attribute>
+ *       <attribute name="date">
+ *         <simpleType>
+ *           <union memberTypes=" {http://www.w3.org/2001/XMLSchema}date {http://www.w3.org/2001/XMLSchema}gYearMonth {http://www.w3.org/2001/XMLSchema}gYear">
+ *           </union>
+ *         </simpleType>
+ *       </attribute>
+ *       <attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="volume" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="first" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="last" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="publisher" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="city" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="db" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="number" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="institute" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="country" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "citationType", propOrder = { + "title", + "editorList", + "authorList", + "locator", + "dbReference" +}) +public class CitationType { + + protected String title; + protected NameListType editorList; + protected NameListType authorList; + protected String locator; + protected List dbReference; + @XmlAttribute(name = "type", required = true) + protected String type; + @XmlAttribute(name = "date") + protected String date; + @XmlAttribute(name = "name") + protected String name; + @XmlAttribute(name = "volume") + protected String volume; + @XmlAttribute(name = "first") + protected String first; + @XmlAttribute(name = "last") + protected String last; + @XmlAttribute(name = "publisher") + protected String publisher; + @XmlAttribute(name = "city") + protected String city; + @XmlAttribute(name = "db") + protected String db; + @XmlAttribute(name = "number") + protected String number; + @XmlAttribute(name = "institute") + protected String institute; + @XmlAttribute(name = "country") + protected String country; + + /** + * Gets the value of the title property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTitle() { + return title; + } + + /** + * Sets the value of the title property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTitle(String value) { + this.title = value; + } + + /** + * Gets the value of the editorList property. + * + * @return + * possible object is + * {@link NameListType } + * + */ + public NameListType getEditorList() { + return editorList; + } + + /** + * Sets the value of the editorList property. + * + * @param value + * allowed object is + * {@link NameListType } + * + */ + public void setEditorList(NameListType value) { + this.editorList = value; + } + + /** + * Gets the value of the authorList property. + * + * @return + * possible object is + * {@link NameListType } + * + */ + public NameListType getAuthorList() { + return authorList; + } + + /** + * Sets the value of the authorList property. + * + * @param value + * allowed object is + * {@link NameListType } + * + */ + public void setAuthorList(NameListType value) { + this.authorList = value; + } + + /** + * Gets the value of the locator property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getLocator() { + return locator; + } + + /** + * Sets the value of the locator property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setLocator(String value) { + this.locator = value; + } + + /** + * Gets the value of the dbReference property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the dbReference property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getDbReference().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link DbReferenceType } + * + * + */ + public List getDbReference() { + if (dbReference == null) { + dbReference = new ArrayList(); + } + return this.dbReference; + } + + /** + * Gets the value of the type property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getType() { + return type; + } + + /** + * Sets the value of the type property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setType(String value) { + this.type = value; + } + + /** + * Gets the value of the date property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDate() { + return date; + } + + /** + * Sets the value of the date property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDate(String value) { + this.date = value; + } + + /** + * Gets the value of the name property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getName() { + return name; + } + + /** + * Sets the value of the name property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setName(String value) { + this.name = value; + } + + /** + * Gets the value of the volume property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getVolume() { + return volume; + } + + /** + * Sets the value of the volume property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setVolume(String value) { + this.volume = value; + } + + /** + * Gets the value of the first property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFirst() { + return first; + } + + /** + * Sets the value of the first property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFirst(String value) { + this.first = value; + } + + /** + * Gets the value of the last property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getLast() { + return last; + } + + /** + * Sets the value of the last property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setLast(String value) { + this.last = value; + } + + /** + * Gets the value of the publisher property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPublisher() { + return publisher; + } + + /** + * Sets the value of the publisher property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPublisher(String value) { + this.publisher = value; + } + + /** + * Gets the value of the city property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCity() { + return city; + } + + /** + * Sets the value of the city property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCity(String value) { + this.city = value; + } + + /** + * Gets the value of the db property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDb() { + return db; + } + + /** + * Sets the value of the db property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDb(String value) { + this.db = value; + } + + /** + * Gets the value of the number property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getNumber() { + return number; + } + + /** + * Sets the value of the number property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setNumber(String value) { + this.number = value; + } + + /** + * Gets the value of the institute property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getInstitute() { + return institute; + } + + /** + * Sets the value of the institute property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setInstitute(String value) { + this.institute = value; + } + + /** + * Gets the value of the country property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCountry() { + return country; + } + + /** + * Sets the value of the country property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCountry(String value) { + this.country = value; + } + +} diff --git a/src/jalview/xml/binding/uniprot/CofactorType.java b/src/jalview/xml/binding/uniprot/CofactorType.java new file mode 100644 index 0000000..9b91dc4 --- /dev/null +++ b/src/jalview/xml/binding/uniprot/CofactorType.java @@ -0,0 +1,134 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2018.09.13 at 10:18:53 AM BST +// + + +package jalview.xml.binding.uniprot; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + * Describes a cofactor. + * + *

Java class for cofactorType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="cofactorType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="dbReference" type="{http://uniprot.org/uniprot}dbReferenceType"/>
+ *       </sequence>
+ *       <attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "cofactorType", propOrder = { + "name", + "dbReference" +}) +public class CofactorType { + + @XmlElement(required = true) + protected String name; + @XmlElement(required = true) + protected DbReferenceType dbReference; + @XmlAttribute(name = "evidence") + protected List evidence; + + /** + * Gets the value of the name property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getName() { + return name; + } + + /** + * Sets the value of the name property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setName(String value) { + this.name = value; + } + + /** + * Gets the value of the dbReference property. + * + * @return + * possible object is + * {@link DbReferenceType } + * + */ + public DbReferenceType getDbReference() { + return dbReference; + } + + /** + * Sets the value of the dbReference property. + * + * @param value + * allowed object is + * {@link DbReferenceType } + * + */ + public void setDbReference(DbReferenceType value) { + this.dbReference = value; + } + + /** + * Gets the value of the evidence property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the evidence property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getEvidence().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Integer } + * + * + */ + public List getEvidence() { + if (evidence == null) { + evidence = new ArrayList(); + } + return this.evidence; + } + +} diff --git a/src/jalview/xml/binding/uniprot/CommentType.java b/src/jalview/xml/binding/uniprot/CommentType.java new file mode 100644 index 0000000..b0bbf77 --- /dev/null +++ b/src/jalview/xml/binding/uniprot/CommentType.java @@ -0,0 +1,1730 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2018.09.13 at 10:18:53 AM BST +// + + +package jalview.xml.binding.uniprot; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + * Describes different types of general annotations. + * Equivalent to the flat file CC-line. + * + *

Java class for commentType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="commentType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="molecule" type="{http://uniprot.org/uniprot}moleculeType" minOccurs="0"/>
+ *         <choice minOccurs="0">
+ *           <group ref="{http://uniprot.org/uniprot}bpcCommentGroup"/>
+ *           <sequence>
+ *             <element name="cofactor" type="{http://uniprot.org/uniprot}cofactorType" maxOccurs="unbounded"/>
+ *           </sequence>
+ *           <sequence>
+ *             <element name="subcellularLocation" type="{http://uniprot.org/uniprot}subcellularLocationType" maxOccurs="unbounded"/>
+ *           </sequence>
+ *           <element name="conflict">
+ *             <complexType>
+ *               <complexContent>
+ *                 <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                   <sequence>
+ *                     <element name="sequence" minOccurs="0">
+ *                       <complexType>
+ *                         <complexContent>
+ *                           <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                             <attribute name="resource" use="required">
+ *                               <simpleType>
+ *                                 <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *                                   <enumeration value="EMBL-CDS"/>
+ *                                   <enumeration value="EMBL"/>
+ *                                 </restriction>
+ *                               </simpleType>
+ *                             </attribute>
+ *                             <attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                             <attribute name="version" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *                           </restriction>
+ *                         </complexContent>
+ *                       </complexType>
+ *                     </element>
+ *                   </sequence>
+ *                   <attribute name="type" use="required">
+ *                     <simpleType>
+ *                       <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *                         <enumeration value="frameshift"/>
+ *                         <enumeration value="erroneous initiation"/>
+ *                         <enumeration value="erroneous termination"/>
+ *                         <enumeration value="erroneous gene model prediction"/>
+ *                         <enumeration value="erroneous translation"/>
+ *                         <enumeration value="miscellaneous discrepancy"/>
+ *                       </restriction>
+ *                     </simpleType>
+ *                   </attribute>
+ *                   <attribute name="ref" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                 </restriction>
+ *               </complexContent>
+ *             </complexType>
+ *           </element>
+ *           <sequence>
+ *             <element name="link" maxOccurs="unbounded" minOccurs="0">
+ *               <complexType>
+ *                 <complexContent>
+ *                   <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                     <attribute name="uri" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *                   </restriction>
+ *                 </complexContent>
+ *               </complexType>
+ *             </element>
+ *           </sequence>
+ *           <sequence>
+ *             <element name="event" type="{http://uniprot.org/uniprot}eventType" maxOccurs="4"/>
+ *             <element name="isoform" type="{http://uniprot.org/uniprot}isoformType" maxOccurs="unbounded" minOccurs="0"/>
+ *           </sequence>
+ *           <sequence>
+ *             <element name="interactant" type="{http://uniprot.org/uniprot}interactantType" maxOccurs="2" minOccurs="2"/>
+ *             <element name="organismsDiffer" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
+ *             <element name="experiments" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *           </sequence>
+ *           <element name="disease">
+ *             <complexType>
+ *               <complexContent>
+ *                 <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                   <sequence>
+ *                     <element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *                     <element name="acronym" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *                     <element name="description" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *                     <element name="dbReference" type="{http://uniprot.org/uniprot}dbReferenceType"/>
+ *                   </sequence>
+ *                   <attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                 </restriction>
+ *               </complexContent>
+ *             </complexType>
+ *           </element>
+ *         </choice>
+ *         <element name="location" type="{http://uniprot.org/uniprot}locationType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="text" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="type" use="required">
+ *         <simpleType>
+ *           <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *             <enumeration value="allergen"/>
+ *             <enumeration value="alternative products"/>
+ *             <enumeration value="biotechnology"/>
+ *             <enumeration value="biophysicochemical properties"/>
+ *             <enumeration value="catalytic activity"/>
+ *             <enumeration value="caution"/>
+ *             <enumeration value="cofactor"/>
+ *             <enumeration value="developmental stage"/>
+ *             <enumeration value="disease"/>
+ *             <enumeration value="domain"/>
+ *             <enumeration value="disruption phenotype"/>
+ *             <enumeration value="activity regulation"/>
+ *             <enumeration value="function"/>
+ *             <enumeration value="induction"/>
+ *             <enumeration value="miscellaneous"/>
+ *             <enumeration value="pathway"/>
+ *             <enumeration value="pharmaceutical"/>
+ *             <enumeration value="polymorphism"/>
+ *             <enumeration value="PTM"/>
+ *             <enumeration value="RNA editing"/>
+ *             <enumeration value="similarity"/>
+ *             <enumeration value="subcellular location"/>
+ *             <enumeration value="sequence caution"/>
+ *             <enumeration value="subunit"/>
+ *             <enumeration value="tissue specificity"/>
+ *             <enumeration value="toxic dose"/>
+ *             <enumeration value="online information"/>
+ *             <enumeration value="mass spectrometry"/>
+ *             <enumeration value="interaction"/>
+ *           </restriction>
+ *         </simpleType>
+ *       </attribute>
+ *       <attribute name="locationType" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="mass" type="{http://www.w3.org/2001/XMLSchema}float" />
+ *       <attribute name="error" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="method" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "commentType", propOrder = { + "molecule", + "absorption", + "kinetics", + "phDependence", + "redoxPotential", + "temperatureDependence", + "cofactor", + "subcellularLocation", + "conflict", + "link", + "event", + "isoform", + "interactant", + "organismsDiffer", + "experiments", + "disease", + "location", + "text" +}) +public class CommentType { + + protected MoleculeType molecule; + protected CommentType.Absorption absorption; + protected CommentType.Kinetics kinetics; + protected CommentType.PhDependence phDependence; + protected CommentType.RedoxPotential redoxPotential; + protected CommentType.TemperatureDependence temperatureDependence; + protected List cofactor; + protected List subcellularLocation; + protected CommentType.Conflict conflict; + protected List link; + protected List event; + protected List isoform; + protected List interactant; + @XmlElement(defaultValue = "false") + protected Boolean organismsDiffer; + protected Integer experiments; + protected CommentType.Disease disease; + protected List location; + protected List text; + @XmlAttribute(name = "type", required = true) + protected String type; + @XmlAttribute(name = "locationType") + protected String locationType; + @XmlAttribute(name = "name") + protected String name; + @XmlAttribute(name = "mass") + protected Float mass; + @XmlAttribute(name = "error") + protected String error; + @XmlAttribute(name = "method") + protected String method; + @XmlAttribute(name = "evidence") + protected List evidence; + + /** + * Gets the value of the molecule property. + * + * @return + * possible object is + * {@link MoleculeType } + * + */ + public MoleculeType getMolecule() { + return molecule; + } + + /** + * Sets the value of the molecule property. + * + * @param value + * allowed object is + * {@link MoleculeType } + * + */ + public void setMolecule(MoleculeType value) { + this.molecule = value; + } + + /** + * Gets the value of the absorption property. + * + * @return + * possible object is + * {@link CommentType.Absorption } + * + */ + public CommentType.Absorption getAbsorption() { + return absorption; + } + + /** + * Sets the value of the absorption property. + * + * @param value + * allowed object is + * {@link CommentType.Absorption } + * + */ + public void setAbsorption(CommentType.Absorption value) { + this.absorption = value; + } + + /** + * Gets the value of the kinetics property. + * + * @return + * possible object is + * {@link CommentType.Kinetics } + * + */ + public CommentType.Kinetics getKinetics() { + return kinetics; + } + + /** + * Sets the value of the kinetics property. + * + * @param value + * allowed object is + * {@link CommentType.Kinetics } + * + */ + public void setKinetics(CommentType.Kinetics value) { + this.kinetics = value; + } + + /** + * Gets the value of the phDependence property. + * + * @return + * possible object is + * {@link CommentType.PhDependence } + * + */ + public CommentType.PhDependence getPhDependence() { + return phDependence; + } + + /** + * Sets the value of the phDependence property. + * + * @param value + * allowed object is + * {@link CommentType.PhDependence } + * + */ + public void setPhDependence(CommentType.PhDependence value) { + this.phDependence = value; + } + + /** + * Gets the value of the redoxPotential property. + * + * @return + * possible object is + * {@link CommentType.RedoxPotential } + * + */ + public CommentType.RedoxPotential getRedoxPotential() { + return redoxPotential; + } + + /** + * Sets the value of the redoxPotential property. + * + * @param value + * allowed object is + * {@link CommentType.RedoxPotential } + * + */ + public void setRedoxPotential(CommentType.RedoxPotential value) { + this.redoxPotential = value; + } + + /** + * Gets the value of the temperatureDependence property. + * + * @return + * possible object is + * {@link CommentType.TemperatureDependence } + * + */ + public CommentType.TemperatureDependence getTemperatureDependence() { + return temperatureDependence; + } + + /** + * Sets the value of the temperatureDependence property. + * + * @param value + * allowed object is + * {@link CommentType.TemperatureDependence } + * + */ + public void setTemperatureDependence(CommentType.TemperatureDependence value) { + this.temperatureDependence = value; + } + + /** + * Gets the value of the cofactor property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the cofactor property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getCofactor().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link CofactorType } + * + * + */ + public List getCofactor() { + if (cofactor == null) { + cofactor = new ArrayList(); + } + return this.cofactor; + } + + /** + * Gets the value of the subcellularLocation property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the subcellularLocation property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getSubcellularLocation().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link SubcellularLocationType } + * + * + */ + public List getSubcellularLocation() { + if (subcellularLocation == null) { + subcellularLocation = new ArrayList(); + } + return this.subcellularLocation; + } + + /** + * Gets the value of the conflict property. + * + * @return + * possible object is + * {@link CommentType.Conflict } + * + */ + public CommentType.Conflict getConflict() { + return conflict; + } + + /** + * Sets the value of the conflict property. + * + * @param value + * allowed object is + * {@link CommentType.Conflict } + * + */ + public void setConflict(CommentType.Conflict value) { + this.conflict = value; + } + + /** + * Gets the value of the link property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the link property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getLink().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link CommentType.Link } + * + * + */ + public List getLink() { + if (link == null) { + link = new ArrayList(); + } + return this.link; + } + + /** + * Gets the value of the event property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the event property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getEvent().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link EventType } + * + * + */ + public List getEvent() { + if (event == null) { + event = new ArrayList(); + } + return this.event; + } + + /** + * Gets the value of the isoform property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the isoform property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getIsoform().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link IsoformType } + * + * + */ + public List getIsoform() { + if (isoform == null) { + isoform = new ArrayList(); + } + return this.isoform; + } + + /** + * Gets the value of the interactant property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the interactant property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getInteractant().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link InteractantType } + * + * + */ + public List getInteractant() { + if (interactant == null) { + interactant = new ArrayList(); + } + return this.interactant; + } + + /** + * Gets the value of the organismsDiffer property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isOrganismsDiffer() { + return organismsDiffer; + } + + /** + * Sets the value of the organismsDiffer property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setOrganismsDiffer(Boolean value) { + this.organismsDiffer = value; + } + + /** + * Gets the value of the experiments property. + * + * @return + * possible object is + * {@link Integer } + * + */ + public Integer getExperiments() { + return experiments; + } + + /** + * Sets the value of the experiments property. + * + * @param value + * allowed object is + * {@link Integer } + * + */ + public void setExperiments(Integer value) { + this.experiments = value; + } + + /** + * Gets the value of the disease property. + * + * @return + * possible object is + * {@link CommentType.Disease } + * + */ + public CommentType.Disease getDisease() { + return disease; + } + + /** + * Sets the value of the disease property. + * + * @param value + * allowed object is + * {@link CommentType.Disease } + * + */ + public void setDisease(CommentType.Disease value) { + this.disease = value; + } + + /** + * Gets the value of the location property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the location property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getLocation().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link LocationType } + * + * + */ + public List getLocation() { + if (location == null) { + location = new ArrayList(); + } + return this.location; + } + + /** + * Gets the value of the text property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the text property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getText().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link EvidencedStringType } + * + * + */ + public List getText() { + if (text == null) { + text = new ArrayList(); + } + return this.text; + } + + /** + * Gets the value of the type property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getType() { + return type; + } + + /** + * Sets the value of the type property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setType(String value) { + this.type = value; + } + + /** + * Gets the value of the locationType property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getLocationType() { + return locationType; + } + + /** + * Sets the value of the locationType property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setLocationType(String value) { + this.locationType = value; + } + + /** + * Gets the value of the name property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getName() { + return name; + } + + /** + * Sets the value of the name property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setName(String value) { + this.name = value; + } + + /** + * Gets the value of the mass property. + * + * @return + * possible object is + * {@link Float } + * + */ + public Float getMass() { + return mass; + } + + /** + * Sets the value of the mass property. + * + * @param value + * allowed object is + * {@link Float } + * + */ + public void setMass(Float value) { + this.mass = value; + } + + /** + * Gets the value of the error property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getError() { + return error; + } + + /** + * Sets the value of the error property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setError(String value) { + this.error = value; + } + + /** + * Gets the value of the method property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getMethod() { + return method; + } + + /** + * Sets the value of the method property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setMethod(String value) { + this.method = value; + } + + /** + * Gets the value of the evidence property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the evidence property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getEvidence().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Integer } + * + * + */ + public List getEvidence() { + if (evidence == null) { + evidence = new ArrayList(); + } + return this.evidence; + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <complexContent>
+     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       <sequence>
+     *         <element name="max" type="{http://uniprot.org/uniprot}evidencedStringType" minOccurs="0"/>
+     *         <element name="text" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded" minOccurs="0"/>
+     *       </sequence>
+     *     </restriction>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "max", + "text" + }) + public static class Absorption { + + protected EvidencedStringType max; + protected List text; + + /** + * Gets the value of the max property. + * + * @return + * possible object is + * {@link EvidencedStringType } + * + */ + public EvidencedStringType getMax() { + return max; + } + + /** + * Sets the value of the max property. + * + * @param value + * allowed object is + * {@link EvidencedStringType } + * + */ + public void setMax(EvidencedStringType value) { + this.max = value; + } + + /** + * Gets the value of the text property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the text property. + * + *

+ * For example, to add a new item, do as follows: + *

+         *    getText().add(newItem);
+         * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link EvidencedStringType } + * + * + */ + public List getText() { + if (text == null) { + text = new ArrayList(); + } + return this.text; + } + + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <complexContent>
+     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       <sequence>
+     *         <element name="sequence" minOccurs="0">
+     *           <complexType>
+     *             <complexContent>
+     *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                 <attribute name="resource" use="required">
+     *                   <simpleType>
+     *                     <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+     *                       <enumeration value="EMBL-CDS"/>
+     *                       <enumeration value="EMBL"/>
+     *                     </restriction>
+     *                   </simpleType>
+     *                 </attribute>
+     *                 <attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *                 <attribute name="version" type="{http://www.w3.org/2001/XMLSchema}int" />
+     *               </restriction>
+     *             </complexContent>
+     *           </complexType>
+     *         </element>
+     *       </sequence>
+     *       <attribute name="type" use="required">
+     *         <simpleType>
+     *           <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+     *             <enumeration value="frameshift"/>
+     *             <enumeration value="erroneous initiation"/>
+     *             <enumeration value="erroneous termination"/>
+     *             <enumeration value="erroneous gene model prediction"/>
+     *             <enumeration value="erroneous translation"/>
+     *             <enumeration value="miscellaneous discrepancy"/>
+     *           </restriction>
+     *         </simpleType>
+     *       </attribute>
+     *       <attribute name="ref" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *     </restriction>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "sequence" + }) + public static class Conflict { + + protected CommentType.Conflict.Sequence sequence; + @XmlAttribute(name = "type", required = true) + protected String type; + @XmlAttribute(name = "ref") + protected String ref; + + /** + * Gets the value of the sequence property. + * + * @return + * possible object is + * {@link CommentType.Conflict.Sequence } + * + */ + public CommentType.Conflict.Sequence getSequence() { + return sequence; + } + + /** + * Sets the value of the sequence property. + * + * @param value + * allowed object is + * {@link CommentType.Conflict.Sequence } + * + */ + public void setSequence(CommentType.Conflict.Sequence value) { + this.sequence = value; + } + + /** + * Gets the value of the type property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getType() { + return type; + } + + /** + * Sets the value of the type property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setType(String value) { + this.type = value; + } + + /** + * Gets the value of the ref property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getRef() { + return ref; + } + + /** + * Sets the value of the ref property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setRef(String value) { + this.ref = value; + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+         * <complexType>
+         *   <complexContent>
+         *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+         *       <attribute name="resource" use="required">
+         *         <simpleType>
+         *           <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+         *             <enumeration value="EMBL-CDS"/>
+         *             <enumeration value="EMBL"/>
+         *           </restriction>
+         *         </simpleType>
+         *       </attribute>
+         *       <attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+         *       <attribute name="version" type="{http://www.w3.org/2001/XMLSchema}int" />
+         *     </restriction>
+         *   </complexContent>
+         * </complexType>
+         * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class Sequence { + + @XmlAttribute(name = "resource", required = true) + protected String resource; + @XmlAttribute(name = "id", required = true) + protected String id; + @XmlAttribute(name = "version") + protected Integer version; + + /** + * Gets the value of the resource property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getResource() { + return resource; + } + + /** + * Sets the value of the resource property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setResource(String value) { + this.resource = value; + } + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + + /** + * Gets the value of the version property. + * + * @return + * possible object is + * {@link Integer } + * + */ + public Integer getVersion() { + return version; + } + + /** + * Sets the value of the version property. + * + * @param value + * allowed object is + * {@link Integer } + * + */ + public void setVersion(Integer value) { + this.version = value; + } + + } + + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <complexContent>
+     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       <sequence>
+     *         <element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
+     *         <element name="acronym" type="{http://www.w3.org/2001/XMLSchema}string"/>
+     *         <element name="description" type="{http://www.w3.org/2001/XMLSchema}string"/>
+     *         <element name="dbReference" type="{http://uniprot.org/uniprot}dbReferenceType"/>
+     *       </sequence>
+     *       <attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *     </restriction>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "name", + "acronym", + "description", + "dbReference" + }) + public static class Disease { + + @XmlElement(required = true) + protected String name; + @XmlElement(required = true) + protected String acronym; + @XmlElement(required = true) + protected String description; + @XmlElement(required = true) + protected DbReferenceType dbReference; + @XmlAttribute(name = "id", required = true) + protected String id; + + /** + * Gets the value of the name property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getName() { + return name; + } + + /** + * Sets the value of the name property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setName(String value) { + this.name = value; + } + + /** + * Gets the value of the acronym property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAcronym() { + return acronym; + } + + /** + * Sets the value of the acronym property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAcronym(String value) { + this.acronym = value; + } + + /** + * Gets the value of the description property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDescription() { + return description; + } + + /** + * Sets the value of the description property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDescription(String value) { + this.description = value; + } + + /** + * Gets the value of the dbReference property. + * + * @return + * possible object is + * {@link DbReferenceType } + * + */ + public DbReferenceType getDbReference() { + return dbReference; + } + + /** + * Sets the value of the dbReference property. + * + * @param value + * allowed object is + * {@link DbReferenceType } + * + */ + public void setDbReference(DbReferenceType value) { + this.dbReference = value; + } + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <complexContent>
+     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       <sequence>
+     *         <element name="KM" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded" minOccurs="0"/>
+     *         <element name="Vmax" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded" minOccurs="0"/>
+     *         <element name="text" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded" minOccurs="0"/>
+     *       </sequence>
+     *     </restriction>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "km", + "vmax", + "text" + }) + public static class Kinetics { + + @XmlElement(name = "KM") + protected List km; + @XmlElement(name = "Vmax") + protected List vmax; + protected List text; + + /** + * Gets the value of the km property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the km property. + * + *

+ * For example, to add a new item, do as follows: + *

+         *    getKM().add(newItem);
+         * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link EvidencedStringType } + * + * + */ + public List getKM() { + if (km == null) { + km = new ArrayList(); + } + return this.km; + } + + /** + * Gets the value of the vmax property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the vmax property. + * + *

+ * For example, to add a new item, do as follows: + *

+         *    getVmax().add(newItem);
+         * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link EvidencedStringType } + * + * + */ + public List getVmax() { + if (vmax == null) { + vmax = new ArrayList(); + } + return this.vmax; + } + + /** + * Gets the value of the text property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the text property. + * + *

+ * For example, to add a new item, do as follows: + *

+         *    getText().add(newItem);
+         * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link EvidencedStringType } + * + * + */ + public List getText() { + if (text == null) { + text = new ArrayList(); + } + return this.text; + } + + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <complexContent>
+     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       <attribute name="uri" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+     *     </restriction>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class Link { + + @XmlAttribute(name = "uri", required = true) + @XmlSchemaType(name = "anyURI") + protected String uri; + + /** + * Gets the value of the uri property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getUri() { + return uri; + } + + /** + * Sets the value of the uri property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setUri(String value) { + this.uri = value; + } + + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <complexContent>
+     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       <sequence>
+     *         <element name="text" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded"/>
+     *       </sequence>
+     *     </restriction>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "text" + }) + public static class PhDependence { + + @XmlElement(required = true) + protected List text; + + /** + * Gets the value of the text property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the text property. + * + *

+ * For example, to add a new item, do as follows: + *

+         *    getText().add(newItem);
+         * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link EvidencedStringType } + * + * + */ + public List getText() { + if (text == null) { + text = new ArrayList(); + } + return this.text; + } + + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <complexContent>
+     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       <sequence>
+     *         <element name="text" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded"/>
+     *       </sequence>
+     *     </restriction>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "text" + }) + public static class RedoxPotential { + + @XmlElement(required = true) + protected List text; + + /** + * Gets the value of the text property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the text property. + * + *

+ * For example, to add a new item, do as follows: + *

+         *    getText().add(newItem);
+         * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link EvidencedStringType } + * + * + */ + public List getText() { + if (text == null) { + text = new ArrayList(); + } + return this.text; + } + + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <complexContent>
+     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       <sequence>
+     *         <element name="text" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded"/>
+     *       </sequence>
+     *     </restriction>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "text" + }) + public static class TemperatureDependence { + + @XmlElement(required = true) + protected List text; + + /** + * Gets the value of the text property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the text property. + * + *

+ * For example, to add a new item, do as follows: + *

+         *    getText().add(newItem);
+         * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link EvidencedStringType } + * + * + */ + public List getText() { + if (text == null) { + text = new ArrayList(); + } + return this.text; + } + + } + +} diff --git a/src/jalview/xml/binding/uniprot/ConsortiumType.java b/src/jalview/xml/binding/uniprot/ConsortiumType.java new file mode 100644 index 0000000..c74c1e7 --- /dev/null +++ b/src/jalview/xml/binding/uniprot/ConsortiumType.java @@ -0,0 +1,68 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2018.09.13 at 10:18:53 AM BST +// + + +package jalview.xml.binding.uniprot; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; + + +/** + * Describes the authors of a citation when these are represented by a consortium. + * Equivalent to the flat file RG-line. + * + *

Java class for consortiumType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="consortiumType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "consortiumType") +public class ConsortiumType { + + @XmlAttribute(name = "name", required = true) + protected String name; + + /** + * Gets the value of the name property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getName() { + return name; + } + + /** + * Sets the value of the name property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setName(String value) { + this.name = value; + } + +} diff --git a/src/jalview/xml/binding/uniprot/DbReferenceType.java b/src/jalview/xml/binding/uniprot/DbReferenceType.java new file mode 100644 index 0000000..184ee40 --- /dev/null +++ b/src/jalview/xml/binding/uniprot/DbReferenceType.java @@ -0,0 +1,192 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2018.09.13 at 10:18:53 AM BST +// + + +package jalview.xml.binding.uniprot; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; + + +/** + * Describes a database cross-reference. + * Equivalent to the flat file DR-line. + * + * + *

Java class for dbReferenceType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="dbReferenceType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="molecule" type="{http://uniprot.org/uniprot}moleculeType" minOccurs="0"/>
+ *         <element name="property" type="{http://uniprot.org/uniprot}propertyType" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="type" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "dbReferenceType", propOrder = { + "molecule", + "property" +}) +public class DbReferenceType { + + protected MoleculeType molecule; + protected List property; + @XmlAttribute(name = "type", required = true) + protected String type; + @XmlAttribute(name = "id", required = true) + protected String id; + @XmlAttribute(name = "evidence") + protected List evidence; + + /** + * Gets the value of the molecule property. + * + * @return + * possible object is + * {@link MoleculeType } + * + */ + public MoleculeType getMolecule() { + return molecule; + } + + /** + * Sets the value of the molecule property. + * + * @param value + * allowed object is + * {@link MoleculeType } + * + */ + public void setMolecule(MoleculeType value) { + this.molecule = value; + } + + /** + * Gets the value of the property property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the property property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getProperty().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link PropertyType } + * + * + */ + public List getProperty() { + if (property == null) { + property = new ArrayList(); + } + return this.property; + } + + /** + * Gets the value of the type property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getType() { + return type; + } + + /** + * Sets the value of the type property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setType(String value) { + this.type = value; + } + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + + /** + * Gets the value of the evidence property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the evidence property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getEvidence().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Integer } + * + * + */ + public List getEvidence() { + if (evidence == null) { + evidence = new ArrayList(); + } + return this.evidence; + } + +} diff --git a/src/jalview/xml/binding/uniprot/Entry.java b/src/jalview/xml/binding/uniprot/Entry.java new file mode 100644 index 0000000..1ca91bc --- /dev/null +++ b/src/jalview/xml/binding/uniprot/Entry.java @@ -0,0 +1,625 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2018.09.13 at 10:18:53 AM BST +// + + +package jalview.xml.binding.uniprot; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.datatype.XMLGregorianCalendar; + + +/** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="accession" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/>
+ *         <element name="name" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/>
+ *         <element name="protein" type="{http://uniprot.org/uniprot}proteinType"/>
+ *         <element name="gene" type="{http://uniprot.org/uniprot}geneType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="organism" type="{http://uniprot.org/uniprot}organismType"/>
+ *         <element name="organismHost" type="{http://uniprot.org/uniprot}organismType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="geneLocation" type="{http://uniprot.org/uniprot}geneLocationType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="reference" type="{http://uniprot.org/uniprot}referenceType" maxOccurs="unbounded"/>
+ *         <element name="comment" type="{http://uniprot.org/uniprot}commentType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="dbReference" type="{http://uniprot.org/uniprot}dbReferenceType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="proteinExistence" type="{http://uniprot.org/uniprot}proteinExistenceType"/>
+ *         <element name="keyword" type="{http://uniprot.org/uniprot}keywordType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="feature" type="{http://uniprot.org/uniprot}featureType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="evidence" type="{http://uniprot.org/uniprot}evidenceType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="sequence" type="{http://uniprot.org/uniprot}sequenceType"/>
+ *       </sequence>
+ *       <attribute name="dataset" use="required">
+ *         <simpleType>
+ *           <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *             <enumeration value="Swiss-Prot"/>
+ *             <enumeration value="TrEMBL"/>
+ *           </restriction>
+ *         </simpleType>
+ *       </attribute>
+ *       <attribute name="created" use="required" type="{http://www.w3.org/2001/XMLSchema}date" />
+ *       <attribute name="modified" use="required" type="{http://www.w3.org/2001/XMLSchema}date" />
+ *       <attribute name="version" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "accession", + "name", + "protein", + "gene", + "organism", + "organismHost", + "geneLocation", + "reference", + "comment", + "dbReference", + "proteinExistence", + "keyword", + "feature", + "evidence", + "sequence" +}) +@XmlRootElement(name = "entry") +public class Entry { + + @XmlElement(required = true) + protected List accession; + @XmlElement(required = true) + protected List name; + @XmlElement(required = true) + protected ProteinType protein; + protected List gene; + @XmlElement(required = true) + protected OrganismType organism; + protected List organismHost; + protected List geneLocation; + @XmlElement(required = true) + protected List reference; + @XmlElement(nillable = true) + protected List comment; + protected List dbReference; + @XmlElement(required = true) + protected ProteinExistenceType proteinExistence; + protected List keyword; + protected List feature; + protected List evidence; + @XmlElement(required = true) + protected SequenceType sequence; + @XmlAttribute(name = "dataset", required = true) + protected String dataset; + @XmlAttribute(name = "created", required = true) + @XmlSchemaType(name = "date") + protected XMLGregorianCalendar created; + @XmlAttribute(name = "modified", required = true) + @XmlSchemaType(name = "date") + protected XMLGregorianCalendar modified; + @XmlAttribute(name = "version", required = true) + protected int version; + + /** + * Gets the value of the accession property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the accession property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getAccession().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * + */ + public List getAccession() { + if (accession == null) { + accession = new ArrayList(); + } + return this.accession; + } + + /** + * Gets the value of the name property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the name property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getName().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * + */ + public List getName() { + if (name == null) { + name = new ArrayList(); + } + return this.name; + } + + /** + * Gets the value of the protein property. + * + * @return + * possible object is + * {@link ProteinType } + * + */ + public ProteinType getProtein() { + return protein; + } + + /** + * Sets the value of the protein property. + * + * @param value + * allowed object is + * {@link ProteinType } + * + */ + public void setProtein(ProteinType value) { + this.protein = value; + } + + /** + * Gets the value of the gene property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the gene property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getGene().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link GeneType } + * + * + */ + public List getGene() { + if (gene == null) { + gene = new ArrayList(); + } + return this.gene; + } + + /** + * Gets the value of the organism property. + * + * @return + * possible object is + * {@link OrganismType } + * + */ + public OrganismType getOrganism() { + return organism; + } + + /** + * Sets the value of the organism property. + * + * @param value + * allowed object is + * {@link OrganismType } + * + */ + public void setOrganism(OrganismType value) { + this.organism = value; + } + + /** + * Gets the value of the organismHost property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the organismHost property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getOrganismHost().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link OrganismType } + * + * + */ + public List getOrganismHost() { + if (organismHost == null) { + organismHost = new ArrayList(); + } + return this.organismHost; + } + + /** + * Gets the value of the geneLocation property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the geneLocation property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getGeneLocation().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link GeneLocationType } + * + * + */ + public List getGeneLocation() { + if (geneLocation == null) { + geneLocation = new ArrayList(); + } + return this.geneLocation; + } + + /** + * Gets the value of the reference property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the reference property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getReference().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link ReferenceType } + * + * + */ + public List getReference() { + if (reference == null) { + reference = new ArrayList(); + } + return this.reference; + } + + /** + * Gets the value of the comment property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the comment property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getComment().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link CommentType } + * + * + */ + public List getComment() { + if (comment == null) { + comment = new ArrayList(); + } + return this.comment; + } + + /** + * Gets the value of the dbReference property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the dbReference property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getDbReference().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link DbReferenceType } + * + * + */ + public List getDbReference() { + if (dbReference == null) { + dbReference = new ArrayList(); + } + return this.dbReference; + } + + /** + * Gets the value of the proteinExistence property. + * + * @return + * possible object is + * {@link ProteinExistenceType } + * + */ + public ProteinExistenceType getProteinExistence() { + return proteinExistence; + } + + /** + * Sets the value of the proteinExistence property. + * + * @param value + * allowed object is + * {@link ProteinExistenceType } + * + */ + public void setProteinExistence(ProteinExistenceType value) { + this.proteinExistence = value; + } + + /** + * Gets the value of the keyword property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the keyword property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getKeyword().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link KeywordType } + * + * + */ + public List getKeyword() { + if (keyword == null) { + keyword = new ArrayList(); + } + return this.keyword; + } + + /** + * Gets the value of the feature property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the feature property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getFeature().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link FeatureType } + * + * + */ + public List getFeature() { + if (feature == null) { + feature = new ArrayList(); + } + return this.feature; + } + + /** + * Gets the value of the evidence property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the evidence property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getEvidence().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link EvidenceType } + * + * + */ + public List getEvidence() { + if (evidence == null) { + evidence = new ArrayList(); + } + return this.evidence; + } + + /** + * Gets the value of the sequence property. + * + * @return + * possible object is + * {@link SequenceType } + * + */ + public SequenceType getSequence() { + return sequence; + } + + /** + * Sets the value of the sequence property. + * + * @param value + * allowed object is + * {@link SequenceType } + * + */ + public void setSequence(SequenceType value) { + this.sequence = value; + } + + /** + * Gets the value of the dataset property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDataset() { + return dataset; + } + + /** + * Sets the value of the dataset property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDataset(String value) { + this.dataset = value; + } + + /** + * Gets the value of the created property. + * + * @return + * possible object is + * {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getCreated() { + return created; + } + + /** + * Sets the value of the created property. + * + * @param value + * allowed object is + * {@link XMLGregorianCalendar } + * + */ + public void setCreated(XMLGregorianCalendar value) { + this.created = value; + } + + /** + * Gets the value of the modified property. + * + * @return + * possible object is + * {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getModified() { + return modified; + } + + /** + * Sets the value of the modified property. + * + * @param value + * allowed object is + * {@link XMLGregorianCalendar } + * + */ + public void setModified(XMLGregorianCalendar value) { + this.modified = value; + } + + /** + * Gets the value of the version property. + * + */ + public int getVersion() { + return version; + } + + /** + * Sets the value of the version property. + * + */ + public void setVersion(int value) { + this.version = value; + } + +} diff --git a/src/jalview/xml/binding/uniprot/EventType.java b/src/jalview/xml/binding/uniprot/EventType.java new file mode 100644 index 0000000..3b5b8a0 --- /dev/null +++ b/src/jalview/xml/binding/uniprot/EventType.java @@ -0,0 +1,76 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2018.09.13 at 10:18:53 AM BST +// + + +package jalview.xml.binding.uniprot; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; + + +/** + * Describes the type of events that cause alternative products. + * + *

Java class for eventType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="eventType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="type" use="required">
+ *         <simpleType>
+ *           <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *             <enumeration value="alternative splicing"/>
+ *             <enumeration value="alternative initiation"/>
+ *             <enumeration value="alternative promoter"/>
+ *             <enumeration value="ribosomal frameshifting"/>
+ *           </restriction>
+ *         </simpleType>
+ *       </attribute>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "eventType") +public class EventType { + + @XmlAttribute(name = "type", required = true) + protected String type; + + /** + * Gets the value of the type property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getType() { + return type; + } + + /** + * Sets the value of the type property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setType(String value) { + this.type = value; + } + +} diff --git a/src/jalview/xml/binding/uniprot/EvidenceType.java b/src/jalview/xml/binding/uniprot/EvidenceType.java new file mode 100644 index 0000000..77a7561 --- /dev/null +++ b/src/jalview/xml/binding/uniprot/EvidenceType.java @@ -0,0 +1,153 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2018.09.13 at 10:18:53 AM BST +// + + +package jalview.xml.binding.uniprot; + +import java.math.BigInteger; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; + + +/** + * Describes the evidence for an annotation. + * No flat file equivalent. + * + *

Java class for evidenceType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="evidenceType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="source" type="{http://uniprot.org/uniprot}sourceType" minOccurs="0"/>
+ *         <element name="importedFrom" type="{http://uniprot.org/uniprot}importedFromType" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="type" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="key" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "evidenceType", propOrder = { + "source", + "importedFrom" +}) +public class EvidenceType { + + protected SourceType source; + protected ImportedFromType importedFrom; + @XmlAttribute(name = "type", required = true) + protected String type; + @XmlAttribute(name = "key", required = true) + protected BigInteger key; + + /** + * Gets the value of the source property. + * + * @return + * possible object is + * {@link SourceType } + * + */ + public SourceType getSource() { + return source; + } + + /** + * Sets the value of the source property. + * + * @param value + * allowed object is + * {@link SourceType } + * + */ + public void setSource(SourceType value) { + this.source = value; + } + + /** + * Gets the value of the importedFrom property. + * + * @return + * possible object is + * {@link ImportedFromType } + * + */ + public ImportedFromType getImportedFrom() { + return importedFrom; + } + + /** + * Sets the value of the importedFrom property. + * + * @param value + * allowed object is + * {@link ImportedFromType } + * + */ + public void setImportedFrom(ImportedFromType value) { + this.importedFrom = value; + } + + /** + * Gets the value of the type property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getType() { + return type; + } + + /** + * Sets the value of the type property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setType(String value) { + this.type = value; + } + + /** + * Gets the value of the key property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getKey() { + return key; + } + + /** + * Sets the value of the key property. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setKey(BigInteger value) { + this.key = value; + } + +} diff --git a/src/jalview/xml/binding/uniprot/EvidencedStringType.java b/src/jalview/xml/binding/uniprot/EvidencedStringType.java new file mode 100644 index 0000000..4c1fa7b --- /dev/null +++ b/src/jalview/xml/binding/uniprot/EvidencedStringType.java @@ -0,0 +1,136 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2018.09.13 at 10:18:53 AM BST +// + + +package jalview.xml.binding.uniprot; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; + + +/** + *

Java class for evidencedStringType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="evidencedStringType">
+ *   <simpleContent>
+ *     <extension base="<http://www.w3.org/2001/XMLSchema>string">
+ *       <attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
+ *       <attribute name="status">
+ *         <simpleType>
+ *           <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *             <enumeration value="by similarity"/>
+ *             <enumeration value="probable"/>
+ *             <enumeration value="potential"/>
+ *           </restriction>
+ *         </simpleType>
+ *       </attribute>
+ *     </extension>
+ *   </simpleContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "evidencedStringType", propOrder = { + "value" +}) +public class EvidencedStringType { + + @XmlValue + protected String value; + @XmlAttribute(name = "evidence") + protected List evidence; + @XmlAttribute(name = "status") + protected String status; + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setValue(String value) { + this.value = value; + } + + /** + * Gets the value of the evidence property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the evidence property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getEvidence().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Integer } + * + * + */ + public List getEvidence() { + if (evidence == null) { + evidence = new ArrayList(); + } + return this.evidence; + } + + /** + * Gets the value of the status property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getStatus() { + return status; + } + + /** + * Sets the value of the status property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setStatus(String value) { + this.status = value; + } + +} diff --git a/src/jalview/xml/binding/uniprot/FeatureType.java b/src/jalview/xml/binding/uniprot/FeatureType.java new file mode 100644 index 0000000..0ef367c --- /dev/null +++ b/src/jalview/xml/binding/uniprot/FeatureType.java @@ -0,0 +1,353 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2018.09.13 at 10:18:53 AM BST +// + + +package jalview.xml.binding.uniprot; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + * Describes different types of sequence annotations. + * Equivalent to the flat file FT-line. + * + *

Java class for featureType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="featureType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="original" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="variation" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="location" type="{http://uniprot.org/uniprot}locationType"/>
+ *       </sequence>
+ *       <attribute name="type" use="required">
+ *         <simpleType>
+ *           <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *             <enumeration value="active site"/>
+ *             <enumeration value="binding site"/>
+ *             <enumeration value="calcium-binding region"/>
+ *             <enumeration value="chain"/>
+ *             <enumeration value="coiled-coil region"/>
+ *             <enumeration value="compositionally biased region"/>
+ *             <enumeration value="cross-link"/>
+ *             <enumeration value="disulfide bond"/>
+ *             <enumeration value="DNA-binding region"/>
+ *             <enumeration value="domain"/>
+ *             <enumeration value="glycosylation site"/>
+ *             <enumeration value="helix"/>
+ *             <enumeration value="initiator methionine"/>
+ *             <enumeration value="lipid moiety-binding region"/>
+ *             <enumeration value="metal ion-binding site"/>
+ *             <enumeration value="modified residue"/>
+ *             <enumeration value="mutagenesis site"/>
+ *             <enumeration value="non-consecutive residues"/>
+ *             <enumeration value="non-terminal residue"/>
+ *             <enumeration value="nucleotide phosphate-binding region"/>
+ *             <enumeration value="peptide"/>
+ *             <enumeration value="propeptide"/>
+ *             <enumeration value="region of interest"/>
+ *             <enumeration value="repeat"/>
+ *             <enumeration value="non-standard amino acid"/>
+ *             <enumeration value="sequence conflict"/>
+ *             <enumeration value="sequence variant"/>
+ *             <enumeration value="short sequence motif"/>
+ *             <enumeration value="signal peptide"/>
+ *             <enumeration value="site"/>
+ *             <enumeration value="splice variant"/>
+ *             <enumeration value="strand"/>
+ *             <enumeration value="topological domain"/>
+ *             <enumeration value="transit peptide"/>
+ *             <enumeration value="transmembrane region"/>
+ *             <enumeration value="turn"/>
+ *             <enumeration value="unsure residue"/>
+ *             <enumeration value="zinc finger region"/>
+ *             <enumeration value="intramembrane region"/>
+ *           </restriction>
+ *         </simpleType>
+ *       </attribute>
+ *       <attribute name="status">
+ *         <simpleType>
+ *           <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *             <enumeration value="by similarity"/>
+ *             <enumeration value="probable"/>
+ *             <enumeration value="potential"/>
+ *           </restriction>
+ *         </simpleType>
+ *       </attribute>
+ *       <attribute name="id" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="description" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
+ *       <attribute name="ref" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "featureType", propOrder = { + "original", + "variation", + "location" +}) +public class FeatureType { + + protected String original; + protected List variation; + @XmlElement(required = true) + protected LocationType location; + @XmlAttribute(name = "type", required = true) + protected String type; + @XmlAttribute(name = "status") + protected String status; + @XmlAttribute(name = "id") + protected String id; + @XmlAttribute(name = "description") + protected String description; + @XmlAttribute(name = "evidence") + protected List evidence; + @XmlAttribute(name = "ref") + protected String ref; + + /** + * Gets the value of the original property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getOriginal() { + return original; + } + + /** + * Sets the value of the original property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setOriginal(String value) { + this.original = value; + } + + /** + * Gets the value of the variation property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the variation property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getVariation().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * + */ + public List getVariation() { + if (variation == null) { + variation = new ArrayList(); + } + return this.variation; + } + + /** + * Gets the value of the location property. + * + * @return + * possible object is + * {@link LocationType } + * + */ + public LocationType getLocation() { + return location; + } + + /** + * Sets the value of the location property. + * + * @param value + * allowed object is + * {@link LocationType } + * + */ + public void setLocation(LocationType value) { + this.location = value; + } + + /** + * Gets the value of the type property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getType() { + return type; + } + + /** + * Sets the value of the type property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setType(String value) { + this.type = value; + } + + /** + * Gets the value of the status property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getStatus() { + return status; + } + + /** + * Sets the value of the status property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setStatus(String value) { + this.status = value; + } + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + + /** + * Gets the value of the description property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDescription() { + return description; + } + + /** + * Sets the value of the description property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDescription(String value) { + this.description = value; + } + + /** + * Gets the value of the evidence property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the evidence property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getEvidence().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Integer } + * + * + */ + public List getEvidence() { + if (evidence == null) { + evidence = new ArrayList(); + } + return this.evidence; + } + + /** + * Gets the value of the ref property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getRef() { + return ref; + } + + /** + * Sets the value of the ref property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setRef(String value) { + this.ref = value; + } + +} diff --git a/src/jalview/xml/binding/uniprot/GeneLocationType.java b/src/jalview/xml/binding/uniprot/GeneLocationType.java new file mode 100644 index 0000000..5a2ebcf --- /dev/null +++ b/src/jalview/xml/binding/uniprot/GeneLocationType.java @@ -0,0 +1,152 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2018.09.13 at 10:18:53 AM BST +// + + +package jalview.xml.binding.uniprot; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; + + +/** + * Describes non-nuclear gene locations (organelles and plasmids). + * Equivalent to the flat file OG-line. + * + *

Java class for geneLocationType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="geneLocationType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="name" type="{http://uniprot.org/uniprot}statusType" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="type" use="required">
+ *         <simpleType>
+ *           <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *             <enumeration value="apicoplast"/>
+ *             <enumeration value="chloroplast"/>
+ *             <enumeration value="organellar chromatophore"/>
+ *             <enumeration value="cyanelle"/>
+ *             <enumeration value="hydrogenosome"/>
+ *             <enumeration value="mitochondrion"/>
+ *             <enumeration value="non-photosynthetic plastid"/>
+ *             <enumeration value="nucleomorph"/>
+ *             <enumeration value="plasmid"/>
+ *             <enumeration value="plastid"/>
+ *           </restriction>
+ *         </simpleType>
+ *       </attribute>
+ *       <attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "geneLocationType", propOrder = { + "name" +}) +public class GeneLocationType { + + protected List name; + @XmlAttribute(name = "type", required = true) + protected String type; + @XmlAttribute(name = "evidence") + protected List evidence; + + /** + * Gets the value of the name property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the name property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getName().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link StatusType } + * + * + */ + public List getName() { + if (name == null) { + name = new ArrayList(); + } + return this.name; + } + + /** + * Gets the value of the type property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getType() { + return type; + } + + /** + * Sets the value of the type property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setType(String value) { + this.type = value; + } + + /** + * Gets the value of the evidence property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the evidence property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getEvidence().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Integer } + * + * + */ + public List getEvidence() { + if (evidence == null) { + evidence = new ArrayList(); + } + return this.evidence; + } + +} diff --git a/src/jalview/xml/binding/uniprot/GeneNameType.java b/src/jalview/xml/binding/uniprot/GeneNameType.java new file mode 100644 index 0000000..1716731 --- /dev/null +++ b/src/jalview/xml/binding/uniprot/GeneNameType.java @@ -0,0 +1,140 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2018.09.13 at 10:18:53 AM BST +// + + +package jalview.xml.binding.uniprot; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; + + +/** + * Describes different types of gene designations. + * Equivalent to the flat file GN-line. + * + *

Java class for geneNameType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="geneNameType">
+ *   <simpleContent>
+ *     <extension base="<http://www.w3.org/2001/XMLSchema>string">
+ *       <attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
+ *       <attribute name="type" use="required">
+ *         <simpleType>
+ *           <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *             <enumeration value="primary"/>
+ *             <enumeration value="synonym"/>
+ *             <enumeration value="ordered locus"/>
+ *             <enumeration value="ORF"/>
+ *           </restriction>
+ *         </simpleType>
+ *       </attribute>
+ *     </extension>
+ *   </simpleContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "geneNameType", propOrder = { + "value" +}) +public class GeneNameType { + + @XmlValue + protected String value; + @XmlAttribute(name = "evidence") + protected List evidence; + @XmlAttribute(name = "type", required = true) + protected String type; + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setValue(String value) { + this.value = value; + } + + /** + * Gets the value of the evidence property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the evidence property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getEvidence().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Integer } + * + * + */ + public List getEvidence() { + if (evidence == null) { + evidence = new ArrayList(); + } + return this.evidence; + } + + /** + * Gets the value of the type property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getType() { + return type; + } + + /** + * Sets the value of the type property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setType(String value) { + this.type = value; + } + +} diff --git a/src/jalview/xml/binding/uniprot/GeneType.java b/src/jalview/xml/binding/uniprot/GeneType.java new file mode 100644 index 0000000..b466644 --- /dev/null +++ b/src/jalview/xml/binding/uniprot/GeneType.java @@ -0,0 +1,79 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2018.09.13 at 10:18:53 AM BST +// + + +package jalview.xml.binding.uniprot; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + * Describes a gene. + * Equivalent to the flat file GN-line. + * + *

Java class for geneType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="geneType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="name" type="{http://uniprot.org/uniprot}geneNameType" maxOccurs="unbounded"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "geneType", propOrder = { + "name" +}) +public class GeneType { + + @XmlElement(required = true) + protected List name; + + /** + * Gets the value of the name property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the name property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getName().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link GeneNameType } + * + * + */ + public List getName() { + if (name == null) { + name = new ArrayList(); + } + return this.name; + } + +} diff --git a/src/jalview/xml/binding/uniprot/ImportedFromType.java b/src/jalview/xml/binding/uniprot/ImportedFromType.java new file mode 100644 index 0000000..92fa6f4 --- /dev/null +++ b/src/jalview/xml/binding/uniprot/ImportedFromType.java @@ -0,0 +1,71 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2018.09.13 at 10:18:53 AM BST +// + + +package jalview.xml.binding.uniprot; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + * Describes the source of the evidence, when it is not assigned by UniProt, but imported from an external database. + * + *

Java class for importedFromType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="importedFromType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="dbReference" type="{http://uniprot.org/uniprot}dbReferenceType"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "importedFromType", propOrder = { + "dbReference" +}) +public class ImportedFromType { + + @XmlElement(required = true) + protected DbReferenceType dbReference; + + /** + * Gets the value of the dbReference property. + * + * @return + * possible object is + * {@link DbReferenceType } + * + */ + public DbReferenceType getDbReference() { + return dbReference; + } + + /** + * Sets the value of the dbReference property. + * + * @param value + * allowed object is + * {@link DbReferenceType } + * + */ + public void setDbReference(DbReferenceType value) { + this.dbReference = value; + } + +} diff --git a/src/jalview/xml/binding/uniprot/InteractantType.java b/src/jalview/xml/binding/uniprot/InteractantType.java new file mode 100644 index 0000000..66ba19d --- /dev/null +++ b/src/jalview/xml/binding/uniprot/InteractantType.java @@ -0,0 +1,119 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2018.09.13 at 10:18:53 AM BST +// + + +package jalview.xml.binding.uniprot; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for interactantType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="interactantType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <group ref="{http://uniprot.org/uniprot}interactantGroup" minOccurs="0"/>
+ *       <attribute name="intactId" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "interactantType", propOrder = { + "id", + "label" +}) +public class InteractantType { + + protected String id; + protected String label; + @XmlAttribute(name = "intactId", required = true) + protected String intactId; + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + + /** + * Gets the value of the label property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getLabel() { + return label; + } + + /** + * Sets the value of the label property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setLabel(String value) { + this.label = value; + } + + /** + * Gets the value of the intactId property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getIntactId() { + return intactId; + } + + /** + * Sets the value of the intactId property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setIntactId(String value) { + this.intactId = value; + } + +} diff --git a/src/jalview/xml/binding/uniprot/IsoformType.java b/src/jalview/xml/binding/uniprot/IsoformType.java new file mode 100644 index 0000000..35a085a --- /dev/null +++ b/src/jalview/xml/binding/uniprot/IsoformType.java @@ -0,0 +1,370 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2018.09.13 at 10:18:53 AM BST +// + + +package jalview.xml.binding.uniprot; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; + + +/** + * Describes isoforms in 'alternative products' annotations. + * + *

Java class for isoformType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="isoformType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="id" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/>
+ *         <element name="name" maxOccurs="unbounded">
+ *           <complexType>
+ *             <simpleContent>
+ *               <extension base="<http://www.w3.org/2001/XMLSchema>string">
+ *                 <attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
+ *               </extension>
+ *             </simpleContent>
+ *           </complexType>
+ *         </element>
+ *         <element name="sequence">
+ *           <complexType>
+ *             <complexContent>
+ *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 <attribute name="type" use="required">
+ *                   <simpleType>
+ *                     <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *                       <enumeration value="not described"/>
+ *                       <enumeration value="described"/>
+ *                       <enumeration value="displayed"/>
+ *                       <enumeration value="external"/>
+ *                     </restriction>
+ *                   </simpleType>
+ *                 </attribute>
+ *                 <attribute name="ref" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *               </restriction>
+ *             </complexContent>
+ *           </complexType>
+ *         </element>
+ *         <element name="text" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "isoformType", propOrder = { + "id", + "name", + "sequence", + "text" +}) +public class IsoformType { + + @XmlElement(required = true) + protected List id; + @XmlElement(required = true) + protected List name; + @XmlElement(required = true) + protected IsoformType.Sequence sequence; + protected List text; + + /** + * Gets the value of the id property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the id property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getId().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * + */ + public List getId() { + if (id == null) { + id = new ArrayList(); + } + return this.id; + } + + /** + * Gets the value of the name property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the name property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getName().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link IsoformType.Name } + * + * + */ + public List getName() { + if (name == null) { + name = new ArrayList(); + } + return this.name; + } + + /** + * Gets the value of the sequence property. + * + * @return + * possible object is + * {@link IsoformType.Sequence } + * + */ + public IsoformType.Sequence getSequence() { + return sequence; + } + + /** + * Sets the value of the sequence property. + * + * @param value + * allowed object is + * {@link IsoformType.Sequence } + * + */ + public void setSequence(IsoformType.Sequence value) { + this.sequence = value; + } + + /** + * Gets the value of the text property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the text property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getText().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link EvidencedStringType } + * + * + */ + public List getText() { + if (text == null) { + text = new ArrayList(); + } + return this.text; + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <simpleContent>
+     *     <extension base="<http://www.w3.org/2001/XMLSchema>string">
+     *       <attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
+     *     </extension>
+     *   </simpleContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "value" + }) + public static class Name { + + @XmlValue + protected String value; + @XmlAttribute(name = "evidence") + protected List evidence; + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setValue(String value) { + this.value = value; + } + + /** + * Gets the value of the evidence property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the evidence property. + * + *

+ * For example, to add a new item, do as follows: + *

+         *    getEvidence().add(newItem);
+         * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Integer } + * + * + */ + public List getEvidence() { + if (evidence == null) { + evidence = new ArrayList(); + } + return this.evidence; + } + + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <complexContent>
+     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       <attribute name="type" use="required">
+     *         <simpleType>
+     *           <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+     *             <enumeration value="not described"/>
+     *             <enumeration value="described"/>
+     *             <enumeration value="displayed"/>
+     *             <enumeration value="external"/>
+     *           </restriction>
+     *         </simpleType>
+     *       </attribute>
+     *       <attribute name="ref" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *     </restriction>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class Sequence { + + @XmlAttribute(name = "type", required = true) + protected String type; + @XmlAttribute(name = "ref") + protected String ref; + + /** + * Gets the value of the type property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getType() { + return type; + } + + /** + * Sets the value of the type property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setType(String value) { + this.type = value; + } + + /** + * Gets the value of the ref property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getRef() { + return ref; + } + + /** + * Sets the value of the ref property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setRef(String value) { + this.ref = value; + } + + } + +} diff --git a/src/jalview/xml/binding/uniprot/KeywordType.java b/src/jalview/xml/binding/uniprot/KeywordType.java new file mode 100644 index 0000000..5b7e0f7 --- /dev/null +++ b/src/jalview/xml/binding/uniprot/KeywordType.java @@ -0,0 +1,128 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2018.09.13 at 10:18:53 AM BST +// + + +package jalview.xml.binding.uniprot; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; + + +/** + *

Java class for keywordType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="keywordType">
+ *   <simpleContent>
+ *     <extension base="<http://www.w3.org/2001/XMLSchema>string">
+ *       <attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
+ *       <attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     </extension>
+ *   </simpleContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "keywordType", propOrder = { + "value" +}) +public class KeywordType { + + @XmlValue + protected String value; + @XmlAttribute(name = "evidence") + protected List evidence; + @XmlAttribute(name = "id", required = true) + protected String id; + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setValue(String value) { + this.value = value; + } + + /** + * Gets the value of the evidence property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the evidence property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getEvidence().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Integer } + * + * + */ + public List getEvidence() { + if (evidence == null) { + evidence = new ArrayList(); + } + return this.evidence; + } + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + +} diff --git a/src/jalview/xml/binding/uniprot/LocationType.java b/src/jalview/xml/binding/uniprot/LocationType.java new file mode 100644 index 0000000..749871a --- /dev/null +++ b/src/jalview/xml/binding/uniprot/LocationType.java @@ -0,0 +1,153 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2018.09.13 at 10:18:53 AM BST +// + + +package jalview.xml.binding.uniprot; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; + + +/** + * Describes a sequence location as either a range with a begin and end or as a position. The 'sequence' attribute is only used when the location is not on the canonical sequence displayed in the current entry. + * + *

Java class for locationType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="locationType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <choice>
+ *         <sequence>
+ *           <element name="begin" type="{http://uniprot.org/uniprot}positionType"/>
+ *           <element name="end" type="{http://uniprot.org/uniprot}positionType"/>
+ *         </sequence>
+ *         <element name="position" type="{http://uniprot.org/uniprot}positionType"/>
+ *       </choice>
+ *       <attribute name="sequence" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "locationType", propOrder = { + "begin", + "end", + "position" +}) +public class LocationType { + + protected PositionType begin; + protected PositionType end; + protected PositionType position; + @XmlAttribute(name = "sequence") + protected String sequence; + + /** + * Gets the value of the begin property. + * + * @return + * possible object is + * {@link PositionType } + * + */ + public PositionType getBegin() { + return begin; + } + + /** + * Sets the value of the begin property. + * + * @param value + * allowed object is + * {@link PositionType } + * + */ + public void setBegin(PositionType value) { + this.begin = value; + } + + /** + * Gets the value of the end property. + * + * @return + * possible object is + * {@link PositionType } + * + */ + public PositionType getEnd() { + return end; + } + + /** + * Sets the value of the end property. + * + * @param value + * allowed object is + * {@link PositionType } + * + */ + public void setEnd(PositionType value) { + this.end = value; + } + + /** + * Gets the value of the position property. + * + * @return + * possible object is + * {@link PositionType } + * + */ + public PositionType getPosition() { + return position; + } + + /** + * Sets the value of the position property. + * + * @param value + * allowed object is + * {@link PositionType } + * + */ + public void setPosition(PositionType value) { + this.position = value; + } + + /** + * Gets the value of the sequence property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSequence() { + return sequence; + } + + /** + * Sets the value of the sequence property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSequence(String value) { + this.sequence = value; + } + +} diff --git a/src/jalview/xml/binding/uniprot/MoleculeType.java b/src/jalview/xml/binding/uniprot/MoleculeType.java new file mode 100644 index 0000000..0392a4b --- /dev/null +++ b/src/jalview/xml/binding/uniprot/MoleculeType.java @@ -0,0 +1,96 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2018.09.13 at 10:18:53 AM BST +// + + +package jalview.xml.binding.uniprot; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; + + +/** + * Describes a molecule by name or unique identifier. + * + *

Java class for moleculeType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="moleculeType">
+ *   <simpleContent>
+ *     <extension base="<http://www.w3.org/2001/XMLSchema>string">
+ *       <attribute name="id" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     </extension>
+ *   </simpleContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "moleculeType", propOrder = { + "value" +}) +public class MoleculeType { + + @XmlValue + protected String value; + @XmlAttribute(name = "id") + protected String id; + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setValue(String value) { + this.value = value; + } + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + +} diff --git a/src/jalview/xml/binding/uniprot/NameListType.java b/src/jalview/xml/binding/uniprot/NameListType.java new file mode 100644 index 0000000..70d5e2f --- /dev/null +++ b/src/jalview/xml/binding/uniprot/NameListType.java @@ -0,0 +1,82 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2018.09.13 at 10:18:53 AM BST +// + + +package jalview.xml.binding.uniprot; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElements; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for nameListType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="nameListType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <choice maxOccurs="unbounded">
+ *         <element name="consortium" type="{http://uniprot.org/uniprot}consortiumType"/>
+ *         <element name="person" type="{http://uniprot.org/uniprot}personType"/>
+ *       </choice>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "nameListType", propOrder = { + "consortiumOrPerson" +}) +public class NameListType { + + @XmlElements({ + @XmlElement(name = "consortium", type = ConsortiumType.class), + @XmlElement(name = "person", type = PersonType.class) + }) + protected List consortiumOrPerson; + + /** + * Gets the value of the consortiumOrPerson property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the consortiumOrPerson property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getConsortiumOrPerson().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link ConsortiumType } + * {@link PersonType } + * + * + */ + public List getConsortiumOrPerson() { + if (consortiumOrPerson == null) { + consortiumOrPerson = new ArrayList(); + } + return this.consortiumOrPerson; + } + +} diff --git a/src/jalview/xml/binding/uniprot/ObjectFactory.java b/src/jalview/xml/binding/uniprot/ObjectFactory.java new file mode 100644 index 0000000..20cba73 --- /dev/null +++ b/src/jalview/xml/binding/uniprot/ObjectFactory.java @@ -0,0 +1,492 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2018.09.13 at 10:18:53 AM BST +// + + +package jalview.xml.binding.uniprot; + +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlElementDecl; +import javax.xml.bind.annotation.XmlRegistry; +import javax.xml.namespace.QName; + + +/** + * This object contains factory methods for each + * Java content interface and Java element interface + * generated in the jalview.xml.binding.uniprot package. + *

An ObjectFactory allows you to programatically + * construct new instances of the Java representation + * for XML content. The Java representation of XML + * content can consist of schema derived interfaces + * and classes representing the binding of schema + * type definitions, element declarations and model + * groups. Factory methods for each of these are + * provided in this class. + * + */ +@XmlRegistry +public class ObjectFactory { + + private final static QName _Copyright_QNAME = new QName("http://uniprot.org/uniprot", "copyright"); + + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: jalview.xml.binding.uniprot + * + */ + public ObjectFactory() { + } + + /** + * Create an instance of {@link SourceDataType } + * + */ + public SourceDataType createSourceDataType() { + return new SourceDataType(); + } + + /** + * Create an instance of {@link IsoformType } + * + */ + public IsoformType createIsoformType() { + return new IsoformType(); + } + + /** + * Create an instance of {@link CommentType } + * + */ + public CommentType createCommentType() { + return new CommentType(); + } + + /** + * Create an instance of {@link CommentType.Conflict } + * + */ + public CommentType.Conflict createCommentTypeConflict() { + return new CommentType.Conflict(); + } + + /** + * Create an instance of {@link OrganismType } + * + */ + public OrganismType createOrganismType() { + return new OrganismType(); + } + + /** + * Create an instance of {@link ProteinType } + * + */ + public ProteinType createProteinType() { + return new ProteinType(); + } + + /** + * Create an instance of {@link Entry } + * + */ + public Entry createEntry() { + return new Entry(); + } + + /** + * Create an instance of {@link GeneType } + * + */ + public GeneType createGeneType() { + return new GeneType(); + } + + /** + * Create an instance of {@link GeneLocationType } + * + */ + public GeneLocationType createGeneLocationType() { + return new GeneLocationType(); + } + + /** + * Create an instance of {@link ReferenceType } + * + */ + public ReferenceType createReferenceType() { + return new ReferenceType(); + } + + /** + * Create an instance of {@link DbReferenceType } + * + */ + public DbReferenceType createDbReferenceType() { + return new DbReferenceType(); + } + + /** + * Create an instance of {@link ProteinExistenceType } + * + */ + public ProteinExistenceType createProteinExistenceType() { + return new ProteinExistenceType(); + } + + /** + * Create an instance of {@link KeywordType } + * + */ + public KeywordType createKeywordType() { + return new KeywordType(); + } + + /** + * Create an instance of {@link FeatureType } + * + */ + public FeatureType createFeatureType() { + return new FeatureType(); + } + + /** + * Create an instance of {@link EvidenceType } + * + */ + public EvidenceType createEvidenceType() { + return new EvidenceType(); + } + + /** + * Create an instance of {@link SequenceType } + * + */ + public SequenceType createSequenceType() { + return new SequenceType(); + } + + /** + * Create an instance of {@link Uniprot } + * + */ + public Uniprot createUniprot() { + return new Uniprot(); + } + + /** + * Create an instance of {@link StatusType } + * + */ + public StatusType createStatusType() { + return new StatusType(); + } + + /** + * Create an instance of {@link PositionType } + * + */ + public PositionType createPositionType() { + return new PositionType(); + } + + /** + * Create an instance of {@link ConsortiumType } + * + */ + public ConsortiumType createConsortiumType() { + return new ConsortiumType(); + } + + /** + * Create an instance of {@link GeneNameType } + * + */ + public GeneNameType createGeneNameType() { + return new GeneNameType(); + } + + /** + * Create an instance of {@link LocationType } + * + */ + public LocationType createLocationType() { + return new LocationType(); + } + + /** + * Create an instance of {@link CitationType } + * + */ + public CitationType createCitationType() { + return new CitationType(); + } + + /** + * Create an instance of {@link PropertyType } + * + */ + public PropertyType createPropertyType() { + return new PropertyType(); + } + + /** + * Create an instance of {@link CofactorType } + * + */ + public CofactorType createCofactorType() { + return new CofactorType(); + } + + /** + * Create an instance of {@link EvidencedStringType } + * + */ + public EvidencedStringType createEvidencedStringType() { + return new EvidencedStringType(); + } + + /** + * Create an instance of {@link PersonType } + * + */ + public PersonType createPersonType() { + return new PersonType(); + } + + /** + * Create an instance of {@link ImportedFromType } + * + */ + public ImportedFromType createImportedFromType() { + return new ImportedFromType(); + } + + /** + * Create an instance of {@link EventType } + * + */ + public EventType createEventType() { + return new EventType(); + } + + /** + * Create an instance of {@link InteractantType } + * + */ + public InteractantType createInteractantType() { + return new InteractantType(); + } + + /** + * Create an instance of {@link NameListType } + * + */ + public NameListType createNameListType() { + return new NameListType(); + } + + /** + * Create an instance of {@link SourceType } + * + */ + public SourceType createSourceType() { + return new SourceType(); + } + + /** + * Create an instance of {@link MoleculeType } + * + */ + public MoleculeType createMoleculeType() { + return new MoleculeType(); + } + + /** + * Create an instance of {@link OrganismNameType } + * + */ + public OrganismNameType createOrganismNameType() { + return new OrganismNameType(); + } + + /** + * Create an instance of {@link SubcellularLocationType } + * + */ + public SubcellularLocationType createSubcellularLocationType() { + return new SubcellularLocationType(); + } + + /** + * Create an instance of {@link SourceDataType.Strain } + * + */ + public SourceDataType.Strain createSourceDataTypeStrain() { + return new SourceDataType.Strain(); + } + + /** + * Create an instance of {@link SourceDataType.Plasmid } + * + */ + public SourceDataType.Plasmid createSourceDataTypePlasmid() { + return new SourceDataType.Plasmid(); + } + + /** + * Create an instance of {@link SourceDataType.Transposon } + * + */ + public SourceDataType.Transposon createSourceDataTypeTransposon() { + return new SourceDataType.Transposon(); + } + + /** + * Create an instance of {@link SourceDataType.Tissue } + * + */ + public SourceDataType.Tissue createSourceDataTypeTissue() { + return new SourceDataType.Tissue(); + } + + /** + * Create an instance of {@link IsoformType.Name } + * + */ + public IsoformType.Name createIsoformTypeName() { + return new IsoformType.Name(); + } + + /** + * Create an instance of {@link IsoformType.Sequence } + * + */ + public IsoformType.Sequence createIsoformTypeSequence() { + return new IsoformType.Sequence(); + } + + /** + * Create an instance of {@link CommentType.Absorption } + * + */ + public CommentType.Absorption createCommentTypeAbsorption() { + return new CommentType.Absorption(); + } + + /** + * Create an instance of {@link CommentType.Kinetics } + * + */ + public CommentType.Kinetics createCommentTypeKinetics() { + return new CommentType.Kinetics(); + } + + /** + * Create an instance of {@link CommentType.PhDependence } + * + */ + public CommentType.PhDependence createCommentTypePhDependence() { + return new CommentType.PhDependence(); + } + + /** + * Create an instance of {@link CommentType.RedoxPotential } + * + */ + public CommentType.RedoxPotential createCommentTypeRedoxPotential() { + return new CommentType.RedoxPotential(); + } + + /** + * Create an instance of {@link CommentType.TemperatureDependence } + * + */ + public CommentType.TemperatureDependence createCommentTypeTemperatureDependence() { + return new CommentType.TemperatureDependence(); + } + + /** + * Create an instance of {@link CommentType.Link } + * + */ + public CommentType.Link createCommentTypeLink() { + return new CommentType.Link(); + } + + /** + * Create an instance of {@link CommentType.Disease } + * + */ + public CommentType.Disease createCommentTypeDisease() { + return new CommentType.Disease(); + } + + /** + * Create an instance of {@link CommentType.Conflict.Sequence } + * + */ + public CommentType.Conflict.Sequence createCommentTypeConflictSequence() { + return new CommentType.Conflict.Sequence(); + } + + /** + * Create an instance of {@link OrganismType.Lineage } + * + */ + public OrganismType.Lineage createOrganismTypeLineage() { + return new OrganismType.Lineage(); + } + + /** + * Create an instance of {@link ProteinType.RecommendedName } + * + */ + public ProteinType.RecommendedName createProteinTypeRecommendedName() { + return new ProteinType.RecommendedName(); + } + + /** + * Create an instance of {@link ProteinType.AlternativeName } + * + */ + public ProteinType.AlternativeName createProteinTypeAlternativeName() { + return new ProteinType.AlternativeName(); + } + + /** + * Create an instance of {@link ProteinType.SubmittedName } + * + */ + public ProteinType.SubmittedName createProteinTypeSubmittedName() { + return new ProteinType.SubmittedName(); + } + + /** + * Create an instance of {@link ProteinType.Domain } + * + */ + public ProteinType.Domain createProteinTypeDomain() { + return new ProteinType.Domain(); + } + + /** + * Create an instance of {@link ProteinType.Component } + * + */ + public ProteinType.Component createProteinTypeComponent() { + return new ProteinType.Component(); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://uniprot.org/uniprot", name = "copyright") + public JAXBElement createCopyright(String value) { + return new JAXBElement(_Copyright_QNAME, String.class, null, value); + } + +} diff --git a/src/jalview/xml/binding/uniprot/OrganismNameType.java b/src/jalview/xml/binding/uniprot/OrganismNameType.java new file mode 100644 index 0000000..a658e36 --- /dev/null +++ b/src/jalview/xml/binding/uniprot/OrganismNameType.java @@ -0,0 +1,106 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2018.09.13 at 10:18:53 AM BST +// + + +package jalview.xml.binding.uniprot; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; + + +/** + * Describes different types of source organism names. + * + *

Java class for organismNameType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="organismNameType">
+ *   <simpleContent>
+ *     <extension base="<http://www.w3.org/2001/XMLSchema>string">
+ *       <attribute name="type" use="required">
+ *         <simpleType>
+ *           <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *             <enumeration value="common"/>
+ *             <enumeration value="full"/>
+ *             <enumeration value="scientific"/>
+ *             <enumeration value="synonym"/>
+ *             <enumeration value="abbreviation"/>
+ *           </restriction>
+ *         </simpleType>
+ *       </attribute>
+ *     </extension>
+ *   </simpleContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "organismNameType", propOrder = { + "value" +}) +public class OrganismNameType { + + @XmlValue + protected String value; + @XmlAttribute(name = "type", required = true) + protected String type; + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setValue(String value) { + this.value = value; + } + + /** + * Gets the value of the type property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getType() { + return type; + } + + /** + * Sets the value of the type property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setType(String value) { + this.type = value; + } + +} diff --git a/src/jalview/xml/binding/uniprot/OrganismType.java b/src/jalview/xml/binding/uniprot/OrganismType.java new file mode 100644 index 0000000..feabacd --- /dev/null +++ b/src/jalview/xml/binding/uniprot/OrganismType.java @@ -0,0 +1,241 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2018.09.13 at 10:18:53 AM BST +// + + +package jalview.xml.binding.uniprot; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + * Describes the source organism. + * + *

Java class for organismType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="organismType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="name" type="{http://uniprot.org/uniprot}organismNameType" maxOccurs="unbounded"/>
+ *         <element name="dbReference" type="{http://uniprot.org/uniprot}dbReferenceType" maxOccurs="unbounded"/>
+ *         <element name="lineage" minOccurs="0">
+ *           <complexType>
+ *             <complexContent>
+ *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 <sequence>
+ *                   <element name="taxon" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/>
+ *                 </sequence>
+ *               </restriction>
+ *             </complexContent>
+ *           </complexType>
+ *         </element>
+ *       </sequence>
+ *       <attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "organismType", propOrder = { + "name", + "dbReference", + "lineage" +}) +public class OrganismType { + + @XmlElement(required = true) + protected List name; + @XmlElement(required = true) + protected List dbReference; + protected OrganismType.Lineage lineage; + @XmlAttribute(name = "evidence") + protected List evidence; + + /** + * Gets the value of the name property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the name property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getName().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link OrganismNameType } + * + * + */ + public List getName() { + if (name == null) { + name = new ArrayList(); + } + return this.name; + } + + /** + * Gets the value of the dbReference property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the dbReference property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getDbReference().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link DbReferenceType } + * + * + */ + public List getDbReference() { + if (dbReference == null) { + dbReference = new ArrayList(); + } + return this.dbReference; + } + + /** + * Gets the value of the lineage property. + * + * @return + * possible object is + * {@link OrganismType.Lineage } + * + */ + public OrganismType.Lineage getLineage() { + return lineage; + } + + /** + * Sets the value of the lineage property. + * + * @param value + * allowed object is + * {@link OrganismType.Lineage } + * + */ + public void setLineage(OrganismType.Lineage value) { + this.lineage = value; + } + + /** + * Gets the value of the evidence property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the evidence property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getEvidence().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Integer } + * + * + */ + public List getEvidence() { + if (evidence == null) { + evidence = new ArrayList(); + } + return this.evidence; + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <complexContent>
+     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       <sequence>
+     *         <element name="taxon" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/>
+     *       </sequence>
+     *     </restriction>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "taxon" + }) + public static class Lineage { + + @XmlElement(required = true) + protected List taxon; + + /** + * Gets the value of the taxon property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the taxon property. + * + *

+ * For example, to add a new item, do as follows: + *

+         *    getTaxon().add(newItem);
+         * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * + */ + public List getTaxon() { + if (taxon == null) { + taxon = new ArrayList(); + } + return this.taxon; + } + + } + +} diff --git a/src/jalview/xml/binding/uniprot/PersonType.java b/src/jalview/xml/binding/uniprot/PersonType.java new file mode 100644 index 0000000..2a3e8bd --- /dev/null +++ b/src/jalview/xml/binding/uniprot/PersonType.java @@ -0,0 +1,65 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2018.09.13 at 10:18:53 AM BST +// + + +package jalview.xml.binding.uniprot; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for personType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="personType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "personType") +public class PersonType { + + @XmlAttribute(name = "name", required = true) + protected String name; + + /** + * Gets the value of the name property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getName() { + return name; + } + + /** + * Sets the value of the name property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setName(String value) { + this.name = value; + } + +} diff --git a/src/jalview/xml/binding/uniprot/PositionType.java b/src/jalview/xml/binding/uniprot/PositionType.java new file mode 100644 index 0000000..92d8906 --- /dev/null +++ b/src/jalview/xml/binding/uniprot/PositionType.java @@ -0,0 +1,143 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2018.09.13 at 10:18:53 AM BST +// + + +package jalview.xml.binding.uniprot; + +import java.math.BigInteger; +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for positionType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="positionType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="position" type="{http://www.w3.org/2001/XMLSchema}unsignedLong" />
+ *       <attribute name="status" default="certain">
+ *         <simpleType>
+ *           <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *             <enumeration value="certain"/>
+ *             <enumeration value="uncertain"/>
+ *             <enumeration value="less than"/>
+ *             <enumeration value="greater than"/>
+ *             <enumeration value="unknown"/>
+ *           </restriction>
+ *         </simpleType>
+ *       </attribute>
+ *       <attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "positionType") +public class PositionType { + + @XmlAttribute(name = "position") + @XmlSchemaType(name = "unsignedLong") + protected BigInteger position; + @XmlAttribute(name = "status") + protected String status; + @XmlAttribute(name = "evidence") + protected List evidence; + + /** + * Gets the value of the position property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getPosition() { + return position; + } + + /** + * Sets the value of the position property. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setPosition(BigInteger value) { + this.position = value; + } + + /** + * Gets the value of the status property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getStatus() { + if (status == null) { + return "certain"; + } else { + return status; + } + } + + /** + * Sets the value of the status property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setStatus(String value) { + this.status = value; + } + + /** + * Gets the value of the evidence property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the evidence property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getEvidence().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Integer } + * + * + */ + public List getEvidence() { + if (evidence == null) { + evidence = new ArrayList(); + } + return this.evidence; + } + +} diff --git a/src/jalview/xml/binding/uniprot/PropertyType.java b/src/jalview/xml/binding/uniprot/PropertyType.java new file mode 100644 index 0000000..a9299f4 --- /dev/null +++ b/src/jalview/xml/binding/uniprot/PropertyType.java @@ -0,0 +1,92 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2018.09.13 at 10:18:53 AM BST +// + + +package jalview.xml.binding.uniprot; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for propertyType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="propertyType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="type" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="value" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "propertyType") +public class PropertyType { + + @XmlAttribute(name = "type", required = true) + protected String type; + @XmlAttribute(name = "value", required = true) + protected String value; + + /** + * Gets the value of the type property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getType() { + return type; + } + + /** + * Sets the value of the type property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setType(String value) { + this.type = value; + } + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setValue(String value) { + this.value = value; + } + +} diff --git a/src/jalview/xml/binding/uniprot/ProteinExistenceType.java b/src/jalview/xml/binding/uniprot/ProteinExistenceType.java new file mode 100644 index 0000000..315f62d --- /dev/null +++ b/src/jalview/xml/binding/uniprot/ProteinExistenceType.java @@ -0,0 +1,78 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2018.09.13 at 10:18:53 AM BST +// + + +package jalview.xml.binding.uniprot; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; + + +/** + * Describes the evidence for the protein's existence. + * Equivalent to the flat file PE-line. + * + *

Java class for proteinExistenceType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="proteinExistenceType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="type" use="required">
+ *         <simpleType>
+ *           <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *             <enumeration value="evidence at protein level"/>
+ *             <enumeration value="evidence at transcript level"/>
+ *             <enumeration value="inferred from homology"/>
+ *             <enumeration value="predicted"/>
+ *             <enumeration value="uncertain"/>
+ *           </restriction>
+ *         </simpleType>
+ *       </attribute>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "proteinExistenceType") +public class ProteinExistenceType { + + @XmlAttribute(name = "type", required = true) + protected String type; + + /** + * Gets the value of the type property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getType() { + return type; + } + + /** + * Sets the value of the type property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setType(String value) { + this.type = value; + } + +} diff --git a/src/jalview/xml/binding/uniprot/ProteinType.java b/src/jalview/xml/binding/uniprot/ProteinType.java new file mode 100644 index 0000000..dd5a8be --- /dev/null +++ b/src/jalview/xml/binding/uniprot/ProteinType.java @@ -0,0 +1,1109 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2018.09.13 at 10:18:53 AM BST +// + + +package jalview.xml.binding.uniprot; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + * Describes the names for the protein and parts thereof. + * Equivalent to the flat file DE-line. + * + *

Java class for proteinType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="proteinType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <group ref="{http://uniprot.org/uniprot}proteinNameGroup"/>
+ *         <element name="domain" maxOccurs="unbounded" minOccurs="0">
+ *           <complexType>
+ *             <complexContent>
+ *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 <group ref="{http://uniprot.org/uniprot}proteinNameGroup"/>
+ *               </restriction>
+ *             </complexContent>
+ *           </complexType>
+ *         </element>
+ *         <element name="component" maxOccurs="unbounded" minOccurs="0">
+ *           <complexType>
+ *             <complexContent>
+ *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 <group ref="{http://uniprot.org/uniprot}proteinNameGroup"/>
+ *               </restriction>
+ *             </complexContent>
+ *           </complexType>
+ *         </element>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "proteinType", propOrder = { + "recommendedName", + "alternativeName", + "submittedName", + "allergenName", + "biotechName", + "cdAntigenName", + "innName", + "domain", + "component" +}) +public class ProteinType { + + protected ProteinType.RecommendedName recommendedName; + protected List alternativeName; + protected List submittedName; + protected EvidencedStringType allergenName; + protected EvidencedStringType biotechName; + protected List cdAntigenName; + protected List innName; + protected List domain; + protected List component; + + /** + * Gets the value of the recommendedName property. + * + * @return + * possible object is + * {@link ProteinType.RecommendedName } + * + */ + public ProteinType.RecommendedName getRecommendedName() { + return recommendedName; + } + + /** + * Sets the value of the recommendedName property. + * + * @param value + * allowed object is + * {@link ProteinType.RecommendedName } + * + */ + public void setRecommendedName(ProteinType.RecommendedName value) { + this.recommendedName = value; + } + + /** + * Gets the value of the alternativeName property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the alternativeName property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getAlternativeName().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link ProteinType.AlternativeName } + * + * + */ + public List getAlternativeName() { + if (alternativeName == null) { + alternativeName = new ArrayList(); + } + return this.alternativeName; + } + + /** + * Gets the value of the submittedName property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the submittedName property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getSubmittedName().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link ProteinType.SubmittedName } + * + * + */ + public List getSubmittedName() { + if (submittedName == null) { + submittedName = new ArrayList(); + } + return this.submittedName; + } + + /** + * Gets the value of the allergenName property. + * + * @return + * possible object is + * {@link EvidencedStringType } + * + */ + public EvidencedStringType getAllergenName() { + return allergenName; + } + + /** + * Sets the value of the allergenName property. + * + * @param value + * allowed object is + * {@link EvidencedStringType } + * + */ + public void setAllergenName(EvidencedStringType value) { + this.allergenName = value; + } + + /** + * Gets the value of the biotechName property. + * + * @return + * possible object is + * {@link EvidencedStringType } + * + */ + public EvidencedStringType getBiotechName() { + return biotechName; + } + + /** + * Sets the value of the biotechName property. + * + * @param value + * allowed object is + * {@link EvidencedStringType } + * + */ + public void setBiotechName(EvidencedStringType value) { + this.biotechName = value; + } + + /** + * Gets the value of the cdAntigenName property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the cdAntigenName property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getCdAntigenName().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link EvidencedStringType } + * + * + */ + public List getCdAntigenName() { + if (cdAntigenName == null) { + cdAntigenName = new ArrayList(); + } + return this.cdAntigenName; + } + + /** + * Gets the value of the innName property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the innName property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getInnName().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link EvidencedStringType } + * + * + */ + public List getInnName() { + if (innName == null) { + innName = new ArrayList(); + } + return this.innName; + } + + /** + * Gets the value of the domain property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the domain property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getDomain().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link ProteinType.Domain } + * + * + */ + public List getDomain() { + if (domain == null) { + domain = new ArrayList(); + } + return this.domain; + } + + /** + * Gets the value of the component property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the component property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getComponent().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link ProteinType.Component } + * + * + */ + public List getComponent() { + if (component == null) { + component = new ArrayList(); + } + return this.component; + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <complexContent>
+     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       <sequence>
+     *         <element name="fullName" type="{http://uniprot.org/uniprot}evidencedStringType" minOccurs="0"/>
+     *         <element name="shortName" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded" minOccurs="0"/>
+     *         <element name="ecNumber" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded" minOccurs="0"/>
+     *       </sequence>
+     *     </restriction>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "fullName", + "shortName", + "ecNumber" + }) + public static class AlternativeName { + + protected EvidencedStringType fullName; + protected List shortName; + protected List ecNumber; + + /** + * Gets the value of the fullName property. + * + * @return + * possible object is + * {@link EvidencedStringType } + * + */ + public EvidencedStringType getFullName() { + return fullName; + } + + /** + * Sets the value of the fullName property. + * + * @param value + * allowed object is + * {@link EvidencedStringType } + * + */ + public void setFullName(EvidencedStringType value) { + this.fullName = value; + } + + /** + * Gets the value of the shortName property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the shortName property. + * + *

+ * For example, to add a new item, do as follows: + *

+         *    getShortName().add(newItem);
+         * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link EvidencedStringType } + * + * + */ + public List getShortName() { + if (shortName == null) { + shortName = new ArrayList(); + } + return this.shortName; + } + + /** + * Gets the value of the ecNumber property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the ecNumber property. + * + *

+ * For example, to add a new item, do as follows: + *

+         *    getEcNumber().add(newItem);
+         * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link EvidencedStringType } + * + * + */ + public List getEcNumber() { + if (ecNumber == null) { + ecNumber = new ArrayList(); + } + return this.ecNumber; + } + + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <complexContent>
+     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       <group ref="{http://uniprot.org/uniprot}proteinNameGroup"/>
+     *     </restriction>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "recommendedName", + "alternativeName", + "submittedName", + "allergenName", + "biotechName", + "cdAntigenName", + "innName" + }) + public static class Component { + + protected ProteinType.RecommendedName recommendedName; + protected List alternativeName; + protected List submittedName; + protected EvidencedStringType allergenName; + protected EvidencedStringType biotechName; + protected List cdAntigenName; + protected List innName; + + /** + * Gets the value of the recommendedName property. + * + * @return + * possible object is + * {@link ProteinType.RecommendedName } + * + */ + public ProteinType.RecommendedName getRecommendedName() { + return recommendedName; + } + + /** + * Sets the value of the recommendedName property. + * + * @param value + * allowed object is + * {@link ProteinType.RecommendedName } + * + */ + public void setRecommendedName(ProteinType.RecommendedName value) { + this.recommendedName = value; + } + + /** + * Gets the value of the alternativeName property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the alternativeName property. + * + *

+ * For example, to add a new item, do as follows: + *

+         *    getAlternativeName().add(newItem);
+         * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link ProteinType.AlternativeName } + * + * + */ + public List getAlternativeName() { + if (alternativeName == null) { + alternativeName = new ArrayList(); + } + return this.alternativeName; + } + + /** + * Gets the value of the submittedName property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the submittedName property. + * + *

+ * For example, to add a new item, do as follows: + *

+         *    getSubmittedName().add(newItem);
+         * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link ProteinType.SubmittedName } + * + * + */ + public List getSubmittedName() { + if (submittedName == null) { + submittedName = new ArrayList(); + } + return this.submittedName; + } + + /** + * Gets the value of the allergenName property. + * + * @return + * possible object is + * {@link EvidencedStringType } + * + */ + public EvidencedStringType getAllergenName() { + return allergenName; + } + + /** + * Sets the value of the allergenName property. + * + * @param value + * allowed object is + * {@link EvidencedStringType } + * + */ + public void setAllergenName(EvidencedStringType value) { + this.allergenName = value; + } + + /** + * Gets the value of the biotechName property. + * + * @return + * possible object is + * {@link EvidencedStringType } + * + */ + public EvidencedStringType getBiotechName() { + return biotechName; + } + + /** + * Sets the value of the biotechName property. + * + * @param value + * allowed object is + * {@link EvidencedStringType } + * + */ + public void setBiotechName(EvidencedStringType value) { + this.biotechName = value; + } + + /** + * Gets the value of the cdAntigenName property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the cdAntigenName property. + * + *

+ * For example, to add a new item, do as follows: + *

+         *    getCdAntigenName().add(newItem);
+         * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link EvidencedStringType } + * + * + */ + public List getCdAntigenName() { + if (cdAntigenName == null) { + cdAntigenName = new ArrayList(); + } + return this.cdAntigenName; + } + + /** + * Gets the value of the innName property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the innName property. + * + *

+ * For example, to add a new item, do as follows: + *

+         *    getInnName().add(newItem);
+         * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link EvidencedStringType } + * + * + */ + public List getInnName() { + if (innName == null) { + innName = new ArrayList(); + } + return this.innName; + } + + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <complexContent>
+     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       <group ref="{http://uniprot.org/uniprot}proteinNameGroup"/>
+     *     </restriction>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "recommendedName", + "alternativeName", + "submittedName", + "allergenName", + "biotechName", + "cdAntigenName", + "innName" + }) + public static class Domain { + + protected ProteinType.RecommendedName recommendedName; + protected List alternativeName; + protected List submittedName; + protected EvidencedStringType allergenName; + protected EvidencedStringType biotechName; + protected List cdAntigenName; + protected List innName; + + /** + * Gets the value of the recommendedName property. + * + * @return + * possible object is + * {@link ProteinType.RecommendedName } + * + */ + public ProteinType.RecommendedName getRecommendedName() { + return recommendedName; + } + + /** + * Sets the value of the recommendedName property. + * + * @param value + * allowed object is + * {@link ProteinType.RecommendedName } + * + */ + public void setRecommendedName(ProteinType.RecommendedName value) { + this.recommendedName = value; + } + + /** + * Gets the value of the alternativeName property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the alternativeName property. + * + *

+ * For example, to add a new item, do as follows: + *

+         *    getAlternativeName().add(newItem);
+         * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link ProteinType.AlternativeName } + * + * + */ + public List getAlternativeName() { + if (alternativeName == null) { + alternativeName = new ArrayList(); + } + return this.alternativeName; + } + + /** + * Gets the value of the submittedName property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the submittedName property. + * + *

+ * For example, to add a new item, do as follows: + *

+         *    getSubmittedName().add(newItem);
+         * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link ProteinType.SubmittedName } + * + * + */ + public List getSubmittedName() { + if (submittedName == null) { + submittedName = new ArrayList(); + } + return this.submittedName; + } + + /** + * Gets the value of the allergenName property. + * + * @return + * possible object is + * {@link EvidencedStringType } + * + */ + public EvidencedStringType getAllergenName() { + return allergenName; + } + + /** + * Sets the value of the allergenName property. + * + * @param value + * allowed object is + * {@link EvidencedStringType } + * + */ + public void setAllergenName(EvidencedStringType value) { + this.allergenName = value; + } + + /** + * Gets the value of the biotechName property. + * + * @return + * possible object is + * {@link EvidencedStringType } + * + */ + public EvidencedStringType getBiotechName() { + return biotechName; + } + + /** + * Sets the value of the biotechName property. + * + * @param value + * allowed object is + * {@link EvidencedStringType } + * + */ + public void setBiotechName(EvidencedStringType value) { + this.biotechName = value; + } + + /** + * Gets the value of the cdAntigenName property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the cdAntigenName property. + * + *

+ * For example, to add a new item, do as follows: + *

+         *    getCdAntigenName().add(newItem);
+         * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link EvidencedStringType } + * + * + */ + public List getCdAntigenName() { + if (cdAntigenName == null) { + cdAntigenName = new ArrayList(); + } + return this.cdAntigenName; + } + + /** + * Gets the value of the innName property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the innName property. + * + *

+ * For example, to add a new item, do as follows: + *

+         *    getInnName().add(newItem);
+         * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link EvidencedStringType } + * + * + */ + public List getInnName() { + if (innName == null) { + innName = new ArrayList(); + } + return this.innName; + } + + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <complexContent>
+     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       <sequence>
+     *         <element name="fullName" type="{http://uniprot.org/uniprot}evidencedStringType"/>
+     *         <element name="shortName" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded" minOccurs="0"/>
+     *         <element name="ecNumber" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded" minOccurs="0"/>
+     *       </sequence>
+     *     </restriction>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "fullName", + "shortName", + "ecNumber" + }) + public static class RecommendedName { + + @XmlElement(required = true) + protected EvidencedStringType fullName; + protected List shortName; + protected List ecNumber; + + /** + * Gets the value of the fullName property. + * + * @return + * possible object is + * {@link EvidencedStringType } + * + */ + public EvidencedStringType getFullName() { + return fullName; + } + + /** + * Sets the value of the fullName property. + * + * @param value + * allowed object is + * {@link EvidencedStringType } + * + */ + public void setFullName(EvidencedStringType value) { + this.fullName = value; + } + + /** + * Gets the value of the shortName property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the shortName property. + * + *

+ * For example, to add a new item, do as follows: + *

+         *    getShortName().add(newItem);
+         * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link EvidencedStringType } + * + * + */ + public List getShortName() { + if (shortName == null) { + shortName = new ArrayList(); + } + return this.shortName; + } + + /** + * Gets the value of the ecNumber property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the ecNumber property. + * + *

+ * For example, to add a new item, do as follows: + *

+         *    getEcNumber().add(newItem);
+         * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link EvidencedStringType } + * + * + */ + public List getEcNumber() { + if (ecNumber == null) { + ecNumber = new ArrayList(); + } + return this.ecNumber; + } + + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <complexContent>
+     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       <sequence>
+     *         <element name="fullName" type="{http://uniprot.org/uniprot}evidencedStringType"/>
+     *         <element name="ecNumber" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded" minOccurs="0"/>
+     *       </sequence>
+     *     </restriction>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "fullName", + "ecNumber" + }) + public static class SubmittedName { + + @XmlElement(required = true) + protected EvidencedStringType fullName; + protected List ecNumber; + + /** + * Gets the value of the fullName property. + * + * @return + * possible object is + * {@link EvidencedStringType } + * + */ + public EvidencedStringType getFullName() { + return fullName; + } + + /** + * Sets the value of the fullName property. + * + * @param value + * allowed object is + * {@link EvidencedStringType } + * + */ + public void setFullName(EvidencedStringType value) { + this.fullName = value; + } + + /** + * Gets the value of the ecNumber property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the ecNumber property. + * + *

+ * For example, to add a new item, do as follows: + *

+         *    getEcNumber().add(newItem);
+         * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link EvidencedStringType } + * + * + */ + public List getEcNumber() { + if (ecNumber == null) { + ecNumber = new ArrayList(); + } + return this.ecNumber; + } + + } + +} diff --git a/src/jalview/xml/binding/uniprot/ReferenceType.java b/src/jalview/xml/binding/uniprot/ReferenceType.java new file mode 100644 index 0000000..33e6251 --- /dev/null +++ b/src/jalview/xml/binding/uniprot/ReferenceType.java @@ -0,0 +1,193 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2018.09.13 at 10:18:53 AM BST +// + + +package jalview.xml.binding.uniprot; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + * Describes a citation and a summary of its content. + * Equivalent to the flat file RN-, RP-, RC-, RX-, RG-, RA-, RT- and RL-lines. + * + *

Java class for referenceType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="referenceType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="citation" type="{http://uniprot.org/uniprot}citationType"/>
+ *         <group ref="{http://uniprot.org/uniprot}sptrCitationGroup"/>
+ *       </sequence>
+ *       <attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
+ *       <attribute name="key" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "referenceType", propOrder = { + "citation", + "scope", + "source" +}) +public class ReferenceType { + + @XmlElement(required = true) + protected CitationType citation; + @XmlElement(required = true) + protected List scope; + protected SourceDataType source; + @XmlAttribute(name = "evidence") + protected List evidence; + @XmlAttribute(name = "key", required = true) + protected String key; + + /** + * Gets the value of the citation property. + * + * @return + * possible object is + * {@link CitationType } + * + */ + public CitationType getCitation() { + return citation; + } + + /** + * Sets the value of the citation property. + * + * @param value + * allowed object is + * {@link CitationType } + * + */ + public void setCitation(CitationType value) { + this.citation = value; + } + + /** + * Gets the value of the scope property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the scope property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getScope().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * + */ + public List getScope() { + if (scope == null) { + scope = new ArrayList(); + } + return this.scope; + } + + /** + * Gets the value of the source property. + * + * @return + * possible object is + * {@link SourceDataType } + * + */ + public SourceDataType getSource() { + return source; + } + + /** + * Sets the value of the source property. + * + * @param value + * allowed object is + * {@link SourceDataType } + * + */ + public void setSource(SourceDataType value) { + this.source = value; + } + + /** + * Gets the value of the evidence property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the evidence property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getEvidence().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Integer } + * + * + */ + public List getEvidence() { + if (evidence == null) { + evidence = new ArrayList(); + } + return this.evidence; + } + + /** + * Gets the value of the key property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getKey() { + return key; + } + + /** + * Sets the value of the key property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setKey(String value) { + this.key = value; + } + +} diff --git a/src/jalview/xml/binding/uniprot/SequenceType.java b/src/jalview/xml/binding/uniprot/SequenceType.java new file mode 100644 index 0000000..f0b110b --- /dev/null +++ b/src/jalview/xml/binding/uniprot/SequenceType.java @@ -0,0 +1,242 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2018.09.13 at 10:18:53 AM BST +// + + +package jalview.xml.binding.uniprot; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; +import javax.xml.datatype.XMLGregorianCalendar; + + +/** + *

Java class for sequenceType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="sequenceType">
+ *   <simpleContent>
+ *     <extension base="<http://www.w3.org/2001/XMLSchema>string">
+ *       <attribute name="length" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *       <attribute name="mass" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *       <attribute name="checksum" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="modified" use="required" type="{http://www.w3.org/2001/XMLSchema}date" />
+ *       <attribute name="version" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *       <attribute name="precursor" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       <attribute name="fragment">
+ *         <simpleType>
+ *           <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *             <enumeration value="single"/>
+ *             <enumeration value="multiple"/>
+ *           </restriction>
+ *         </simpleType>
+ *       </attribute>
+ *     </extension>
+ *   </simpleContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "sequenceType", propOrder = { + "value" +}) +public class SequenceType { + + @XmlValue + protected String value; + @XmlAttribute(name = "length", required = true) + protected int length; + @XmlAttribute(name = "mass", required = true) + protected int mass; + @XmlAttribute(name = "checksum", required = true) + protected String checksum; + @XmlAttribute(name = "modified", required = true) + @XmlSchemaType(name = "date") + protected XMLGregorianCalendar modified; + @XmlAttribute(name = "version", required = true) + protected int version; + @XmlAttribute(name = "precursor") + protected Boolean precursor; + @XmlAttribute(name = "fragment") + protected String fragment; + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setValue(String value) { + this.value = value; + } + + /** + * Gets the value of the length property. + * + */ + public int getLength() { + return length; + } + + /** + * Sets the value of the length property. + * + */ + public void setLength(int value) { + this.length = value; + } + + /** + * Gets the value of the mass property. + * + */ + public int getMass() { + return mass; + } + + /** + * Sets the value of the mass property. + * + */ + public void setMass(int value) { + this.mass = value; + } + + /** + * Gets the value of the checksum property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getChecksum() { + return checksum; + } + + /** + * Sets the value of the checksum property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setChecksum(String value) { + this.checksum = value; + } + + /** + * Gets the value of the modified property. + * + * @return + * possible object is + * {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getModified() { + return modified; + } + + /** + * Sets the value of the modified property. + * + * @param value + * allowed object is + * {@link XMLGregorianCalendar } + * + */ + public void setModified(XMLGregorianCalendar value) { + this.modified = value; + } + + /** + * Gets the value of the version property. + * + */ + public int getVersion() { + return version; + } + + /** + * Sets the value of the version property. + * + */ + public void setVersion(int value) { + this.version = value; + } + + /** + * Gets the value of the precursor property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isPrecursor() { + return precursor; + } + + /** + * Sets the value of the precursor property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setPrecursor(Boolean value) { + this.precursor = value; + } + + /** + * Gets the value of the fragment property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFragment() { + return fragment; + } + + /** + * Sets the value of the fragment property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFragment(String value) { + this.fragment = value; + } + +} diff --git a/src/jalview/xml/binding/uniprot/SourceDataType.java b/src/jalview/xml/binding/uniprot/SourceDataType.java new file mode 100644 index 0000000..03cace3 --- /dev/null +++ b/src/jalview/xml/binding/uniprot/SourceDataType.java @@ -0,0 +1,461 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2018.09.13 at 10:18:53 AM BST +// + + +package jalview.xml.binding.uniprot; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElements; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; + + +/** + * Describes the source of the sequence according to the citation. + * Equivalent to the flat file RC-line. + * + *

Java class for sourceDataType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="sourceDataType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <choice maxOccurs="unbounded">
+ *         <element name="strain">
+ *           <complexType>
+ *             <simpleContent>
+ *               <extension base="<http://www.w3.org/2001/XMLSchema>string">
+ *                 <attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
+ *               </extension>
+ *             </simpleContent>
+ *           </complexType>
+ *         </element>
+ *         <element name="plasmid">
+ *           <complexType>
+ *             <simpleContent>
+ *               <extension base="<http://www.w3.org/2001/XMLSchema>string">
+ *                 <attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
+ *               </extension>
+ *             </simpleContent>
+ *           </complexType>
+ *         </element>
+ *         <element name="transposon">
+ *           <complexType>
+ *             <simpleContent>
+ *               <extension base="<http://www.w3.org/2001/XMLSchema>string">
+ *                 <attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
+ *               </extension>
+ *             </simpleContent>
+ *           </complexType>
+ *         </element>
+ *         <element name="tissue">
+ *           <complexType>
+ *             <simpleContent>
+ *               <extension base="<http://www.w3.org/2001/XMLSchema>string">
+ *                 <attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
+ *               </extension>
+ *             </simpleContent>
+ *           </complexType>
+ *         </element>
+ *       </choice>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "sourceDataType", propOrder = { + "strainOrPlasmidOrTransposon" +}) +public class SourceDataType { + + @XmlElements({ + @XmlElement(name = "strain", type = SourceDataType.Strain.class), + @XmlElement(name = "plasmid", type = SourceDataType.Plasmid.class), + @XmlElement(name = "transposon", type = SourceDataType.Transposon.class), + @XmlElement(name = "tissue", type = SourceDataType.Tissue.class) + }) + protected List strainOrPlasmidOrTransposon; + + /** + * Gets the value of the strainOrPlasmidOrTransposon property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the strainOrPlasmidOrTransposon property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getStrainOrPlasmidOrTransposon().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link SourceDataType.Strain } + * {@link SourceDataType.Plasmid } + * {@link SourceDataType.Transposon } + * {@link SourceDataType.Tissue } + * + * + */ + public List getStrainOrPlasmidOrTransposon() { + if (strainOrPlasmidOrTransposon == null) { + strainOrPlasmidOrTransposon = new ArrayList(); + } + return this.strainOrPlasmidOrTransposon; + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <simpleContent>
+     *     <extension base="<http://www.w3.org/2001/XMLSchema>string">
+     *       <attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
+     *     </extension>
+     *   </simpleContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "value" + }) + public static class Plasmid { + + @XmlValue + protected String value; + @XmlAttribute(name = "evidence") + protected List evidence; + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setValue(String value) { + this.value = value; + } + + /** + * Gets the value of the evidence property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the evidence property. + * + *

+ * For example, to add a new item, do as follows: + *

+         *    getEvidence().add(newItem);
+         * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Integer } + * + * + */ + public List getEvidence() { + if (evidence == null) { + evidence = new ArrayList(); + } + return this.evidence; + } + + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <simpleContent>
+     *     <extension base="<http://www.w3.org/2001/XMLSchema>string">
+     *       <attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
+     *     </extension>
+     *   </simpleContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "value" + }) + public static class Strain { + + @XmlValue + protected String value; + @XmlAttribute(name = "evidence") + protected List evidence; + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setValue(String value) { + this.value = value; + } + + /** + * Gets the value of the evidence property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the evidence property. + * + *

+ * For example, to add a new item, do as follows: + *

+         *    getEvidence().add(newItem);
+         * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Integer } + * + * + */ + public List getEvidence() { + if (evidence == null) { + evidence = new ArrayList(); + } + return this.evidence; + } + + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <simpleContent>
+     *     <extension base="<http://www.w3.org/2001/XMLSchema>string">
+     *       <attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
+     *     </extension>
+     *   </simpleContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "value" + }) + public static class Tissue { + + @XmlValue + protected String value; + @XmlAttribute(name = "evidence") + protected List evidence; + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setValue(String value) { + this.value = value; + } + + /** + * Gets the value of the evidence property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the evidence property. + * + *

+ * For example, to add a new item, do as follows: + *

+         *    getEvidence().add(newItem);
+         * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Integer } + * + * + */ + public List getEvidence() { + if (evidence == null) { + evidence = new ArrayList(); + } + return this.evidence; + } + + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <simpleContent>
+     *     <extension base="<http://www.w3.org/2001/XMLSchema>string">
+     *       <attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
+     *     </extension>
+     *   </simpleContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "value" + }) + public static class Transposon { + + @XmlValue + protected String value; + @XmlAttribute(name = "evidence") + protected List evidence; + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setValue(String value) { + this.value = value; + } + + /** + * Gets the value of the evidence property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the evidence property. + * + *

+ * For example, to add a new item, do as follows: + *

+         *    getEvidence().add(newItem);
+         * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Integer } + * + * + */ + public List getEvidence() { + if (evidence == null) { + evidence = new ArrayList(); + } + return this.evidence; + } + + } + +} diff --git a/src/jalview/xml/binding/uniprot/SourceType.java b/src/jalview/xml/binding/uniprot/SourceType.java new file mode 100644 index 0000000..44edbba --- /dev/null +++ b/src/jalview/xml/binding/uniprot/SourceType.java @@ -0,0 +1,98 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2018.09.13 at 10:18:53 AM BST +// + + +package jalview.xml.binding.uniprot; + +import java.math.BigInteger; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; + + +/** + * Describes the source of the data using a database cross-reference (or a 'ref' attribute when the source cannot be found in a public data source, such as PubMed, and is cited only within the UniProtKB entry). + * + *

Java class for sourceType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="sourceType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="dbReference" type="{http://uniprot.org/uniprot}dbReferenceType" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="ref" type="{http://www.w3.org/2001/XMLSchema}integer" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "sourceType", propOrder = { + "dbReference" +}) +public class SourceType { + + protected DbReferenceType dbReference; + @XmlAttribute(name = "ref") + protected BigInteger ref; + + /** + * Gets the value of the dbReference property. + * + * @return + * possible object is + * {@link DbReferenceType } + * + */ + public DbReferenceType getDbReference() { + return dbReference; + } + + /** + * Sets the value of the dbReference property. + * + * @param value + * allowed object is + * {@link DbReferenceType } + * + */ + public void setDbReference(DbReferenceType value) { + this.dbReference = value; + } + + /** + * Gets the value of the ref property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getRef() { + return ref; + } + + /** + * Sets the value of the ref property. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setRef(BigInteger value) { + this.ref = value; + } + +} diff --git a/src/jalview/xml/binding/uniprot/StatusType.java b/src/jalview/xml/binding/uniprot/StatusType.java new file mode 100644 index 0000000..29fb34e --- /dev/null +++ b/src/jalview/xml/binding/uniprot/StatusType.java @@ -0,0 +1,107 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2018.09.13 at 10:18:53 AM BST +// + + +package jalview.xml.binding.uniprot; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; + + +/** + * Indicates whether the name of a plasmid is known or unknown. + * + *

Java class for statusType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="statusType">
+ *   <simpleContent>
+ *     <extension base="<http://www.w3.org/2001/XMLSchema>string">
+ *       <attribute name="status" default="known">
+ *         <simpleType>
+ *           <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *             <enumeration value="known"/>
+ *             <enumeration value="unknown"/>
+ *           </restriction>
+ *         </simpleType>
+ *       </attribute>
+ *     </extension>
+ *   </simpleContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "statusType", propOrder = { + "value" +}) +public class StatusType { + + @XmlValue + protected String value; + @XmlAttribute(name = "status") + protected String status; + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setValue(String value) { + this.value = value; + } + + /** + * Gets the value of the status property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getStatus() { + if (status == null) { + return "known"; + } else { + return status; + } + } + + /** + * Sets the value of the status property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setStatus(String value) { + this.status = value; + } + +} diff --git a/src/jalview/xml/binding/uniprot/SubcellularLocationType.java b/src/jalview/xml/binding/uniprot/SubcellularLocationType.java new file mode 100644 index 0000000..29848d7 --- /dev/null +++ b/src/jalview/xml/binding/uniprot/SubcellularLocationType.java @@ -0,0 +1,142 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2018.09.13 at 10:18:53 AM BST +// + + +package jalview.xml.binding.uniprot; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + * Describes the subcellular location and optionally the topology and orientation of a molecule. + * + *

Java class for subcellularLocationType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="subcellularLocationType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="location" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded"/>
+ *         <element name="topology" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="orientation" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "subcellularLocationType", propOrder = { + "location", + "topology", + "orientation" +}) +public class SubcellularLocationType { + + @XmlElement(required = true) + protected List location; + protected List topology; + protected List orientation; + + /** + * Gets the value of the location property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the location property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getLocation().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link EvidencedStringType } + * + * + */ + public List getLocation() { + if (location == null) { + location = new ArrayList(); + } + return this.location; + } + + /** + * Gets the value of the topology property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the topology property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getTopology().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link EvidencedStringType } + * + * + */ + public List getTopology() { + if (topology == null) { + topology = new ArrayList(); + } + return this.topology; + } + + /** + * Gets the value of the orientation property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the orientation property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getOrientation().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link EvidencedStringType } + * + * + */ + public List getOrientation() { + if (orientation == null) { + orientation = new ArrayList(); + } + return this.orientation; + } + +} diff --git a/src/jalview/xml/binding/uniprot/Uniprot.java b/src/jalview/xml/binding/uniprot/Uniprot.java new file mode 100644 index 0000000..4e2cdb0 --- /dev/null +++ b/src/jalview/xml/binding/uniprot/Uniprot.java @@ -0,0 +1,105 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2018.09.13 at 10:18:53 AM BST +// + + +package jalview.xml.binding.uniprot; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element ref="{http://uniprot.org/uniprot}entry" maxOccurs="unbounded"/>
+ *         <element ref="{http://uniprot.org/uniprot}copyright" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "entry", + "copyright" +}) +@XmlRootElement(name = "uniprot") +public class Uniprot { + + @XmlElement(required = true) + protected List entry; + protected String copyright; + + /** + * Gets the value of the entry property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the entry property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getEntry().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Entry } + * + * + */ + public List getEntry() { + if (entry == null) { + entry = new ArrayList(); + } + return this.entry; + } + + /** + * Gets the value of the copyright property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCopyright() { + return copyright; + } + + /** + * Sets the value of the copyright property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCopyright(String value) { + this.copyright = value; + } + +} diff --git a/src/jalview/xml/binding/uniprot/package-info.java b/src/jalview/xml/binding/uniprot/package-info.java new file mode 100644 index 0000000..9741acc --- /dev/null +++ b/src/jalview/xml/binding/uniprot/package-info.java @@ -0,0 +1,9 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2018.09.13 at 10:18:53 AM BST +// + +@javax.xml.bind.annotation.XmlSchema(namespace = "http://uniprot.org/uniprot", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) +package jalview.xml.binding.uniprot; diff --git a/test/jalview/ws/dbsources/UniprotTest.java b/test/jalview/ws/dbsources/UniprotTest.java index 060c303..e835724 100644 --- a/test/jalview/ws/dbsources/UniprotTest.java +++ b/test/jalview/ws/dbsources/UniprotTest.java @@ -21,19 +21,23 @@ package jalview.ws.dbsources; import static org.testng.AssertJUnit.assertEquals; -import static org.testng.AssertJUnit.assertFalse; import static org.testng.AssertJUnit.assertNotNull; import static org.testng.AssertJUnit.assertNull; +import static org.testng.AssertJUnit.assertTrue; -import jalview.datamodel.PDBEntry; import jalview.datamodel.SequenceI; -import jalview.datamodel.xdb.uniprot.UniprotEntry; -import jalview.datamodel.xdb.uniprot.UniprotFeature; import jalview.gui.JvOptionPane; - -import java.io.Reader; -import java.io.StringReader; -import java.util.Vector; +import jalview.xml.binding.uniprot.DbReferenceType; +import jalview.xml.binding.uniprot.Entry; +import jalview.xml.binding.uniprot.FeatureType; +import jalview.xml.binding.uniprot.LocationType; +import jalview.xml.binding.uniprot.PositionType; + +import java.io.ByteArrayInputStream; +import java.io.InputStream; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.util.List; import org.testng.Assert; import org.testng.annotations.BeforeClass; @@ -51,13 +55,13 @@ public class UniprotTest // adapted from http://www.uniprot.org/uniprot/A9CKP4.xml private static final String UNIPROT_XML = "" - + "" + + "" + "" + "A9CKP4" + "A9CKP5" + "A9CKP4_AGRT5" + "A9CKP4_AGRT6" - + "Mitogen-activated protein kinase 13Henry" + + "Mitogen-activated protein kinase 13" + "" + "" + "" @@ -75,15 +79,17 @@ public class UniprotTest /** * Test the method that unmarshals XML to a Uniprot model + * + * @throws UnsupportedEncodingException */ @Test(groups = { "Functional" }) - public void testGetUniprotEntries() + public void testGetUniprotEntries() throws UnsupportedEncodingException { Uniprot u = new Uniprot(); - Reader reader = new StringReader(UNIPROT_XML); - Vector entries = u.getUniprotEntries(reader); + InputStream is = new ByteArrayInputStream(UNIPROT_XML.getBytes()); + List entries = u.getUniprotEntries(is); assertEquals(1, entries.size()); - UniprotEntry entry = entries.get(0); + Entry entry = entries.get(0); assertEquals(2, entry.getName().size()); assertEquals("A9CKP4_AGRT5", entry.getName().get(0)); assertEquals("A9CKP4_AGRT6", entry.getName().get(1)); @@ -91,82 +97,84 @@ public class UniprotTest assertEquals("A9CKP4", entry.getAccession().get(0)); assertEquals("A9CKP5", entry.getAccession().get(1)); - /* - * UniprotSequence drops any space characters - */ - assertEquals("MHAPLVSKDL", entry.getUniprotSequence().getContent()); + assertEquals("MHAPL VSKDL", entry.getSequence().getValue()); - assertEquals(2, entry.getProtein().getName().size()); assertEquals("Mitogen-activated protein kinase 13", entry.getProtein() - .getName().get(0)); - assertEquals("Henry", entry.getProtein().getName().get(1)); + .getRecommendedName().getFullName().getValue()); /* * Check sequence features */ - Vector features = entry.getFeature(); + List features = entry.getFeature(); assertEquals(9, features.size()); - UniprotFeature sf = features.get(0); + FeatureType sf = features.get(0); assertEquals("signal peptide", sf.getType()); assertNull(sf.getDescription()); assertNull(sf.getStatus()); - assertEquals(1, sf.getBegin()); - assertEquals(18, sf.getEnd()); + assertNull(sf.getLocation().getPosition()); + assertEquals(1, sf.getLocation().getBegin().getPosition().intValue()); + assertEquals(18, sf.getLocation().getEnd().getPosition().intValue()); sf = features.get(1); assertEquals("propeptide", sf.getType()); assertEquals("Activation peptide", sf.getDescription()); - assertEquals(19, sf.getPosition()); - assertEquals(19, sf.getBegin()); - assertEquals(20, sf.getEnd()); + assertNull(sf.getLocation().getPosition()); + assertEquals(19, sf.getLocation().getBegin().getPosition().intValue()); + assertEquals(20, sf.getLocation().getEnd().getPosition().intValue()); sf = features.get(2); assertEquals("chain", sf.getType()); assertEquals("Granzyme B", sf.getDescription()); - assertEquals(21, sf.getPosition()); - assertEquals(21, sf.getBegin()); - assertEquals(247, sf.getEnd()); + assertNull(sf.getLocation().getPosition()); + assertEquals(21, sf.getLocation().getBegin().getPosition().intValue()); + assertEquals(247, sf.getLocation().getEnd().getPosition().intValue()); sf = features.get(3); assertEquals("sequence variant", sf.getType()); assertNull(sf.getDescription()); - assertEquals(41, sf.getPosition()); - assertEquals(41, sf.getBegin()); - assertEquals(41, sf.getEnd()); + assertEquals(41, + sf.getLocation().getPosition().getPosition().intValue()); + assertNull(sf.getLocation().getBegin()); + assertNull(sf.getLocation().getEnd()); sf = features.get(4); assertEquals("sequence variant", sf.getType()); assertEquals("Pathogenic", sf.getDescription()); - assertEquals(41, sf.getPosition()); - assertEquals(41, sf.getBegin()); - assertEquals(41, sf.getEnd()); + assertEquals(41, + sf.getLocation().getPosition().getPosition().intValue()); + assertNull(sf.getLocation().getBegin()); + assertNull(sf.getLocation().getEnd()); sf = features.get(5); assertEquals("sequence variant", sf.getType()); assertEquals("Pathogenic", sf.getDescription()); - assertEquals(41, sf.getPosition()); - assertEquals(41, sf.getBegin()); - assertEquals(41, sf.getEnd()); + assertEquals(41, + sf.getLocation().getPosition().getPosition().intValue()); + assertNull(sf.getLocation().getBegin()); + assertNull(sf.getLocation().getEnd()); sf = features.get(6); assertEquals("sequence variant", sf.getType()); assertEquals("Foo", sf.getDescription()); - assertEquals(42, sf.getPosition()); - assertEquals(42, sf.getBegin()); - assertEquals(42, sf.getEnd()); + assertEquals(42, + sf.getLocation().getPosition().getPosition().intValue()); + assertNull(sf.getLocation().getBegin()); + assertNull(sf.getLocation().getEnd()); Assert.assertEquals(Uniprot.getDescription(sf), "p.Met42Leu" + "
  " + "p.Met42LeuMetVal Foo"); sf = features.get(7); - assertEquals(42, sf.getBegin()); - assertEquals(43, sf.getEnd()); + assertNull(sf.getLocation().getPosition()); + assertEquals(42, sf.getLocation().getBegin().getPosition().intValue()); + assertEquals(43, sf.getLocation().getEnd().getPosition().intValue()); Assert.assertEquals(Uniprot.getDescription(sf), "p.MetLeu42LeuLeu" + "
  " + "p.MetLeu42LeuMetVal Foo"); sf = features.get(8); - assertEquals(42, sf.getBegin()); - assertEquals(45, sf.getEnd()); + assertNull(sf.getLocation().getPosition()); + assertEquals(42, sf.getLocation().getBegin().getPosition().intValue()); + assertEquals(45, sf.getLocation().getEnd().getPosition().intValue()); Assert.assertEquals(Uniprot.getDescription(sf), "p.MLML42LeuLeu" + "
  " + "p.MLML42LMVK Foo Too"); @@ -174,33 +182,38 @@ public class UniprotTest /* * Check cross-references */ - Vector xrefs = entry.getDbReference(); + List xrefs = entry.getDbReference(); assertEquals(3, xrefs.size()); - PDBEntry xref = xrefs.get(0); + DbReferenceType xref = xrefs.get(0); assertEquals("2FSQ", xref.getId()); assertEquals("PDB", xref.getType()); - assertEquals("X-ray", xref.getProperty("method")); - assertEquals("1.40", xref.getProperty("resolution")); + assertEquals("X-ray", + Uniprot.getProperty(xref.getProperty(), "method")); + assertEquals("1.40", + Uniprot.getProperty(xref.getProperty(), "resolution")); xref = xrefs.get(1); assertEquals("2FSR", xref.getId()); assertEquals("PDBsum", xref.getType()); - assertFalse(xref.getProperties().hasMoreElements()); + assertTrue(xref.getProperty().isEmpty()); xref = xrefs.get(2); assertEquals("AE007869", xref.getId()); assertEquals("EMBL", xref.getType()); - assertEquals("AAK85932.1", xref.getProperty("protein sequence ID")); - assertEquals("Genomic_DNA", xref.getProperty("molecule type")); + assertEquals("AAK85932.1", + Uniprot.getProperty(xref.getProperty(), "protein sequence ID")); + assertEquals("Genomic_DNA", + Uniprot.getProperty(xref.getProperty(), "molecule type")); } @Test(groups = { "Functional" }) - public void testGetUniprotSequence() + public void testGetUniprotSequence() throws UnsupportedEncodingException { - UniprotEntry entry = new Uniprot().getUniprotEntries( - new StringReader(UNIPROT_XML)).get(0); - SequenceI seq = new Uniprot().uniprotEntryToSequenceI(entry); + InputStream is = new ByteArrayInputStream(UNIPROT_XML.getBytes()); + Entry entry = new Uniprot().getUniprotEntries( + is).get(0); + SequenceI seq = new Uniprot().uniprotEntryToSequence(entry); assertNotNull(seq); assertEquals(6, seq.getDBRefs().length); // 2*Uniprot, PDB, PDBsum, 2*EMBL @@ -208,12 +221,14 @@ public class UniprotTest /** * Test the method that formats the sequence id + * + * @throws UnsupportedEncodingException */ @Test(groups = { "Functional" }) - public void testGetUniprotEntryId() + public void testGetUniprotEntryId() throws UnsupportedEncodingException { - UniprotEntry entry = new Uniprot().getUniprotEntries( - new StringReader(UNIPROT_XML)).get(0); + InputStream is = new ByteArrayInputStream(UNIPROT_XML.getBytes()); + Entry entry = new Uniprot().getUniprotEntries(is).get(0); /* * name formatted with Uniprot Entry name @@ -225,67 +240,66 @@ public class UniprotTest /** * Test the method that formats the sequence description + * + * @throws UnsupportedEncodingException */ @Test(groups = { "Functional" }) public void testGetUniprotEntryDescription() + throws UnsupportedEncodingException { - UniprotEntry entry = new Uniprot().getUniprotEntries( - new StringReader(UNIPROT_XML)).get(0); + InputStream is = new ByteArrayInputStream(UNIPROT_XML.getBytes()); + Entry entry = new Uniprot().getUniprotEntries(is).get(0); - /* - * recommended names concatenated with space separator - */ - String expectedDescription = "Mitogen-activated protein kinase 13 Henry"; - assertEquals(expectedDescription, + assertEquals("Mitogen-activated protein kinase 13", Uniprot.getUniprotEntryDescription(entry)); } @Test(groups = { "Functional" }) public void testGetDescription() { - UniprotFeature uf = new UniprotFeature(); - assertEquals("", Uniprot.getDescription(uf)); + FeatureType ft = new FeatureType(); + assertEquals("", Uniprot.getDescription(ft)); - uf.setDescription("Hello"); - assertEquals("Hello", Uniprot.getDescription(uf)); + ft.setDescription("Hello"); + assertEquals("Hello", Uniprot.getDescription(ft)); - uf.setPosition(23); - uf.setOriginal("K"); - Vector vars = new Vector<>(); - vars.add("y"); - uf.setVariation(vars); - assertEquals("p.Lys23Tyr Hello", Uniprot.getDescription(uf)); + ft.setLocation(new LocationType()); + ft.getLocation().setPosition(new PositionType()); + ft.getLocation().getPosition().setPosition(BigInteger.valueOf(23)); + ft.setOriginal("K"); + ft.getVariation().add("y"); + assertEquals("p.Lys23Tyr Hello", Uniprot.getDescription(ft)); // multiple variants generate an html description over more than one line - vars.add("W"); + ft.getVariation().add("W"); assertEquals("p.Lys23Tyr
  p.Lys23Trp Hello", - Uniprot.getDescription(uf)); + Uniprot.getDescription(ft)); /* * indel cases * up to 3 bases (original or variant) are shown using 3 letter code */ - vars.clear(); - vars.add("KWE"); - uf.setOriginal("KLS"); + ft.getVariation().clear(); + ft.getVariation().add("KWE"); + ft.setOriginal("KLS"); assertEquals("p.LysLeuSer23LysTrpGlu Hello", - Uniprot.getDescription(uf)); + Uniprot.getDescription(ft)); // adding a fourth original base switches to single letter code - uf.setOriginal("KLST"); - assertEquals("p.KLST23LysTrpGlu Hello", Uniprot.getDescription(uf)); + ft.setOriginal("KLST"); + assertEquals("p.KLST23LysTrpGlu Hello", Uniprot.getDescription(ft)); // adding a fourth variant switches to single letter code - vars.clear(); - vars.add("KWES"); - assertEquals("p.KLST23KWES Hello", Uniprot.getDescription(uf)); + ft.getVariation().clear(); + ft.getVariation().add("KWES"); + assertEquals("p.KLST23KWES Hello", Uniprot.getDescription(ft)); - vars.clear(); - vars.add("z"); // unknown variant - fails gracefully - uf.setOriginal("K"); - assertEquals("p.Lys23z Hello", Uniprot.getDescription(uf)); + ft.getVariation().clear(); + ft.getVariation().add("z"); // unknown variant - fails gracefully + ft.setOriginal("K"); + assertEquals("p.Lys23z Hello", Uniprot.getDescription(ft)); - uf.setVariation(null); // variant missing - is ignored - assertEquals("Hello", Uniprot.getDescription(uf)); + ft.getVariation().clear(); // variant missing - is ignored + assertEquals("Hello", Uniprot.getDescription(ft)); } }