+
+ /**
+ * Change blank version to "0" in any DBRefEntry, to ensure consistent
+ * comparison with other DBRefEntry in Jalview
+ *
+ * @param record
+ * @see Uniprot#getDbVersion
+ */
+ static void canonicaliseDbRefs(EmblFile record)
+ {
+ if (record.getEntries() == null)
+ {
+ return;
+ }
+ for (EmblEntry entry : record.getEntries())
+ {
+ if (entry.getDbRefs() != null)
+ {
+ for (DBRefEntry dbref : entry.getDbRefs())
+ {
+ if ("".equals(dbref.getVersion()))
+ {
+ dbref.setVersion("0");
+ }
+ }
+ }
+
+ if (entry.getFeatures() != null)
+ {
+ for (EmblFeature feature : entry.getFeatures())
+ {
+ if (feature.getDbRefs() != null)
+ {
+ for (DBRefEntry dbref : feature.getDbRefs())
+ {
+ if ("".equals(dbref.getVersion()))
+ {
+ dbref.setVersion("0");
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ public String getText()
+ {
+ return text;
+ }
+
+ public void setText(String text)
+ {
+ this.text = text;
+ }