Minor changes in implementation of AlignmentEditor.
[taxeditor.git] / eu.etaxonomy.taxeditor.editor / src / main / java / eu / etaxonomy / taxeditor / editor / molecular / CDMAlignmentObjectPlaceholder.java
1 package eu.etaxonomy.taxeditor.editor.molecular;
2
3
4 import info.bioinfweb.libralign.pherogram.model.ShiftChange;
5
6 import java.util.ArrayList;
7 import java.util.List;
8 import java.util.Map;
9 import java.util.TreeMap;
10
11 import org.biojava3.core.sequence.compound.NucleotideCompound;
12 import org.biojava3.core.sequence.template.Sequence;
13
14
15
16 /**
17 * This class is used as a replacement for a class representing the CMD objects storing an contig alignment during early
18 * development phase.
19 *
20 * @author Ben Stöver
21 * @date 06.08.2014
22 */
23 public class CDMAlignmentObjectPlaceholder {
24 /**
25 * Represents information in the contig alignment describing a single read sequence and the relation to its associated
26 * pherogram.
27 *
28 * @author Ben Stöver
29 * @date 06.08.2014
30 */
31 public static class Read {
32 private long pherogramObjectID = Long.MIN_VALUE; // The ID used in the CMD to identify the object storing the pherogram URL. (Dont' know if this is long, just as an example-)
33 private final Sequence<NucleotideCompound> editableSequence = null; // Could also be of type String, if helpful for CDM architecture.
34 private final List<ShiftChange> shiftChangeList = new ArrayList<ShiftChange>();
35 private String readName = "";
36 private boolean reverseComplemeted = false;
37
38
39 public Read(long pherogramObjectID) {
40 super();
41 this.pherogramObjectID = pherogramObjectID;
42 }
43
44
45 public long getPherogramObjectID() {
46 return pherogramObjectID;
47 }
48
49
50 public void setPherogramObjectID(long pherogramObjectID) {
51 this.pherogramObjectID = pherogramObjectID;
52 }
53
54
55 public List<ShiftChange> getShiftChangeList() {
56 return shiftChangeList;
57 }
58
59
60 public Sequence<NucleotideCompound> getEditableSequence() {
61 return editableSequence;
62 }
63
64
65 public String getReadName() {
66 return readName;
67 }
68
69
70 public void setReadName(String readName) {
71 this.readName = readName;
72 }
73
74
75 public boolean isReverseComplemeted() {
76 return reverseComplemeted;
77 }
78
79
80 public void setReverseComplemeted(boolean reverseComplemeted) {
81 this.reverseComplemeted = reverseComplemeted;
82 }
83 }
84
85
86 private final Map<String, Sequence<NucleotideCompound>> consensusSequences = new TreeMap<String, Sequence<NucleotideCompound>>(); // Could also be of type Map<String, String>, if helpful for CDM architecture.
87 private final Map<Long, Read> readSequences = new TreeMap<Long, Read>();
88
89
90 public Map<String, Sequence<NucleotideCompound>> getConsensusSequences() {
91 return consensusSequences;
92 }
93
94
95 public Map<Long, Read> getReadSequences() {
96 return readSequences;
97 }
98 }