- Hashtable sqinfo = new Hashtable();
- sqinfo.put("Name", seq.getName());
- sqinfo.put("Start", Integer.valueOf(seq.getStart()));
- sqinfo.put("End", Integer.valueOf(seq.getEnd()));
- if (seq.getDescription() != null)
- {
- sqinfo.put("Description", seq.getDescription());
- }
-
- Vector<SequenceFeature> sfeat = new Vector<>();
- List<SequenceFeature> sfs = seq.getFeatures().getAllFeatures();
- sfeat.addAll(sfs);
-
- if (seq.getDatasetSequence() == null)
- {
- sqinfo.put("SeqFeatures", sfeat);
- sqinfo.put("PdbId",
- (seq.getAllPDBEntries() != null) ? seq.getAllPDBEntries()
- : new Vector<PDBEntry>());
- }
- else
+ SequenceInfo sqinfo = new SequenceInfo(seq.getName(), seq.getStart(), seq.getEnd());
+ sqinfo.description = Optional.ofNullable(seq.getDescription());
+ sqinfo.dataset = Optional.ofNullable(seq.getDatasetSequence());
+ if (!sqinfo.dataset.isPresent())