From: <rv...@us...> - 2011-04-19 11:16:09
|
Revision: 789 http://treebase.svn.sourceforge.net/treebase/?rev=789&view=rev Author: rvos Date: 2011-04-19 11:16:03 +0000 (Tue, 19 Apr 2011) Log Message: ----------- Now checking to make sure the "legacy" id and the current one aren't the same thing. Only attaching them if they aren't. Modified Paths: -------------- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/taxon/TaxonLabel.java Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/domain/taxon/TaxonLabel.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/taxon/TaxonLabel.java 2011-04-19 11:10:53 UTC (rev 788) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/domain/taxon/TaxonLabel.java 2011-04-19 11:16:03 UTC (rev 789) @@ -270,13 +270,15 @@ if ( ! fullName.equals(taxonName) ) { annotations.add(new Annotation(Constants.SKOSURI, "skos:prefLabel",taxonName)); } - if ( null != taxon.getTB1LegacyId() ) { - annotations.add(new Annotation(Constants.TBTermsURI, "tb:identifier.taxon.tb1", taxon.getTB1LegacyId())); + Integer tb1LegacyID = taxon.getTB1LegacyId(); + if ( null != tb1LegacyID && taxon.getId() != tb1LegacyID.longValue() ) { + annotations.add(new Annotation(Constants.TBTermsURI, "tb:identifier.taxon.tb1", tb1LegacyID.longValue())); } } } - if ( null != tv.getTB1LegacyId() ) { - annotations.add(new Annotation(Constants.TBTermsURI, "tb:identifier.taxonVariant.tb1", tv.getTB1LegacyId())); + Integer tb1TvId = tv.getTB1LegacyId(); + if ( null != tb1TvId && tv.getId() != tb1TvId.longValue() ) { + annotations.add(new Annotation(Constants.TBTermsURI, "tb:identifier.taxonVariant.tb1", tb1TvId.longValue() )); } annotations.add(new Annotation(Constants.TBTermsURI, "tb:identifier.taxonVariant", tv.getId())); Taxon taxon = tv.getTaxon(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |