From: tcofoegbu Date: Wed, 11 Nov 2015 13:08:02 +0000 (+0000) Subject: merge of SIFTs Branch X-Git-Tag: Release_2_10_0~341 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=605217afe6b4bb56ddd2e5925941ed8fa1bc9d32;hp=a7c333565f975ce40069334efe291d035580c253;p=jalview.git merge of SIFTs Branch --- diff --git a/resources/lang/Messages.properties b/resources/lang/Messages.properties index 54370d8..e576678 100644 --- a/resources/lang/Messages.properties +++ b/resources/lang/Messages.properties @@ -1279,3 +1279,6 @@ exception.pdb_rest_service_no_longer_available = PDB rest services no longer ava exception.resource_not_be_found = The requested resource could not be found exception.pdb_server_error = There seems to be an error from the PDB server exception.pdb_server_unreachable = Jalview is unable to reach the PDBe Solr server. \nPlease ensure that you are connected to the internet and try again. +label.nw_mapping = Needleman & Wunsch Alignment +label.sifts_mapping = SIFTs Mapping +label.mapping_method = Sequence \u27f7 Structure mapping method \ No newline at end of file diff --git a/schemas/sifts/alignment.xsd b/schemas/sifts/alignment.xsd new file mode 100644 index 0000000..7731048 --- /dev/null +++ b/schemas/sifts/alignment.xsd @@ -0,0 +1,155 @@ + + + + + + This section of the schema deals with alignments. The alignment can be either a sequence alignment or a structural alignment. + + + + + + description of object. id e.g. 1tim.A,8tim.B, P001228, ...; type: type of object e.g.: protein, dna. version: last time this object has been changed (sometimes not so easy to know ...) + + + + + + + + + + + + + + + + + + + + + + + e.g.: number of identical residues, % id residues, aligmnent score, e-value, p-value, etc. + + + + + + + + + + + + the alignment given for a single object + the alignment given for a single object + + + + + + e.g. 2D23M4I + + + + + + + + + + + + + + + + geometrical operation to perform on 3D object + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/schemas/sifts/dataTypes.xsd b/schemas/sifts/dataTypes.xsd new file mode 100644 index 0000000..f0947b4 --- /dev/null +++ b/schemas/sifts/dataTypes.xsd @@ -0,0 +1,154 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/schemas/sifts/eFamily.xsd b/schemas/sifts/eFamily.xsd new file mode 100644 index 0000000..250f1f4 --- /dev/null +++ b/schemas/sifts/eFamily.xsd @@ -0,0 +1,154 @@ + + + + + + + The eFamily schema is designed to allow the members of the eFamily consortium to exchange domain definitions. As members of the different databases use different underlying data (languages) so we need a way of getting between the co-ordinates systems. MSD are to provide the mapping between the co-ordinates (translator), hence the reason for the incorporation of the mappings into the core of the schema. + + + + + The entry represents a database entry. This schema is currently designed for domain and mapping entires. + + + + + + + + + + + + + + + + + This is a free text field that allows someone to attach some sort of documentation to the entry + + + + + + + + An entity is a single domain definition. In the case of SCOP, there is only one entity per entry, but in the case of Pfam, an entry is a collection of domains/entities. + + + + + + This is a free text field that allows someone to attach some sort of documentation to the entity + + + + + + + + An entity may not comprise of a single continuous region. This may be used to a chimeric structure or a discontinuous domain + + + + + + Contains a set of residues objects + + + + + + A single residue object. This object can contain information on what the residue is, general annotation, the numbering system and co-ordinate mapping + + + + + + Allows the linking between different co-ordinate systems + + + + + + + + + + This allows one to add information to the residues. For example whether it is observed or whether it is an active site residue + + + + + + + + + + + + + + + + Allows cross referencing to another database. For example, one may wish to include which the taxon that a mapping or sequence corresponds + + + + + + Defines the database that is being cross mapped to + + + + + + Contains the mapping coordinates. The start end tags refer to the master databse co-ordinates. The tags prefixed with sys refer to the database being mapped to. + + + + + + + + + + + + + + + + + + + + + + + + This is a free text field that allows someone to attach some sort of documentation to the segment + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/MCview/PDBfile.java b/src/MCview/PDBfile.java index c1018a3..58611e2 100755 --- a/src/MCview/PDBfile.java +++ b/src/MCview/PDBfile.java @@ -24,6 +24,8 @@ import jalview.analysis.AlignSeq; import jalview.datamodel.Alignment; import jalview.datamodel.AlignmentAnnotation; import jalview.datamodel.AlignmentI; +import jalview.datamodel.DBRefEntry; +import jalview.datamodel.DBRefSource; import jalview.datamodel.PDBEntry; import jalview.datamodel.SequenceI; import jalview.io.FileParse; @@ -94,11 +96,13 @@ public class PDBfile extends jalview.io.AlignFile doParse(); } + @Override public String print() { return null; } + @Override public void parse() throws IOException { // TODO set the filename sensibly - try using data source name. @@ -285,8 +289,8 @@ public class PDBfile extends jalview.io.AlignFile */ protected SequenceI postProcessChain(PDBChain chain) { - SequenceI dataset = chain.sequence; - dataset.setName(id + "|" + dataset.getName()); + SequenceI pdbSequence = chain.sequence; + pdbSequence.setName(id + "|" + pdbSequence.getName()); PDBEntry entry = new PDBEntry(); entry.setId(id); entry.setType(PDBEntry.Type.PDB); @@ -305,9 +309,16 @@ public class PDBfile extends jalview.io.AlignFile // TODO: decide if we should dump the datasource to disk entry.setFile(getDataName()); } - dataset.addPDBId(entry); + pdbSequence.addPDBId(entry); + + DBRefEntry sourceDBRef = new DBRefEntry(); + sourceDBRef.setAccessionId(id); + sourceDBRef.setSource(DBRefSource.PDB); + sourceDBRef.setStartRes(pdbSequence.getStart()); + sourceDBRef.setEndRes(pdbSequence.getEnd()); + pdbSequence.setSourceDBRef(sourceDBRef); // PDBChain objects maintain reference to dataset - SequenceI chainseq = dataset.deriveSequence(); + SequenceI chainseq = pdbSequence.deriveSequence(); seqs.addElement(chainseq); AlignmentAnnotation[] chainannot = chainseq.getAnnotation(); diff --git a/src/jalview/analysis/AlignSeq.java b/src/jalview/analysis/AlignSeq.java index 3ca3d90..369721d 100755 --- a/src/jalview/analysis/AlignSeq.java +++ b/src/jalview/analysis/AlignSeq.java @@ -577,7 +577,8 @@ public class AlignSeq } } int len = 72 - maxid - 1; - int nochunks = ((aseq1.length - count) / len) + 1; + int nochunks = ((aseq1.length - count) / len) + + ((aseq1.length - count) % len > 0 ? 1 : 0); pid = 0; output.append("Score = ").append(score[maxi][maxj]).append(NEWLINE); @@ -662,9 +663,8 @@ public class AlignSeq } pid = pid / (aseq1.length - count) * 100; - output = output.append(new Format("Percentage ID = %2.2f\n\n") + output = output.append(new Format("Percentage ID = %2.2f\n") .form(pid)); - try { os.print(output.toString()); @@ -948,6 +948,7 @@ public class AlignSeq public static void displayMatrix(Graphics g, int[][] mat, int n, int m, int psize) { + // TODO method dosen't seem to be referenced anywhere delete?? int max = -1000; int min = 1000; diff --git a/src/jalview/analysis/AlignmentUtils.java b/src/jalview/analysis/AlignmentUtils.java index 898e4f7..da5bc2f 100644 --- a/src/jalview/analysis/AlignmentUtils.java +++ b/src/jalview/analysis/AlignmentUtils.java @@ -1284,7 +1284,7 @@ public class AlignmentUtils return false; } String name = seq2.getName(); - final DBRefEntry[] xrefs = seq1.getDBRef(); + final DBRefEntry[] xrefs = seq1.getDBRefs(); if (xrefs != null) { for (DBRefEntry xref : xrefs) @@ -1402,7 +1402,7 @@ public class AlignmentUtils String cdsAccId = FeatureProperties .getCodingFeature(DBRefSource.EMBL); DBRefEntry[] cdsRefs = DBRefUtils.selectRefs(seqMapping.getTo() - .getDBRef(), DBRefSource.CODINGDBS); + .getDBRefs(), DBRefSource.CODINGDBS); if (cdsRefs != null) { for (DBRefEntry cdsRef : cdsRefs) diff --git a/src/jalview/analysis/CrossRef.java b/src/jalview/analysis/CrossRef.java index 2e6431c..a71e614 100644 --- a/src/jalview/analysis/CrossRef.java +++ b/src/jalview/analysis/CrossRef.java @@ -97,7 +97,7 @@ public class CrossRef { dss = dss.getDatasetSequence(); } - DBRefEntry[] rfs = findXDbRefs(dna, dss.getDBRef()); + DBRefEntry[] rfs = findXDbRefs(dna, dss.getDBRefs()); for (int r = 0; rfs != null && r < rfs.length; r++) { if (!refs.contains(rfs[r].getSource())) @@ -109,13 +109,13 @@ public class CrossRef { // search for references to this sequence's direct references. DBRefEntry[] lrfs = CrossRef - .findXDbRefs(!dna, seqs[s].getDBRef()); + .findXDbRefs(!dna, seqs[s].getDBRefs()); List rseqs = new ArrayList(); CrossRef.searchDatasetXrefs(seqs[s], !dna, lrfs, dataset, rseqs, null); // don't need to specify codon frame for mapping here for (SequenceI rs : rseqs) { - DBRefEntry[] xrs = findXDbRefs(dna, rs.getDBRef()); // not used?? + DBRefEntry[] xrs = findXDbRefs(dna, rs.getDBRefs()); // not used?? for (int r = 0; rfs != null && r < rfs.length; r++) { if (!refs.contains(rfs[r].getSource())) @@ -159,7 +159,7 @@ public class CrossRef Vector cseqs = new Vector(); for (int s = 0; s < seqs.length; s++) { - DBRefEntry[] cdna = findXDbRefs(true, seqs[s].getDBRef()); + DBRefEntry[] cdna = findXDbRefs(true, seqs[s].getDBRefs()); for (int c = 0; c < cdna.length; c++) { if (cdna[c].getSource().equals(DBRefSource.EMBLCDS)) @@ -219,11 +219,11 @@ public class CrossRef dss = dss.getDatasetSequence(); } boolean found = false; - DBRefEntry[] xrfs = CrossRef.findXDbRefs(dna, dss.getDBRef()); + DBRefEntry[] xrfs = CrossRef.findXDbRefs(dna, dss.getDBRefs()); if ((xrfs == null || xrfs.length == 0) && dataset != null) { System.out.println("Attempting to find ds Xrefs refs."); - DBRefEntry[] lrfs = CrossRef.findXDbRefs(!dna, seqs[s].getDBRef()); + DBRefEntry[] lrfs = CrossRef.findXDbRefs(!dna, seqs[s].getDBRefs()); // less ambiguous would be a 'find primary dbRefEntry' method. // filter for desired source xref here found = CrossRef.searchDatasetXrefs(dss, !dna, lrfs, dataset, @@ -330,7 +330,7 @@ public class CrossRef { // TODO: examine each sequence for 'redundancy' jalview.datamodel.DBRefEntry[] dbr = retrieved[rs] - .getDBRef(); + .getDBRefs(); if (dbr != null && dbr.length > 0) { for (int di = 0; di < dbr.length; di++) @@ -500,7 +500,7 @@ public class CrossRef } // look for direct or indirect references in common - DBRefEntry[] poss = nxt.getDBRef(), cands = null; + DBRefEntry[] poss = nxt.getDBRefs(), cands = null; if (direct) { cands = jalview.util.DBRefUtils.searchRefs(poss, xrf); diff --git a/src/jalview/analysis/Dna.java b/src/jalview/analysis/Dna.java index 9ce00cc..2939e3c 100644 --- a/src/jalview/analysis/Dna.java +++ b/src/jalview/analysis/Dna.java @@ -208,13 +208,13 @@ public class Dna for (int gd = 0; gd < selection.length; gd++) { SequenceI dna = selection[gd]; - DBRefEntry[] dnarefs = DBRefUtils.selectRefs(dna.getDBRef(), + DBRefEntry[] dnarefs = DBRefUtils.selectRefs(dna.getDBRefs(), jalview.datamodel.DBRefSource.DNACODINGDBS); if (dnarefs != null) { // intersect with pep List mappedrefs = new ArrayList(); - DBRefEntry[] refs = dna.getDBRef(); + DBRefEntry[] refs = dna.getDBRefs(); for (int d = 0; d < refs.length; d++) { if (refs[d].getMap() != null && refs[d].getMap().getMap() != null @@ -773,7 +773,7 @@ public class Dna { SequenceFeature[] sfs = dna.getSequenceFeatures(); Boolean fgstate; - DBRefEntry[] dnarefs = DBRefUtils.selectRefs(dna.getDBRef(), + DBRefEntry[] dnarefs = DBRefUtils.selectRefs(dna.getDBRefs(), DBRefSource.DNACODINGDBS); if (dnarefs != null) { diff --git a/src/jalview/analysis/SequenceIdMatcher.java b/src/jalview/analysis/SequenceIdMatcher.java index 35a72e3..454bc09 100755 --- a/src/jalview/analysis/SequenceIdMatcher.java +++ b/src/jalview/analysis/SequenceIdMatcher.java @@ -63,9 +63,9 @@ public class SequenceIdMatcher dbseq = dbseq.getDatasetSequence(); } // add in any interesting identifiers - if (dbseq.getDBRef() != null) + if (dbseq.getDBRefs() != null) { - DBRefEntry dbr[] = dbseq.getDBRef(); + DBRefEntry dbr[] = dbseq.getDBRefs(); SeqIdName sid = null; for (int r = 0; r < dbr.length; r++) { diff --git a/src/jalview/api/DBRefEntryI.java b/src/jalview/api/DBRefEntryI.java new file mode 100644 index 0000000..b927fa5 --- /dev/null +++ b/src/jalview/api/DBRefEntryI.java @@ -0,0 +1,72 @@ +package jalview.api; + + +public interface DBRefEntryI +{ + public boolean equalRef(DBRefEntryI entry); + + /** + * + * @return Source DB name for this entry + */ + public String getSource(); + + /** + * + * @return Accession Id for this entry + */ + public String getAccessionId(); + + /** + * + * @param accessionId + * Accession Id for this entry + */ + public void setAccessionId(String accessionId); + + /** + * + * @param source + * Source DB name for this entry + */ + public void setSource(String source); + + /** + * + * @return Source DB version for this entry + */ + public String getVersion(); + + /** + * + * @param version + * Source DB version for this entry + */ + public void setVersion(String version); + + /** + * + * @param startRes + * index of start residue in the source DB + */ + public void setStartRes(int startRes); + + /** + * + * @return index of start residue in the source DB + */ + public int getStartRes(); + + /** + * + * @param endRes + * index of end residue in the source DB + */ + public void setEndRes(int endRes); + + /** + * + * @return index of end residue in the source DB + */ + public int getEndRes(); +} diff --git a/src/jalview/api/SiftsClientI.java b/src/jalview/api/SiftsClientI.java new file mode 100644 index 0000000..35cb57f --- /dev/null +++ b/src/jalview/api/SiftsClientI.java @@ -0,0 +1,143 @@ +/* + * 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.api; + +import jalview.datamodel.SequenceI; +import jalview.structure.StructureMapping; +import jalview.ws.sifts.MappingOutputPojo; +import jalview.ws.sifts.SiftsException; +import jalview.xml.binding.sifts.Entry.Entity; + +import java.util.HashSet; + +public interface SiftsClientI +{ + /** + * Get the DB Accession Id for the SIFTs Entry + * + * @return + */ + public String getDbAccessionId(); + + /** + * Get DB Coordinate system for the SIFTs Entry + * + * @return + */ + public String getDbCoordSys(); + + /** + * Get DB Evidence for the SIFTs Entry + * + * @return + */ + public String getDbEvidence(); + + /** + * Get DB Source for the SIFTs Entry + * + * @return + */ + public String getDbSource(); + + /** + * Get DB version for the SIFTs Entry + * + * @return + */ + public String getDbVersion(); + + /** + * Get Number of Entities available in the SIFTs Entry + * + * @return + */ + public int getEntityCount(); + + /** + * Get a unique Entity by its Id + * + * @param id + * ID of the entity to fetch + * @return Entity + * @throws Exception + */ + public Entity getEntityById(String id) throws SiftsException; + + /** + * Get all accession Ids available in the current SIFTs entry + * + * @return a unique set of discovered accession strings + */ + public HashSet getAllMappingAccession(); + + /** + * Check if the accessionId is available in current SIFTs Entry + * + * @param accessionId + * @return + */ + public boolean isFoundInSiftsEntry(String accessionId); + + /** + * Get the standard DB referenced by the SIFTs Entry + * + * @return + */ + public String[] getEntryDBs(); + + /** + * + * @param mop + * MappingOutputPojo + * @return Sequence<->Structure mapping as int[][] + * @throws SiftsException + */ + public StringBuffer getMappingOutput(MappingOutputPojo mop) + throws SiftsException; + + /** + * + * @param seq + * sequence to generate mapping against the structure + * @param pdbFile + * PDB file for the mapping + * @param chain + * the chain of the entry to use for mapping + * @return StructureMapping + * @throws SiftsException + */ + public StructureMapping getSiftsStructureMapping(SequenceI seq, + String pdbFile, String chain) throws SiftsException; + + /** + * Get residue by residue mapping for a given Sequence and SIFTs entity + * + * @param entityId + * Id of the target entity in the SIFTs entry + * @param seq + * SequenceI + * @return generated mapping + * @throws Exception + */ + public int[][] getGreedyMapping(String entityId, SequenceI seq, + java.io.PrintStream os) throws SiftsException; +} \ No newline at end of file diff --git a/src/jalview/appletgui/APopupMenu.java b/src/jalview/appletgui/APopupMenu.java index 1d2feb2..748954a 100644 --- a/src/jalview/appletgui/APopupMenu.java +++ b/src/jalview/appletgui/APopupMenu.java @@ -274,7 +274,7 @@ public class APopupMenu extends java.awt.PopupMenu implements // collect matching db-refs DBRefEntry[] dbr = jalview.util.DBRefUtils.selectRefs( - seq.getDBRef(), new String[] { target }); + seq.getDBRefs(), new String[] { target }); // collect id string too String id = seq.getName(); String descr = seq.getDescription(); diff --git a/src/jalview/datamodel/DBRefEntry.java b/src/jalview/datamodel/DBRefEntry.java index 0581845..0b1fb6d 100755 --- a/src/jalview/datamodel/DBRefEntry.java +++ b/src/jalview/datamodel/DBRefEntry.java @@ -20,10 +20,13 @@ */ package jalview.datamodel; -public class DBRefEntry +import jalview.api.DBRefEntryI; + +public class DBRefEntry implements DBRefEntryI { String source = "", version = "", accessionId = ""; + private int startRes, endRes; /** * maps from associated sequence to the database sequence's coordinate system */ @@ -98,7 +101,8 @@ public class DBRefEntry * @param entry * @return true if source, accession and version are equal with those of entry */ - public boolean equalRef(DBRefEntry entry) + @Override + public boolean equalRef(DBRefEntryI entry) { if (entry == null) { @@ -108,63 +112,59 @@ public class DBRefEntry { return true; } - if ((source != null && entry.source != null && source - .equalsIgnoreCase(entry.source)) - && (accessionId != null && entry.accessionId != null && accessionId - .equalsIgnoreCase(entry.accessionId)) - && (version != null && entry.version != null && version - .equalsIgnoreCase(entry.version))) + if (entry != null + && (source != null && entry.getSource() != null && source + .equalsIgnoreCase(entry.getSource())) + && (accessionId != null && entry.getAccessionId() != null && accessionId + .equalsIgnoreCase(entry.getAccessionId())) + && (version != null && entry.getVersion() != null && version + .equalsIgnoreCase(entry.getVersion()))) { return true; } return false; } + @Override public String getSource() { return source; } + @Override public String getVersion() { return version; } + @Override public String getAccessionId() { return accessionId; } - /** - * @param accessionId - * the accessionId to set - */ + + @Override public void setAccessionId(String accessionId) { this.accessionId = accessionId; } - /** - * @param source - * the source to set - */ + + @Override public void setSource(String source) { this.source = source; } - /** - * @param version - * the version to set - */ + + @Override public void setVersion(String version) { this.version = version; } - /** - * @return the map - */ + public Mapping getMap() { return map; @@ -194,8 +194,33 @@ public class DBRefEntry + ((accessionId != null) ? accessionId : ""); } + @Override public String toString() { return getSrcAccString(); } + + @Override + public int getStartRes() + { + return startRes; + } + + @Override + public void setStartRes(int startRes) + { + this.startRes = startRes; + } + + @Override + public int getEndRes() + { + return endRes; + } + + @Override + public void setEndRes(int endRes) + { + this.endRes = endRes; + } } diff --git a/src/jalview/datamodel/Sequence.java b/src/jalview/datamodel/Sequence.java index c7581d8..ac2f9c1 100755 --- a/src/jalview/datamodel/Sequence.java +++ b/src/jalview/datamodel/Sequence.java @@ -21,6 +21,7 @@ package jalview.datamodel; import jalview.analysis.AlignSeq; +import jalview.api.DBRefEntryI; import jalview.util.StringUtils; import java.util.ArrayList; @@ -55,6 +56,8 @@ public class Sequence extends ASequence implements SequenceI String vamsasId; + DBRefEntryI sourceDBRef; + DBRefEntry[] dbrefs; RNA rna; @@ -216,6 +219,7 @@ public class Sequence extends ASequence implements SequenceI initSeqAndName(seq.getName(), seq.getSequence(), seq.getStart(), seq.getEnd()); description = seq.getDescription(); + sourceDBRef = seq.getSourceDBRef(); if (seq.getSequenceFeatures() != null) { SequenceFeature[] sf = seq.getSequenceFeatures(); @@ -225,10 +229,10 @@ public class Sequence extends ASequence implements SequenceI } } setDatasetSequence(seq.getDatasetSequence()); - if (datasetSequence == null && seq.getDBRef() != null) + if (datasetSequence == null && seq.getDBRefs() != null) { // only copy DBRefs if we really are a dataset sequence - DBRefEntry[] dbr = seq.getDBRef(); + DBRefEntry[] dbr = seq.getDBRefs(); for (int i = 0; i < dbr.length; i++) { addDBRef(new DBRefEntry(dbr[i])); @@ -276,11 +280,13 @@ public class Sequence extends ASequence implements SequenceI * @param v * DOCUMENT ME! */ + @Override public void setSequenceFeatures(SequenceFeature[] features) { sequenceFeatures = features; } + @Override public synchronized void addSequenceFeature(SequenceFeature sf) { if (sequenceFeatures == null) @@ -303,6 +309,7 @@ public class Sequence extends ASequence implements SequenceI sequenceFeatures = temp; } + @Override public void deleteFeature(SequenceFeature sf) { if (sequenceFeatures == null) @@ -352,6 +359,7 @@ public class Sequence extends ASequence implements SequenceI * * @return */ + @Override public SequenceFeature[] getSequenceFeatures() { SequenceFeature[] features = sequenceFeatures; @@ -367,6 +375,7 @@ public class Sequence extends ASequence implements SequenceI return features; } + @Override public void addPDBId(PDBEntry entry) { if (pdbIds == null) @@ -419,6 +428,7 @@ public class Sequence extends ASequence implements SequenceI * * @return DOCUMENT ME! */ + @Override public String getDisplayId(boolean jvsuffix) { StringBuffer result = new StringBuffer(name); @@ -436,6 +446,7 @@ public class Sequence extends ASequence implements SequenceI * @param name * DOCUMENT ME! */ + @Override public void setName(String name) { this.name = name; @@ -447,6 +458,7 @@ public class Sequence extends ASequence implements SequenceI * * @return DOCUMENT ME! */ + @Override public String getName() { return this.name; @@ -458,6 +470,7 @@ public class Sequence extends ASequence implements SequenceI * @param start * DOCUMENT ME! */ + @Override public void setStart(int start) { this.start = start; @@ -468,6 +481,7 @@ public class Sequence extends ASequence implements SequenceI * * @return DOCUMENT ME! */ + @Override public int getStart() { return this.start; @@ -479,6 +493,7 @@ public class Sequence extends ASequence implements SequenceI * @param end * DOCUMENT ME! */ + @Override public void setEnd(int end) { this.end = end; @@ -489,6 +504,7 @@ public class Sequence extends ASequence implements SequenceI * * @return DOCUMENT ME! */ + @Override public int getEnd() { return this.end; @@ -499,6 +515,7 @@ public class Sequence extends ASequence implements SequenceI * * @return DOCUMENT ME! */ + @Override public int getLength() { return this.sequence.length; @@ -510,22 +527,26 @@ public class Sequence extends ASequence implements SequenceI * @param seq * DOCUMENT ME! */ + @Override public void setSequence(String seq) { this.sequence = seq.toCharArray(); checkValidRange(); } + @Override public String getSequenceAsString() { return new String(sequence); } + @Override public String getSequenceAsString(int start, int end) { return new String(getSequence(start, end)); } + @Override public char[] getSequence() { return sequence; @@ -536,6 +557,7 @@ public class Sequence extends ASequence implements SequenceI * * @see jalview.datamodel.SequenceI#getSequence(int, int) */ + @Override public char[] getSequence(int start, int end) { if (start < 0) @@ -596,6 +618,7 @@ public class Sequence extends ASequence implements SequenceI * * @return DOCUMENT ME! */ + @Override public char getCharAt(int i) { if (i < sequence.length) @@ -614,6 +637,7 @@ public class Sequence extends ASequence implements SequenceI * @param desc * DOCUMENT ME! */ + @Override public void setDescription(String desc) { this.description = desc; @@ -624,6 +648,7 @@ public class Sequence extends ASequence implements SequenceI * * @return DOCUMENT ME! */ + @Override public String getDescription() { return this.description; @@ -634,6 +659,7 @@ public class Sequence extends ASequence implements SequenceI * * @see jalview.datamodel.SequenceI#findIndex(int) */ + @Override public int findIndex(int pos) { // returns the alignment position for a residue @@ -686,6 +712,7 @@ public class Sequence extends ASequence implements SequenceI * @return int[SequenceI.getEnd()-SequenceI.getStart()+1] or null if no * residues in SequenceI object */ + @Override public int[] gapMap() { String seq = jalview.analysis.AlignSeq.extractGaps( @@ -885,18 +912,18 @@ public class Sequence extends ASequence implements SequenceI } @Override - public void setDBRef(DBRefEntry[] dbref) + public void setDBRefs(DBRefEntry[] dbref) { dbrefs = dbref; } @Override - public DBRefEntry[] getDBRef() + public DBRefEntry[] getDBRefs() { if (dbrefs == null && datasetSequence != null && this != datasetSequence) { - return datasetSequence.getDBRef(); + return datasetSequence.getDBRefs(); } return dbrefs; } @@ -973,6 +1000,7 @@ public class Sequence extends ASequence implements SequenceI annotation.setSequenceRef(this); } + @Override public void removeAlignmentAnnotation(AlignmentAnnotation annotation) { if (this.annotation != null) @@ -1040,6 +1068,7 @@ public class Sequence extends ASequence implements SequenceI * * @see jalview.datamodel.SequenceI#createDatasetSequence() */ + @Override public SequenceI createDatasetSequence() { if (datasetSequence == null) @@ -1051,8 +1080,8 @@ public class Sequence extends ASequence implements SequenceI datasetSequence.setDescription(getDescription()); setSequenceFeatures(null); // move database references onto dataset sequence - datasetSequence.setDBRef(getDBRef()); - setDBRef(null); + datasetSequence.setDBRefs(getDBRefs()); + setDBRefs(null); datasetSequence.setPDBId(getAllPDBEntries()); setPDBId(null); datasetSequence.updatePDBIds(); @@ -1078,6 +1107,7 @@ public class Sequence extends ASequence implements SequenceI * jalview.datamodel.SequenceI#setAlignmentAnnotation(AlignmmentAnnotation[] * annotations) */ + @Override public void setAlignmentAnnotation(AlignmentAnnotation[] annotations) { if (annotation != null) @@ -1226,7 +1256,7 @@ public class Sequence extends ASequence implements SequenceI } } // transfer database references - DBRefEntry[] entryRefs = entry.getDBRef(); + DBRefEntry[] entryRefs = entry.getDBRefs(); if (entryRefs != null) { for (int r = 0; r < entryRefs.length; r++) @@ -1250,6 +1280,7 @@ public class Sequence extends ASequence implements SequenceI * @return The index (zero-based) on this sequence in the MSA. It returns * {@code -1} if this information is not available. */ + @Override public int getIndex() { return index; @@ -1263,16 +1294,19 @@ public class Sequence extends ASequence implements SequenceI * position for this sequence. This value is zero-based (zero for * this first sequence) */ + @Override public void setIndex(int value) { index = value; } + @Override public void setRNA(RNA r) { rna = r; } + @Override public RNA getRNA() { return rna; @@ -1297,6 +1331,7 @@ public class Sequence extends ASequence implements SequenceI return result; } + @Override public String toString() { return getDisplayId(false); @@ -1321,4 +1356,16 @@ public class Sequence extends ASequence implements SequenceI return null; } + @Override + public void setSourceDBRef(DBRefEntryI dbRef) + { + this.sourceDBRef = dbRef; + } + + @Override + public DBRefEntryI getSourceDBRef() + { + return this.sourceDBRef; + } + } diff --git a/src/jalview/datamodel/SequenceGroup.java b/src/jalview/datamodel/SequenceGroup.java index cc70e25..0e8fa17 100755 --- a/src/jalview/datamodel/SequenceGroup.java +++ b/src/jalview/datamodel/SequenceGroup.java @@ -209,7 +209,7 @@ public class SequenceGroup implements AnnotatedCollectionI if (seqs[ipos] != null) { seqs[ipos].setDescription(seq.getDescription()); - seqs[ipos].setDBRef(seq.getDBRef()); + seqs[ipos].setDBRefs(seq.getDBRefs()); seqs[ipos].setSequenceFeatures(seq.getSequenceFeatures()); if (seq.getDatasetSequence() != null) { diff --git a/src/jalview/datamodel/SequenceI.java b/src/jalview/datamodel/SequenceI.java index 0e649c0..f1cba43 100755 --- a/src/jalview/datamodel/SequenceI.java +++ b/src/jalview/datamodel/SequenceI.java @@ -20,6 +20,8 @@ */ package jalview.datamodel; +import jalview.api.DBRefEntryI; + import java.util.List; import java.util.Vector; @@ -296,9 +298,9 @@ public interface SequenceI extends ASequenceI public void setVamsasId(String id); - public void setDBRef(DBRefEntry[] dbs); + public void setDBRefs(DBRefEntry[] dbs); - public DBRefEntry[] getDBRef(); + public DBRefEntry[] getDBRefs(); /** * add the given entry to the list of DBRefs for this sequence, or replace a @@ -429,4 +431,8 @@ public interface SequenceI extends ASequenceI * @return */ public PDBEntry getPDBEntry(String pdbId); + + public void setSourceDBRef(DBRefEntryI dbRef); + + public DBRefEntryI getSourceDBRef(); } diff --git a/src/jalview/ext/jmol/JmolCommands.java b/src/jalview/ext/jmol/JmolCommands.java index 19f535c..d5676c5 100644 --- a/src/jalview/ext/jmol/JmolCommands.java +++ b/src/jalview/ext/jmol/JmolCommands.java @@ -64,7 +64,9 @@ public class JmolCommands ArrayList str = new ArrayList(); if (mapping == null || mapping.length < 1) + { continue; + } int lastPos = -1; for (int s = 0; s < sequence[pdbfnum].length; s++) @@ -85,14 +87,18 @@ public class JmolCommands int pos = mapping[m].getPDBResNum(asp.findPosition(r)); if (pos < 1 || pos == lastPos) + { continue; + } lastPos = pos; Color col = sr.getResidueBoxColour(sequence[pdbfnum][s], r); if (fr != null) + { col = fr.findFeatureColour(col, sequence[pdbfnum][s], r); + } String newSelcom = (mapping[m].getChain() != " " ? ":" + mapping[m].getChain() : "") + "/" @@ -125,7 +131,7 @@ public class JmolCommands command.append("select " + pos); command.append(newSelcom); } - break; + // break; } } } diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index d20d62e..5e15195 100644 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -5531,8 +5531,14 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, @Override public void run() { + boolean isNuclueotide = alignPanel.alignFrame + .getViewport().getAlignment() + .isNucleotide(); new jalview.ws.DBRefFetcher(alignPanel.av - .getSequenceSelection(), alignPanel.alignFrame) + .getSequenceSelection(), + alignPanel.alignFrame, null, + alignPanel.alignFrame.featureSettings, + isNuclueotide) .fetchDBRefs(false); } }).start(); @@ -5601,9 +5607,14 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, @Override public void run() { + boolean isNuclueotide = alignPanel.alignFrame + .getViewport().getAlignment() + .isNucleotide(); new jalview.ws.DBRefFetcher(alignPanel.av .getSequenceSelection(), - alignPanel.alignFrame, dassource) + alignPanel.alignFrame, dassource, + alignPanel.alignFrame.featureSettings, + isNuclueotide) .fetchDBRefs(false); } }).start(); @@ -5637,9 +5648,14 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, @Override public void run() { + boolean isNuclueotide = alignPanel.alignFrame + .getViewport().getAlignment() + .isNucleotide(); new jalview.ws.DBRefFetcher(alignPanel.av .getSequenceSelection(), - alignPanel.alignFrame, dassource) + alignPanel.alignFrame, dassource, + alignPanel.alignFrame.featureSettings, + isNuclueotide) .fetchDBRefs(false); } }).start(); @@ -5688,9 +5704,14 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, @Override public void run() { + boolean isNuclueotide = alignPanel.alignFrame + .getViewport().getAlignment() + .isNucleotide(); new jalview.ws.DBRefFetcher(alignPanel.av .getSequenceSelection(), - alignPanel.alignFrame, dassrc) + alignPanel.alignFrame, dassrc, + alignPanel.alignFrame.featureSettings, + isNuclueotide) .fetchDBRefs(false); } }).start(); diff --git a/src/jalview/gui/Jalview2XML.java b/src/jalview/gui/Jalview2XML.java index 50a8167..fc96edc 100644 --- a/src/jalview/gui/Jalview2XML.java +++ b/src/jalview/gui/Jalview2XML.java @@ -1948,16 +1948,16 @@ public class Jalview2XML if (jds.getDatasetSequence() != null) { vamsasSeq.setDsseqid(seqHash(jds.getDatasetSequence())); - if (jds.getDatasetSequence().getDBRef() != null) + if (jds.getDatasetSequence().getDBRefs() != null) { - dbrefs = jds.getDatasetSequence().getDBRef(); + dbrefs = jds.getDatasetSequence().getDBRefs(); } } else { vamsasSeq.setDsseqid(id); // so we can tell which sequences really are // dataset sequences only - dbrefs = jds.getDBRef(); + dbrefs = jds.getDBRefs(); } if (dbrefs != null) { diff --git a/src/jalview/gui/PopupMenu.java b/src/jalview/gui/PopupMenu.java index fee47e5..e86b2c5 100644 --- a/src/jalview/gui/PopupMenu.java +++ b/src/jalview/gui/PopupMenu.java @@ -642,7 +642,7 @@ public class PopupMenu extends JPopupMenu // collect matching db-refs DBRefEntry[] dbr = jalview.util.DBRefUtils.selectRefs( - seq.getDBRef(), new String[] { urlLink.getTarget() }); + seq.getDBRefs(), new String[] { urlLink.getTarget() }); // collect id string too String id = seq.getName(); String descr = seq.getDescription(); @@ -896,7 +896,7 @@ public class PopupMenu extends JPopupMenu { sqi = sqi.getDatasetSequence(); } - DBRefEntry[] dbr = sqi.getDBRef(); + DBRefEntry[] dbr = sqi.getDBRefs(); if (dbr != null && dbr.length > 0) { for (int d = 0; d < dbr.length; d++) @@ -2451,9 +2451,13 @@ public class PopupMenu extends JPopupMenu @Override public void run() { + boolean isNuclueotide = ap.alignFrame.getViewport().getAlignment() + .isNucleotide(); - new jalview.ws.DBRefFetcher(sequences, ap.alignFrame) + new jalview.ws.DBRefFetcher(sequences, ap.alignFrame, null, + ap.alignFrame.featureSettings, isNuclueotide) .fetchDBRefs(false); + } }); diff --git a/src/jalview/gui/Preferences.java b/src/jalview/gui/Preferences.java index 5cb6512..885a62f 100755 --- a/src/jalview/gui/Preferences.java +++ b/src/jalview/gui/Preferences.java @@ -313,6 +313,15 @@ public class Preferences extends GPreferences } }); + if (Cache.getDefault("MAP_WITH_SIFTS", false)) + { + siftsMapping.setSelected(true); + } + else + { + nwMapping.setSelected(true); + } + /* * Set Connections tab defaults */ @@ -384,6 +393,7 @@ public class Preferences extends GPreferences * * @param e */ + @Override public void ok_actionPerformed(ActionEvent e) { if (!validateSettings()) @@ -492,6 +502,8 @@ public class Preferences extends GPreferences Cache.applicationProperties.setProperty(STRUCTURE_DISPLAY, structViewer .getSelectedItem().toString()); Cache.setOrRemove(CHIMERA_PATH, chimeraPath.getText()); + Cache.applicationProperties.setProperty("MAP_WITH_SIFTS", + Boolean.toString(siftsMapping.isSelected())); /* * Save Output settings @@ -647,6 +659,7 @@ public class Preferences extends GPreferences /** * DOCUMENT ME! */ + @Override public void startupFileTextfield_mouseClicked() { JalviewFileChooser chooser = new JalviewFileChooser( @@ -676,6 +689,7 @@ public class Preferences extends GPreferences * @param e * DOCUMENT ME! */ + @Override public void cancel_actionPerformed(ActionEvent e) { try @@ -694,6 +708,7 @@ public class Preferences extends GPreferences * @param e * DOCUMENT ME! */ + @Override public void annotations_actionPerformed(ActionEvent e) { conservation.setEnabled(annotations.isSelected()); @@ -707,6 +722,7 @@ public class Preferences extends GPreferences && (identity.isSelected() || showGroupConsensus.isSelected())); } + @Override public void newLink_actionPerformed(ActionEvent e) { @@ -733,6 +749,7 @@ public class Preferences extends GPreferences } } + @Override public void editLink_actionPerformed(ActionEvent e) { GSequenceLink link = new GSequenceLink(); @@ -774,6 +791,7 @@ public class Preferences extends GPreferences } } + @Override public void deleteLink_actionPerformed(ActionEvent e) { int index = linkNameList.getSelectedIndex(); @@ -796,6 +814,7 @@ public class Preferences extends GPreferences linkURLList.setListData(urlLinks); } + @Override public void defaultBrowser_mouseClicked(MouseEvent e) { JFileChooser chooser = new JFileChooser("."); @@ -818,6 +837,7 @@ public class Preferences extends GPreferences * jalview.jbgui.GPreferences#showunconserved_actionPerformed(java.awt.event * .ActionEvent) */ + @Override protected void showunconserved_actionPerformed(ActionEvent e) { // TODO Auto-generated method stub diff --git a/src/jalview/gui/SequenceFetcher.java b/src/jalview/gui/SequenceFetcher.java index a973757..191e8fe 100755 --- a/src/jalview/gui/SequenceFetcher.java +++ b/src/jalview/gui/SequenceFetcher.java @@ -661,7 +661,7 @@ public class SequenceFetcher extends JPanel implements Runnable { if (rs[r] != null && (found = DBRefUtils.searchRefs( - rs[r].getDBRef(), dbr)) != null + rs[r].getDBRefs(), dbr)) != null && found.length > 0) { rfound = true; diff --git a/src/jalview/gui/StructureChooser.java b/src/jalview/gui/StructureChooser.java index 63a8654..3df7e0c 100644 --- a/src/jalview/gui/StructureChooser.java +++ b/src/jalview/gui/StructureChooser.java @@ -22,6 +22,7 @@ package jalview.gui; import jalview.datamodel.DBRefEntry; +import jalview.datamodel.DBRefSource; import jalview.datamodel.PDBEntry; import jalview.datamodel.SequenceI; import jalview.jbgui.GStructureChooser; @@ -145,7 +146,7 @@ public class StructureChooser extends GStructureChooser PDBRestRequest pdbRequest = new PDBRestRequest(); pdbRequest.setAllowEmptySeq(false); pdbRequest.setResponseSize(500); - pdbRequest.setFieldToSearchBy("(text:"); + pdbRequest.setFieldToSearchBy("("); pdbRequest.setWantedFields(wantedFields); pdbRequest.setSearchTerm(buildQuery(seq) + ")"); pdbRequest.setAssociatedSequence(seq); @@ -233,18 +234,10 @@ public class StructureChooser extends GStructureChooser public static String buildQuery(SequenceI seq) { + boolean isPDBRefsFound = false; + boolean isUniProtRefsFound = false; + StringBuilder queryBuilder = new StringBuilder(); HashSet seqRefs = new LinkedHashSet(); - String seqName = seq.getName(); - String[] names = seqName.toLowerCase().split("\\|"); - for (String name : names) - { - // System.out.println("Found name : " + name); - name.trim(); - if (isValidSeqName(name)) - { - seqRefs.add(name); - } - } if (seq.getAllPDBEntries() != null) { @@ -252,40 +245,77 @@ public class StructureChooser extends GStructureChooser { if (isValidSeqName(entry.getId())) { - seqRefs.add(entry.getId()); + queryBuilder.append(PDBRestClient.PDBDocField.PDB_ID.getCode()) + .append(":") +.append(entry.getId().toLowerCase()) + .append(" OR "); + isPDBRefsFound = true; + // seqRefs.add(entry.getId()); } } } - if (seq.getDBRef() != null && seq.getDBRef().length != 0) + if (seq.getDBRefs() != null && seq.getDBRefs().length != 0) { - int count = 0; - for (DBRefEntry dbRef : seq.getDBRef()) + for (DBRefEntry dbRef : seq.getDBRefs()) { if (isValidSeqName(getDBRefId(dbRef))) { - seqRefs.add(getDBRefId(dbRef)); - } - ++count; - if (count > 10) - { - break; + if (dbRef.getSource().equalsIgnoreCase(DBRefSource.UNIPROT)) + { + queryBuilder + .append(PDBRestClient.PDBDocField.UNIPROT_ACCESSION + .getCode()).append(":") + .append(getDBRefId(dbRef)) + .append(" OR "); + queryBuilder + .append(PDBRestClient.PDBDocField.UNIPROT_ID.getCode()) + .append(":") + .append(getDBRefId(dbRef)).append(" OR "); + isUniProtRefsFound = true; + } + else if (dbRef.getSource().equalsIgnoreCase(DBRefSource.PDB)) + { + + queryBuilder.append(PDBRestClient.PDBDocField.PDB_ID.getCode()) + .append(":").append(getDBRefId(dbRef).toLowerCase()) + .append(" OR "); + isPDBRefsFound = true; + } + else + { + seqRefs.add(getDBRefId(dbRef)); + } } } } - StringBuilder queryBuilder = new StringBuilder(); - for (String seqRef : seqRefs) + if (!isPDBRefsFound && !isUniProtRefsFound) { - queryBuilder.append("text:").append(seqRef).append(" OR "); + String seqName = seq.getName(); + String[] names = seqName.toLowerCase().split("\\|"); + for (String name : names) + { + // System.out.println("Found name : " + name); + name.trim(); + if (isValidSeqName(name)) + { + seqRefs.add(name); + } + } + + for (String seqRef : seqRefs) + { + queryBuilder.append("text:").append(seqRef).append(" OR "); + } } - int endIndex = queryBuilder.lastIndexOf(" OR "); + int endIndex = queryBuilder.lastIndexOf(" OR "); if (queryBuilder.toString().length() < 6) { return null; } - String query = queryBuilder.toString().substring(5, endIndex); + String query = queryBuilder.toString().substring(0, endIndex); return query; } @@ -349,7 +379,7 @@ public class StructureChooser extends GStructureChooser PDBRestRequest pdbRequest = new PDBRestRequest(); pdbRequest.setAllowEmptySeq(false); pdbRequest.setResponseSize(1); - pdbRequest.setFieldToSearchBy("(text:"); + pdbRequest.setFieldToSearchBy("("); pdbRequest.setFieldToSortBy(fieldToFilterBy, !chk_invertFilter.isSelected()); pdbRequest.setSearchTerm(buildQuery(seq) + ")"); @@ -420,6 +450,7 @@ public class StructureChooser extends GStructureChooser /** * Handles action event for btn_pdbFromFile */ + @Override public void pdbFromFile_actionPerformed() { jalview.io.JalviewFileChooser chooser = new jalview.io.JalviewFileChooser( @@ -445,6 +476,7 @@ public class StructureChooser extends GStructureChooser * Populates the filter combo-box options dynamically depending on discovered * structures */ + @Override protected void populateFilterComboBox() { if (isStructuresDiscovered()) @@ -473,6 +505,7 @@ public class StructureChooser extends GStructureChooser /** * Updates the displayed view based on the selected filter option */ + @Override protected void updateCurrentView() { FilterOption selectedFilterOpt = ((FilterOption) cmb_filterOption @@ -503,6 +536,7 @@ public class StructureChooser extends GStructureChooser * Validates user selection and activates the view button if all parameters * are correct */ + @Override public void validateSelections() { FilterOption selectedFilterOpt = ((FilterOption) cmb_filterOption @@ -744,6 +778,7 @@ public class StructureChooser extends GStructureChooser final StructureViewer sViewer = new StructureViewer(ssm); new Thread(new Runnable() { + @Override public void run() { if (pdbEntriesToView.length > 1) @@ -768,6 +803,7 @@ public class StructureChooser extends GStructureChooser * Populates the combo-box used in associating manually fetched structures to * a unique sequence when more than one sequence selection is made. */ + @Override public void populateCmbAssociateSeqOptions( JComboBox cmb_assSeq, JLabel lbl_associateSeq) { @@ -812,6 +848,7 @@ public class StructureChooser extends GStructureChooser { new Thread() { + @Override public void run() { errorWarning.setLength(0); diff --git a/src/jalview/gui/TreePanel.java b/src/jalview/gui/TreePanel.java index d2c86c8..9522144 100755 --- a/src/jalview/gui/TreePanel.java +++ b/src/jalview/gui/TreePanel.java @@ -840,7 +840,7 @@ public class TreePanel extends GTreePanel { // search dbrefs, features and annotation DBRefEntry[] refs = jalview.util.DBRefUtils.selectRefs( - sq.getDBRef(), + sq.getDBRefs(), new String[] { labelClass.toUpperCase() }); if (refs != null) { diff --git a/src/jalview/io/ModellerDescription.java b/src/jalview/io/ModellerDescription.java index 55324ad..1ab9545 100755 --- a/src/jalview/io/ModellerDescription.java +++ b/src/jalview/io/ModellerDescription.java @@ -268,10 +268,10 @@ public class ModellerDescription // sets the local reference field int t = 0; // sequence if (seq.getDatasetSequence() != null - && seq.getDatasetSequence().getDBRef() != null) + && seq.getDatasetSequence().getDBRefs() != null) { jalview.datamodel.DBRefEntry[] dbr = seq.getDatasetSequence() - .getDBRef(); + .getDBRefs(); int i, j; for (i = 0, j = dbr.length; i < j; i++) { diff --git a/src/jalview/io/SequenceAnnotationReport.java b/src/jalview/io/SequenceAnnotationReport.java index 72f8044..d3a1d09 100644 --- a/src/jalview/io/SequenceAnnotationReport.java +++ b/src/jalview/io/SequenceAnnotationReport.java @@ -230,7 +230,7 @@ public class SequenceAnnotationReport { // collect matching db-refs - DBRefEntry[] dbr = jalview.util.DBRefUtils.selectRefs(seq.getDBRef(), + DBRefEntry[] dbr = jalview.util.DBRefUtils.selectRefs(seq.getDBRefs(), new String[] { target }); // collect id string too String id = seq.getName(); @@ -346,7 +346,7 @@ public class SequenceAnnotationReport { ds = ds.getDatasetSequence(); } - DBRefEntry[] dbrefs = ds.getDBRef(); + DBRefEntry[] dbrefs = ds.getDBRefs(); if (showDbRefs && dbrefs != null) { for (int i = 0; i < dbrefs.length; i++) diff --git a/src/jalview/io/StockholmFile.java b/src/jalview/io/StockholmFile.java index 9135b92..23c4d21 100644 --- a/src/jalview/io/StockholmFile.java +++ b/src/jalview/io/StockholmFile.java @@ -900,18 +900,18 @@ public class StockholmFile extends AlignFile { maxid = tmp.length(); } - if (s[in].getDBRef() != null) + if (s[in].getDBRefs() != null) { - for (int idb = 0; idb < s[in].getDBRef().length; idb++) + for (int idb = 0; idb < s[in].getDBRefs().length; idb++) { if (dataRef == null) { dataRef = new Hashtable(); } - String datAs1 = s[in].getDBRef()[idb].getSource().toString() + String datAs1 = s[in].getDBRefs()[idb].getSource().toString() + " ; " - + s[in].getDBRef()[idb].getAccessionId().toString(); + + s[in].getDBRefs()[idb].getAccessionId().toString(); dataRef.put(tmp, datAs1); } } diff --git a/src/jalview/io/WSWUBlastClient.java b/src/jalview/io/WSWUBlastClient.java index a6c1111..9d9b940 100755 --- a/src/jalview/io/WSWUBlastClient.java +++ b/src/jalview/io/WSWUBlastClient.java @@ -176,7 +176,7 @@ public class WSWUBlastClient } } - DBRefEntry[] entries = oldseq.getDBRef(); + DBRefEntry[] entries = oldseq.getDBRefs(); if (entries != null) { oldseq.addDBRef(new jalview.datamodel.DBRefEntry( diff --git a/src/jalview/io/vamsas/Datasetsequence.java b/src/jalview/io/vamsas/Datasetsequence.java index f1b9f1a..9db7a8e 100644 --- a/src/jalview/io/vamsas/Datasetsequence.java +++ b/src/jalview/io/vamsas/Datasetsequence.java @@ -175,10 +175,10 @@ public class Datasetsequence extends DatastoreItem boolean modifiedthedoc = false; SequenceI sq = (SequenceI) jvobj; - if (sq.getDatasetSequence() == null && sq.getDBRef() != null) + if (sq.getDatasetSequence() == null && sq.getDBRefs() != null) { // only sync database references for dataset sequences - DBRefEntry[] entries = sq.getDBRef(); + DBRefEntry[] entries = sq.getDBRefs(); // jalview.datamodel.DBRefEntry dbentry; for (int db = 0; db < entries.length; db++) { diff --git a/src/jalview/io/vamsas/Sequencemapping.java b/src/jalview/io/vamsas/Sequencemapping.java index 31ccc48..160f5e2 100644 --- a/src/jalview/io/vamsas/Sequencemapping.java +++ b/src/jalview/io/vamsas/Sequencemapping.java @@ -386,7 +386,7 @@ public class Sequencemapping extends Rangetype private void matchConjugateDBRefs(SequenceI from, SequenceI to, jalview.util.MapList smap) { - if (from.getDBRef() == null && to.getDBRef() == null) + if (from.getDBRefs() == null && to.getDBRefs() == null) { if (jalview.bin.Cache.log.isDebugEnabled()) { @@ -400,11 +400,11 @@ public class Sequencemapping extends Rangetype jalview.bin.Cache.log.debug("Matching conjugate refs for " + from.getName() + " and " + to.getName()); } - jalview.datamodel.DBRefEntry[] fdb = from.getDBRef(); + jalview.datamodel.DBRefEntry[] fdb = from.getDBRefs(); jalview.datamodel.DBRefEntry[] tdb = new jalview.datamodel.DBRefEntry[to - .getDBRef().length]; - int tdblen = to.getDBRef().length; - System.arraycopy(to.getDBRef(), 0, tdb, 0, tdblen); + .getDBRefs().length]; + int tdblen = to.getDBRefs().length; + System.arraycopy(to.getDBRefs(), 0, tdb, 0, tdblen); Vector matched = new Vector(); jalview.util.MapList smapI = smap.getInverse(); for (int f = 0; f < fdb.length; f++) diff --git a/src/jalview/jbgui/GPreferences.java b/src/jalview/jbgui/GPreferences.java index b12355a..b5c1804 100755 --- a/src/jalview/jbgui/GPreferences.java +++ b/src/jalview/jbgui/GPreferences.java @@ -44,6 +44,7 @@ import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import javax.swing.BorderFactory; +import javax.swing.ButtonGroup; import javax.swing.DefaultListCellRenderer; import javax.swing.JButton; import javax.swing.JCheckBox; @@ -52,6 +53,7 @@ import javax.swing.JFileChooser; import javax.swing.JLabel; import javax.swing.JList; import javax.swing.JPanel; +import javax.swing.JRadioButton; import javax.swing.JScrollPane; import javax.swing.JTabbedPane; import javax.swing.JTextField; @@ -156,6 +158,12 @@ public class GPreferences extends JPanel protected JTextField chimeraPath = new JTextField(); + protected ButtonGroup mappingMethod = new ButtonGroup(); + + protected JRadioButton siftsMapping = new JRadioButton(); + + protected JRadioButton nwMapping = new JRadioButton(); + /* * Colours tab components */ @@ -509,6 +517,7 @@ public class GPreferences extends JPanel newLink.setText(MessageManager.getString("action.new")); newLink.addActionListener(new java.awt.event.ActionListener() { + @Override public void actionPerformed(ActionEvent e) { newLink_actionPerformed(e); @@ -518,6 +527,7 @@ public class GPreferences extends JPanel editLink.setText(MessageManager.getString("action.edit")); editLink.addActionListener(new java.awt.event.ActionListener() { + @Override public void actionPerformed(ActionEvent e) { editLink_actionPerformed(e); @@ -527,6 +537,7 @@ public class GPreferences extends JPanel deleteLink.setText(MessageManager.getString("action.delete")); deleteLink.addActionListener(new java.awt.event.ActionListener() { + @Override public void actionPerformed(ActionEvent e) { deleteLink_actionPerformed(e); @@ -535,6 +546,7 @@ public class GPreferences extends JPanel linkURLList.addListSelectionListener(new ListSelectionListener() { + @Override public void valueChanged(ListSelectionEvent e) { int index = linkURLList.getSelectedIndex(); @@ -544,6 +556,7 @@ public class GPreferences extends JPanel linkNameList.addListSelectionListener(new ListSelectionListener() { + @Override public void valueChanged(ListSelectionEvent e) { int index = linkNameList.getSelectedIndex(); @@ -571,6 +584,7 @@ public class GPreferences extends JPanel defaultBrowser.addMouseListener(new MouseAdapter() { + @Override public void mouseClicked(MouseEvent e) { if (e.getClickCount() > 1) @@ -585,6 +599,7 @@ public class GPreferences extends JPanel useProxy.setText(MessageManager.getString("label.use_proxy_server")); useProxy.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent e) { useProxy_actionPerformed(); @@ -653,6 +668,7 @@ public class GPreferences extends JPanel ok.setText(MessageManager.getString("action.ok")); ok.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent e) { ok_actionPerformed(e); @@ -662,6 +678,7 @@ public class GPreferences extends JPanel cancel.setText(MessageManager.getString("action.cancel")); cancel.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent e) { cancel_actionPerformed(e); @@ -693,6 +710,7 @@ public class GPreferences extends JPanel minColour.setPreferredSize(new Dimension(40, 20)); minColour.addMouseListener(new MouseAdapter() { + @Override public void mousePressed(MouseEvent e) { minColour_actionPerformed(minColour); @@ -707,6 +725,7 @@ public class GPreferences extends JPanel maxColour.setPreferredSize(new Dimension(40, 20)); maxColour.addMouseListener(new MouseAdapter() { + @Override public void mousePressed(MouseEvent e) { maxColour_actionPerformed(maxColour); @@ -764,7 +783,7 @@ public class GPreferences extends JPanel final int width = 400; final int height = 22; final int lineSpacing = 25; - int ypos = 30; + int ypos = 15; structFromPdb.setFont(LABEL_FONT); structFromPdb @@ -859,13 +878,30 @@ public class GPreferences extends JPanel structureTab.add(chimeraPath); ypos += lineSpacing; - // scrl_pdbDocFieldConfig.setPreferredSize(new Dimension(450, 100)); - // scrl_pdbDocFieldConfig - // .setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); - // scrl_pdbDocFieldConfig.setBounds(); + nwMapping.setFont(LABEL_FONT); + nwMapping.setText(MessageManager.getString("label.nw_mapping")); + siftsMapping.setFont(LABEL_FONT); + siftsMapping.setText(MessageManager.getString("label.sifts_mapping")); + mappingMethod.add(nwMapping); + mappingMethod.add(siftsMapping); + JPanel mappingPanel = new JPanel(); + mappingPanel.setFont(LABEL_FONT); + TitledBorder mmTitledBorder = new TitledBorder( + MessageManager.getString("label.mapping_method")); + mmTitledBorder.setTitleFont(LABEL_FONT); + mappingPanel.setBorder(mmTitledBorder); + mappingPanel.setBounds(new Rectangle(10, ypos, 452, 45)); + // GridLayout mappingLayout = new GridLayout(); + mappingPanel.setLayout(new GridLayout()); + mappingPanel.add(nwMapping); + mappingPanel.add(siftsMapping); + structureTab.add(mappingPanel); + + ypos += lineSpacing; + ypos += lineSpacing; PDBDocFieldPreferences docFieldPref = new PDBDocFieldPreferences( PreferenceSource.PREFERENCES); - docFieldPref.setBounds(new Rectangle(10, ypos + 5, 450, 120)); + docFieldPref.setBounds(new Rectangle(10, ypos, 450, 120)); structureTab.add(docFieldPref); return structureTab; @@ -1018,6 +1054,7 @@ public class GPreferences extends JPanel annotations.setBounds(new Rectangle(169, 12, 200, 23)); annotations.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent e) { annotations_actionPerformed(e); @@ -1025,6 +1062,7 @@ public class GPreferences extends JPanel }); identity.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent e) { annotations_actionPerformed(e); @@ -1032,6 +1070,7 @@ public class GPreferences extends JPanel }); showGroupConsensus.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent e) { annotations_actionPerformed(e); @@ -1045,6 +1084,7 @@ public class GPreferences extends JPanel .getString("action.show_unconserved")); showUnconserved.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent e) { showunconserved_actionPerformed(e); @@ -1112,6 +1152,7 @@ public class GPreferences extends JPanel startupFileTextfield.setBounds(new Rectangle(172, 310, 330, 20)); startupFileTextfield.addMouseListener(new MouseAdapter() { + @Override public void mouseClicked(MouseEvent e) { if (e.getClickCount() > 1) diff --git a/src/jalview/structure/StructureSelectionManager.java b/src/jalview/structure/StructureSelectionManager.java index 26b7d48..3d5a975 100644 --- a/src/jalview/structure/StructureSelectionManager.java +++ b/src/jalview/structure/StructureSelectionManager.java @@ -35,6 +35,8 @@ import jalview.datamodel.SequenceI; import jalview.io.AppletFormatAdapter; import jalview.util.MappingUtils; import jalview.util.MessageManager; +import jalview.ws.sifts.SiftsClient; +import jalview.ws.sifts.SiftsException; import java.io.PrintStream; import java.util.ArrayList; @@ -324,7 +326,7 @@ public class StructureSelectionManager * @param forStructureView * when true, record the mapping for use in mouseOvers * - * @param sequence + * @param sequenceArray * - one or more sequences to be mapped to pdbFile * @param targetChains * - optional chain specification for mapping each sequence to pdb @@ -336,7 +338,7 @@ public class StructureSelectionManager * @return null or the structure data parsed as a pdb file */ synchronized public PDBfile setMapping(boolean forStructureView, - SequenceI[] sequence, String[] targetChains, String pdbFile, + SequenceI[] sequenceArray, String[] targetChains, String pdbFile, String protocol) { /* @@ -346,7 +348,7 @@ public class StructureSelectionManager boolean parseSecStr = processSecondaryStructure; if (isPDBFileRegistered(pdbFile)) { - for (SequenceI sq : sequence) + for (SequenceI sq : sequenceArray) { SequenceI ds = sq; while (ds.getDatasetSequence() != null) @@ -370,15 +372,25 @@ public class StructureSelectionManager } } PDBfile pdb = null; + boolean isMapUsingSIFTs = Boolean.valueOf(jalview.bin.Cache.getDefault( + "MAP_WITH_SIFTS", "false")); + SiftsClient siftsClient = null; try { pdb = new PDBfile(addTempFacAnnot, parseSecStr, secStructServices, pdbFile, protocol); + if (isMapUsingSIFTs) + { + siftsClient = new SiftsClient(pdb); + } if (pdb.id != null && pdb.id.trim().length() > 0 && AppletFormatAdapter.FILE.equals(protocol)) { registerPDBFile(pdb.id.trim(), pdbFile); } + } catch (SiftsException e) + { + e.printStackTrace(); } catch (Exception ex) { ex.printStackTrace(); @@ -386,10 +398,10 @@ public class StructureSelectionManager } String targetChain; - for (int s = 0; s < sequence.length; s++) + for (int s = 0; s < sequenceArray.length; s++) { boolean infChain = true; - final SequenceI seq = sequence[s]; + final SequenceI seq = sequenceArray[s]; if (targetChains != null && targetChains[s] != null) { infChain = false; @@ -457,90 +469,141 @@ public class StructureSelectionManager { continue; } - final StringBuilder mappingDetails = new StringBuilder(128); - mappingDetails.append(NEWLINE).append("PDB Sequence is :") - .append(NEWLINE).append("Sequence = ") - .append(maxChain.sequence.getSequenceAsString()); - mappingDetails.append(NEWLINE).append("No of residues = ") - .append(maxChain.residues.size()).append(NEWLINE) - .append(NEWLINE); - PrintStream ps = new PrintStream(System.out) + + if (protocol.equals(jalview.io.AppletFormatAdapter.PASTE)) { - @Override - public void print(String x) - { - mappingDetails.append(x); - } + pdbFile = "INLINE" + pdb.id; + } - @Override - public void println() - { - mappingDetails.append(NEWLINE); - } - }; - - maxAlignseq.printAlignment(ps); - - mappingDetails.append(NEWLINE).append("PDB start/end "); - mappingDetails.append(String.valueOf(maxAlignseq.seq2start)).append( - " "); - mappingDetails.append(String.valueOf(maxAlignseq.seq2end)); - - mappingDetails.append(NEWLINE).append("SEQ start/end "); - mappingDetails.append( - String.valueOf(maxAlignseq.seq1start + seq.getStart() - 1)) - .append(" "); - mappingDetails.append(String.valueOf(maxAlignseq.seq1end - + seq.getEnd() - 1)); - - maxChain.makeExactMapping(maxAlignseq, seq); - jalview.datamodel.Mapping sqmpping = maxAlignseq - .getMappingFromS1(false); - jalview.datamodel.Mapping omap = new jalview.datamodel.Mapping( - sqmpping.getMap().getInverse()); - maxChain.transferRESNUMFeatures(seq, null); - - // allocate enough slots to store the mapping from positions in - // sequence[s] to the associated chain - int[][] mapping = new int[seq.findPosition(seq.getLength()) + 2][2]; - int resNum = -10000; - int index = 0; - - do + ArrayList seqToStrucMapping = null; + if (isMapUsingSIFTs) { - Atom tmp = maxChain.atoms.elementAt(index); - if (resNum != tmp.resNumber && tmp.alignmentMapping != -1) + try { - resNum = tmp.resNumber; - if (tmp.alignmentMapping >= -1) + seqToStrucMapping = new ArrayList(); + if (targetChain != null && !targetChain.trim().isEmpty()) { - // TODO (JAL-1836) address root cause: negative residue no in PDB - // file - mapping[tmp.alignmentMapping + 1][0] = tmp.resNumber; - mapping[tmp.alignmentMapping + 1][1] = tmp.atomIndex; + maxChainId = targetChain; + StructureMapping curChainMapping = siftsClient + .getSiftsStructureMapping(seq, pdbFile, targetChain); + seqToStrucMapping.add(curChainMapping); } + else + { + for (PDBChain chain : pdb.chains) + { + maxChainId = chain.id; + StructureMapping curChainMapping = siftsClient + .getSiftsStructureMapping(seq, pdbFile, chain.id); + seqToStrucMapping.add(curChainMapping); + } + } + } catch (SiftsException e) + { + System.err + .println(">>>>>>> SIFTs mapping could not be obtained... Now mapping with NW alignment"); + seqToStrucMapping = getNWMappings(seq, pdbFile, maxChainId, + maxChain, pdb, maxAlignseq); } - - index++; - } while (index < maxChain.atoms.size()); - - if (protocol.equals(jalview.io.AppletFormatAdapter.PASTE)) + } + else { - pdbFile = "INLINE" + pdb.id; + seqToStrucMapping = getNWMappings(seq, pdbFile, + maxChainId, maxChain, pdb, + maxAlignseq); } - StructureMapping newMapping = new StructureMapping(seq, pdbFile, - pdb.id, maxChainId, mapping, mappingDetails.toString()); + if (forStructureView) { - mappings.add(newMapping); + // mappings.add(seqToStrucMapping); + mappings.addAll(seqToStrucMapping); } - maxChain.transferResidueAnnotation(newMapping, sqmpping); } - // /////// - return pdb; } + private ArrayList getNWMappings(SequenceI seq, + String pdbFile, + String maxChainId, PDBChain maxChain, PDBfile pdb, + AlignSeq maxAlignseq) + { + final StringBuilder mappingDetails = new StringBuilder(128); + mappingDetails.append(NEWLINE).append( + "Sequence \u27f7 Structure mapping details"); + mappingDetails.append(NEWLINE); + mappingDetails + .append("Method: inferred with Needleman & Wunsch alignment"); + mappingDetails.append(NEWLINE).append("PDB Sequence is :") + .append(NEWLINE).append("Sequence = ") + .append(maxChain.sequence.getSequenceAsString()); + mappingDetails.append(NEWLINE).append("No of residues = ") + .append(maxChain.residues.size()).append(NEWLINE) + .append(NEWLINE); + PrintStream ps = new PrintStream(System.out) + { + @Override + public void print(String x) + { + mappingDetails.append(x); + } + + @Override + public void println() + { + mappingDetails.append(NEWLINE); + } + }; + + maxAlignseq.printAlignment(ps); + + mappingDetails.append(NEWLINE).append("PDB start/end "); + mappingDetails.append(String.valueOf(maxAlignseq.seq2start)) + .append(" "); + mappingDetails.append(String.valueOf(maxAlignseq.seq2end)); + mappingDetails.append(NEWLINE).append("SEQ start/end "); + mappingDetails.append( + String.valueOf(maxAlignseq.seq1start + (seq.getStart() - 1))) + .append(" "); + mappingDetails.append(String.valueOf(maxAlignseq.seq1end + + (seq.getStart() - 1))); + mappingDetails.append(NEWLINE); + maxChain.makeExactMapping(maxAlignseq, seq); + jalview.datamodel.Mapping sqmpping = maxAlignseq + .getMappingFromS1(false); + maxChain.transferRESNUMFeatures(seq, null); + + // allocate enough slots to store the mapping from positions in + // sequence[s] to the associated chain + int[][] mapping = new int[seq.findPosition(seq.getLength()) + 2][2]; + int resNum = -10000; + int index = 0; + + do + { + Atom tmp = maxChain.atoms.elementAt(index); + if (resNum != tmp.resNumber && tmp.alignmentMapping != -1) + { + resNum = tmp.resNumber; + if (tmp.alignmentMapping >= -1) + { + // TODO (JAL-1836) address root cause: negative residue no in PDB + // file + mapping[tmp.alignmentMapping + 1][0] = tmp.resNumber; + mapping[tmp.alignmentMapping + 1][1] = tmp.atomIndex; + } + } + + index++; + } while (index < maxChain.atoms.size()); + + StructureMapping nwMapping = new StructureMapping(seq, pdbFile, + pdb.id, maxChainId, mapping, mappingDetails.toString()); + maxChain.transferResidueAnnotation(nwMapping, sqmpping); + ArrayList mappings = new ArrayList(); + mappings.add(nwMapping); + return mappings; + } + public void removeStructureViewerListener(Object svl, String[] pdbfiles) { listeners.removeElement(svl); diff --git a/src/jalview/ws/DBRefFetcher.java b/src/jalview/ws/DBRefFetcher.java index d531fea..473d54f 100644 --- a/src/jalview/ws/DBRefFetcher.java +++ b/src/jalview/ws/DBRefFetcher.java @@ -28,9 +28,9 @@ import jalview.datamodel.DBRefSource; import jalview.datamodel.Mapping; import jalview.datamodel.SequenceFeature; import jalview.datamodel.SequenceI; -import jalview.gui.AlignFrame; import jalview.gui.CutAndPasteTransfer; import jalview.gui.Desktop; +import jalview.gui.FeatureSettings; import jalview.gui.IProgressIndicator; import jalview.gui.OOMWarning; import jalview.util.MessageManager; @@ -57,7 +57,7 @@ public class DBRefFetcher implements Runnable { SequenceI[] dataset; - IProgressIndicator af; + IProgressIndicator progressWindow; CutAndPasteTransfer output = new CutAndPasteTransfer(); @@ -91,34 +91,25 @@ public class DBRefFetcher implements Runnable } /** - * Creates a new SequenceFeatureFetcher object and fetches from the currently - * selected set of databases. + * Creates a new DBRefFetcher object and fetches from the currently selected + * set of databases, if this is null then it fetches based on feature settings * * @param seqs - * fetch references for these sequences - * @param af - * the parent alignframe for progress bar monitoring. - */ - public DBRefFetcher(SequenceI[] seqs, AlignFrame af) - { - this(seqs, af, null); - } - - /** - * Creates a new SequenceFeatureFetcher object and fetches from the currently - * selected set of databases. - * - * @param seqs - * fetch references for these sequences - * @param af - * the parent alignframe for progress bar monitoring. + * fetch references for these SequenceI array + * @param progressIndicatorFrame + * the frame for progress bar monitoring * @param sources - * array of database source strings to query references from + * array of DbSourceProxy to query references form + * @param featureSettings + * FeatureSettings to get alternative DbSourceProxy from + * @param isNucleotide + * indicates if the array of SequenceI are Nucleotides or not */ - public DBRefFetcher(SequenceI[] seqs, AlignFrame af, - DbSourceProxy[] sources) + public DBRefFetcher(SequenceI[] seqs, + IProgressIndicator progressIndicatorFrame, + DbSourceProxy[] sources, FeatureSettings featureSettings, boolean isNucleotide) { - this.af = af; + this.progressWindow = progressIndicatorFrame; alseqs = new SequenceI[seqs.length]; SequenceI[] ds = new SequenceI[seqs.length]; for (int i = 0; i < seqs.length; i++) @@ -135,7 +126,8 @@ public class DBRefFetcher implements Runnable } this.dataset = ds; // TODO Jalview 2.5 lots of this code should be in the gui package! - sfetcher = jalview.gui.SequenceFetcher.getSequenceFetcherSingleton(af); + sfetcher = jalview.gui.SequenceFetcher + .getSequenceFetcherSingleton(progressIndicatorFrame); // set default behaviour for transferring excess sequence data to the // dataset trimDsSeqs = Cache.getDefault("TRIM_FETCHED_DATASET_SEQS", true); @@ -145,7 +137,7 @@ public class DBRefFetcher implements Runnable String[] defdb = null, otherdb = sfetcher .getDbInstances(jalview.ws.dbsources.das.datamodel.DasSequenceSource.class); List selsources = new ArrayList(); - Vector dasselsrc = (af.featureSettings != null) ? af.featureSettings + Vector dasselsrc = (featureSettings != null) ? featureSettings .getSelectedSources() : new jalview.gui.DasSourceBrowser() .getSelectedSources(); Enumeration en = dasselsrc.elements(); @@ -163,7 +155,7 @@ public class DBRefFetcher implements Runnable } } // select appropriate databases based on alignFrame context. - if (af.getViewport().getAlignment().isNucleotide()) + if (isNucleotide) { defdb = DBRefSource.DNACODINGDBS; } @@ -283,6 +275,7 @@ public class DBRefFetcher implements Runnable /** * DOCUMENT ME! */ + @Override public void run() { if (dbSources == null) @@ -293,8 +286,12 @@ public class DBRefFetcher implements Runnable } running = true; long startTime = System.currentTimeMillis(); - af.setProgressBar(MessageManager.getString("status.fetching_db_refs"), + if (progressWindow != null) + { + progressWindow.setProgressBar( + MessageManager.getString("status.fetching_db_refs"), startTime); + } try { if (Cache.getDefault("DBREFFETCH_USEPICR", false)) @@ -400,7 +397,7 @@ public class DBRefFetcher implements Runnable { SequenceI sequence = dataset[seqIndex]; DBRefEntry[] uprefs = jalview.util.DBRefUtils.selectRefs( - sequence.getDBRef(), + sequence.getDBRefs(), new String[] { dbsource.getDbSource() }); // jalview.datamodel.DBRefSource.UNIPROT // }); // check for existing dbrefs to use @@ -479,11 +476,14 @@ public class DBRefFetcher implements Runnable // of the viewed sequence } + if (progressWindow != null) + { + progressWindow.setProgressBar( + MessageManager.getString("label.dbref_search_completed"), + startTime); + // promptBeforeBlast(); - af.setProgressBar( - MessageManager.getString("label.dbref_search_completed"), - startTime); - // promptBeforeBlast(); + } running = false; @@ -524,7 +524,7 @@ public class DBRefFetcher implements Runnable Vector sequenceMatches = new Vector(); // look for corresponding accession ids DBRefEntry[] entryRefs = jalview.util.DBRefUtils.selectRefs( - entry.getDBRef(), new String[] { dbSource }); + entry.getDBRefs(), new String[] { dbSource }); if (entryRefs == null) { System.err @@ -591,8 +591,8 @@ public class DBRefFetcher implements Runnable // no existing references // TODO: test for legacy where uniprot or EMBL refs exist but no // mappings are made (but content matches retrieved set) - boolean updateRefFrame = sequence.getDBRef() == null - || sequence.getDBRef().length == 0; + boolean updateRefFrame = sequence.getDBRefs() == null + || sequence.getDBRefs().length == 0; // TODO: // verify sequence against the entry sequence @@ -737,7 +737,7 @@ public class DBRefFetcher implements Runnable for (int i = 0; sequencesArray != null && i < sequencesArray.length; i++) { nseq.addElement(sequencesArray[i]); - DBRefEntry dbr[] = sequencesArray[i].getDBRef(); + DBRefEntry dbr[] = sequencesArray[i].getDBRefs(); jalview.datamodel.Mapping map = null; for (int r = 0; (dbr != null) && r < dbr.length; r++) { diff --git a/src/jalview/ws/DasSequenceFeatureFetcher.java b/src/jalview/ws/DasSequenceFeatureFetcher.java index 808d9a0..d7ba24d 100644 --- a/src/jalview/ws/DasSequenceFeatureFetcher.java +++ b/src/jalview/ws/DasSequenceFeatureFetcher.java @@ -181,7 +181,7 @@ public class DasSequenceFeatureFetcher int refCount = 0; for (int i = 0; i < sequences.length; i++) { - DBRefEntry[] dbref = sequences[i].getDBRef(); + DBRefEntry[] dbref = sequences[i].getDBRefs(); if (dbref != null) { for (int j = 0; j < dbref.length; j++) @@ -238,6 +238,7 @@ public class DasSequenceFeatureFetcher class FetchSeqFeatures implements Runnable { + @Override public void run() { startFetching(); @@ -247,10 +248,15 @@ public class DasSequenceFeatureFetcher class FetchDBRefs implements Runnable { + @Override public void run() { running = true; - new DBRefFetcher(sequences, af).fetchDBRefs(true); + boolean isNuclueotide = af.getViewport().getAlignment() + .isNucleotide(); + new jalview.ws.DBRefFetcher(sequences, af, null, af.featureSettings, + isNuclueotide).fetchDBRefs(true); + startFetching(); setGuiFetchComplete(); } @@ -638,7 +644,7 @@ public class DasSequenceFeatureFetcher return null; } DBRefEntry[] uprefs = jalview.util.DBRefUtils.selectRefs( - seq.getDBRef(), new String[] { + seq.getDBRefs(), new String[] { // jalview.datamodel.DBRefSource.PDB, jalview.datamodel.DBRefSource.UNIPROT, // jalview.datamodel.DBRefSource.EMBL - not tested on any EMBL coord diff --git a/src/jalview/ws/dbsources/Pdb.java b/src/jalview/ws/dbsources/Pdb.java index 4a50196..7f8c76c 100644 --- a/src/jalview/ws/dbsources/Pdb.java +++ b/src/jalview/ws/dbsources/Pdb.java @@ -97,7 +97,7 @@ public class Pdb extends EbiFileRetrievedProxy implements DbSourceProxy */ public AlignmentI getSequenceRecords(String queries) throws Exception { - AlignmentI pdbfile = null; + AlignmentI pdbAlignment = null; Vector result = new Vector(); String chain = null; String id = null; @@ -131,12 +131,12 @@ public class Pdb extends EbiFileRetrievedProxy implements DbSourceProxy try { - pdbfile = new FormatAdapter().readFile(file, + pdbAlignment = new FormatAdapter().readFile(file, jalview.io.AppletFormatAdapter.FILE, "PDB"); - if (pdbfile != null) + if (pdbAlignment != null) { List toremove = new ArrayList(); - for (SequenceI pdbcs : pdbfile.getSequences()) + for (SequenceI pdbcs : pdbAlignment.getSequences()) { String chid = null; // Mapping map=null; @@ -188,18 +188,18 @@ public class Pdb extends EbiFileRetrievedProxy implements DbSourceProxy // now remove marked sequences for (SequenceI pdbcs : toremove) { - pdbfile.deleteSequence(pdbcs); + pdbAlignment.deleteSequence(pdbcs); if (pdbcs.getAnnotation() != null) { for (AlignmentAnnotation aa : pdbcs.getAnnotation()) { - pdbfile.deleteAnnotation(aa); + pdbAlignment.deleteAnnotation(aa); } } } } - if (pdbfile == null || pdbfile.getHeight() < 1) + if (pdbAlignment == null || pdbAlignment.getHeight() < 1) { throw new Exception(MessageManager.formatMessage( "exception.no_pdb_records_for_chain", new String[] { id, @@ -211,7 +211,7 @@ public class Pdb extends EbiFileRetrievedProxy implements DbSourceProxy stopQuery(); throw (ex); } - return pdbfile; + return pdbAlignment; } /* diff --git a/src/jalview/ws/dbsources/Uniprot.java b/src/jalview/ws/dbsources/Uniprot.java index 1e8eadb..843828b 100644 --- a/src/jalview/ws/dbsources/Uniprot.java +++ b/src/jalview/ws/dbsources/Uniprot.java @@ -20,10 +20,12 @@ */ package jalview.ws.dbsources; +import jalview.datamodel.Alignment; import jalview.datamodel.AlignmentI; import jalview.datamodel.DBRefEntry; import jalview.datamodel.DBRefSource; import jalview.datamodel.PDBEntry; +import jalview.datamodel.Sequence; import jalview.datamodel.SequenceFeature; import jalview.datamodel.SequenceI; import jalview.datamodel.UniprotEntry; @@ -35,6 +37,7 @@ import jalview.ws.seqfetcher.DbSourceProxyImpl; import java.io.File; import java.io.FileReader; import java.io.Reader; +import java.util.ArrayList; import java.util.Vector; import org.exolab.castor.xml.Unmarshaller; @@ -50,8 +53,6 @@ public class Uniprot extends DbSourceProxyImpl implements DbSourceProxy private static final String BAR_DELIMITER = "|"; - private static final String NEWLINE = "\n"; - private static org.exolab.castor.mapping.Mapping map; /** @@ -62,7 +63,6 @@ public class Uniprot extends DbSourceProxyImpl implements DbSourceProxy super(); addDbSourceProperty(DBRefSource.SEQDB, DBRefSource.SEQDB); addDbSourceProperty(DBRefSource.PROTSEQDB); - // addDbSourceProperty(DBRefSource.MULTIACC, new Integer(50)); } /* @@ -70,9 +70,10 @@ public class Uniprot extends DbSourceProxyImpl implements DbSourceProxy * * @see jalview.ws.DbSourceProxy#getAccessionSeparator() */ + @Override public String getAccessionSeparator() { - return null; // ";"; + return null; } /* @@ -80,6 +81,7 @@ public class Uniprot extends DbSourceProxyImpl implements DbSourceProxy * * @see jalview.ws.DbSourceProxy#getAccessionValidator() */ + @Override public Regex getAccessionValidator() { return new Regex("([A-Z]+[0-9]+[A-Z0-9]+|[A-Z0-9]+_[A-Z0-9]+)"); @@ -90,6 +92,7 @@ public class Uniprot extends DbSourceProxyImpl implements DbSourceProxy * * @see jalview.ws.DbSourceProxy#getDbSource() */ + @Override public String getDbSource() { return DBRefSource.UNIPROT; @@ -100,6 +103,7 @@ public class Uniprot extends DbSourceProxyImpl implements DbSourceProxy * * @see jalview.ws.DbSourceProxy#getDbVersion() */ + @Override public String getDbVersion() { return "0"; // we really don't know what version we're on. @@ -148,6 +152,7 @@ public class Uniprot extends DbSourceProxyImpl implements DbSourceProxy * * @see jalview.ws.DbSourceProxy#getSequenceRecords(java.lang.String[]) */ + @Override public AlignmentI getSequenceRecords(String queries) throws Exception { startQuery(); @@ -165,32 +170,13 @@ public class Uniprot extends DbSourceProxyImpl implements DbSourceProxy if (entries != null) { - /* - * If Castor binding included sequence@length, we could guesstimate the - * size of buffer to hold the alignment - */ - StringBuffer result = new StringBuffer(128); - // First, make the new sequences + ArrayList seqs = new ArrayList(); for (UniprotEntry entry : entries) { - StringBuilder name = constructSequenceFastaHeader(entry); - - result.append(name).append(NEWLINE) - .append(entry.getUniprotSequence().getContent()) - .append(NEWLINE); + seqs.add(uniprotEntryToSequenceI(entry)); } + al = new Alignment(seqs.toArray(new SequenceI[0])); - // Then read in the features and apply them to the dataset - al = parseResult(result.toString()); - if (al != null) - { - // Decorate the alignment with database entries. - addUniprotXrefs(al, entries); - } - else - { - results = result; - } } stopQuery(); return al; @@ -202,99 +188,95 @@ public class Uniprot extends DbSourceProxyImpl implements DbSourceProxy } /** - * Construct a Fasta-format sequence header by concatenating the source, - * accession id(s) and name(s), delimited by '|', plus any protein names, now - * with space rather than bar delimiter * * @param entry - * @return + * UniprotEntry + * @return SequenceI instance created from the UniprotEntry instance */ - public static StringBuilder constructSequenceFastaHeader( - UniprotEntry entry) - { - StringBuilder name = new StringBuilder(32); - name.append(">UniProt/Swiss-Prot"); + public SequenceI uniprotEntryToSequenceI(UniprotEntry entry){ + String id = getUniprotEntryId(entry); + SequenceI sequence = new Sequence(id, entry.getUniprotSequence() + .getContent()); + sequence.setDescription(getUniprotEntryDescription(entry)); + + final String dbVersion = getDbVersion(); + ArrayList dbRefs = new ArrayList(); for (String accessionId : entry.getAccession()) { - name.append(BAR_DELIMITER); - name.append(accessionId); + DBRefEntry dbRef = new DBRefEntry(DBRefSource.UNIPROT, dbVersion, + accessionId); + dbRefs.add(dbRef); } - for (String n : entry.getName()) + sequence.setSourceDBRef((dbRefs != null && dbRefs.size() > 0) ? dbRefs + .get(0) : null); + + Vector onlyPdbEntries = new Vector(); + for (PDBEntry pdb : entry.getDbReference()) { - name.append(BAR_DELIMITER); - name.append(n); + DBRefEntry dbr = new DBRefEntry(); + dbr.setSource(pdb.getType()); + dbr.setAccessionId(pdb.getId()); + dbr.setVersion(DBRefSource.UNIPROT + ":" + dbVersion); + dbRefs.add(dbr); + if ("PDB".equals(pdb.getType())) + { + onlyPdbEntries.addElement(pdb); + } } - if (entry.getProtein() != null && entry.getProtein().getName() != null) + sequence.setPDBId(onlyPdbEntries); + if (entry.getFeature() != null) { - for (String nm : entry.getProtein().getName()) + for (SequenceFeature sf : entry.getFeature()) { - name.append(" ").append(nm); + sf.setFeatureGroup("Uniprot"); + sequence.addSequenceFeature(sf); } } - return name; + sequence.setDBRefs(dbRefs.toArray(new DBRefEntry[0])); + return sequence; } /** - * add an ordered set of UniprotEntry objects to an ordered set of seuqences. * - * @param al - * - a sequence of n sequences - * @param entries - * a list of n uniprot entries to be analysed. + * @param entry + * UniportEntry + * @return protein name(s) delimited by a white space character */ - public void addUniprotXrefs(AlignmentI al, Vector entries) + public static String getUniprotEntryDescription(UniprotEntry entry) { - final String dbVersion = getDbVersion(); - - for (int i = 0; i < entries.size(); i++) + StringBuilder desc = new StringBuilder(32); + if (entry.getProtein() != null && entry.getProtein().getName() != null) { - UniprotEntry entry = entries.elementAt(i); - Vector onlyPdbEntries = new Vector(); - Vector dbxrefs = new Vector(); - - for (PDBEntry pdb : entry.getDbReference()) - { - DBRefEntry dbr = new DBRefEntry(); - dbr.setSource(pdb.getType()); - dbr.setAccessionId(pdb.getId()); - dbr.setVersion(DBRefSource.UNIPROT + ":" + dbVersion); - dbxrefs.addElement(dbr); - if ("PDB".equals(pdb.getType())) - { - onlyPdbEntries.addElement(pdb); - } - } - - SequenceI sq = al.getSequenceAt(i); - while (sq.getDatasetSequence() != null) - { - sq = sq.getDatasetSequence(); - } - - for (String accessionId : entry.getAccession()) + for (String nm : entry.getProtein().getName()) { - /* - * add as uniprot whether retrieved from uniprot or uniprot_name - */ - sq.addDBRef(new DBRefEntry(DBRefSource.UNIPROT, dbVersion, - accessionId)); + desc.append(nm).append(" "); } + } + return desc.toString(); + } - for (DBRefEntry dbRef : dbxrefs) - { - sq.addDBRef(dbRef); - } - sq.setPDBId(onlyPdbEntries); - if (entry.getFeature() != null) - { - for (SequenceFeature sf : entry.getFeature()) - { - sf.setFeatureGroup("Uniprot"); - sq.addSequenceFeature(sf); - } - } + /** + * + * @param entry + * UniportEntry + * @return The accession id(s) and name(s) delimited by '|'. + */ + public static String getUniprotEntryId(UniprotEntry entry) + { + StringBuilder name = new StringBuilder(32); + name.append("UniProt/Swiss-Prot"); + for (String accessionId : entry.getAccession()) + { + name.append(BAR_DELIMITER); + name.append(accessionId); } + for (String n : entry.getName()) + { + name.append(BAR_DELIMITER); + name.append(n); + } + return name.toString(); } /* @@ -302,6 +284,7 @@ public class Uniprot extends DbSourceProxyImpl implements DbSourceProxy * * @see jalview.ws.DbSourceProxy#isValidReference(java.lang.String) */ + @Override public boolean isValidReference(String accession) { // TODO: make the following a standard validator @@ -312,11 +295,13 @@ public class Uniprot extends DbSourceProxyImpl implements DbSourceProxy /** * return LDHA_CHICK uniprot entry */ + @Override public String getTestQuery() { return "P00340"; } + @Override public String getDbName() { return "Uniprot"; // getDbSource(); diff --git a/src/jalview/ws/seqfetcher/ASequenceFetcher.java b/src/jalview/ws/seqfetcher/ASequenceFetcher.java index 8656c25..0fe7275 100644 --- a/src/jalview/ws/seqfetcher/ASequenceFetcher.java +++ b/src/jalview/ws/seqfetcher/ASequenceFetcher.java @@ -171,7 +171,7 @@ public class ASequenceFetcher { rseqs.addElement(seqs[is]); DBRefEntry[] frefs = DBRefUtils.searchRefs(seqs[is] - .getDBRef(), new DBRefEntry(db, null, null)); + .getDBRefs(), new DBRefEntry(db, null, null)); if (frefs != null) { for (DBRefEntry dbr : frefs) diff --git a/src/jalview/ws/sifts/MappingOutputPojo.java b/src/jalview/ws/sifts/MappingOutputPojo.java new file mode 100644 index 0000000..c06e51f --- /dev/null +++ b/src/jalview/ws/sifts/MappingOutputPojo.java @@ -0,0 +1,129 @@ +package jalview.ws.sifts; + +public class MappingOutputPojo +{ + private String seqName; + + private String seqResidue; + + private int seqStart; + + private int seqEnd; + + private String strName; + + private String strResidue; + + private int strStart; + + private int strEnd; + + private String type; + + private int wrapHeight; + + private static final int MAX_ID_LENGTH = 30; + + public String getSeqName() + { + return seqName; + } + + public void setSeqName(String seqName) + { + this.seqName = (seqName.length() > MAX_ID_LENGTH) ? seqName.substring( + 0, MAX_ID_LENGTH) : seqName; + } + + public String getSeqResidue() + { + return seqResidue; + } + + public void setSeqResidue(String seqResidue) + { + this.seqResidue = seqResidue; + } + + public int getSeqStart() + { + return seqStart; + } + + public void setSeqStart(int seqStart) + { + this.seqStart = seqStart; + } + + public int getSeqEnd() + { + return seqEnd; + } + + public void setSeqEnd(int seqEnd) + { + this.seqEnd = seqEnd; + } + + public String getStrName() + { + return strName; + } + + public void setStrName(String strName) + { + this.strName = (strName.length() > MAX_ID_LENGTH) ? strName.substring( + 0, MAX_ID_LENGTH) : strName; + } + + public String getStrResidue() + { + return strResidue; + } + + public void setStrResidue(String strResidue) + { + this.strResidue = strResidue; + } + + public int getStrStart() + { + return strStart; + } + + public void setStrStart(int strStart) + { + this.strStart = strStart; + } + + public int getStrEnd() + { + return strEnd; + } + + public void setStrEnd(int strEnd) + { + this.strEnd = strEnd; + } + + public String getType() + { + return type; + } + + public void setType(String type) + { + this.type = type; + } + + public int getWrapHeight() + { + return wrapHeight; + } + + public void setWrapHeight(int wrapHeight) + { + this.wrapHeight = wrapHeight; + } + +} diff --git a/src/jalview/ws/sifts/SiftsClient.java b/src/jalview/ws/sifts/SiftsClient.java new file mode 100644 index 0000000..10e14f4 --- /dev/null +++ b/src/jalview/ws/sifts/SiftsClient.java @@ -0,0 +1,854 @@ +/* + * 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.ws.sifts; + +import jalview.analysis.AlignSeq; +import jalview.api.DBRefEntryI; +import jalview.api.SiftsClientI; +import jalview.datamodel.DBRefEntry; +import jalview.datamodel.DBRefSource; +import jalview.datamodel.SequenceI; +import jalview.schemes.ResidueProperties; +import jalview.structure.StructureMapping; +import jalview.util.Format; +import jalview.xml.binding.sifts.Entry; +import jalview.xml.binding.sifts.Entry.Entity; +import jalview.xml.binding.sifts.Entry.Entity.Segment; +import jalview.xml.binding.sifts.Entry.Entity.Segment.ListMapRegion.MapRegion; +import jalview.xml.binding.sifts.Entry.Entity.Segment.ListResidue.Residue; +import jalview.xml.binding.sifts.Entry.Entity.Segment.ListResidue.Residue.CrossRefDb; +import jalview.xml.binding.sifts.Entry.ListDB.Db; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.PrintStream; +import java.net.URL; +import java.net.URLConnection; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashSet; +import java.util.List; +import java.util.TreeMap; +import java.util.zip.GZIPInputStream; + +import javax.xml.bind.JAXBContext; +import javax.xml.bind.JAXBException; +import javax.xml.bind.Unmarshaller; +import javax.xml.stream.FactoryConfigurationError; +import javax.xml.stream.XMLInputFactory; +import javax.xml.stream.XMLStreamException; +import javax.xml.stream.XMLStreamReader; + +import MCview.Atom; +import MCview.PDBChain; +import MCview.PDBfile; + +public class SiftsClient implements SiftsClientI +{ + private Entry siftsEntry; + + private PDBfile pdb; + + private String pdbId; + + private String structId; + + private String segStartEnd; + + private CoordinateSys seqCoordSys = CoordinateSys.UNIPROT; + + private static final int BUFFER_SIZE = 4096; + + public static final int UNASSIGNED = -1; + + private static final int PDB_RES_POS = 0; + + private static final int PDB_ATOM_POS = 1; + + private static final String SIFTS_FTP_BASE_URL = "ftp://ftp.ebi.ac.uk/pub/databases/msd/sifts/xml/"; + + public static final String DEFAULT_SIFTS_DOWNLOAD_DIR = System + .getProperty("user.home") + + File.separatorChar + + ".sifts_downloads" + File.separatorChar; + + public static final String SIFTS_DOWNLOAD_DIR = jalview.bin.Cache + .getDefault("sifts_download_dir", DEFAULT_SIFTS_DOWNLOAD_DIR); + + private final static String NEWLINE = System.lineSeparator(); + + private String curSourceDBRef; + + private HashSet curDBRefAccessionIdsString; + + public enum CoordinateSys + { + UNIPROT("UniProt"), PDB("PDBresnum"), PDBe("PDBe"); + private String name; + + private CoordinateSys(String name) + { + this.name = name; + } + + public String getName() + { + return name; + } + }; + + /** + * Fetch SIFTs file for the given PDB Id and construct an instance of + * SiftsClient + * + * @param pdbId + * @throws SiftsException + */ + public SiftsClient(PDBfile pdb) throws SiftsException + { + this.pdb = pdb; + this.pdbId = pdb.id; + File siftsFile = getSiftsFile(pdbId); + siftsEntry = parseSIFTs(siftsFile); + } + + /** + * Construct an instance of SiftsClient using the supplied SIFTs file - the + * SIFTs file should correspond to the given PDB Id + * + * @param pdbId + * @param siftsFile + * @throws SiftsException + * @throws Exception + */ + public SiftsClient(PDBfile pdb, File siftsFile) throws SiftsException + { + this.pdb = pdb; + this.pdbId = pdb.id; + siftsEntry = parseSIFTs(siftsFile); + } + + /** + * Parse the given SIFTs File and return a JAXB POJO of parsed data + * + * @param siftFile + * - the GZipped SIFTs XML file to parse + * @return + * @throws Exception + * if a problem occurs while parsing the SIFTs XML + */ + private Entry parseSIFTs(File siftFile) throws SiftsException + { + try + { + System.out.println("File : " + siftFile.getAbsolutePath()); + JAXBContext jc = JAXBContext.newInstance("jalview.xml.binding.sifts"); + InputStream in = new FileInputStream(siftFile); + GZIPInputStream gzis = new GZIPInputStream(in); + XMLStreamReader streamReader = XMLInputFactory.newInstance() + .createXMLStreamReader(gzis); + Unmarshaller um = jc.createUnmarshaller(); + return (Entry) um.unmarshal(streamReader); + } catch (JAXBException e) + { + e.printStackTrace(); + } catch (FileNotFoundException e) + { + e.printStackTrace(); + } catch (XMLStreamException e) + { + e.printStackTrace(); + } catch (FactoryConfigurationError e) + { + e.printStackTrace(); + } catch (IOException e) + { + e.printStackTrace(); + } + throw new SiftsException("Error parsing siftFile"); + } + + /** + * Get a SIFTs XML file for a given PDB Id + * + * @param pdbId + * @return SIFTs XML file + */ + public static File getSiftsFile(String pdbId) + { + File siftsFile = new File(SIFTS_DOWNLOAD_DIR + pdbId.toLowerCase() + + ".xml.gz"); + if (siftsFile.exists()) + { + // TODO it may be worth performing an age check to determine if a + // new SIFTs file should be re-downloaded as SIFTs entries are usually + // updated weekly + System.out.println(">>> SIFTS File already downloaded for " + pdbId); + return siftsFile; + } + siftsFile = downloadSiftsFile(pdbId.toLowerCase()); + return siftsFile; + } + + /** + * Download a SIFTs XML file for a given PDB Id + * + * @param pdbId + * @return downloaded SIFTs XML file + */ + public static File downloadSiftsFile(String pdbId) + { + String siftFile = pdbId + ".xml.gz"; + String siftsFileFTPURL = SIFTS_FTP_BASE_URL + siftFile; + String downloadedSiftsFile = SIFTS_DOWNLOAD_DIR + siftFile; + File siftsDownloadDir = new File(SIFTS_DOWNLOAD_DIR); + if (!siftsDownloadDir.exists()) + { + siftsDownloadDir.mkdirs(); + } + try + { + System.out.println(">> Download ftp url : " + siftsFileFTPURL); + URL url = new URL(siftsFileFTPURL); + URLConnection conn = url.openConnection(); + InputStream inputStream = conn.getInputStream(); + FileOutputStream outputStream = new FileOutputStream( + downloadedSiftsFile); + byte[] buffer = new byte[BUFFER_SIZE]; + int bytesRead = -1; + while ((bytesRead = inputStream.read(buffer)) != -1) + { + outputStream.write(buffer, 0, bytesRead); + } + outputStream.close(); + inputStream.close(); + System.out.println(">>> File downloaded : " + downloadedSiftsFile); + } catch (IOException ex) + { + ex.printStackTrace(); + } + return new File(downloadedSiftsFile); + } + + /** + * Delete the SIFTs file for the given PDB Id in the local SIFTs download + * directory + * + * @param pdbId + * @return true if the file was deleted or doesn't exist + */ + public static boolean deleteSiftsFileByPDBId(String pdbId) + { + File siftsFile = new File(SIFTS_DOWNLOAD_DIR + pdbId.toLowerCase() + + ".xml.gz"); + if (siftsFile.exists()) + { + return siftsFile.delete(); + } + return true; + } + + + /** + * Get a valid SIFTs DBRef for the given sequence current SIFTs entry + * + * @param seq + * - the target sequence for the operation + * @return a valid DBRefEntry that is SIFTs compatible + * @throws Exception + * if no valid source DBRefEntry was found for the given sequences + */ + public DBRefEntryI getValidSourceDBRef(SequenceI seq) + throws SiftsException + { + DBRefEntryI sourceDBRef = null; + sourceDBRef = seq.getSourceDBRef(); + if (sourceDBRef != null && isValidDBRefEntry(sourceDBRef)) + { + return sourceDBRef; + } + else + { + DBRefEntry[] dbRefs = seq.getDBRefs(); + if (dbRefs == null || dbRefs.length < 1) + { + final SequenceI[] seqs = new SequenceI[] { seq }; + new jalview.ws.DBRefFetcher(seqs, null, null, null, false) + .fetchDBRefs(true); + dbRefs = seq.getDBRefs(); + } + + if (dbRefs == null || dbRefs.length < 1) + { + throw new SiftsException("Could not get source DB Ref"); + } + + for (DBRefEntryI dbRef : dbRefs) + { + if (dbRef == null || dbRef.getAccessionId() == null + || dbRef.getSource() == null) + { + continue; + } + if (isFoundInSiftsEntry(dbRef.getAccessionId()) + && (dbRef.getSource().equalsIgnoreCase(DBRefSource.UNIPROT) || dbRef + .getSource().equalsIgnoreCase(DBRefSource.PDB))) + { + return dbRef; + } + } + } + if (sourceDBRef != null && isValidDBRefEntry(sourceDBRef)) + { + return sourceDBRef; + } + throw new SiftsException("Could not get source DB Ref"); + } + + + /** + * Check that the DBRef Entry is properly populated and is available in the + * instantiated SIFTs Entry + * + * @param entry + * - DBRefEntry to validate + * @return true validation is successful otherwise false is returned. + */ + private boolean isValidDBRefEntry(DBRefEntryI entry) + { + return entry != null && entry.getAccessionId() != null + && isFoundInSiftsEntry(entry.getAccessionId()); + } + + @Override + public HashSet getAllMappingAccession() + { + HashSet accessions = new HashSet(); + List entities = siftsEntry.getEntity(); + for (Entity entity : entities) + { + List segments = entity.getSegment(); + for (Segment segment : segments) + { + List mapRegions = segment.getListMapRegion() + .getMapRegion(); + for (MapRegion mapRegion : mapRegions) + { + accessions.add(mapRegion.getDb().getDbAccessionId()); + } + } + } + return accessions; + } + + @Override + public StructureMapping getSiftsStructureMapping(SequenceI seq, + String pdbFile, String chain) throws SiftsException + { + structId = (chain == null) ? pdbId : pdbId + "|" + chain; + System.out.println("Getting mapping for: " + pdbId + "|" + chain + + " : seq- " + seq.getName()); + + final StringBuilder mappingDetails = new StringBuilder(128); + PrintStream ps = new PrintStream(System.out) + { + @Override + public void print(String x) + { + mappingDetails.append(x); + } + + @Override + public void println() + { + mappingDetails.append(NEWLINE); + } + }; + int[][] mapping = getGreedyMapping(chain, seq, ps); + + String mappingOutput = mappingDetails.toString(); + StructureMapping siftsMapping = new StructureMapping(seq, pdbFile, + pdbId, chain, mapping, + mappingOutput); + return siftsMapping; + } + + @Override + public int[][] getGreedyMapping(String entityId, SequenceI seq, + java.io.PrintStream os) + throws SiftsException + { + + System.out.println("Generating mappings for : " + entityId); + Entity entity = null; + entity = getEntityById(entityId); + String originalSeq = AlignSeq.extractGaps( + jalview.util.Comparison.GapChars, + seq.getSequenceAsString()); + int mapping[][] = new int[originalSeq.length() + seq.getStart()][2]; + DBRefEntryI sourceDBRef = seq.getSourceDBRef(); + if (sourceDBRef == null) + { + sourceDBRef = getValidSourceDBRef(seq); + // TODO ensure sequence start/end is in the same coordinate system and + // consistent with the choosen sourceDBRef + } + + // set sequence coordinate system - default value is UniProt + if (sourceDBRef.getSource().equalsIgnoreCase(DBRefSource.PDB)) + { + seqCoordSys = CoordinateSys.PDB; + } + + HashSet dbRefAccessionIdsString = new HashSet(); + for (DBRefEntry dbref : seq.getDBRefs()) + { + dbRefAccessionIdsString.add(dbref.getAccessionId().toLowerCase()); + } + dbRefAccessionIdsString.add(sourceDBRef.getAccessionId().toLowerCase()); + + curDBRefAccessionIdsString = dbRefAccessionIdsString; + curSourceDBRef = sourceDBRef.getAccessionId(); + + // initialise all mapping positions to unassigned + for (int residuePos[] : mapping) + { + residuePos[PDB_RES_POS] = UNASSIGNED; + residuePos[PDB_ATOM_POS] = UNASSIGNED; + } + + TreeMap resNumMap = new TreeMap(); + List segments = entity.getSegment(); + for (Segment segment : segments) + { + segStartEnd = segment.getStart() + " - " + segment.getEnd(); + System.out.println("Mappging segments : " + segment.getSegId() + "\\" + + segStartEnd); + List residues = segment.getListResidue().getResidue(); + for (Residue residue : residues) + { + int currSeqIndex = UNASSIGNED; + List cRefDbs = residue.getCrossRefDb(); + CrossRefDb pdbRefDb = null; + for (CrossRefDb cRefDb : cRefDbs) + { + if (cRefDb.getDbSource().equalsIgnoreCase(DBRefSource.PDB)) + { + pdbRefDb = cRefDb; + } + if (cRefDb.getDbCoordSys() + .equalsIgnoreCase(seqCoordSys.getName()) + && hasAccessionId(cRefDb.getDbAccessionId())) + { + String resNumIndexString = cRefDb.getDbResNum() + .equalsIgnoreCase("None") ? String.valueOf(UNASSIGNED) + : cRefDb.getDbResNum(); + currSeqIndex = Integer.valueOf(resNumIndexString); + if (pdbRefDb != null) + { + break;// exit loop if pdb and uniprot are already found + } + } + } + if (currSeqIndex == UNASSIGNED) + { + continue; + } + if (currSeqIndex > seq.getStart() && currSeqIndex <= seq.getEnd()) + { + int resNum; + try + { + resNum = (pdbRefDb == null) ? Integer.valueOf(residue + .getDbResNum()) : Integer.valueOf(pdbRefDb.getDbResNum()); + } catch (NumberFormatException nfe) + { + resNum = (pdbRefDb == null) ? Integer.valueOf(residue + .getDbResNum()) : Integer.valueOf(pdbRefDb + .getDbResNum().split("[a-zA-Z]")[0]); + } + try + { + mapping[currSeqIndex][PDB_RES_POS] = Integer.valueOf(resNum); + } catch (ArrayIndexOutOfBoundsException e) + { + // do nothing.. + } + char resCharCode = ResidueProperties + .getSingleCharacterCode(residue.getDbResName()); + resNumMap.put(currSeqIndex, String.valueOf(resCharCode)); + } + } + } + try + { + populateAtomPositions(entityId, mapping); + } catch (Exception e) + { + e.printStackTrace(); + } + padWithGaps(resNumMap); + int counter = 0; + int seqStart = UNASSIGNED; + int seqEnd = UNASSIGNED; + int pdbStart = UNASSIGNED; + int pdbEnd = UNASSIGNED; + boolean startDetected = false; + for (int[] x : mapping) + { + if (!startDetected && x[PDB_RES_POS] != UNASSIGNED) + { + seqStart = counter; + startDetected = true; + // System.out.println("Seq start: "+ seqStart); + } + + if (startDetected && x[PDB_RES_POS] != UNASSIGNED) + { + seqEnd = counter; + } + ++counter; + } + + String matchedSeq = originalSeq; + if (seqStart != UNASSIGNED) + { + seqEnd = (seqEnd == UNASSIGNED) ? counter : seqEnd; + pdbStart = mapping[seqStart][PDB_RES_POS]; + pdbEnd = mapping[seqEnd][PDB_RES_POS]; + int orignalSeqStart = seq.getStart(); + if (orignalSeqStart >= 1) + { + int subSeqStart = seqStart - orignalSeqStart; + int subSeqEnd = seqEnd - (orignalSeqStart - 1); + matchedSeq = originalSeq.substring(subSeqStart, subSeqEnd); + } + } + + StringBuilder targetStrucSeqs = new StringBuilder(); + for (String res : resNumMap.values()) + { + targetStrucSeqs.append(res); + } + + if (os != null) + { + MappingOutputPojo mop = new MappingOutputPojo(); + mop.setSeqStart(seqStart); + mop.setSeqEnd(seqEnd); + mop.setSeqName(seq.getName()); + mop.setSeqResidue(matchedSeq); + + mop.setStrStart(pdbStart); + mop.setStrEnd(pdbEnd); + mop.setStrName(structId); + mop.setStrResidue(targetStrucSeqs.toString()); + + mop.setType("pep"); + os.print(getMappingOutput(mop).toString()); + } + return mapping; + } + + private boolean hasAccessionId(String accession) + { + boolean isStrictMatch = true; + return isStrictMatch ? curSourceDBRef.equalsIgnoreCase(accession) + : curDBRefAccessionIdsString.contains(accession.toLowerCase()); + } + + @Override + public boolean isFoundInSiftsEntry(String accessionId) + { + return accessionId != null + && getAllMappingAccession().contains(accessionId); + } + + /** + * Pads missing positions with gaps + * + * @param resNumMap + */ + void padWithGaps(TreeMap resNumMap) + { + if (resNumMap == null || resNumMap.isEmpty()) + { + return; + } + Integer[] keys = resNumMap.keySet().toArray(new Integer[0]); + Arrays.sort(keys); + int firstIndex = keys[0]; + int lastIndex = keys[keys.length - 1]; + System.out.println("Min value " + firstIndex); + System.out.println("Max value " + lastIndex); + for (int x = firstIndex; x <= lastIndex; x++) + { + if (!resNumMap.containsKey(x)) + { + resNumMap.put(x, "-"); + } + } + } + + /** + * + * @param chainId + * Target chain to populate mapping of its atom positions. + * @param mapping + * Two dimension array of residue index versus atom position + * @throws IllegalArgumentException + * Thrown if chainId or mapping is null + */ + void populateAtomPositions(String chainId, int[][] mapping) + throws IllegalArgumentException + { + PDBChain chain = pdb.findChain(chainId); + if (chain == null || mapping == null) + { + throw new IllegalArgumentException( + "Chain id or mapping must not be null."); + } + for (int[] map : mapping) + { + if (map[PDB_RES_POS] != UNASSIGNED) + { + map[PDB_ATOM_POS] = getAtomIndex(map[PDB_RES_POS], chain.atoms); + } + } + } + + /** + * + * @param residueIndex + * The residue index used for the search + * @param atoms + * A collection of Atom to search + * @return atom position for the given residue index + */ + int getAtomIndex(int residueIndex, Collection atoms) + { + if (atoms == null) + { + throw new IllegalArgumentException( + "atoms collection must not be null!"); + } + for (Atom atom : atoms) + { + if (atom.resNumber == residueIndex) + { + return atom.atomIndex; + } + } + return UNASSIGNED; + } + + @Override + public Entity getEntityById(String id) throws SiftsException + { + List entities = siftsEntry.getEntity(); + for (Entity entity : entities) + { + if (!entity.getEntityId().equalsIgnoreCase(id)) + { + continue; + } + return entity; + } + throw new SiftsException("Entity " + id + " not found"); + } + + @Override + public String[] getEntryDBs() + { + System.out.println("\nListing DB entries..."); + List availDbs = new ArrayList(); + List dbs = siftsEntry.getListDB().getDb(); + for (Db db : dbs) + { + availDbs.add(db.getDbSource()); + System.out.println(db.getDbSource() + " | " + db.getDbCoordSys()); + } + return availDbs.toArray(new String[0]); + } + + @Override + public StringBuffer getMappingOutput(MappingOutputPojo mp) + throws SiftsException + { + String seqRes = mp.getSeqResidue(); + String seqName = mp.getSeqName(); + int sStart = mp.getSeqStart(); + int sEnd = mp.getSeqEnd(); + + String strRes = mp.getStrResidue(); + String strName = mp.getStrName(); + int pdbStart = mp.getStrStart(); + int pdbEnd = mp.getStrEnd(); + + String type = mp.getType(); + + int maxid = (seqName.length() >= strName.length()) ? seqName.length() + : strName.length(); + int len = 72 - maxid - 1; + + int nochunks = ((seqRes.length()) / len) + + ((seqRes.length()) % len > 0 ? 1 : 0); + // output mappings + StringBuffer output = new StringBuffer(); + output.append(NEWLINE); + output.append("Sequence ⟷ Structure mapping details").append(NEWLINE); + output.append("Method: SIFTS"); + output.append(NEWLINE).append(NEWLINE); + + output.append(new Format("%" + maxid + "s").form(seqName)); + output.append(" : "); + output.append(String.valueOf(sStart)); + output.append(" - "); + output.append(String.valueOf(sEnd)); + output.append(" Maps to "); + output.append(NEWLINE); + output.append(new Format("%" + maxid + "s").form(structId)); + output.append(" : "); + output.append(String.valueOf(pdbStart)); + output.append(" - "); + output.append(String.valueOf(pdbEnd)); + output.append(NEWLINE).append(NEWLINE); + + int matchedSeqCount = 0; + for (int j = 0; j < nochunks; j++) + { + // Print the first aligned sequence + output.append(new Format("%" + (maxid) + "s").form(seqName)).append( + " "); + + for (int i = 0; i < len; i++) + { + if ((i + (j * len)) < seqRes.length()) + { + output.append(seqRes.charAt(i + (j * len))); + } + } + + output.append(NEWLINE); + output.append(new Format("%" + (maxid) + "s").form(" ")).append(" "); + + // Print out the matching chars + for (int i = 0; i < len; i++) + { + try + { + if ((i + (j * len)) < seqRes.length()) + { + if (seqRes.charAt(i + (j * len)) == strRes.charAt(i + (j * len)) + && !jalview.util.Comparison.isGap(seqRes.charAt(i + + (j * len)))) + { + matchedSeqCount++; + output.append("|"); + } + else if (type.equals("pep")) + { + if (ResidueProperties.getPAM250(seqRes.charAt(i + (j * len)), + strRes.charAt(i + (j * len))) > 0) + { + output.append("."); + } + else + { + output.append(" "); + } + } + else + { + output.append(" "); + } + } + } catch (IndexOutOfBoundsException e) + { + continue; + } + } + // Now print the second aligned sequence + output = output.append(NEWLINE); + output = output.append(new Format("%" + (maxid) + "s").form(strName)) + .append(" "); + for (int i = 0; i < len; i++) + { + if ((i + (j * len)) < strRes.length()) + { + output.append(strRes.charAt(i + (j * len))); + } + } + output.append(NEWLINE).append(NEWLINE); + } + float pid = (float) matchedSeqCount / seqRes.length() * 100; + if (pid < 2) + { + throw new SiftsException("Low PID detected for SIFTs mapping..."); + } + output.append("Length of alignment = " + seqRes.length()) + .append(NEWLINE); + output.append(new Format("Percentage ID = %2.2f").form(pid)); + output.append(NEWLINE); + return output; + } + + @Override + public int getEntityCount() + { + return siftsEntry.getEntity().size(); + } + + @Override + public String getDbAccessionId() + { + return siftsEntry.getDbAccessionId(); + } + + @Override + public String getDbCoordSys() + { + return siftsEntry.getDbCoordSys(); + } + + @Override + public String getDbEvidence() + { + return siftsEntry.getDbEvidence(); + } + + @Override + public String getDbSource() + { + return siftsEntry.getDbSource(); + } + + @Override + public String getDbVersion() + { + return siftsEntry.getDbVersion(); + } +} diff --git a/src/jalview/ws/sifts/SiftsException.java b/src/jalview/ws/sifts/SiftsException.java new file mode 100644 index 0000000..2923541 --- /dev/null +++ b/src/jalview/ws/sifts/SiftsException.java @@ -0,0 +1,12 @@ +package jalview.ws.sifts; + +public class SiftsException extends Exception +{ + + private static final long serialVersionUID = 1L; + + public SiftsException(String message) + { + super(message); + } +} diff --git a/src/jalview/xml/binding/sifts/Alignment.java b/src/jalview/xml/binding/sifts/Alignment.java new file mode 100644 index 0000000..650ea19 --- /dev/null +++ b/src/jalview/xml/binding/sifts/Alignment.java @@ -0,0 +1,2310 @@ +// +// 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: 2015.10.09 at 03:18:33 PM BST +// + + +package jalview.xml.binding.sifts; + +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.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; + + +/** + *

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="alignObject" maxOccurs="unbounded">
+ *           <complexType>
+ *             <complexContent>
+ *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 <sequence>
+ *                   <element name="alignObjectDetail" maxOccurs="unbounded" minOccurs="0">
+ *                     <complexType>
+ *                       <complexContent>
+ *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                           <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
+ *                         </restriction>
+ *                       </complexContent>
+ *                     </complexType>
+ *                   </element>
+ *                   <element name="sequence" minOccurs="0">
+ *                     <complexType>
+ *                       <complexContent>
+ *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                           <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
+ *                         </restriction>
+ *                       </complexContent>
+ *                     </complexType>
+ *                   </element>
+ *                 </sequence>
+ *                 <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbRef"/>
+ *                 <attribute name="objectVersion" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                 <attribute name="intObjectId" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                 <attribute name="type" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *               </restriction>
+ *             </complexContent>
+ *           </complexType>
+ *         </element>
+ *         <element name="score" maxOccurs="unbounded" minOccurs="0">
+ *           <complexType>
+ *             <complexContent>
+ *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 <attribute name="methodName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                 <attribute name="scoreValue" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *               </restriction>
+ *             </complexContent>
+ *           </complexType>
+ *         </element>
+ *         <element name="block" maxOccurs="unbounded">
+ *           <complexType>
+ *             <complexContent>
+ *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 <sequence>
+ *                   <element name="segment" maxOccurs="unbounded">
+ *                     <complexType>
+ *                       <complexContent>
+ *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                           <sequence minOccurs="0">
+ *                             <element name="cigar" type="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}cigarstring"/>
+ *                           </sequence>
+ *                           <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
+ *                           <attribute name="intObjectId" use="required" type="{http://www.w3.org/2001/XMLSchema}anySimpleType" />
+ *                           <attribute name="strand" type="{http://www.w3.org/2001/XMLSchema}anySimpleType" />
+ *                         </restriction>
+ *                       </complexContent>
+ *                     </complexType>
+ *                   </element>
+ *                 </sequence>
+ *                 <attribute name="blockScore" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                 <attribute name="blockOrder" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
+ *               </restriction>
+ *             </complexContent>
+ *           </complexType>
+ *         </element>
+ *         <element name="geo3d" maxOccurs="unbounded" minOccurs="0">
+ *           <complexType>
+ *             <complexContent>
+ *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 <sequence>
+ *                   <element name="vector">
+ *                     <complexType>
+ *                       <complexContent>
+ *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                           <attribute name="x" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
+ *                           <attribute name="y" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
+ *                           <attribute name="z" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
+ *                         </restriction>
+ *                       </complexContent>
+ *                     </complexType>
+ *                   </element>
+ *                   <element name="matrix" maxOccurs="unbounded">
+ *                     <complexType>
+ *                       <complexContent>
+ *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                           <sequence>
+ *                             <element name="max11">
+ *                               <complexType>
+ *                                 <complexContent>
+ *                                   <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                                     <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
+ *                                   </restriction>
+ *                                 </complexContent>
+ *                               </complexType>
+ *                             </element>
+ *                             <element name="max12">
+ *                               <complexType>
+ *                                 <complexContent>
+ *                                   <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                                     <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
+ *                                   </restriction>
+ *                                 </complexContent>
+ *                               </complexType>
+ *                             </element>
+ *                             <element name="max13">
+ *                               <complexType>
+ *                                 <complexContent>
+ *                                   <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                                     <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
+ *                                   </restriction>
+ *                                 </complexContent>
+ *                               </complexType>
+ *                             </element>
+ *                             <element name="max21">
+ *                               <complexType>
+ *                                 <complexContent>
+ *                                   <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                                     <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
+ *                                   </restriction>
+ *                                 </complexContent>
+ *                               </complexType>
+ *                             </element>
+ *                             <element name="max22">
+ *                               <complexType>
+ *                                 <complexContent>
+ *                                   <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                                     <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
+ *                                   </restriction>
+ *                                 </complexContent>
+ *                               </complexType>
+ *                             </element>
+ *                             <element name="max23">
+ *                               <complexType>
+ *                                 <complexContent>
+ *                                   <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                                     <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
+ *                                   </restriction>
+ *                                 </complexContent>
+ *                               </complexType>
+ *                             </element>
+ *                             <element name="max31">
+ *                               <complexType>
+ *                                 <complexContent>
+ *                                   <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                                     <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
+ *                                   </restriction>
+ *                                 </complexContent>
+ *                               </complexType>
+ *                             </element>
+ *                             <element name="max32">
+ *                               <complexType>
+ *                                 <complexContent>
+ *                                   <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                                     <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
+ *                                   </restriction>
+ *                                 </complexContent>
+ *                               </complexType>
+ *                             </element>
+ *                             <element name="max33">
+ *                               <complexType>
+ *                                 <complexContent>
+ *                                   <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                                     <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
+ *                                   </restriction>
+ *                                 </complexContent>
+ *                               </complexType>
+ *                             </element>
+ *                           </sequence>
+ *                         </restriction>
+ *                       </complexContent>
+ *                     </complexType>
+ *                   </element>
+ *                 </sequence>
+ *                 <attribute name="intObjectId" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *               </restriction>
+ *             </complexContent>
+ *           </complexType>
+ *         </element>
+ *       </sequence>
+ *       <attribute name="alignType" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "alignObject", + "score", + "block", + "geo3D" +}) +@XmlRootElement(name = "alignment") +public class Alignment { + + @XmlElement(required = true) + protected List alignObject; + protected List score; + @XmlElement(required = true) + protected List block; + @XmlElement(name = "geo3d") + protected List geo3D; + @XmlAttribute(name = "alignType", required = true) + protected String alignType; + + /** + * Gets the value of the alignObject 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 alignObject property. + * + *

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

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

+ * Objects of the following type(s) are allowed in the list + * {@link Alignment.AlignObject } + * + * + */ + public List getAlignObject() { + if (alignObject == null) { + alignObject = new ArrayList(); + } + return this.alignObject; + } + + /** + * Gets the value of the score 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 score property. + * + *

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

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

+ * Objects of the following type(s) are allowed in the list + * {@link Alignment.Score } + * + * + */ + public List getScore() { + if (score == null) { + score = new ArrayList(); + } + return this.score; + } + + /** + * Gets the value of the block 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 block property. + * + *

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

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

+ * Objects of the following type(s) are allowed in the list + * {@link Alignment.Block } + * + * + */ + public List getBlock() { + if (block == null) { + block = new ArrayList(); + } + return this.block; + } + + /** + * Gets the value of the geo3D 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 geo3D property. + * + *

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

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

+ * Objects of the following type(s) are allowed in the list + * {@link Alignment.Geo3D } + * + * + */ + public List getGeo3D() { + if (geo3D == null) { + geo3D = new ArrayList(); + } + return this.geo3D; + } + + /** + * Gets the value of the alignType property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAlignType() { + return alignType; + } + + /** + * Sets the value of the alignType property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAlignType(String value) { + this.alignType = 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="alignObjectDetail" maxOccurs="unbounded" minOccurs="0">
+     *           <complexType>
+     *             <complexContent>
+     *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                 <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
+     *               </restriction>
+     *             </complexContent>
+     *           </complexType>
+     *         </element>
+     *         <element name="sequence" minOccurs="0">
+     *           <complexType>
+     *             <complexContent>
+     *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                 <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
+     *               </restriction>
+     *             </complexContent>
+     *           </complexType>
+     *         </element>
+     *       </sequence>
+     *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbRef"/>
+     *       <attribute name="objectVersion" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *       <attribute name="intObjectId" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *       <attribute name="type" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *     </restriction>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "alignObjectDetail", + "sequence" + }) + public static class AlignObject { + + protected List alignObjectDetail; + protected Alignment.AlignObject.Sequence sequence; + @XmlAttribute(name = "objectVersion", required = true) + protected String objectVersion; + @XmlAttribute(name = "intObjectId", required = true) + protected String intObjectId; + @XmlAttribute(name = "type") + protected String type; + @XmlAttribute(name = "dbSource", required = true) + protected String dbSource; + @XmlAttribute(name = "dbCoordSys", required = true) + protected String dbCoordSys; + @XmlAttribute(name = "dbAccessionId", required = true) + protected String dbAccessionId; + @XmlAttribute(name = "dbEvidence") + protected String dbEvidence; + @XmlAttribute(name = "dbVersion") + protected String dbVersion; + + /** + * Gets the value of the alignObjectDetail 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 alignObjectDetail property. + * + *

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

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

+ * Objects of the following type(s) are allowed in the list + * {@link Alignment.AlignObject.AlignObjectDetail } + * + * + */ + public List getAlignObjectDetail() { + if (alignObjectDetail == null) { + alignObjectDetail = new ArrayList(); + } + return this.alignObjectDetail; + } + + /** + * Gets the value of the sequence property. + * + * @return + * possible object is + * {@link Alignment.AlignObject.Sequence } + * + */ + public Alignment.AlignObject.Sequence getSequence() { + return sequence; + } + + /** + * Sets the value of the sequence property. + * + * @param value + * allowed object is + * {@link Alignment.AlignObject.Sequence } + * + */ + public void setSequence(Alignment.AlignObject.Sequence value) { + this.sequence = value; + } + + /** + * Gets the value of the objectVersion property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getObjectVersion() { + return objectVersion; + } + + /** + * Sets the value of the objectVersion property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setObjectVersion(String value) { + this.objectVersion = value; + } + + /** + * Gets the value of the intObjectId property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getIntObjectId() { + return intObjectId; + } + + /** + * Sets the value of the intObjectId property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setIntObjectId(String value) { + this.intObjectId = 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 dbSource property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDbSource() { + return dbSource; + } + + /** + * Sets the value of the dbSource property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDbSource(String value) { + this.dbSource = value; + } + + /** + * Gets the value of the dbCoordSys property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDbCoordSys() { + return dbCoordSys; + } + + /** + * Sets the value of the dbCoordSys property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDbCoordSys(String value) { + this.dbCoordSys = value; + } + + /** + * Gets the value of the dbAccessionId property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDbAccessionId() { + return dbAccessionId; + } + + /** + * Sets the value of the dbAccessionId property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDbAccessionId(String value) { + this.dbAccessionId = value; + } + + /** + * Gets the value of the dbEvidence property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDbEvidence() { + return dbEvidence; + } + + /** + * Sets the value of the dbEvidence property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDbEvidence(String value) { + this.dbEvidence = value; + } + + /** + * Gets the value of the dbVersion property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDbVersion() { + return dbVersion; + } + + /** + * Sets the value of the dbVersion property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDbVersion(String value) { + this.dbVersion = 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">
+         *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
+         *     </restriction>
+         *   </complexContent>
+         * </complexType>
+         * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "content" + }) + public static class AlignObjectDetail { + + @XmlValue + protected String content; + @XmlAttribute(name = "dbSource") + protected String dbSource; + @XmlAttribute(name = "property", required = true) + protected String property; + + /** + * Gets the value of the content property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getContent() { + return content; + } + + /** + * Sets the value of the content property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setContent(String value) { + this.content = value; + } + + /** + * Gets the value of the dbSource property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDbSource() { + return dbSource; + } + + /** + * Sets the value of the dbSource property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDbSource(String value) { + this.dbSource = value; + } + + /** + * Gets the value of the property property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getProperty() { + return property; + } + + /** + * Sets the value of the property property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setProperty(String value) { + this.property = 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">
+         *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
+         *     </restriction>
+         *   </complexContent>
+         * </complexType>
+         * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "content" + }) + public static class Sequence { + + @XmlValue + protected String content; + @XmlAttribute(name = "start") + protected String start; + @XmlAttribute(name = "end") + protected String end; + + /** + * Gets the value of the content property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getContent() { + return content; + } + + /** + * Sets the value of the content property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setContent(String value) { + this.content = value; + } + + /** + * Gets the value of the start property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getStart() { + return start; + } + + /** + * Sets the value of the start property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setStart(String value) { + this.start = value; + } + + /** + * Gets the value of the end property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getEnd() { + return end; + } + + /** + * Sets the value of the end property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setEnd(String value) { + this.end = 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="segment" maxOccurs="unbounded">
+     *           <complexType>
+     *             <complexContent>
+     *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                 <sequence minOccurs="0">
+     *                   <element name="cigar" type="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}cigarstring"/>
+     *                 </sequence>
+     *                 <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
+     *                 <attribute name="intObjectId" use="required" type="{http://www.w3.org/2001/XMLSchema}anySimpleType" />
+     *                 <attribute name="strand" type="{http://www.w3.org/2001/XMLSchema}anySimpleType" />
+     *               </restriction>
+     *             </complexContent>
+     *           </complexType>
+     *         </element>
+     *       </sequence>
+     *       <attribute name="blockScore" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *       <attribute name="blockOrder" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
+     *     </restriction>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "segment" + }) + public static class Block { + + @XmlElement(required = true) + protected List segment; + @XmlAttribute(name = "blockScore") + protected String blockScore; + @XmlAttribute(name = "blockOrder", required = true) + protected BigInteger blockOrder; + + /** + * Gets the value of the segment 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 segment property. + * + *

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

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

+ * Objects of the following type(s) are allowed in the list + * {@link Alignment.Block.Segment } + * + * + */ + public List getSegment() { + if (segment == null) { + segment = new ArrayList(); + } + return this.segment; + } + + /** + * Gets the value of the blockScore property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getBlockScore() { + return blockScore; + } + + /** + * Sets the value of the blockScore property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setBlockScore(String value) { + this.blockScore = value; + } + + /** + * Gets the value of the blockOrder property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getBlockOrder() { + return blockOrder; + } + + /** + * Sets the value of the blockOrder property. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setBlockOrder(BigInteger value) { + this.blockOrder = 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 minOccurs="0">
+         *         <element name="cigar" type="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}cigarstring"/>
+         *       </sequence>
+         *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
+         *       <attribute name="intObjectId" use="required" type="{http://www.w3.org/2001/XMLSchema}anySimpleType" />
+         *       <attribute name="strand" type="{http://www.w3.org/2001/XMLSchema}anySimpleType" />
+         *     </restriction>
+         *   </complexContent>
+         * </complexType>
+         * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "cigar" + }) + public static class Segment { + + protected String cigar; + @XmlAttribute(name = "intObjectId", required = true) + @XmlSchemaType(name = "anySimpleType") + protected String intObjectId; + @XmlAttribute(name = "strand") + @XmlSchemaType(name = "anySimpleType") + protected String strand; + @XmlAttribute(name = "start") + protected String start; + @XmlAttribute(name = "end") + protected String end; + + /** + * Gets the value of the cigar property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCigar() { + return cigar; + } + + /** + * Sets the value of the cigar property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCigar(String value) { + this.cigar = value; + } + + /** + * Gets the value of the intObjectId property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getIntObjectId() { + return intObjectId; + } + + /** + * Sets the value of the intObjectId property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setIntObjectId(String value) { + this.intObjectId = value; + } + + /** + * Gets the value of the strand property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getStrand() { + return strand; + } + + /** + * Sets the value of the strand property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setStrand(String value) { + this.strand = value; + } + + /** + * Gets the value of the start property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getStart() { + return start; + } + + /** + * Sets the value of the start property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setStart(String value) { + this.start = value; + } + + /** + * Gets the value of the end property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getEnd() { + return end; + } + + /** + * Sets the value of the end property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setEnd(String value) { + this.end = 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="vector">
+     *           <complexType>
+     *             <complexContent>
+     *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                 <attribute name="x" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
+     *                 <attribute name="y" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
+     *                 <attribute name="z" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
+     *               </restriction>
+     *             </complexContent>
+     *           </complexType>
+     *         </element>
+     *         <element name="matrix" maxOccurs="unbounded">
+     *           <complexType>
+     *             <complexContent>
+     *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                 <sequence>
+     *                   <element name="max11">
+     *                     <complexType>
+     *                       <complexContent>
+     *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                           <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
+     *                         </restriction>
+     *                       </complexContent>
+     *                     </complexType>
+     *                   </element>
+     *                   <element name="max12">
+     *                     <complexType>
+     *                       <complexContent>
+     *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                           <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
+     *                         </restriction>
+     *                       </complexContent>
+     *                     </complexType>
+     *                   </element>
+     *                   <element name="max13">
+     *                     <complexType>
+     *                       <complexContent>
+     *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                           <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
+     *                         </restriction>
+     *                       </complexContent>
+     *                     </complexType>
+     *                   </element>
+     *                   <element name="max21">
+     *                     <complexType>
+     *                       <complexContent>
+     *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                           <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
+     *                         </restriction>
+     *                       </complexContent>
+     *                     </complexType>
+     *                   </element>
+     *                   <element name="max22">
+     *                     <complexType>
+     *                       <complexContent>
+     *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                           <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
+     *                         </restriction>
+     *                       </complexContent>
+     *                     </complexType>
+     *                   </element>
+     *                   <element name="max23">
+     *                     <complexType>
+     *                       <complexContent>
+     *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                           <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
+     *                         </restriction>
+     *                       </complexContent>
+     *                     </complexType>
+     *                   </element>
+     *                   <element name="max31">
+     *                     <complexType>
+     *                       <complexContent>
+     *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                           <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
+     *                         </restriction>
+     *                       </complexContent>
+     *                     </complexType>
+     *                   </element>
+     *                   <element name="max32">
+     *                     <complexType>
+     *                       <complexContent>
+     *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                           <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
+     *                         </restriction>
+     *                       </complexContent>
+     *                     </complexType>
+     *                   </element>
+     *                   <element name="max33">
+     *                     <complexType>
+     *                       <complexContent>
+     *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                           <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
+     *                         </restriction>
+     *                       </complexContent>
+     *                     </complexType>
+     *                   </element>
+     *                 </sequence>
+     *               </restriction>
+     *             </complexContent>
+     *           </complexType>
+     *         </element>
+     *       </sequence>
+     *       <attribute name="intObjectId" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *     </restriction>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "vector", + "matrix" + }) + public static class Geo3D { + + @XmlElement(required = true) + protected Alignment.Geo3D.Vector vector; + @XmlElement(required = true) + protected List matrix; + @XmlAttribute(name = "intObjectId", required = true) + protected String intObjectId; + + /** + * Gets the value of the vector property. + * + * @return + * possible object is + * {@link Alignment.Geo3D.Vector } + * + */ + public Alignment.Geo3D.Vector getVector() { + return vector; + } + + /** + * Sets the value of the vector property. + * + * @param value + * allowed object is + * {@link Alignment.Geo3D.Vector } + * + */ + public void setVector(Alignment.Geo3D.Vector value) { + this.vector = value; + } + + /** + * Gets the value of the matrix 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 matrix property. + * + *

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

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

+ * Objects of the following type(s) are allowed in the list + * {@link Alignment.Geo3D.Matrix } + * + * + */ + public List getMatrix() { + if (matrix == null) { + matrix = new ArrayList(); + } + return this.matrix; + } + + /** + * Gets the value of the intObjectId property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getIntObjectId() { + return intObjectId; + } + + /** + * Sets the value of the intObjectId property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setIntObjectId(String value) { + this.intObjectId = 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="max11">
+         *           <complexType>
+         *             <complexContent>
+         *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+         *                 <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
+         *               </restriction>
+         *             </complexContent>
+         *           </complexType>
+         *         </element>
+         *         <element name="max12">
+         *           <complexType>
+         *             <complexContent>
+         *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+         *                 <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
+         *               </restriction>
+         *             </complexContent>
+         *           </complexType>
+         *         </element>
+         *         <element name="max13">
+         *           <complexType>
+         *             <complexContent>
+         *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+         *                 <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
+         *               </restriction>
+         *             </complexContent>
+         *           </complexType>
+         *         </element>
+         *         <element name="max21">
+         *           <complexType>
+         *             <complexContent>
+         *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+         *                 <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
+         *               </restriction>
+         *             </complexContent>
+         *           </complexType>
+         *         </element>
+         *         <element name="max22">
+         *           <complexType>
+         *             <complexContent>
+         *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+         *                 <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
+         *               </restriction>
+         *             </complexContent>
+         *           </complexType>
+         *         </element>
+         *         <element name="max23">
+         *           <complexType>
+         *             <complexContent>
+         *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+         *                 <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
+         *               </restriction>
+         *             </complexContent>
+         *           </complexType>
+         *         </element>
+         *         <element name="max31">
+         *           <complexType>
+         *             <complexContent>
+         *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+         *                 <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
+         *               </restriction>
+         *             </complexContent>
+         *           </complexType>
+         *         </element>
+         *         <element name="max32">
+         *           <complexType>
+         *             <complexContent>
+         *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+         *                 <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
+         *               </restriction>
+         *             </complexContent>
+         *           </complexType>
+         *         </element>
+         *         <element name="max33">
+         *           <complexType>
+         *             <complexContent>
+         *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+         *                 <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
+         *               </restriction>
+         *             </complexContent>
+         *           </complexType>
+         *         </element>
+         *       </sequence>
+         *     </restriction>
+         *   </complexContent>
+         * </complexType>
+         * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "max11", + "max12", + "max13", + "max21", + "max22", + "max23", + "max31", + "max32", + "max33" + }) + public static class Matrix { + + @XmlElement(required = true) + protected Alignment.Geo3D.Matrix.Max11 max11; + @XmlElement(required = true) + protected Alignment.Geo3D.Matrix.Max12 max12; + @XmlElement(required = true) + protected Alignment.Geo3D.Matrix.Max13 max13; + @XmlElement(required = true) + protected Alignment.Geo3D.Matrix.Max21 max21; + @XmlElement(required = true) + protected Alignment.Geo3D.Matrix.Max22 max22; + @XmlElement(required = true) + protected Alignment.Geo3D.Matrix.Max23 max23; + @XmlElement(required = true) + protected Alignment.Geo3D.Matrix.Max31 max31; + @XmlElement(required = true) + protected Alignment.Geo3D.Matrix.Max32 max32; + @XmlElement(required = true) + protected Alignment.Geo3D.Matrix.Max33 max33; + + /** + * Gets the value of the max11 property. + * + * @return + * possible object is + * {@link Alignment.Geo3D.Matrix.Max11 } + * + */ + public Alignment.Geo3D.Matrix.Max11 getMax11() { + return max11; + } + + /** + * Sets the value of the max11 property. + * + * @param value + * allowed object is + * {@link Alignment.Geo3D.Matrix.Max11 } + * + */ + public void setMax11(Alignment.Geo3D.Matrix.Max11 value) { + this.max11 = value; + } + + /** + * Gets the value of the max12 property. + * + * @return + * possible object is + * {@link Alignment.Geo3D.Matrix.Max12 } + * + */ + public Alignment.Geo3D.Matrix.Max12 getMax12() { + return max12; + } + + /** + * Sets the value of the max12 property. + * + * @param value + * allowed object is + * {@link Alignment.Geo3D.Matrix.Max12 } + * + */ + public void setMax12(Alignment.Geo3D.Matrix.Max12 value) { + this.max12 = value; + } + + /** + * Gets the value of the max13 property. + * + * @return + * possible object is + * {@link Alignment.Geo3D.Matrix.Max13 } + * + */ + public Alignment.Geo3D.Matrix.Max13 getMax13() { + return max13; + } + + /** + * Sets the value of the max13 property. + * + * @param value + * allowed object is + * {@link Alignment.Geo3D.Matrix.Max13 } + * + */ + public void setMax13(Alignment.Geo3D.Matrix.Max13 value) { + this.max13 = value; + } + + /** + * Gets the value of the max21 property. + * + * @return + * possible object is + * {@link Alignment.Geo3D.Matrix.Max21 } + * + */ + public Alignment.Geo3D.Matrix.Max21 getMax21() { + return max21; + } + + /** + * Sets the value of the max21 property. + * + * @param value + * allowed object is + * {@link Alignment.Geo3D.Matrix.Max21 } + * + */ + public void setMax21(Alignment.Geo3D.Matrix.Max21 value) { + this.max21 = value; + } + + /** + * Gets the value of the max22 property. + * + * @return + * possible object is + * {@link Alignment.Geo3D.Matrix.Max22 } + * + */ + public Alignment.Geo3D.Matrix.Max22 getMax22() { + return max22; + } + + /** + * Sets the value of the max22 property. + * + * @param value + * allowed object is + * {@link Alignment.Geo3D.Matrix.Max22 } + * + */ + public void setMax22(Alignment.Geo3D.Matrix.Max22 value) { + this.max22 = value; + } + + /** + * Gets the value of the max23 property. + * + * @return + * possible object is + * {@link Alignment.Geo3D.Matrix.Max23 } + * + */ + public Alignment.Geo3D.Matrix.Max23 getMax23() { + return max23; + } + + /** + * Sets the value of the max23 property. + * + * @param value + * allowed object is + * {@link Alignment.Geo3D.Matrix.Max23 } + * + */ + public void setMax23(Alignment.Geo3D.Matrix.Max23 value) { + this.max23 = value; + } + + /** + * Gets the value of the max31 property. + * + * @return + * possible object is + * {@link Alignment.Geo3D.Matrix.Max31 } + * + */ + public Alignment.Geo3D.Matrix.Max31 getMax31() { + return max31; + } + + /** + * Sets the value of the max31 property. + * + * @param value + * allowed object is + * {@link Alignment.Geo3D.Matrix.Max31 } + * + */ + public void setMax31(Alignment.Geo3D.Matrix.Max31 value) { + this.max31 = value; + } + + /** + * Gets the value of the max32 property. + * + * @return + * possible object is + * {@link Alignment.Geo3D.Matrix.Max32 } + * + */ + public Alignment.Geo3D.Matrix.Max32 getMax32() { + return max32; + } + + /** + * Sets the value of the max32 property. + * + * @param value + * allowed object is + * {@link Alignment.Geo3D.Matrix.Max32 } + * + */ + public void setMax32(Alignment.Geo3D.Matrix.Max32 value) { + this.max32 = value; + } + + /** + * Gets the value of the max33 property. + * + * @return + * possible object is + * {@link Alignment.Geo3D.Matrix.Max33 } + * + */ + public Alignment.Geo3D.Matrix.Max33 getMax33() { + return max33; + } + + /** + * Sets the value of the max33 property. + * + * @param value + * allowed object is + * {@link Alignment.Geo3D.Matrix.Max33 } + * + */ + public void setMax33(Alignment.Geo3D.Matrix.Max33 value) { + this.max33 = 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="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
+             *     </restriction>
+             *   </complexContent>
+             * </complexType>
+             * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class Max11 { + + @XmlAttribute(name = "coord", required = true) + protected float coord; + + /** + * Gets the value of the coord property. + * + */ + public float getCoord() { + return coord; + } + + /** + * Sets the value of the coord property. + * + */ + public void setCoord(float value) { + this.coord = 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="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
+             *     </restriction>
+             *   </complexContent>
+             * </complexType>
+             * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class Max12 { + + @XmlAttribute(name = "coord", required = true) + protected float coord; + + /** + * Gets the value of the coord property. + * + */ + public float getCoord() { + return coord; + } + + /** + * Sets the value of the coord property. + * + */ + public void setCoord(float value) { + this.coord = 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="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
+             *     </restriction>
+             *   </complexContent>
+             * </complexType>
+             * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class Max13 { + + @XmlAttribute(name = "coord", required = true) + protected float coord; + + /** + * Gets the value of the coord property. + * + */ + public float getCoord() { + return coord; + } + + /** + * Sets the value of the coord property. + * + */ + public void setCoord(float value) { + this.coord = 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="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
+             *     </restriction>
+             *   </complexContent>
+             * </complexType>
+             * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class Max21 { + + @XmlAttribute(name = "coord", required = true) + protected float coord; + + /** + * Gets the value of the coord property. + * + */ + public float getCoord() { + return coord; + } + + /** + * Sets the value of the coord property. + * + */ + public void setCoord(float value) { + this.coord = 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="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
+             *     </restriction>
+             *   </complexContent>
+             * </complexType>
+             * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class Max22 { + + @XmlAttribute(name = "coord", required = true) + protected float coord; + + /** + * Gets the value of the coord property. + * + */ + public float getCoord() { + return coord; + } + + /** + * Sets the value of the coord property. + * + */ + public void setCoord(float value) { + this.coord = 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="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
+             *     </restriction>
+             *   </complexContent>
+             * </complexType>
+             * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class Max23 { + + @XmlAttribute(name = "coord", required = true) + protected float coord; + + /** + * Gets the value of the coord property. + * + */ + public float getCoord() { + return coord; + } + + /** + * Sets the value of the coord property. + * + */ + public void setCoord(float value) { + this.coord = 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="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
+             *     </restriction>
+             *   </complexContent>
+             * </complexType>
+             * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class Max31 { + + @XmlAttribute(name = "coord", required = true) + protected float coord; + + /** + * Gets the value of the coord property. + * + */ + public float getCoord() { + return coord; + } + + /** + * Sets the value of the coord property. + * + */ + public void setCoord(float value) { + this.coord = 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="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
+             *     </restriction>
+             *   </complexContent>
+             * </complexType>
+             * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class Max32 { + + @XmlAttribute(name = "coord", required = true) + protected float coord; + + /** + * Gets the value of the coord property. + * + */ + public float getCoord() { + return coord; + } + + /** + * Sets the value of the coord property. + * + */ + public void setCoord(float value) { + this.coord = 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="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
+             *     </restriction>
+             *   </complexContent>
+             * </complexType>
+             * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class Max33 { + + @XmlAttribute(name = "coord", required = true) + protected float coord; + + /** + * Gets the value of the coord property. + * + */ + public float getCoord() { + return coord; + } + + /** + * Sets the value of the coord property. + * + */ + public void setCoord(float value) { + this.coord = 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="x" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
+         *       <attribute name="y" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
+         *       <attribute name="z" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
+         *     </restriction>
+         *   </complexContent>
+         * </complexType>
+         * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class Vector { + + @XmlAttribute(name = "x", required = true) + protected float x; + @XmlAttribute(name = "y", required = true) + protected float y; + @XmlAttribute(name = "z", required = true) + protected float z; + + /** + * Gets the value of the x property. + * + */ + public float getX() { + return x; + } + + /** + * Sets the value of the x property. + * + */ + public void setX(float value) { + this.x = value; + } + + /** + * Gets the value of the y property. + * + */ + public float getY() { + return y; + } + + /** + * Sets the value of the y property. + * + */ + public void setY(float value) { + this.y = value; + } + + /** + * Gets the value of the z property. + * + */ + public float getZ() { + return z; + } + + /** + * Sets the value of the z property. + * + */ + public void setZ(float value) { + this.z = 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="methodName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *       <attribute name="scoreValue" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *     </restriction>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class Score { + + @XmlAttribute(name = "methodName", required = true) + protected String methodName; + @XmlAttribute(name = "scoreValue", required = true) + protected String scoreValue; + + /** + * Gets the value of the methodName property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getMethodName() { + return methodName; + } + + /** + * Sets the value of the methodName property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setMethodName(String value) { + this.methodName = value; + } + + /** + * Gets the value of the scoreValue property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getScoreValue() { + return scoreValue; + } + + /** + * Sets the value of the scoreValue property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setScoreValue(String value) { + this.scoreValue = value; + } + + } + +} diff --git a/src/jalview/xml/binding/sifts/EntityType.java b/src/jalview/xml/binding/sifts/EntityType.java new file mode 100644 index 0000000..f74da5a --- /dev/null +++ b/src/jalview/xml/binding/sifts/EntityType.java @@ -0,0 +1,62 @@ +// +// 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: 2015.10.09 at 03:18:33 PM BST +// + + +package jalview.xml.binding.sifts; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for entityType. + * + *

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

+ *

+ * <simpleType name="entityType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="protein"/>
+ *     <enumeration value="RNA"/>
+ *     <enumeration value="DNA"/>
+ *     <enumeration value="domain"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ * + */ +@XmlType(name = "entityType", namespace = "http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd") +@XmlEnum +public enum EntityType { + + @XmlEnumValue("protein") + PROTEIN("protein"), + RNA("RNA"), + DNA("DNA"), + @XmlEnumValue("domain") + DOMAIN("domain"); + private final String value; + + EntityType(String v) { + value = v; + } + + public String value() { + return value; + } + + public static EntityType fromValue(String v) { + for (EntityType c: EntityType.values()) { + if (c.value.equals(v)) { + return c; + } + } + throw new IllegalArgumentException(v); + } + +} diff --git a/src/jalview/xml/binding/sifts/Entry.java b/src/jalview/xml/binding/sifts/Entry.java new file mode 100644 index 0000000..7429059 --- /dev/null +++ b/src/jalview/xml/binding/sifts/Entry.java @@ -0,0 +1,2818 @@ +// +// 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: 2015.10.09 at 03:18:33 PM BST +// + + +package jalview.xml.binding.sifts; + +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.bind.annotation.XmlValue; +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="listDB">
+ *           <complexType>
+ *             <complexContent>
+ *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 <sequence maxOccurs="unbounded">
+ *                   <element name="db">
+ *                     <complexType>
+ *                       <complexContent>
+ *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                           <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}listdbRef"/>
+ *                         </restriction>
+ *                       </complexContent>
+ *                     </complexType>
+ *                   </element>
+ *                 </sequence>
+ *               </restriction>
+ *             </complexContent>
+ *           </complexType>
+ *         </element>
+ *         <element name="entryDetail" maxOccurs="unbounded" minOccurs="0">
+ *           <complexType>
+ *             <complexContent>
+ *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
+ *               </restriction>
+ *             </complexContent>
+ *           </complexType>
+ *         </element>
+ *         <element name="entity" maxOccurs="unbounded">
+ *           <complexType>
+ *             <complexContent>
+ *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 <sequence>
+ *                   <element name="entityDetail" maxOccurs="unbounded" minOccurs="0">
+ *                     <complexType>
+ *                       <complexContent>
+ *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                           <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
+ *                         </restriction>
+ *                       </complexContent>
+ *                     </complexType>
+ *                   </element>
+ *                   <element name="segment" maxOccurs="unbounded">
+ *                     <complexType>
+ *                       <complexContent>
+ *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                           <sequence>
+ *                             <element name="listResidue" minOccurs="0">
+ *                               <complexType>
+ *                                 <complexContent>
+ *                                   <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                                     <sequence>
+ *                                       <element name="residue" maxOccurs="unbounded">
+ *                                         <complexType>
+ *                                           <complexContent>
+ *                                             <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                                               <sequence>
+ *                                                 <element name="crossRefDb" maxOccurs="unbounded" minOccurs="0">
+ *                                                   <complexType>
+ *                                                     <complexContent>
+ *                                                       <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                                                         <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbRef"/>
+ *                                                         <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}resRef"/>
+ *                                                         <attribute name="dbChainId" type="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}chainId" />
+ *                                                       </restriction>
+ *                                                     </complexContent>
+ *                                                   </complexType>
+ *                                                 </element>
+ *                                                 <element name="residueDetail" maxOccurs="unbounded" minOccurs="0">
+ *                                                   <complexType>
+ *                                                     <complexContent>
+ *                                                       <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                                                         <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
+ *                                                       </restriction>
+ *                                                     </complexContent>
+ *                                                   </complexType>
+ *                                                 </element>
+ *                                               </sequence>
+ *                                               <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}resRef"/>
+ *                                               <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}listdbRef"/>
+ *                                             </restriction>
+ *                                           </complexContent>
+ *                                         </complexType>
+ *                                       </element>
+ *                                     </sequence>
+ *                                   </restriction>
+ *                                 </complexContent>
+ *                               </complexType>
+ *                             </element>
+ *                             <element name="listMapRegion" minOccurs="0">
+ *                               <complexType>
+ *                                 <complexContent>
+ *                                   <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                                     <sequence>
+ *                                       <element name="mapRegion" maxOccurs="unbounded">
+ *                                         <complexType>
+ *                                           <complexContent>
+ *                                             <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                                               <sequence>
+ *                                                 <element name="db">
+ *                                                   <complexType>
+ *                                                     <complexContent>
+ *                                                       <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                                                         <sequence>
+ *                                                           <element name="dbDetail" maxOccurs="unbounded" minOccurs="0">
+ *                                                             <complexType>
+ *                                                               <complexContent>
+ *                                                                 <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                                                                   <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
+ *                                                                 </restriction>
+ *                                                               </complexContent>
+ *                                                             </complexType>
+ *                                                           </element>
+ *                                                         </sequence>
+ *                                                         <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbRef"/>
+ *                                                         <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
+ *                                                         <attribute name="dbChainId" type="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbChainId" />
+ *                                                       </restriction>
+ *                                                     </complexContent>
+ *                                                   </complexType>
+ *                                                 </element>
+ *                                               </sequence>
+ *                                               <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
+ *                                             </restriction>
+ *                                           </complexContent>
+ *                                         </complexType>
+ *                                       </element>
+ *                                     </sequence>
+ *                                   </restriction>
+ *                                 </complexContent>
+ *                               </complexType>
+ *                             </element>
+ *                             <element name="segmentDetail" maxOccurs="unbounded" minOccurs="0">
+ *                               <complexType>
+ *                                 <complexContent>
+ *                                   <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                                     <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
+ *                                   </restriction>
+ *                                 </complexContent>
+ *                               </complexType>
+ *                             </element>
+ *                           </sequence>
+ *                           <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
+ *                           <attribute name="segId" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *                         </restriction>
+ *                       </complexContent>
+ *                     </complexType>
+ *                   </element>
+ *                 </sequence>
+ *                 <attribute name="type" use="required" type="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}entityType" />
+ *                 <attribute name="entityId" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *               </restriction>
+ *             </complexContent>
+ *           </complexType>
+ *         </element>
+ *         <element ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/eFamily.xsd}alignment" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbRef"/>
+ *       <attribute name="date" use="required" type="{http://www.w3.org/2001/XMLSchema}date" />
+ *       <attribute name="dbEntryVersion" use="required" type="{http://www.w3.org/2001/XMLSchema}date" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "listDB", + "entryDetail", + "entity", + "alignment" +}) +@XmlRootElement(name = "entry") +public class Entry { + + @XmlElement(required = true) + protected Entry.ListDB listDB; + protected List entryDetail; + @XmlElement(required = true) + protected List entity; + protected List alignment; + @XmlAttribute(name = "date", required = true) + @XmlSchemaType(name = "date") + protected XMLGregorianCalendar date; + @XmlAttribute(name = "dbEntryVersion", required = true) + @XmlSchemaType(name = "date") + protected XMLGregorianCalendar dbEntryVersion; + @XmlAttribute(name = "dbSource", required = true) + protected String dbSource; + @XmlAttribute(name = "dbCoordSys", required = true) + protected String dbCoordSys; + @XmlAttribute(name = "dbAccessionId", required = true) + protected String dbAccessionId; + @XmlAttribute(name = "dbEvidence") + protected String dbEvidence; + @XmlAttribute(name = "dbVersion") + protected String dbVersion; + + /** + * Gets the value of the listDB property. + * + * @return + * possible object is + * {@link Entry.ListDB } + * + */ + public Entry.ListDB getListDB() { + return listDB; + } + + /** + * Sets the value of the listDB property. + * + * @param value + * allowed object is + * {@link Entry.ListDB } + * + */ + public void setListDB(Entry.ListDB value) { + this.listDB = value; + } + + /** + * Gets the value of the entryDetail 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 entryDetail property. + * + *

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

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

+ * Objects of the following type(s) are allowed in the list + * {@link Entry.EntryDetail } + * + * + */ + public List getEntryDetail() { + if (entryDetail == null) { + entryDetail = new ArrayList(); + } + return this.entryDetail; + } + + /** + * Gets the value of the entity 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 entity property. + * + *

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

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

+ * Objects of the following type(s) are allowed in the list + * {@link Entry.Entity } + * + * + */ + public List getEntity() { + if (entity == null) { + entity = new ArrayList(); + } + return this.entity; + } + + /** + * Gets the value of the alignment 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 alignment property. + * + *

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

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

+ * Objects of the following type(s) are allowed in the list + * {@link Alignment } + * + * + */ + public List getAlignment() { + if (alignment == null) { + alignment = new ArrayList(); + } + return this.alignment; + } + + /** + * Gets the value of the date property. + * + * @return + * possible object is + * {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getDate() { + return date; + } + + /** + * Sets the value of the date property. + * + * @param value + * allowed object is + * {@link XMLGregorianCalendar } + * + */ + public void setDate(XMLGregorianCalendar value) { + this.date = value; + } + + /** + * Gets the value of the dbEntryVersion property. + * + * @return + * possible object is + * {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getDbEntryVersion() { + return dbEntryVersion; + } + + /** + * Sets the value of the dbEntryVersion property. + * + * @param value + * allowed object is + * {@link XMLGregorianCalendar } + * + */ + public void setDbEntryVersion(XMLGregorianCalendar value) { + this.dbEntryVersion = value; + } + + /** + * Gets the value of the dbSource property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDbSource() { + return dbSource; + } + + /** + * Sets the value of the dbSource property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDbSource(String value) { + this.dbSource = value; + } + + /** + * Gets the value of the dbCoordSys property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDbCoordSys() { + return dbCoordSys; + } + + /** + * Sets the value of the dbCoordSys property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDbCoordSys(String value) { + this.dbCoordSys = value; + } + + /** + * Gets the value of the dbAccessionId property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDbAccessionId() { + return dbAccessionId; + } + + /** + * Sets the value of the dbAccessionId property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDbAccessionId(String value) { + this.dbAccessionId = value; + } + + /** + * Gets the value of the dbEvidence property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDbEvidence() { + return dbEvidence; + } + + /** + * Sets the value of the dbEvidence property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDbEvidence(String value) { + this.dbEvidence = value; + } + + /** + * Gets the value of the dbVersion property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDbVersion() { + return dbVersion; + } + + /** + * Sets the value of the dbVersion property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDbVersion(String value) { + this.dbVersion = 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="entityDetail" maxOccurs="unbounded" minOccurs="0">
+     *           <complexType>
+     *             <complexContent>
+     *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                 <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
+     *               </restriction>
+     *             </complexContent>
+     *           </complexType>
+     *         </element>
+     *         <element name="segment" maxOccurs="unbounded">
+     *           <complexType>
+     *             <complexContent>
+     *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                 <sequence>
+     *                   <element name="listResidue" minOccurs="0">
+     *                     <complexType>
+     *                       <complexContent>
+     *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                           <sequence>
+     *                             <element name="residue" maxOccurs="unbounded">
+     *                               <complexType>
+     *                                 <complexContent>
+     *                                   <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                                     <sequence>
+     *                                       <element name="crossRefDb" maxOccurs="unbounded" minOccurs="0">
+     *                                         <complexType>
+     *                                           <complexContent>
+     *                                             <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                                               <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbRef"/>
+     *                                               <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}resRef"/>
+     *                                               <attribute name="dbChainId" type="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}chainId" />
+     *                                             </restriction>
+     *                                           </complexContent>
+     *                                         </complexType>
+     *                                       </element>
+     *                                       <element name="residueDetail" maxOccurs="unbounded" minOccurs="0">
+     *                                         <complexType>
+     *                                           <complexContent>
+     *                                             <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                                               <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
+     *                                             </restriction>
+     *                                           </complexContent>
+     *                                         </complexType>
+     *                                       </element>
+     *                                     </sequence>
+     *                                     <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}resRef"/>
+     *                                     <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}listdbRef"/>
+     *                                   </restriction>
+     *                                 </complexContent>
+     *                               </complexType>
+     *                             </element>
+     *                           </sequence>
+     *                         </restriction>
+     *                       </complexContent>
+     *                     </complexType>
+     *                   </element>
+     *                   <element name="listMapRegion" minOccurs="0">
+     *                     <complexType>
+     *                       <complexContent>
+     *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                           <sequence>
+     *                             <element name="mapRegion" maxOccurs="unbounded">
+     *                               <complexType>
+     *                                 <complexContent>
+     *                                   <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                                     <sequence>
+     *                                       <element name="db">
+     *                                         <complexType>
+     *                                           <complexContent>
+     *                                             <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                                               <sequence>
+     *                                                 <element name="dbDetail" maxOccurs="unbounded" minOccurs="0">
+     *                                                   <complexType>
+     *                                                     <complexContent>
+     *                                                       <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                                                         <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
+     *                                                       </restriction>
+     *                                                     </complexContent>
+     *                                                   </complexType>
+     *                                                 </element>
+     *                                               </sequence>
+     *                                               <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbRef"/>
+     *                                               <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
+     *                                               <attribute name="dbChainId" type="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbChainId" />
+     *                                             </restriction>
+     *                                           </complexContent>
+     *                                         </complexType>
+     *                                       </element>
+     *                                     </sequence>
+     *                                     <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
+     *                                   </restriction>
+     *                                 </complexContent>
+     *                               </complexType>
+     *                             </element>
+     *                           </sequence>
+     *                         </restriction>
+     *                       </complexContent>
+     *                     </complexType>
+     *                   </element>
+     *                   <element name="segmentDetail" maxOccurs="unbounded" minOccurs="0">
+     *                     <complexType>
+     *                       <complexContent>
+     *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                           <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
+     *                         </restriction>
+     *                       </complexContent>
+     *                     </complexType>
+     *                   </element>
+     *                 </sequence>
+     *                 <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
+     *                 <attribute name="segId" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *               </restriction>
+     *             </complexContent>
+     *           </complexType>
+     *         </element>
+     *       </sequence>
+     *       <attribute name="type" use="required" type="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}entityType" />
+     *       <attribute name="entityId" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+     *     </restriction>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "entityDetail", + "segment" + }) + public static class Entity { + + protected List entityDetail; + @XmlElement(required = true) + protected List segment; + @XmlAttribute(name = "type", required = true) + protected EntityType type; + @XmlAttribute(name = "entityId", required = true) + protected String entityId; + + /** + * Gets the value of the entityDetail 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 entityDetail property. + * + *

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

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

+ * Objects of the following type(s) are allowed in the list + * {@link Entry.Entity.EntityDetail } + * + * + */ + public List getEntityDetail() { + if (entityDetail == null) { + entityDetail = new ArrayList(); + } + return this.entityDetail; + } + + /** + * Gets the value of the segment 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 segment property. + * + *

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

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

+ * Objects of the following type(s) are allowed in the list + * {@link Entry.Entity.Segment } + * + * + */ + public List getSegment() { + if (segment == null) { + segment = new ArrayList(); + } + return this.segment; + } + + /** + * Gets the value of the type property. + * + * @return + * possible object is + * {@link EntityType } + * + */ + public EntityType getType() { + return type; + } + + /** + * Sets the value of the type property. + * + * @param value + * allowed object is + * {@link EntityType } + * + */ + public void setType(EntityType value) { + this.type = value; + } + + /** + * Gets the value of the entityId property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getEntityId() { + return entityId; + } + + /** + * Sets the value of the entityId property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setEntityId(String value) { + this.entityId = 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">
+         *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
+         *     </restriction>
+         *   </complexContent>
+         * </complexType>
+         * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "content" + }) + public static class EntityDetail { + + @XmlValue + protected String content; + @XmlAttribute(name = "dbSource") + protected String dbSource; + @XmlAttribute(name = "property", required = true) + protected String property; + + /** + * Gets the value of the content property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getContent() { + return content; + } + + /** + * Sets the value of the content property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setContent(String value) { + this.content = value; + } + + /** + * Gets the value of the dbSource property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDbSource() { + return dbSource; + } + + /** + * Sets the value of the dbSource property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDbSource(String value) { + this.dbSource = value; + } + + /** + * Gets the value of the property property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getProperty() { + return property; + } + + /** + * Sets the value of the property property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setProperty(String value) { + this.property = 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="listResidue" minOccurs="0">
+         *           <complexType>
+         *             <complexContent>
+         *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+         *                 <sequence>
+         *                   <element name="residue" maxOccurs="unbounded">
+         *                     <complexType>
+         *                       <complexContent>
+         *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+         *                           <sequence>
+         *                             <element name="crossRefDb" maxOccurs="unbounded" minOccurs="0">
+         *                               <complexType>
+         *                                 <complexContent>
+         *                                   <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+         *                                     <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbRef"/>
+         *                                     <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}resRef"/>
+         *                                     <attribute name="dbChainId" type="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}chainId" />
+         *                                   </restriction>
+         *                                 </complexContent>
+         *                               </complexType>
+         *                             </element>
+         *                             <element name="residueDetail" maxOccurs="unbounded" minOccurs="0">
+         *                               <complexType>
+         *                                 <complexContent>
+         *                                   <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+         *                                     <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
+         *                                   </restriction>
+         *                                 </complexContent>
+         *                               </complexType>
+         *                             </element>
+         *                           </sequence>
+         *                           <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}resRef"/>
+         *                           <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}listdbRef"/>
+         *                         </restriction>
+         *                       </complexContent>
+         *                     </complexType>
+         *                   </element>
+         *                 </sequence>
+         *               </restriction>
+         *             </complexContent>
+         *           </complexType>
+         *         </element>
+         *         <element name="listMapRegion" minOccurs="0">
+         *           <complexType>
+         *             <complexContent>
+         *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+         *                 <sequence>
+         *                   <element name="mapRegion" maxOccurs="unbounded">
+         *                     <complexType>
+         *                       <complexContent>
+         *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+         *                           <sequence>
+         *                             <element name="db">
+         *                               <complexType>
+         *                                 <complexContent>
+         *                                   <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+         *                                     <sequence>
+         *                                       <element name="dbDetail" maxOccurs="unbounded" minOccurs="0">
+         *                                         <complexType>
+         *                                           <complexContent>
+         *                                             <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+         *                                               <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
+         *                                             </restriction>
+         *                                           </complexContent>
+         *                                         </complexType>
+         *                                       </element>
+         *                                     </sequence>
+         *                                     <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbRef"/>
+         *                                     <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
+         *                                     <attribute name="dbChainId" type="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbChainId" />
+         *                                   </restriction>
+         *                                 </complexContent>
+         *                               </complexType>
+         *                             </element>
+         *                           </sequence>
+         *                           <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
+         *                         </restriction>
+         *                       </complexContent>
+         *                     </complexType>
+         *                   </element>
+         *                 </sequence>
+         *               </restriction>
+         *             </complexContent>
+         *           </complexType>
+         *         </element>
+         *         <element name="segmentDetail" maxOccurs="unbounded" minOccurs="0">
+         *           <complexType>
+         *             <complexContent>
+         *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+         *                 <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
+         *               </restriction>
+         *             </complexContent>
+         *           </complexType>
+         *         </element>
+         *       </sequence>
+         *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
+         *       <attribute name="segId" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+         *     </restriction>
+         *   </complexContent>
+         * </complexType>
+         * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "listResidue", + "listMapRegion", + "segmentDetail" + }) + public static class Segment { + + protected Entry.Entity.Segment.ListResidue listResidue; + protected Entry.Entity.Segment.ListMapRegion listMapRegion; + protected List segmentDetail; + @XmlAttribute(name = "segId", required = true) + protected String segId; + @XmlAttribute(name = "start") + protected String start; + @XmlAttribute(name = "end") + protected String end; + + /** + * Gets the value of the listResidue property. + * + * @return + * possible object is + * {@link Entry.Entity.Segment.ListResidue } + * + */ + public Entry.Entity.Segment.ListResidue getListResidue() { + return listResidue; + } + + /** + * Sets the value of the listResidue property. + * + * @param value + * allowed object is + * {@link Entry.Entity.Segment.ListResidue } + * + */ + public void setListResidue(Entry.Entity.Segment.ListResidue value) { + this.listResidue = value; + } + + /** + * Gets the value of the listMapRegion property. + * + * @return + * possible object is + * {@link Entry.Entity.Segment.ListMapRegion } + * + */ + public Entry.Entity.Segment.ListMapRegion getListMapRegion() { + return listMapRegion; + } + + /** + * Sets the value of the listMapRegion property. + * + * @param value + * allowed object is + * {@link Entry.Entity.Segment.ListMapRegion } + * + */ + public void setListMapRegion(Entry.Entity.Segment.ListMapRegion value) { + this.listMapRegion = value; + } + + /** + * Gets the value of the segmentDetail 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 segmentDetail property. + * + *

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

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

+ * Objects of the following type(s) are allowed in the list + * {@link Entry.Entity.Segment.SegmentDetail } + * + * + */ + public List getSegmentDetail() { + if (segmentDetail == null) { + segmentDetail = new ArrayList(); + } + return this.segmentDetail; + } + + /** + * Gets the value of the segId property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSegId() { + return segId; + } + + /** + * Sets the value of the segId property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSegId(String value) { + this.segId = value; + } + + /** + * Gets the value of the start property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getStart() { + return start; + } + + /** + * Sets the value of the start property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setStart(String value) { + this.start = value; + } + + /** + * Gets the value of the end property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getEnd() { + return end; + } + + /** + * Sets the value of the end property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setEnd(String value) { + this.end = 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="mapRegion" maxOccurs="unbounded">
+             *           <complexType>
+             *             <complexContent>
+             *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+             *                 <sequence>
+             *                   <element name="db">
+             *                     <complexType>
+             *                       <complexContent>
+             *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+             *                           <sequence>
+             *                             <element name="dbDetail" maxOccurs="unbounded" minOccurs="0">
+             *                               <complexType>
+             *                                 <complexContent>
+             *                                   <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+             *                                     <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
+             *                                   </restriction>
+             *                                 </complexContent>
+             *                               </complexType>
+             *                             </element>
+             *                           </sequence>
+             *                           <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbRef"/>
+             *                           <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
+             *                           <attribute name="dbChainId" type="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbChainId" />
+             *                         </restriction>
+             *                       </complexContent>
+             *                     </complexType>
+             *                   </element>
+             *                 </sequence>
+             *                 <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
+             *               </restriction>
+             *             </complexContent>
+             *           </complexType>
+             *         </element>
+             *       </sequence>
+             *     </restriction>
+             *   </complexContent>
+             * </complexType>
+             * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "mapRegion" + }) + public static class ListMapRegion { + + @XmlElement(required = true) + protected List mapRegion; + + /** + * Gets the value of the mapRegion 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 mapRegion property. + * + *

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

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

+ * Objects of the following type(s) are allowed in the list + * {@link Entry.Entity.Segment.ListMapRegion.MapRegion } + * + * + */ + public List getMapRegion() { + if (mapRegion == null) { + mapRegion = new ArrayList(); + } + return this.mapRegion; + } + + + /** + *

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="db">
+                 *           <complexType>
+                 *             <complexContent>
+                 *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+                 *                 <sequence>
+                 *                   <element name="dbDetail" maxOccurs="unbounded" minOccurs="0">
+                 *                     <complexType>
+                 *                       <complexContent>
+                 *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+                 *                           <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
+                 *                         </restriction>
+                 *                       </complexContent>
+                 *                     </complexType>
+                 *                   </element>
+                 *                 </sequence>
+                 *                 <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbRef"/>
+                 *                 <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
+                 *                 <attribute name="dbChainId" type="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbChainId" />
+                 *               </restriction>
+                 *             </complexContent>
+                 *           </complexType>
+                 *         </element>
+                 *       </sequence>
+                 *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
+                 *     </restriction>
+                 *   </complexContent>
+                 * </complexType>
+                 * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "db" + }) + public static class MapRegion { + + @XmlElement(required = true) + protected Entry.Entity.Segment.ListMapRegion.MapRegion.Db db; + @XmlAttribute(name = "start") + protected String start; + @XmlAttribute(name = "end") + protected String end; + + /** + * Gets the value of the db property. + * + * @return + * possible object is + * {@link Entry.Entity.Segment.ListMapRegion.MapRegion.Db } + * + */ + public Entry.Entity.Segment.ListMapRegion.MapRegion.Db getDb() { + return db; + } + + /** + * Sets the value of the db property. + * + * @param value + * allowed object is + * {@link Entry.Entity.Segment.ListMapRegion.MapRegion.Db } + * + */ + public void setDb(Entry.Entity.Segment.ListMapRegion.MapRegion.Db value) { + this.db = value; + } + + /** + * Gets the value of the start property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getStart() { + return start; + } + + /** + * Sets the value of the start property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setStart(String value) { + this.start = value; + } + + /** + * Gets the value of the end property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getEnd() { + return end; + } + + /** + * Sets the value of the end property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setEnd(String value) { + this.end = 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="dbDetail" maxOccurs="unbounded" minOccurs="0">
+                     *           <complexType>
+                     *             <complexContent>
+                     *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+                     *                 <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
+                     *               </restriction>
+                     *             </complexContent>
+                     *           </complexType>
+                     *         </element>
+                     *       </sequence>
+                     *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbRef"/>
+                     *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
+                     *       <attribute name="dbChainId" type="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbChainId" />
+                     *     </restriction>
+                     *   </complexContent>
+                     * </complexType>
+                     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "dbDetail" + }) + public static class Db { + + protected List dbDetail; + @XmlAttribute(name = "dbChainId") + protected String dbChainId; + @XmlAttribute(name = "dbSource", required = true) + protected String dbSource; + @XmlAttribute(name = "dbCoordSys", required = true) + protected String dbCoordSys; + @XmlAttribute(name = "dbAccessionId", required = true) + protected String dbAccessionId; + @XmlAttribute(name = "dbEvidence") + protected String dbEvidence; + @XmlAttribute(name = "dbVersion") + protected String dbVersion; + @XmlAttribute(name = "start") + protected String start; + @XmlAttribute(name = "end") + protected String end; + + /** + * Gets the value of the dbDetail 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 dbDetail property. + * + *

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

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

+ * Objects of the following type(s) are allowed in the list + * {@link Entry.Entity.Segment.ListMapRegion.MapRegion.Db.DbDetail } + * + * + */ + public List getDbDetail() { + if (dbDetail == null) { + dbDetail = new ArrayList(); + } + return this.dbDetail; + } + + /** + * Gets the value of the dbChainId property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDbChainId() { + return dbChainId; + } + + /** + * Sets the value of the dbChainId property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDbChainId(String value) { + this.dbChainId = value; + } + + /** + * Gets the value of the dbSource property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDbSource() { + return dbSource; + } + + /** + * Sets the value of the dbSource property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDbSource(String value) { + this.dbSource = value; + } + + /** + * Gets the value of the dbCoordSys property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDbCoordSys() { + return dbCoordSys; + } + + /** + * Sets the value of the dbCoordSys property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDbCoordSys(String value) { + this.dbCoordSys = value; + } + + /** + * Gets the value of the dbAccessionId property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDbAccessionId() { + return dbAccessionId; + } + + /** + * Sets the value of the dbAccessionId property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDbAccessionId(String value) { + this.dbAccessionId = value; + } + + /** + * Gets the value of the dbEvidence property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDbEvidence() { + return dbEvidence; + } + + /** + * Sets the value of the dbEvidence property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDbEvidence(String value) { + this.dbEvidence = value; + } + + /** + * Gets the value of the dbVersion property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDbVersion() { + return dbVersion; + } + + /** + * Sets the value of the dbVersion property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDbVersion(String value) { + this.dbVersion = value; + } + + /** + * Gets the value of the start property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getStart() { + return start; + } + + /** + * Sets the value of the start property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setStart(String value) { + this.start = value; + } + + /** + * Gets the value of the end property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getEnd() { + return end; + } + + /** + * Sets the value of the end property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setEnd(String value) { + this.end = 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">
+                         *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
+                         *     </restriction>
+                         *   </complexContent>
+                         * </complexType>
+                         * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "content" + }) + public static class DbDetail { + + @XmlValue + protected String content; + @XmlAttribute(name = "dbSource") + protected String dbSource; + @XmlAttribute(name = "property", required = true) + protected String property; + + /** + * Gets the value of the content property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getContent() { + return content; + } + + /** + * Sets the value of the content property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setContent(String value) { + this.content = value; + } + + /** + * Gets the value of the dbSource property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDbSource() { + return dbSource; + } + + /** + * Sets the value of the dbSource property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDbSource(String value) { + this.dbSource = value; + } + + /** + * Gets the value of the property property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getProperty() { + return property; + } + + /** + * Sets the value of the property property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setProperty(String value) { + this.property = 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="residue" maxOccurs="unbounded">
+             *           <complexType>
+             *             <complexContent>
+             *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+             *                 <sequence>
+             *                   <element name="crossRefDb" maxOccurs="unbounded" minOccurs="0">
+             *                     <complexType>
+             *                       <complexContent>
+             *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+             *                           <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbRef"/>
+             *                           <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}resRef"/>
+             *                           <attribute name="dbChainId" type="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}chainId" />
+             *                         </restriction>
+             *                       </complexContent>
+             *                     </complexType>
+             *                   </element>
+             *                   <element name="residueDetail" maxOccurs="unbounded" minOccurs="0">
+             *                     <complexType>
+             *                       <complexContent>
+             *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+             *                           <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
+             *                         </restriction>
+             *                       </complexContent>
+             *                     </complexType>
+             *                   </element>
+             *                 </sequence>
+             *                 <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}resRef"/>
+             *                 <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}listdbRef"/>
+             *               </restriction>
+             *             </complexContent>
+             *           </complexType>
+             *         </element>
+             *       </sequence>
+             *     </restriction>
+             *   </complexContent>
+             * </complexType>
+             * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "residue" + }) + public static class ListResidue { + + @XmlElement(required = true) + protected List residue; + + /** + * Gets the value of the residue 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 residue property. + * + *

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

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

+ * Objects of the following type(s) are allowed in the list + * {@link Entry.Entity.Segment.ListResidue.Residue } + * + * + */ + public List getResidue() { + if (residue == null) { + residue = new ArrayList(); + } + return this.residue; + } + + + /** + *

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="crossRefDb" maxOccurs="unbounded" minOccurs="0">
+                 *           <complexType>
+                 *             <complexContent>
+                 *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+                 *                 <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbRef"/>
+                 *                 <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}resRef"/>
+                 *                 <attribute name="dbChainId" type="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}chainId" />
+                 *               </restriction>
+                 *             </complexContent>
+                 *           </complexType>
+                 *         </element>
+                 *         <element name="residueDetail" maxOccurs="unbounded" minOccurs="0">
+                 *           <complexType>
+                 *             <complexContent>
+                 *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+                 *                 <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
+                 *               </restriction>
+                 *             </complexContent>
+                 *           </complexType>
+                 *         </element>
+                 *       </sequence>
+                 *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}resRef"/>
+                 *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}listdbRef"/>
+                 *     </restriction>
+                 *   </complexContent>
+                 * </complexType>
+                 * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "crossRefDb", + "residueDetail" + }) + public static class Residue { + + protected List crossRefDb; + protected List residueDetail; + @XmlAttribute(name = "dbResNum", required = true) + protected String dbResNum; + @XmlAttribute(name = "dbResName", required = true) + protected String dbResName; + @XmlAttribute(name = "dbVersion") + protected String dbVersion; + @XmlAttribute(name = "dbSource", required = true) + protected String dbSource; + @XmlAttribute(name = "dbCoordSys", required = true) + protected String dbCoordSys; + + /** + * Gets the value of the crossRefDb 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 crossRefDb property. + * + *

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

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

+ * Objects of the following type(s) are allowed in the list + * {@link Entry.Entity.Segment.ListResidue.Residue.CrossRefDb } + * + * + */ + public List getCrossRefDb() { + if (crossRefDb == null) { + crossRefDb = new ArrayList(); + } + return this.crossRefDb; + } + + /** + * Gets the value of the residueDetail 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 residueDetail property. + * + *

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

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

+ * Objects of the following type(s) are allowed in the list + * {@link Entry.Entity.Segment.ListResidue.Residue.ResidueDetail } + * + * + */ + public List getResidueDetail() { + if (residueDetail == null) { + residueDetail = new ArrayList(); + } + return this.residueDetail; + } + + /** + * Gets the value of the dbResNum property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDbResNum() { + return dbResNum; + } + + /** + * Sets the value of the dbResNum property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDbResNum(String value) { + this.dbResNum = value; + } + + /** + * Gets the value of the dbResName property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDbResName() { + return dbResName; + } + + /** + * Sets the value of the dbResName property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDbResName(String value) { + this.dbResName = value; + } + + /** + * Gets the value of the dbVersion property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDbVersion() { + return dbVersion; + } + + /** + * Sets the value of the dbVersion property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDbVersion(String value) { + this.dbVersion = value; + } + + /** + * Gets the value of the dbSource property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDbSource() { + return dbSource; + } + + /** + * Sets the value of the dbSource property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDbSource(String value) { + this.dbSource = value; + } + + /** + * Gets the value of the dbCoordSys property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDbCoordSys() { + return dbCoordSys; + } + + /** + * Sets the value of the dbCoordSys property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDbCoordSys(String value) { + this.dbCoordSys = 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">
+                     *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbRef"/>
+                     *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}resRef"/>
+                     *       <attribute name="dbChainId" type="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}chainId" />
+                     *     </restriction>
+                     *   </complexContent>
+                     * </complexType>
+                     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class CrossRefDb { + + @XmlAttribute(name = "dbChainId") + protected String dbChainId; + @XmlAttribute(name = "dbSource", required = true) + protected String dbSource; + @XmlAttribute(name = "dbCoordSys", required = true) + protected String dbCoordSys; + @XmlAttribute(name = "dbAccessionId", required = true) + protected String dbAccessionId; + @XmlAttribute(name = "dbEvidence") + protected String dbEvidence; + @XmlAttribute(name = "dbVersion") + protected String dbVersion; + @XmlAttribute(name = "dbResNum", required = true) + protected String dbResNum; + @XmlAttribute(name = "dbResName", required = true) + protected String dbResName; + + /** + * Gets the value of the dbChainId property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDbChainId() { + return dbChainId; + } + + /** + * Sets the value of the dbChainId property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDbChainId(String value) { + this.dbChainId = value; + } + + /** + * Gets the value of the dbSource property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDbSource() { + return dbSource; + } + + /** + * Sets the value of the dbSource property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDbSource(String value) { + this.dbSource = value; + } + + /** + * Gets the value of the dbCoordSys property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDbCoordSys() { + return dbCoordSys; + } + + /** + * Sets the value of the dbCoordSys property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDbCoordSys(String value) { + this.dbCoordSys = value; + } + + /** + * Gets the value of the dbAccessionId property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDbAccessionId() { + return dbAccessionId; + } + + /** + * Sets the value of the dbAccessionId property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDbAccessionId(String value) { + this.dbAccessionId = value; + } + + /** + * Gets the value of the dbEvidence property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDbEvidence() { + return dbEvidence; + } + + /** + * Sets the value of the dbEvidence property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDbEvidence(String value) { + this.dbEvidence = value; + } + + /** + * Gets the value of the dbVersion property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDbVersion() { + return dbVersion; + } + + /** + * Sets the value of the dbVersion property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDbVersion(String value) { + this.dbVersion = value; + } + + /** + * Gets the value of the dbResNum property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDbResNum() { + return dbResNum; + } + + /** + * Sets the value of the dbResNum property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDbResNum(String value) { + this.dbResNum = value; + } + + /** + * Gets the value of the dbResName property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDbResName() { + return dbResName; + } + + /** + * Sets the value of the dbResName property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDbResName(String value) { + this.dbResName = 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">
+                     *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
+                     *     </restriction>
+                     *   </complexContent>
+                     * </complexType>
+                     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "content" + }) + public static class ResidueDetail { + + @XmlValue + protected String content; + @XmlAttribute(name = "dbSource") + protected String dbSource; + @XmlAttribute(name = "property", required = true) + protected String property; + + /** + * Gets the value of the content property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getContent() { + return content; + } + + /** + * Sets the value of the content property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setContent(String value) { + this.content = value; + } + + /** + * Gets the value of the dbSource property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDbSource() { + return dbSource; + } + + /** + * Sets the value of the dbSource property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDbSource(String value) { + this.dbSource = value; + } + + /** + * Gets the value of the property property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getProperty() { + return property; + } + + /** + * Sets the value of the property property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setProperty(String value) { + this.property = 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">
+             *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
+             *     </restriction>
+             *   </complexContent>
+             * </complexType>
+             * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "content" + }) + public static class SegmentDetail { + + @XmlValue + protected String content; + @XmlAttribute(name = "dbSource") + protected String dbSource; + @XmlAttribute(name = "property", required = true) + protected String property; + + /** + * Gets the value of the content property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getContent() { + return content; + } + + /** + * Sets the value of the content property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setContent(String value) { + this.content = value; + } + + /** + * Gets the value of the dbSource property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDbSource() { + return dbSource; + } + + /** + * Sets the value of the dbSource property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDbSource(String value) { + this.dbSource = value; + } + + /** + * Gets the value of the property property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getProperty() { + return property; + } + + /** + * Sets the value of the property property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setProperty(String value) { + this.property = 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">
+     *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
+     *     </restriction>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "content" + }) + public static class EntryDetail { + + @XmlValue + protected String content; + @XmlAttribute(name = "dbSource") + protected String dbSource; + @XmlAttribute(name = "property", required = true) + protected String property; + + /** + * Gets the value of the content property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getContent() { + return content; + } + + /** + * Sets the value of the content property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setContent(String value) { + this.content = value; + } + + /** + * Gets the value of the dbSource property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDbSource() { + return dbSource; + } + + /** + * Sets the value of the dbSource property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDbSource(String value) { + this.dbSource = value; + } + + /** + * Gets the value of the property property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getProperty() { + return property; + } + + /** + * Sets the value of the property property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setProperty(String value) { + this.property = 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 maxOccurs="unbounded">
+     *         <element name="db">
+     *           <complexType>
+     *             <complexContent>
+     *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                 <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}listdbRef"/>
+     *               </restriction>
+     *             </complexContent>
+     *           </complexType>
+     *         </element>
+     *       </sequence>
+     *     </restriction>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "db" + }) + public static class ListDB { + + @XmlElement(required = true) + protected List db; + + /** + * Gets the value of the db 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 db property. + * + *

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

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

+ * Objects of the following type(s) are allowed in the list + * {@link Entry.ListDB.Db } + * + * + */ + public List getDb() { + if (db == null) { + db = new ArrayList(); + } + return this.db; + } + + + /** + *

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">
+         *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}listdbRef"/>
+         *     </restriction>
+         *   </complexContent>
+         * </complexType>
+         * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class Db { + + @XmlAttribute(name = "dbVersion") + protected String dbVersion; + @XmlAttribute(name = "dbSource", required = true) + protected String dbSource; + @XmlAttribute(name = "dbCoordSys", required = true) + protected String dbCoordSys; + + /** + * Gets the value of the dbVersion property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDbVersion() { + return dbVersion; + } + + /** + * Sets the value of the dbVersion property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDbVersion(String value) { + this.dbVersion = value; + } + + /** + * Gets the value of the dbSource property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDbSource() { + return dbSource; + } + + /** + * Sets the value of the dbSource property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDbSource(String value) { + this.dbSource = value; + } + + /** + * Gets the value of the dbCoordSys property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDbCoordSys() { + return dbCoordSys; + } + + /** + * Sets the value of the dbCoordSys property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDbCoordSys(String value) { + this.dbCoordSys = value; + } + + } + + } + +} diff --git a/src/jalview/xml/binding/sifts/ObjectFactory.java b/src/jalview/xml/binding/sifts/ObjectFactory.java new file mode 100644 index 0000000..7b74e13 --- /dev/null +++ b/src/jalview/xml/binding/sifts/ObjectFactory.java @@ -0,0 +1,319 @@ +// +// 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: 2015.10.09 at 03:18:33 PM BST +// + + +package jalview.xml.binding.sifts; + +import javax.xml.bind.annotation.XmlRegistry; + + +/** + * This object contains factory methods for each + * Java content interface and Java element interface + * generated in the jalview.xml.binding.sifts 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 { + + + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: jalview.xml.binding.sifts + * + */ + public ObjectFactory() { + } + + /** + * Create an instance of {@link Entry } + * + */ + public Entry createEntry() { + return new Entry(); + } + + /** + * Create an instance of {@link Alignment } + * + */ + public Alignment createAlignment() { + return new Alignment(); + } + + /** + * Create an instance of {@link Alignment.Geo3D } + * + */ + public Alignment.Geo3D createAlignmentGeo3D() { + return new Alignment.Geo3D(); + } + + /** + * Create an instance of {@link Alignment.Geo3D.Matrix } + * + */ + public Alignment.Geo3D.Matrix createAlignmentGeo3DMatrix() { + return new Alignment.Geo3D.Matrix(); + } + + /** + * Create an instance of {@link Alignment.Block } + * + */ + public Alignment.Block createAlignmentBlock() { + return new Alignment.Block(); + } + + /** + * Create an instance of {@link Alignment.AlignObject } + * + */ + public Alignment.AlignObject createAlignmentAlignObject() { + return new Alignment.AlignObject(); + } + + /** + * Create an instance of {@link Entry.Entity } + * + */ + public Entry.Entity createEntryEntity() { + return new Entry.Entity(); + } + + /** + * Create an instance of {@link Entry.Entity.Segment } + * + */ + public Entry.Entity.Segment createEntryEntitySegment() { + return new Entry.Entity.Segment(); + } + + /** + * Create an instance of {@link Entry.Entity.Segment.ListMapRegion } + * + */ + public Entry.Entity.Segment.ListMapRegion createEntryEntitySegmentListMapRegion() { + return new Entry.Entity.Segment.ListMapRegion(); + } + + /** + * Create an instance of {@link Entry.Entity.Segment.ListMapRegion.MapRegion } + * + */ + public Entry.Entity.Segment.ListMapRegion.MapRegion createEntryEntitySegmentListMapRegionMapRegion() { + return new Entry.Entity.Segment.ListMapRegion.MapRegion(); + } + + /** + * Create an instance of {@link Entry.Entity.Segment.ListMapRegion.MapRegion.Db } + * + */ + public Entry.Entity.Segment.ListMapRegion.MapRegion.Db createEntryEntitySegmentListMapRegionMapRegionDb() { + return new Entry.Entity.Segment.ListMapRegion.MapRegion.Db(); + } + + /** + * Create an instance of {@link Entry.Entity.Segment.ListResidue } + * + */ + public Entry.Entity.Segment.ListResidue createEntryEntitySegmentListResidue() { + return new Entry.Entity.Segment.ListResidue(); + } + + /** + * Create an instance of {@link Entry.Entity.Segment.ListResidue.Residue } + * + */ + public Entry.Entity.Segment.ListResidue.Residue createEntryEntitySegmentListResidueResidue() { + return new Entry.Entity.Segment.ListResidue.Residue(); + } + + /** + * Create an instance of {@link Entry.ListDB } + * + */ + public Entry.ListDB createEntryListDB() { + return new Entry.ListDB(); + } + + /** + * Create an instance of {@link Entry.EntryDetail } + * + */ + public Entry.EntryDetail createEntryEntryDetail() { + return new Entry.EntryDetail(); + } + + /** + * Create an instance of {@link Alignment.Score } + * + */ + public Alignment.Score createAlignmentScore() { + return new Alignment.Score(); + } + + /** + * Create an instance of {@link Alignment.Geo3D.Vector } + * + */ + public Alignment.Geo3D.Vector createAlignmentGeo3DVector() { + return new Alignment.Geo3D.Vector(); + } + + /** + * Create an instance of {@link Alignment.Geo3D.Matrix.Max11 } + * + */ + public Alignment.Geo3D.Matrix.Max11 createAlignmentGeo3DMatrixMax11() { + return new Alignment.Geo3D.Matrix.Max11(); + } + + /** + * Create an instance of {@link Alignment.Geo3D.Matrix.Max12 } + * + */ + public Alignment.Geo3D.Matrix.Max12 createAlignmentGeo3DMatrixMax12() { + return new Alignment.Geo3D.Matrix.Max12(); + } + + /** + * Create an instance of {@link Alignment.Geo3D.Matrix.Max13 } + * + */ + public Alignment.Geo3D.Matrix.Max13 createAlignmentGeo3DMatrixMax13() { + return new Alignment.Geo3D.Matrix.Max13(); + } + + /** + * Create an instance of {@link Alignment.Geo3D.Matrix.Max21 } + * + */ + public Alignment.Geo3D.Matrix.Max21 createAlignmentGeo3DMatrixMax21() { + return new Alignment.Geo3D.Matrix.Max21(); + } + + /** + * Create an instance of {@link Alignment.Geo3D.Matrix.Max22 } + * + */ + public Alignment.Geo3D.Matrix.Max22 createAlignmentGeo3DMatrixMax22() { + return new Alignment.Geo3D.Matrix.Max22(); + } + + /** + * Create an instance of {@link Alignment.Geo3D.Matrix.Max23 } + * + */ + public Alignment.Geo3D.Matrix.Max23 createAlignmentGeo3DMatrixMax23() { + return new Alignment.Geo3D.Matrix.Max23(); + } + + /** + * Create an instance of {@link Alignment.Geo3D.Matrix.Max31 } + * + */ + public Alignment.Geo3D.Matrix.Max31 createAlignmentGeo3DMatrixMax31() { + return new Alignment.Geo3D.Matrix.Max31(); + } + + /** + * Create an instance of {@link Alignment.Geo3D.Matrix.Max32 } + * + */ + public Alignment.Geo3D.Matrix.Max32 createAlignmentGeo3DMatrixMax32() { + return new Alignment.Geo3D.Matrix.Max32(); + } + + /** + * Create an instance of {@link Alignment.Geo3D.Matrix.Max33 } + * + */ + public Alignment.Geo3D.Matrix.Max33 createAlignmentGeo3DMatrixMax33() { + return new Alignment.Geo3D.Matrix.Max33(); + } + + /** + * Create an instance of {@link Alignment.Block.Segment } + * + */ + public Alignment.Block.Segment createAlignmentBlockSegment() { + return new Alignment.Block.Segment(); + } + + /** + * Create an instance of {@link Alignment.AlignObject.AlignObjectDetail } + * + */ + public Alignment.AlignObject.AlignObjectDetail createAlignmentAlignObjectAlignObjectDetail() { + return new Alignment.AlignObject.AlignObjectDetail(); + } + + /** + * Create an instance of {@link Alignment.AlignObject.Sequence } + * + */ + public Alignment.AlignObject.Sequence createAlignmentAlignObjectSequence() { + return new Alignment.AlignObject.Sequence(); + } + + /** + * Create an instance of {@link Entry.Entity.EntityDetail } + * + */ + public Entry.Entity.EntityDetail createEntryEntityEntityDetail() { + return new Entry.Entity.EntityDetail(); + } + + /** + * Create an instance of {@link Entry.Entity.Segment.SegmentDetail } + * + */ + public Entry.Entity.Segment.SegmentDetail createEntryEntitySegmentSegmentDetail() { + return new Entry.Entity.Segment.SegmentDetail(); + } + + /** + * Create an instance of {@link Entry.Entity.Segment.ListMapRegion.MapRegion.Db.DbDetail } + * + */ + public Entry.Entity.Segment.ListMapRegion.MapRegion.Db.DbDetail createEntryEntitySegmentListMapRegionMapRegionDbDbDetail() { + return new Entry.Entity.Segment.ListMapRegion.MapRegion.Db.DbDetail(); + } + + /** + * Create an instance of {@link Entry.Entity.Segment.ListResidue.Residue.CrossRefDb } + * + */ + public Entry.Entity.Segment.ListResidue.Residue.CrossRefDb createEntryEntitySegmentListResidueResidueCrossRefDb() { + return new Entry.Entity.Segment.ListResidue.Residue.CrossRefDb(); + } + + /** + * Create an instance of {@link Entry.Entity.Segment.ListResidue.Residue.ResidueDetail } + * + */ + public Entry.Entity.Segment.ListResidue.Residue.ResidueDetail createEntryEntitySegmentListResidueResidueResidueDetail() { + return new Entry.Entity.Segment.ListResidue.Residue.ResidueDetail(); + } + + /** + * Create an instance of {@link Entry.ListDB.Db } + * + */ + public Entry.ListDB.Db createEntryListDBDb() { + return new Entry.ListDB.Db(); + } + +} diff --git a/src/jalview/xml/binding/sifts/package-info.java b/src/jalview/xml/binding/sifts/package-info.java new file mode 100644 index 0000000..aac24fe --- /dev/null +++ b/src/jalview/xml/binding/sifts/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: 2015.10.09 at 03:18:33 PM BST +// + +@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.ebi.ac.uk/pdbe/docs/sifts/eFamily.xsd", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) +package jalview.xml.binding.sifts; diff --git a/test/jalview/analysis/AlignmentUtilsTests.java b/test/jalview/analysis/AlignmentUtilsTests.java index 84b9817..74e4940 100644 --- a/test/jalview/analysis/AlignmentUtilsTests.java +++ b/test/jalview/analysis/AlignmentUtilsTests.java @@ -988,7 +988,7 @@ public class AlignmentUtilsTests assertTrue(AlignmentUtils.haveCrossRef(seq2, seq1)); // now the other way round - seq1.setDBRef(null); + seq1.setDBRefs(null); seq2.addDBRef(new DBRefEntry("EMBL", "1", "A12345")); assertTrue(AlignmentUtils.haveCrossRef(seq1, seq2)); assertTrue(AlignmentUtils.haveCrossRef(seq2, seq1)); @@ -1124,8 +1124,8 @@ public class AlignmentUtilsTests assertEquals("GGGTTT", exon.getSequenceAsString()); assertEquals("dna1|A12345", exon.getName()); - assertEquals(1, exon.getDBRef().length); - DBRefEntry cdsRef = exon.getDBRef()[0]; + assertEquals(1, exon.getDBRefs().length); + DBRefEntry cdsRef = exon.getDBRefs()[0]; assertEquals("EMBLCDS", cdsRef.getSource()); assertEquals("2", cdsRef.getVersion()); assertEquals("A12345", cdsRef.getAccessionId()); @@ -1195,8 +1195,8 @@ public class AlignmentUtilsTests SequenceI exon = exons.get(0); assertEquals("GGGTTT", exon.getSequenceAsString()); assertEquals("dna1|A12345", exon.getName()); - assertEquals(1, exon.getDBRef().length); - DBRefEntry cdsRef = exon.getDBRef()[0]; + assertEquals(1, exon.getDBRefs().length); + DBRefEntry cdsRef = exon.getDBRefs()[0]; assertEquals("EMBLCDS", cdsRef.getSource()); assertEquals("2", cdsRef.getVersion()); assertEquals("A12345", cdsRef.getAccessionId()); @@ -1204,8 +1204,8 @@ public class AlignmentUtilsTests exon = exons.get(1); assertEquals("aaaccc", exon.getSequenceAsString()); assertEquals("dna1|A12346", exon.getName()); - assertEquals(1, exon.getDBRef().length); - cdsRef = exon.getDBRef()[0]; + assertEquals(1, exon.getDBRefs().length); + cdsRef = exon.getDBRefs()[0]; assertEquals("EMBLCDS", cdsRef.getSource()); assertEquals("3", cdsRef.getVersion()); assertEquals("A12346", cdsRef.getAccessionId()); @@ -1213,8 +1213,8 @@ public class AlignmentUtilsTests exon = exons.get(2); assertEquals("aaaTTT", exon.getSequenceAsString()); assertEquals("dna1|A12347", exon.getName()); - assertEquals(1, exon.getDBRef().length); - cdsRef = exon.getDBRef()[0]; + assertEquals(1, exon.getDBRefs().length); + cdsRef = exon.getDBRefs()[0]; assertEquals("EMBLCDS", cdsRef.getSource()); assertEquals("4", cdsRef.getVersion()); assertEquals("A12347", cdsRef.getAccessionId()); diff --git a/test/jalview/io/1a70.xml.gz b/test/jalview/io/1a70.xml.gz new file mode 100644 index 0000000..3f0b68a Binary files /dev/null and b/test/jalview/io/1a70.xml.gz differ diff --git a/test/jalview/util/DBRefUtilsTest.java b/test/jalview/util/DBRefUtilsTest.java index 4a55a0d..7a6dc35 100644 --- a/test/jalview/util/DBRefUtilsTest.java +++ b/test/jalview/util/DBRefUtilsTest.java @@ -137,7 +137,7 @@ public class DBRefUtilsTest { SequenceI seq = new Sequence("Seq1", "ABCD"); DBRefEntry ref = DBRefUtils.parseToDbRef(seq, "EMBL", "1.2", "a7890"); - DBRefEntry[] refs = seq.getDBRef(); + DBRefEntry[] refs = seq.getDBRefs(); assertEquals(1, refs.length); assertSame(ref, refs[0]); assertEquals("EMBL", ref.getSource()); @@ -155,7 +155,7 @@ public class DBRefUtilsTest SequenceI seq = new Sequence("Seq1", "ABCD"); DBRefEntry ref = DBRefUtils.parseToDbRef(seq, "pdb", "1.2", "1WRI A; 7-80;"); - DBRefEntry[] refs = seq.getDBRef(); + DBRefEntry[] refs = seq.getDBRefs(); assertEquals(1, refs.length); assertSame(ref, refs[0]); assertEquals("PDB", ref.getSource()); diff --git a/test/jalview/ws/dbsources/UniprotTest.java b/test/jalview/ws/dbsources/UniprotTest.java index a92b5c4..7e387bd 100644 --- a/test/jalview/ws/dbsources/UniprotTest.java +++ b/test/jalview/ws/dbsources/UniprotTest.java @@ -135,9 +135,13 @@ public class UniprotTest Vector entries = u.getUniprotEntries(reader); UniprotEntry entry = entries.get(0); - // source + accession ids + names + protein names - String expectedName = ">UniProt/Swiss-Prot|A9CKP4|A9CKP5|A9CKP4_AGRT5|A9CKP4_AGRT6 Mitogen-activated protein kinase 13 Henry"; - assertEquals(expectedName, Uniprot.constructSequenceFastaHeader(entry) - .toString()); + // source + accession ids + names + String expectedName = "UniProt/Swiss-Prot|A9CKP4|A9CKP5|A9CKP4_AGRT5|A9CKP4_AGRT6"; + // protein names + String expectedDescription = "Mitogen-activated protein kinase 13 Henry "; + + assertEquals(expectedName, Uniprot.getUniprotEntryId(entry)); + assertEquals(expectedDescription, + Uniprot.getUniprotEntryDescription(entry)); } } diff --git a/test/jalview/ws/seqfetcher/DbRefFetcherTest.java b/test/jalview/ws/seqfetcher/DbRefFetcherTest.java index ddd8b33..902498b 100644 --- a/test/jalview/ws/seqfetcher/DbRefFetcherTest.java +++ b/test/jalview/ws/seqfetcher/DbRefFetcherTest.java @@ -166,7 +166,7 @@ public class DbRefFetcherTest FeatureProperties.isCodingFeature(embl.getDbSource(), sfs[0].getType())); assertEquals(embl.getDbSource(), sfs[0].getFeatureGroup()); - DBRefEntry[] dr = DBRefUtils.selectRefs(seq.getDBRef(), + DBRefEntry[] dr = DBRefUtils.selectRefs(seq.getDBRefs(), DBRefSource.PROTEINSEQ); assertNotNull(dr); assertEquals("Expected a single Uniprot cross reference", 1, dr.length); diff --git a/test/jalview/ws/sifts/SiftsClientTest.java b/test/jalview/ws/sifts/SiftsClientTest.java new file mode 100644 index 0000000..4c94f66 --- /dev/null +++ b/test/jalview/ws/sifts/SiftsClientTest.java @@ -0,0 +1,208 @@ +/* + * 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.ws.sifts; + +import jalview.datamodel.DBRefEntry; +import jalview.datamodel.Sequence; +import jalview.datamodel.SequenceI; + +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.PrintStream; + +import org.testng.Assert; +import org.testng.FileAssert; +import org.testng.annotations.AfterTest; +import org.testng.annotations.BeforeTest; +import org.testng.annotations.Test; + +import MCview.PDBfile; + +public class SiftsClientTest +{ + private final ByteArrayOutputStream outContent = new ByteArrayOutputStream(); + + private String testPDBId = "1a70"; + + private SiftsClient siftsClient = null; + + SequenceI testSeq = new Sequence( + "P00221", + "MAAT..TTTMMG..MATTFVPKPQAPPMMAALPSNTGR..SLFGLKT.GSR..GGRMTMA" + + "AYKVTLVTPTGNVEFQCPDDVYILDAAEEEGIDLPYSCRAGSCSSCAGKLKTGSLNQDD" + + "QSFLDDDQIDEGWVLTCAAYPVSDVTIETHKEEELTA.", 1, 147); + + int u = SiftsClient.UNASSIGNED; + + int[][] expectedMapping = { { u, u }, { u, u }, { u, u }, { u, u }, + { u, u }, { u, u }, { u, u }, { u, u }, { u, u }, { u, u }, { u, u }, + { u, u }, { u, u }, { u, u }, { u, u }, { u, u }, { u, u }, { u, u }, + { u, u }, { u, u }, { u, u }, { u, u }, { u, u }, { u, u }, { u, u }, + { u, u }, { u, u }, { u, u }, { u, u }, { u, u }, { u, u }, { u, u }, + { u, u }, { u, u }, { u, u }, { u, u }, { u, u }, { u, u }, { u, u }, + { u, u }, { u, u }, { u, u }, { u, u }, { u, u }, { u, u }, { u, u }, + { u, u }, { u, u }, { u, u }, { u, u }, { u, u }, { 1, u }, { 2, u }, + { 3, u }, { 4, u }, { 5, u }, { 6, u }, { 7, u }, { 8, u }, { 9, u }, + { 10, u }, { 11, u }, { 12, u }, { 13, u }, { 14, u }, { 15, u }, + { 16, u }, { 17, u }, { 18, u }, { 19, u }, { 20, u }, { 21, u }, + { 22, u }, { 23, u }, { 24, u }, { 25, u }, { 26, u }, { 27, u }, + { 28, u }, { 29, u }, { 30, u }, { 31, u }, { 32, u }, { 33, u }, + { 34, u }, { 35, u }, { 36, u }, { 37, u }, { 38, u }, { 39, u }, + { 40, u }, { 41, u }, { 42, u }, { 43, u }, { 44, u }, { 45, u }, + { 46, u }, { 47, u }, { 48, u }, { 49, u }, { 50, u }, { 51, u }, + { 52, u }, { 53, u }, { 54, u }, { 55, u }, { 56, u }, { 57, u }, + { 58, u }, { 59, u }, { 60, u }, { 61, u }, { 62, u }, { 63, u }, + { 64, u }, { 65, u }, { 66, u }, { 67, u }, { 68, u }, { 69, u }, + { 70, u }, { 71, u }, { 72, u }, { 73, u }, { 74, u }, { 75, u }, + { 76, u }, { 77, u }, { 78, u }, { 79, u }, { 80, u }, { 81, u }, + { 82, u }, { 83, u }, { 84, u }, { 85, u }, { 86, u }, { 87, u }, + { 88, u }, { 89, u }, { 90, u }, { 91, u }, { 92, u }, { 93, u }, + { 94, u }, { 95, u }, { 96, u }, { 97, u } }; + + @BeforeTest(alwaysRun = true) + public void setUpSiftsClient() throws SiftsException + { + // SIFTs entries are updated weekly - so use saved SIFTs file to enforce + // test reproducibility + File testSiftsFile = new File("test/jalview/io/" + testPDBId + + ".xml.gz"); + PDBfile pdbFile = new PDBfile(false, false, false); + siftsClient = new SiftsClient(pdbFile, testSiftsFile); + } + + @AfterTest(alwaysRun = true) + public void cleanUpSiftsClient() + { + siftsClient = null; + } + + @BeforeTest(alwaysRun = true) + public void setUpStreams() + { + System.setOut(new PrintStream(outContent)); + } + + @AfterTest(alwaysRun = true) + public void cleanUpStreams() + { + System.setOut(null); + } + + @Test(groups = { "Functional" }) + public void getSIFTsFileTest() + { + Assert.assertTrue(SiftsClient.deleteSiftsFileByPDBId(testPDBId)); + SiftsClient.getSiftsFile(testPDBId); + Assert.assertFalse(outContent.toString().contains( + ">>> SIFTS File already downloaded for " + testPDBId)); + + // test for SIFTs file caching + SiftsClient.getSiftsFile(testPDBId); + Assert.assertTrue(outContent.toString().contains( + ">>> SIFTS File already downloaded for " + testPDBId)); + } + + @Test(groups = { "Functional" }) + public void downloadSiftsFileTest() + { + // Assert that file isn't yet downloaded - if already downloaded, assert it + // is deleted + Assert.assertTrue(SiftsClient.deleteSiftsFileByPDBId(testPDBId)); + File siftsFile = SiftsClient.downloadSiftsFile(testPDBId); + FileAssert.assertFile(siftsFile); + SiftsClient.downloadSiftsFile(testPDBId); + } + + @Test(groups = { "Functional" }) + public void getAllMappingAccessionTest() + { + Assert.assertNotNull(siftsClient); + Assert.assertNotNull(siftsClient.getAllMappingAccession()); + Assert.assertTrue(siftsClient.getAllMappingAccession().size() > 1); + } + + @Test(groups = { "Functional" }) + public void getGreedyMappingTest() + { + Assert.assertNotNull(siftsClient); + Assert.assertNotNull(testSeq); + Assert.assertNotNull(expectedMapping); + + // TODO delete when auto-fetching of DBRefEntry is implemented + DBRefEntry dbRef = new DBRefEntry("uniprot", "", "P00221"); + dbRef.setStartRes(1); + dbRef.setEndRes(147); + testSeq.addDBRef(dbRef); + // testSeq.setSourceDBRef(dbRef); + + try + { + int[][] actualMapping = siftsClient.getGreedyMapping("A", testSeq, + null); + Assert.assertEquals(actualMapping, expectedMapping); + Assert.assertEquals(testSeq.getStart(), 1); + Assert.assertEquals(testSeq.getEnd(), 147); + } catch (Exception e) + { + e.printStackTrace(); + Assert.fail("Exception thrown while generating mapping..."); + } + } + + @Test(groups = { "Functional" }) + private void getAtomIndexTest() + { + // siftsClient.getAtomIndex(1, null); + // Assert.assertTrue(true); + } + + @Test( + groups = { "Functional" }, + expectedExceptions = IllegalArgumentException.class) + private void getAtomIndexNullTest() + { + siftsClient.getAtomIndex(1, null); + } + + @Test(groups = { "Functional" }) + private void padWithGapsTest() + { + + } + + @Test(groups = { "Functional" }) + private void populateAtomPositionsTest() + { + + } + + @Test(groups = { "Functional" }) + public void getValidSourceDBRefTest() + { + + } + + @Test(groups = { "Functional" }) + public void isValidDBRefEntryTest() + { + + } +}