+ if (noProteinDbref && product != null)
+ {
+ // add protein coding reference to dna sequence so xref matches
+ if (protEMBLCDS == null)
+ {
+ protEMBLCDS = new DBRefEntry();
+ protEMBLCDS.setAccessionId(prid);
+ protEMBLCDS.setSource(DBRefSource.EMBLCDSProduct);
+ protEMBLCDS.setVersion(getVersion());
+ protEMBLCDS
+ .setMap(new Mapping(product, map.getMap().getInverse()));
+ }
+ product.addDBRef(protEMBLCDS);
+
+ // Add converse mapping reference
+ if (map != null)
+ {
+ Mapping pmap = new Mapping(product, protEMBLCDS.getMap().getMap()
+ .getInverse());
+ DBRefEntry ncMap = new DBRefEntry(protEMBLCDS);
+ ncMap.setMap(pmap);
+ if (map.getTo() != null)
+ {
+ dna.addDBRef(ncMap);
+ }
+ }
+ }