JAL-1855 fail gracefully if XML has no <sequence> element
[jalview.git] / src / jalview / datamodel / xdb / embl / EmblEntry.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3  * Copyright (C) $$Year-Rel$$ The Jalview Authors
4  * 
5  * This file is part of Jalview.
6  * 
7  * Jalview is free software: you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License 
9  * as published by the Free Software Foundation, either version 3
10  * of the License, or (at your option) any later version.
11  *  
12  * Jalview is distributed in the hope that it will be useful, but 
13  * WITHOUT ANY WARRANTY; without even the implied warranty 
14  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
15  * PURPOSE.  See the GNU General Public License for more details.
16  * 
17  * You should have received a copy of the GNU General Public License
18  * along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
19  * The Jalview Authors are detailed in the 'AUTHORS' file.
20  */
21 package jalview.datamodel.xdb.embl;
22
23 import jalview.analysis.SequenceIdMatcher;
24 import jalview.bin.Cache;
25 import jalview.datamodel.DBRefEntry;
26 import jalview.datamodel.DBRefSource;
27 import jalview.datamodel.FeatureProperties;
28 import jalview.datamodel.Mapping;
29 import jalview.datamodel.Sequence;
30 import jalview.datamodel.SequenceFeature;
31 import jalview.datamodel.SequenceI;
32 import jalview.util.DBRefUtils;
33 import jalview.util.DnaUtils;
34 import jalview.util.MapList;
35 import jalview.util.MappingUtils;
36 import jalview.util.StringUtils;
37
38 import java.text.ParseException;
39 import java.util.Arrays;
40 import java.util.Hashtable;
41 import java.util.List;
42 import java.util.Map;
43 import java.util.Map.Entry;
44 import java.util.Vector;
45 import java.util.regex.Pattern;
46
47 /**
48  * Data model for one entry returned from an EMBL query, as marshalled by a
49  * Castor binding file
50  * 
51  * For example:
52  * http://www.ebi.ac.uk/ena/data/view/J03321&display=xml
53  * 
54  * @see embl_mapping.xml
55  */
56 public class EmblEntry
57 {
58   private static final Pattern SPACE_PATTERN = Pattern.compile(" ");
59
60   String accession;
61
62   String entryVersion;
63
64   String sequenceVersion;
65
66   String dataClass;
67
68   String moleculeType;
69
70   String topology;
71
72   String sequenceLength;
73
74   String taxonomicDivision;
75
76   String description;
77
78   String firstPublicDate;
79
80   String firstPublicRelease;
81
82   String lastUpdatedDate;
83
84   String lastUpdatedRelease;
85
86   Vector<String> keywords;
87
88   Vector<DBRefEntry> dbRefs;
89
90   Vector<EmblFeature> features;
91
92   EmblSequence sequence;
93
94   /**
95    * @return the accession
96    */
97   public String getAccession()
98   {
99     return accession;
100   }
101
102   /**
103    * @param accession
104    *          the accession to set
105    */
106   public void setAccession(String accession)
107   {
108     this.accession = accession;
109   }
110
111   /**
112    * @return the dbRefs
113    */
114   public Vector<DBRefEntry> getDbRefs()
115   {
116     return dbRefs;
117   }
118
119   /**
120    * @param dbRefs
121    *          the dbRefs to set
122    */
123   public void setDbRefs(Vector<DBRefEntry> dbRefs)
124   {
125     this.dbRefs = dbRefs;
126   }
127
128   /**
129    * @return the features
130    */
131   public Vector<EmblFeature> getFeatures()
132   {
133     return features;
134   }
135
136   /**
137    * @param features
138    *          the features to set
139    */
140   public void setFeatures(Vector<EmblFeature> features)
141   {
142     this.features = features;
143   }
144
145   /**
146    * @return the keywords
147    */
148   public Vector<String> getKeywords()
149   {
150     return keywords;
151   }
152
153   /**
154    * @param keywords
155    *          the keywords to set
156    */
157   public void setKeywords(Vector<String> keywords)
158   {
159     this.keywords = keywords;
160   }
161
162   /**
163    * @return the sequence
164    */
165   public EmblSequence getSequence()
166   {
167     return sequence;
168   }
169
170   /**
171    * @param sequence
172    *          the sequence to set
173    */
174   public void setSequence(EmblSequence sequence)
175   {
176     this.sequence = sequence;
177   }
178
179   /**
180    * Recover annotated sequences from EMBL file
181    * 
182    * @param sourceDb
183    * @param peptides
184    *          a list of protein products found so far (to add to)
185    * @return dna dataset sequence with DBRefs and features
186    */
187   public SequenceI getSequence(String sourceDb, List<SequenceI> peptides)
188   {
189     SequenceI dna = makeSequence(sourceDb);
190     if (dna == null)
191     {
192       return null;
193     }
194     dna.setDescription(description);
195     DBRefEntry retrievedref = new DBRefEntry(sourceDb,
196             getSequenceVersion(), accession);
197     dna.addDBRef(retrievedref);
198     dna.setSourceDBRef(retrievedref);
199     // add map to indicate the sequence is a valid coordinate frame for the
200     // dbref
201     retrievedref.setMap(new Mapping(null, new int[] { 1, dna.getLength() },
202             new int[] { 1, dna.getLength() }, 1, 1));
203
204
205     /*
206      * transform EMBL Database refs to canonical form
207      */
208     if (dbRefs != null)
209     {
210       for (DBRefEntry dbref : dbRefs)
211       {
212         dbref.setSource(DBRefUtils.getCanonicalName(dbref.getSource()));
213         dna.addDBRef(dbref);
214       }
215     }
216
217     SequenceIdMatcher matcher = new SequenceIdMatcher(peptides);
218     try
219     {
220       for (EmblFeature feature : features)
221       {
222         if (FeatureProperties.isCodingFeature(sourceDb, feature.getName()))
223         {
224           parseCodingFeature(feature, sourceDb, dna, peptides, matcher);
225         }
226       }
227     } catch (Exception e)
228     {
229       System.err.println("EMBL Record Features parsing error!");
230       System.err
231               .println("Please report the following to help@jalview.org :");
232       System.err.println("EMBL Record " + accession);
233       System.err.println("Resulted in exception: " + e.getMessage());
234       e.printStackTrace(System.err);
235     }
236
237     return dna;
238   }
239
240   /**
241    * @param sourceDb
242    * @return
243    */
244   SequenceI makeSequence(String sourceDb)
245   {
246     if (sequence == null)
247     {
248       System.err.println("No sequence was returned for ENA accession "
249               + accession);
250       return null;
251     }
252     SequenceI dna = new Sequence(sourceDb + "|" + accession,
253             sequence.getSequence());
254     return dna;
255   }
256
257   /**
258    * Extracts coding region and product from a CDS feature and properly decorate
259    * it with annotations.
260    * 
261    * @param feature
262    *          coding feature
263    * @param sourceDb
264    *          source database for the EMBLXML
265    * @param dna
266    *          parent dna sequence for this record
267    * @param peptides
268    *          list of protein product sequences for Embl entry
269    * @param matcher
270    *          helper to match xrefs in already retrieved sequences
271    */
272   void parseCodingFeature(EmblFeature feature, String sourceDb,
273           SequenceI dna, List<SequenceI> peptides, SequenceIdMatcher matcher)
274   {
275     boolean isEmblCdna = sourceDb.equals(DBRefSource.EMBLCDS);
276
277     int[] exons = getCdsRanges(feature);
278
279     String translation = null;
280     String proteinName = "";
281     String proteinId = null;
282     Map<String, String> vals = new Hashtable<String, String>();
283
284     /*
285      * codon_start 1/2/3 in EMBL corresponds to phase 0/1/2 in CDS
286      * (phase is required for CDS features in GFF3 format)
287      */
288     int codonStart = 1;
289
290     /*
291      * parse qualifiers, saving protein translation, protein id,
292      * codon start position, product (name), and 'other values'
293      */
294     if (feature.getQualifiers() != null)
295     {
296       for (Qualifier q : feature.getQualifiers())
297       {
298         String qname = q.getName();
299         if (qname.equals("translation"))
300         {
301           // remove all spaces (precompiled String.replaceAll(" ", ""))
302           translation = SPACE_PATTERN.matcher(q.getValues()[0]).replaceAll("");
303         }
304         else if (qname.equals("protein_id"))
305         {
306           proteinId = q.getValues()[0].trim();
307         }
308         else if (qname.equals("codon_start"))
309         {
310           try
311           {
312             codonStart = Integer.parseInt(q.getValues()[0].trim());
313           } catch (NumberFormatException e)
314           {
315             System.err.println("Invalid codon_start in XML for "
316                     + accession + ": " + e.getMessage());
317           }
318         }
319         else if (qname.equals("product"))
320         {
321           // sometimes name is returned e.g. for V00488
322           proteinName = q.getValues()[0].trim();
323         }
324         else
325         {
326           // throw anything else into the additional properties hash
327           String[] qvals = q.getValues();
328           if (qvals != null)
329           {
330             String commaSeparated = StringUtils.arrayToSeparatorList(qvals,
331                     ",");
332             vals.put(qname, commaSeparated);
333           }
334         }
335       }
336     }
337
338     DBRefEntry proteinToEmblProteinRef = null;
339     exons = MappingUtils.removeStartPositions(codonStart - 1, exons);
340
341     SequenceI product = null;
342     Mapping dnaToProteinMapping = null;
343     if (translation != null && proteinName != null && proteinId != null)
344     {
345       int translationLength = translation.length();
346
347       /*
348        * look for product in peptides list, if not found, add it
349        */
350       product = matcher.findIdMatch(proteinId);
351       if (product == null)
352       {
353         product = new Sequence(proteinId, translation, 1, translationLength);
354         product.setDescription(((proteinName.length() == 0) ? "Protein Product from "
355                 + sourceDb
356                 : proteinName));
357         peptides.add(product);
358         matcher.add(product);
359       }
360
361       // we have everything - create the mapping and perhaps the protein
362       // sequence
363       if (exons == null || exons.length == 0)
364       {
365         /*
366          * workaround until we handle dna location for CDS sequence
367          * e.g. location="X53828.1:60..1058" correctly
368          */
369         System.err
370                 .println("Implementation Notice: EMBLCDS records not properly supported yet - Making up the CDNA region of this sequence... may be incorrect ("
371                         + sourceDb + ":" + getAccession() + ")");
372         if (translationLength * 3 == (1 - codonStart + dna.getSequence().length))
373         {
374           System.err
375                   .println("Not allowing for additional stop codon at end of cDNA fragment... !");
376           // this might occur for CDS sequences where no features are marked
377           exons = new int[] { dna.getStart() + (codonStart - 1),
378               dna.getEnd() };
379           dnaToProteinMapping = new Mapping(product, exons, new int[] { 1,
380               translationLength }, 3, 1);
381         }
382         if ((translationLength + 1) * 3 == (1 - codonStart + dna
383                 .getSequence().length))
384         {
385           System.err
386                   .println("Allowing for additional stop codon at end of cDNA fragment... will probably cause an error in VAMSAs!");
387           exons = new int[] { dna.getStart() + (codonStart - 1),
388               dna.getEnd() - 3 };
389           dnaToProteinMapping = new Mapping(product, exons, new int[] { 1,
390               translationLength }, 3, 1);
391         }
392       }
393       else
394       {
395         // Trim the exon mapping if necessary - the given product may only be a
396         // fragment of a larger protein. (EMBL:AY043181 is an example)
397
398         if (isEmblCdna)
399         {
400           // TODO: Add a DbRef back to the parent EMBL sequence with the exon
401           // map
402           // if given a dataset reference, search dataset for parent EMBL
403           // sequence if it exists and set its map
404           // make a new feature annotating the coding contig
405         }
406         else
407         {
408           // final product length truncation check
409           int[] cdsRanges = adjustForProteinLength(translationLength, exons);
410           dnaToProteinMapping = new Mapping(product, cdsRanges, new int[] {
411               1, translationLength }, 3, 1);
412           if (product != null)
413           {
414             /*
415              * make xref with mapping from protein to EMBL dna
416              */
417             DBRefEntry proteinToEmblRef = new DBRefEntry(DBRefSource.EMBL,
418                     getSequenceVersion(), proteinId, new Mapping(
419                             dnaToProteinMapping.getMap().getInverse()));
420             product.addDBRef(proteinToEmblRef);
421
422             /*
423              * make xref from protein to EMBLCDS; we assume here that the 
424              * CDS sequence version is same as dna sequence (?!)
425              */
426             MapList proteinToCdsMapList = new MapList(new int[] { 1,
427                 translationLength }, new int[] { 1 + (codonStart - 1),
428                 (codonStart - 1) + 3 * translationLength }, 1, 3);
429             DBRefEntry proteinToEmblCdsRef = new DBRefEntry(
430                     DBRefSource.EMBLCDS, getSequenceVersion(), proteinId,
431                     new Mapping(proteinToCdsMapList));
432             product.addDBRef(proteinToEmblCdsRef);
433
434             /*
435              * make 'direct' xref from protein to EMBLCDSPROTEIN
436              */
437             proteinToEmblProteinRef = new DBRefEntry(proteinToEmblCdsRef);
438             proteinToEmblProteinRef.setSource(DBRefSource.EMBLCDSProduct);
439             proteinToEmblProteinRef.setMap(null);
440             product.addDBRef(proteinToEmblProteinRef);
441           }
442         }
443       }
444
445       /*
446        * add cds features to dna sequence
447        */
448       for (int xint = 0; exons != null && xint < exons.length; xint += 2)
449       {
450         SequenceFeature sf = makeCdsFeature(exons, xint, proteinName,
451                 proteinId, vals, codonStart);
452         sf.setType(feature.getName()); // "CDS"
453         sf.setEnaLocation(feature.getLocation());
454         sf.setFeatureGroup(sourceDb);
455         dna.addSequenceFeature(sf);
456       }
457     }
458
459     /*
460      * add feature dbRefs to sequence, and mappings for Uniprot xrefs
461      */
462     boolean hasUniprotDbref = false;
463     if (feature.dbRefs != null)
464     {
465       boolean mappingUsed = false;
466       for (DBRefEntry ref : feature.dbRefs)
467       {
468         /*
469          * ensure UniProtKB/Swiss-Prot converted to UNIPROT
470          */
471         String source = DBRefUtils.getCanonicalName(ref.getSource());
472         ref.setSource(source);
473         DBRefEntry proteinDbRef = new DBRefEntry(ref.getSource(), ref.getVersion(), ref
474                 .getAccessionId());
475         if (source.equals(DBRefSource.UNIPROT))
476         {
477           String proteinSeqName = DBRefSource.UNIPROT + "|"
478                   + ref.getAccessionId();
479           if (dnaToProteinMapping != null && dnaToProteinMapping.getTo() != null)
480           {
481             if (mappingUsed)
482             {
483               /*
484                * two or more Uniprot xrefs for the same CDS - 
485                * each needs a distinct Mapping (as to a different sequence)
486                */
487               dnaToProteinMapping = new Mapping(dnaToProteinMapping);
488             }
489             mappingUsed = true;
490
491             /*
492              * try to locate the protein mapped to (possibly by a 
493              * previous CDS feature); if not found, construct it from
494              * the EMBL translation
495              */
496             SequenceI proteinSeq = matcher.findIdMatch(proteinSeqName);
497             if (proteinSeq == null)
498             {
499               proteinSeq = new Sequence(proteinSeqName,
500                       product.getSequenceAsString());
501               matcher.add(proteinSeq);
502               peptides.add(proteinSeq);
503             }
504             dnaToProteinMapping.setTo(proteinSeq);
505             dnaToProteinMapping.setMappedFromId(proteinId);
506             proteinSeq.addDBRef(proteinDbRef);
507             proteinSeq.setSourceDBRef(proteinDbRef);
508             ref.setMap(dnaToProteinMapping);
509           }
510           hasUniprotDbref = true;
511         }
512         if (product != null)
513         {
514           /*
515            * copy feature dbref to our protein product
516            */
517           DBRefEntry pref = proteinDbRef;
518           pref.setMap(null); // reference is direct
519           product.addDBRef(pref);
520           // Add converse mapping reference
521           if (dnaToProteinMapping != null)
522           {
523             Mapping pmap = new Mapping(dna, dnaToProteinMapping.getMap()
524                     .getInverse());
525             pref = new DBRefEntry(sourceDb, getSequenceVersion(),
526                     this.getAccession());
527             pref.setMap(pmap);
528             if (dnaToProteinMapping.getTo() != null)
529             {
530               dnaToProteinMapping.getTo().addDBRef(pref);
531             }
532           }
533         }
534         dna.addDBRef(ref);
535       }
536     }
537
538     /*
539      * if we have a product (translation) but no explicit Uniprot dbref
540      * (example: EMBL AAFI02000057 protein_id EAL65544.1)
541      * then construct mappings to an assumed EMBLCDSPROTEIN accession
542      */
543     if (!hasUniprotDbref && product != null)
544     {
545       if (proteinToEmblProteinRef == null)
546       {
547         // assuming CDSPROTEIN sequence version = dna version (?!)
548         proteinToEmblProteinRef = new DBRefEntry(
549                 DBRefSource.EMBLCDSProduct, getSequenceVersion(), proteinId);
550       }
551       product.addDBRef(proteinToEmblProteinRef);
552       product.setSourceDBRef(proteinToEmblProteinRef);
553
554       if (dnaToProteinMapping != null
555               && dnaToProteinMapping.getTo() != null)
556       {
557         DBRefEntry dnaToEmblProteinRef = new DBRefEntry(
558                 DBRefSource.EMBLCDSProduct, getSequenceVersion(), proteinId);
559         dnaToEmblProteinRef.setMap(dnaToProteinMapping);
560         dnaToProteinMapping.setMappedFromId(proteinId);
561         dna.addDBRef(dnaToEmblProteinRef);
562       }
563     }
564   }
565
566   /**
567    * Helper method to construct a SequenceFeature for one cds range
568    * 
569    * @param exons
570    *          array of cds [start, end, ...] positions
571    * @param exonStartIndex
572    *          offset into the exons array
573    * @param proteinName
574    * @param proteinAccessionId
575    * @param vals
576    *          map of 'miscellaneous values' for feature
577    * @param codonStart
578    *          codon start position for CDS (1/2/3, normally 1)
579    * @return
580    */
581   protected SequenceFeature makeCdsFeature(int[] exons, int exonStartIndex,
582           String proteinName, String proteinAccessionId,
583           Map<String, String> vals, int codonStart)
584   {
585     int exonNumber = exonStartIndex / 2 + 1;
586     SequenceFeature sf = new SequenceFeature();
587     sf.setBegin(Math.min(exons[exonStartIndex], exons[exonStartIndex + 1]));
588     sf.setEnd(Math.max(exons[exonStartIndex], exons[exonStartIndex + 1]));
589     sf.setDescription(String.format("Exon %d for protein '%s' EMBLCDS:%s",
590             exonNumber, proteinName, proteinAccessionId));
591     sf.setPhase(String.valueOf(codonStart - 1));
592     sf.setStrand(exons[exonStartIndex] <= exons[exonStartIndex + 1] ? "+"
593             : "-");
594     sf.setValue(FeatureProperties.EXONPOS, exonNumber);
595     sf.setValue(FeatureProperties.EXONPRODUCT, proteinName);
596     if (!vals.isEmpty())
597     {
598       StringBuilder sb = new StringBuilder();
599       boolean first = true;
600       for (Entry<String, String> val : vals.entrySet())
601       {
602         if (!first)
603         {
604           sb.append(";");
605         }
606         sb.append(val.getKey()).append("=").append(val.getValue());
607         first = false;
608         sf.setValue(val.getKey(), val.getValue());
609       }
610       sf.setAttributes(sb.toString());
611     }
612     return sf;
613   }
614
615   /**
616    * Returns the CDS positions as a single array of [start, end, start, end...]
617    * positions. If on the reverse strand, these will be in descending order.
618    * 
619    * @param feature
620    * @return
621    */
622   protected int[] getCdsRanges(EmblFeature feature)
623   {
624     if (feature.location == null)
625     {
626       return new int[] {};
627     }
628
629     try
630     {
631       List<int[]> ranges = DnaUtils.parseLocation(feature.location);
632       return listToArray(ranges);
633     } catch (ParseException e)
634     {
635       Cache.log.warn(String.format(
636               "Not parsing inexact CDS location %s in ENA %s",
637               feature.location, this.accession));
638       return new int[] {};
639     }
640   }
641
642   /**
643    * Converts a list of [start, end] ranges to a single array of [start, end,
644    * start, end ...]
645    * 
646    * @param ranges
647    * @return
648    */
649   int[] listToArray(List<int[]> ranges)
650   {
651     int[] result = new int[ranges.size() * 2];
652     int i = 0;
653     for (int[] range : ranges)
654     {
655       result[i++] = range[0];
656       result[i++] = range[1];
657     }
658     return result;
659   }
660
661   /**
662    * Truncates (if necessary) the exon intervals to match 3 times the length of
663    * the protein; also accepts 3 bases longer (for stop codon not included in
664    * protein)
665    * 
666    * @param proteinLength
667    * @param exon
668    *          an array of [start, end, start, end...] intervals
669    * @return the same array (if unchanged) or a truncated copy
670    */
671   static int[] adjustForProteinLength(int proteinLength, int[] exon)
672   {
673     if (proteinLength <= 0 || exon == null)
674     {
675       return exon;
676     }
677     int expectedCdsLength = proteinLength * 3;
678     int exonLength = MappingUtils.getLength(Arrays.asList(exon));
679
680     /*
681      * if exon length matches protein, or is shorter, or longer by the 
682      * length of a stop codon (3 bases), then leave it unchanged
683      */
684     if (expectedCdsLength >= exonLength
685             || expectedCdsLength == exonLength - 3)
686     {
687       return exon;
688     }
689
690     int origxon[];
691     int sxpos = -1;
692     int endxon = 0;
693     origxon = new int[exon.length];
694     System.arraycopy(exon, 0, origxon, 0, exon.length);
695     int cdspos = 0;
696     for (int x = 0; x < exon.length; x += 2)
697     {
698       cdspos += Math.abs(exon[x + 1] - exon[x]) + 1;
699       if (expectedCdsLength <= cdspos)
700       {
701         // advanced beyond last codon.
702         sxpos = x;
703         if (expectedCdsLength != cdspos)
704         {
705           // System.err
706           // .println("Truncating final exon interval on region by "
707           // + (cdspos - cdslength));
708         }
709
710         /*
711          * shrink the final exon - reduce end position if forward
712          * strand, increase it if reverse
713          */
714         if (exon[x + 1] >= exon[x])
715         {
716           endxon = exon[x + 1] - cdspos + expectedCdsLength;
717         }
718         else
719         {
720           endxon = exon[x + 1] + cdspos - expectedCdsLength;
721         }
722         break;
723       }
724     }
725
726     if (sxpos != -1)
727     {
728       // and trim the exon interval set if necessary
729       int[] nxon = new int[sxpos + 2];
730       System.arraycopy(exon, 0, nxon, 0, sxpos + 2);
731       nxon[sxpos + 1] = endxon; // update the end boundary for the new exon
732                                 // set
733       exon = nxon;
734     }
735     return exon;
736   }
737
738   public String getSequenceVersion()
739   {
740     return sequenceVersion;
741   }
742
743   public void setSequenceVersion(String sequenceVersion)
744   {
745     this.sequenceVersion = sequenceVersion;
746   }
747
748   public String getSequenceLength()
749   {
750     return sequenceLength;
751   }
752
753   public void setSequenceLength(String sequenceLength)
754   {
755     this.sequenceLength = sequenceLength;
756   }
757
758   public String getEntryVersion()
759   {
760     return entryVersion;
761   }
762
763   public void setEntryVersion(String entryVersion)
764   {
765     this.entryVersion = entryVersion;
766   }
767
768   public String getMoleculeType()
769   {
770     return moleculeType;
771   }
772
773   public void setMoleculeType(String moleculeType)
774   {
775     this.moleculeType = moleculeType;
776   }
777
778   public String getTopology()
779   {
780     return topology;
781   }
782
783   public void setTopology(String topology)
784   {
785     this.topology = topology;
786   }
787
788   public String getTaxonomicDivision()
789   {
790     return taxonomicDivision;
791   }
792
793   public void setTaxonomicDivision(String taxonomicDivision)
794   {
795     this.taxonomicDivision = taxonomicDivision;
796   }
797
798   public String getDescription()
799   {
800     return description;
801   }
802
803   public void setDescription(String description)
804   {
805     this.description = description;
806   }
807
808   public String getFirstPublicDate()
809   {
810     return firstPublicDate;
811   }
812
813   public void setFirstPublicDate(String firstPublicDate)
814   {
815     this.firstPublicDate = firstPublicDate;
816   }
817
818   public String getFirstPublicRelease()
819   {
820     return firstPublicRelease;
821   }
822
823   public void setFirstPublicRelease(String firstPublicRelease)
824   {
825     this.firstPublicRelease = firstPublicRelease;
826   }
827
828   public String getLastUpdatedDate()
829   {
830     return lastUpdatedDate;
831   }
832
833   public void setLastUpdatedDate(String lastUpdatedDate)
834   {
835     this.lastUpdatedDate = lastUpdatedDate;
836   }
837
838   public String getLastUpdatedRelease()
839   {
840     return lastUpdatedRelease;
841   }
842
843   public void setLastUpdatedRelease(String lastUpdatedRelease)
844   {
845     this.lastUpdatedRelease = lastUpdatedRelease;
846   }
847
848   public String getDataClass()
849   {
850     return dataClass;
851   }
852
853   public void setDataClass(String dataClass)
854   {
855     this.dataClass = dataClass;
856   }
857 }