From: <lol...@us...> - 2011-06-02 19:55:38
|
Revision: 897 http://treebase.svn.sourceforge.net/treebase/?rev=897&view=rev Author: loloyohe Date: 2011-06-02 19:55:32 +0000 (Thu, 02 Jun 2011) Log Message: ----------- Modified Paths: -------------- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlMatrixConverter.java Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlMatrixConverter.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlMatrixConverter.java 2011-06-02 19:55:09 UTC (rev 896) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlMatrixConverter.java 2011-06-02 19:55:32 UTC (rev 897) @@ -340,15 +340,31 @@ xmlMatrix.setSeq(seq,xmlOTU); } for ( RowSegment tbSegment : tbSegments ) { + String accessionNumber = tbSegment.getSpecimenLabel().getGenBankAccession(); Double latitude = tbSegment.getSpecimenLabel().getLatitude(); Double longitude = tbSegment.getSpecimenLabel().getLongitude(); + Double elevation = tbSegment.getSpecimenLabel().getElevation(); + String collector = tbSegment.getSpecimenLabel().getCollector(); + String country = tbSegment.getSpecimenLabel().getCountry(); + if ( null != accessionNumber) { + xmlOTU.addAnnotationValue("DwC:StringGenbankAcessionNumber", Constants.DwCURI, accessionNumber); + } if ( null != latitude ) { xmlOTU.addAnnotationValue("DwC:DecimalLatitude", Constants.DwCURI, latitude); } if ( null != longitude ) { xmlOTU.addAnnotationValue("DwC:DecimalLongitude", Constants.DwCURI, longitude); } - } + if ( null != elevation ) { + xmlOTU.addAnnotationValue("DwC:DecimalElevation", Constants.DwCURI, elevation); + } + if ( null != collector ) { + xmlOTU.addAnnotationValue("DwC:StringCollector", Constants.DwCURI, collector); + } + if ( null != country ) { + xmlOTU.addAnnotationValue("DwC:StringCountry", Constants.DwCURI, country); + } + } } } @@ -378,16 +394,32 @@ } Set<RowSegment> tbSegments = tbRow.getSegmentsReadOnly(); for ( RowSegment tbSegment : tbSegments ) { + String accessionNumber = tbSegment.getSpecimenLabel().getGenBankAccession(); Double latitude = tbSegment.getSpecimenLabel().getLatitude(); Double longitude = tbSegment.getSpecimenLabel().getLongitude(); + Double elevation = tbSegment.getSpecimenLabel().getElevation(); + String collector = tbSegment.getSpecimenLabel().getCollector(); + String country = tbSegment.getSpecimenLabel().getCountry(); + if ( null != accessionNumber) { + xmlOTU.addAnnotationValue("DwC:StringGenbankAcessionNumber", Constants.DwCURI, accessionNumber); + } if ( null != latitude ) { xmlOTU.addAnnotationValue("DwC:DecimalLatitude", Constants.DwCURI, latitude); } if ( null != longitude ) { xmlOTU.addAnnotationValue("DwC:DecimalLongitude", Constants.DwCURI, longitude); } - } + if ( null != elevation ) { + xmlOTU.addAnnotationValue("DwC:DecimalElevation", Constants.DwCURI, elevation); + } + if ( null != collector ) { + xmlOTU.addAnnotationValue("DwC:StringCollector", Constants.DwCURI, collector); + } + if ( null != country ) { + xmlOTU.addAnnotationValue("DwC:StringCountry", Constants.DwCURI, country); + } + } } } - + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |