10 |
10 |
package eu.etaxonomy.taxeditor.molecular.io;
|
11 |
11 |
|
12 |
12 |
|
|
13 |
import info.bioinfweb.commons.bio.CharacterStateSetType;
|
13 |
14 |
import info.bioinfweb.commons.text.StringUtils;
|
14 |
15 |
import info.bioinfweb.jphyloio.ReadWriteConstants;
|
15 |
16 |
import info.bioinfweb.jphyloio.dataadapters.JPhyloIOEventReceiver;
|
16 |
17 |
import info.bioinfweb.jphyloio.dataadapters.MatrixDataAdapter;
|
|
18 |
import info.bioinfweb.jphyloio.dataadapters.ObjectListDataAdapter;
|
17 |
19 |
import info.bioinfweb.jphyloio.dataadapters.implementations.NoSetsMatrixDataAdapter;
|
|
20 |
import info.bioinfweb.jphyloio.dataadapters.implementations.readtowriteadapter.StoreObjectListDataAdapter;
|
18 |
21 |
import info.bioinfweb.jphyloio.events.LinkedLabeledIDEvent;
|
19 |
22 |
import info.bioinfweb.jphyloio.events.SequenceTokensEvent;
|
|
23 |
import info.bioinfweb.jphyloio.events.TokenSetDefinitionEvent;
|
20 |
24 |
import info.bioinfweb.jphyloio.events.type.EventContentType;
|
21 |
25 |
|
22 |
26 |
import java.io.IOException;
|
... | ... | |
40 |
44 |
|
41 |
45 |
private Sequence sequence;
|
42 |
46 |
private String consensusSequenceLabel;
|
|
47 |
private ObjectListDataAdapter<TokenSetDefinitionEvent> tokenSetList;
|
43 |
48 |
//TODO Also allow specifying single read labels?
|
44 |
49 |
|
45 |
50 |
|
... | ... | |
53 |
58 |
super();
|
54 |
59 |
this.sequence = sequence;
|
55 |
60 |
this.consensusSequenceLabel = consensusSequenceLabel;
|
|
61 |
tokenSetList = createTokenSetList();
|
|
62 |
}
|
|
63 |
|
|
64 |
|
|
65 |
private ObjectListDataAdapter<TokenSetDefinitionEvent> createTokenSetList() {
|
|
66 |
StoreObjectListDataAdapter<TokenSetDefinitionEvent> result = new StoreObjectListDataAdapter<TokenSetDefinitionEvent>();
|
|
67 |
result.setObjectStartEvent(new TokenSetDefinitionEvent(CharacterStateSetType.DNA,
|
|
68 |
ReadWriteConstants.DEFAULT_TOKEN_SET_ID_PREFIX, null));
|
|
69 |
return result;
|
56 |
70 |
}
|
57 |
71 |
|
58 |
72 |
|
... | ... | |
158 |
172 |
throw new IllegalArgumentException("No sequence with the ID \"" + sequenceID + "\" could be found.");
|
159 |
173 |
}
|
160 |
174 |
}
|
|
175 |
|
|
176 |
|
|
177 |
/* (non-Javadoc)
|
|
178 |
* @see info.bioinfweb.jphyloio.dataadapters.implementations.NoSetsMatrixDataAdapter#getTokenSets()
|
|
179 |
*/
|
|
180 |
@Override
|
|
181 |
public ObjectListDataAdapter<TokenSetDefinitionEvent> getTokenSets() {
|
|
182 |
return tokenSetList;
|
|
183 |
}
|
161 |
184 |
}
|
Debug outputs removed.
Token set added to CDMSequenceMatrixAdapter.