From: <rv...@us...> - 2009-06-19 02:15:47
|
Revision: 64 http://treebase.svn.sourceforge.net/treebase/?rev=64&view=rev Author: rvos Date: 2009-06-19 02:15:10 +0000 (Fri, 19 Jun 2009) Log Message: ----------- Added NCBI taxonID and uBio namebankID serialization (to metadata attachments) Modified Paths: -------------- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlOTUConverter.java Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlOTUConverter.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlOTUConverter.java 2009-06-19 02:14:12 UTC (rev 63) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlOTUConverter.java 2009-06-19 02:15:10 UTC (rev 64) @@ -4,6 +4,7 @@ import org.cipres.treebase.domain.taxon.TaxonLabel; import org.cipres.treebase.domain.taxon.TaxonLabelHome; import org.cipres.treebase.domain.taxon.TaxonLabelSet; +import org.cipres.treebase.domain.taxon.TaxonVariant; import org.nexml.model.Document; import org.nexml.model.OTU; import org.nexml.model.OTUs; @@ -74,6 +75,15 @@ OTU xmlOTU = xmlOTUs.createOTU(); xmlOTU.setLabel(taxonLabel.getTaxonLabel()); attachTreeBaseID(xmlOTU,taxonLabel); + if ( null != taxonLabel.getNcbiTaxID() ) { + attachAnnotation("dc:identifier", "NCBI:" + taxonLabel.getNcbiTaxID(), mDCURI, xmlOTU); + } + TaxonVariant tv = taxonLabel.getTaxonVariant(); + if ( null != tv ) { + if ( null != tv.getNamebankID() ) { + attachAnnotation("dc:identifier", "uBio:" + tv.getNamebankID(), mDCURI, xmlOTU); + } + } return xmlOTU; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2009-06-28 10:11:36
|
Revision: 135 http://treebase.svn.sourceforge.net/treebase/?rev=135&view=rev Author: rvos Date: 2009-06-28 10:10:36 +0000 (Sun, 28 Jun 2009) Log Message: ----------- Now attaches uBio and NCBI identifiers as dc:relation annotations Modified Paths: -------------- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlOTUConverter.java Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlOTUConverter.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlOTUConverter.java 2009-06-28 10:09:22 UTC (rev 134) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlOTUConverter.java 2009-06-28 10:10:36 UTC (rev 135) @@ -1,5 +1,7 @@ package org.cipres.treebase.domain.nexus.nexml; +import java.net.URI; + import org.cipres.treebase.domain.study.Study; import org.cipres.treebase.domain.taxon.TaxonLabel; import org.cipres.treebase.domain.taxon.TaxonLabelHome; @@ -80,12 +82,16 @@ } attachTreeBaseID(xmlOTU,taxonLabel,TaxonLabel.class); if ( null != taxonLabel.getNcbiTaxID() ) { - attachAnnotation("dc:identifier", "NCBI:" + taxonLabel.getNcbiTaxID(), mDCURI, xmlOTU); + StringBuilder urlString = new StringBuilder(getDocument().getBaseURI().toString()); + taxonLabel.getPhyloWSPath().getPath(urlString).append("NCBI:").append(taxonLabel.getNcbiTaxID()); + xmlOTU.addAnnotationValue("dc:relation", mDCURI, URI.create(urlString.toString())); } TaxonVariant tv = taxonLabel.getTaxonVariant(); if ( null != tv ) { if ( null != tv.getNamebankID() ) { - attachAnnotation("dc:identifier", "uBio:" + tv.getNamebankID(), mDCURI, xmlOTU); + StringBuilder urlString = new StringBuilder(getDocument().getBaseURI().toString()); + taxonLabel.getPhyloWSPath().getPath(urlString).append("uBio:").append(tv.getNamebankID()); + xmlOTU.addAnnotationValue("dc:relation", mDCURI, URI.create(urlString.toString())); } } return xmlOTU; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2011-04-19 10:59:55
|
Revision: 787 http://treebase.svn.sourceforge.net/treebase/?rev=787&view=rev Author: rvos Date: 2011-04-19 10:59:49 +0000 (Tue, 19 Apr 2011) Log Message: ----------- Now setting the xml:base attribute to <phylowsPurl>/taxon/TB2: on every taxa block. Modified Paths: -------------- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlOTUConverter.java Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlOTUConverter.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlOTUConverter.java 2011-04-19 10:55:10 UTC (rev 786) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlOTUConverter.java 2011-04-19 10:59:49 UTC (rev 787) @@ -1,5 +1,7 @@ package org.cipres.treebase.domain.nexus.nexml; +import java.net.URI; + import org.cipres.treebase.domain.study.Study; import org.cipres.treebase.domain.taxon.TaxonLabel; import org.cipres.treebase.domain.taxon.TaxonLabelHome; @@ -46,6 +48,7 @@ */ public OTUs fromTreeBaseToXml(TaxonLabelSet taxonLabelSet) { OTUs xmlOTUs = getDocument().createOTUs(); + xmlOTUs.setBaseURI(mTaxonBaseURI); xmlOTUs.setLabel(taxonLabelSet.getTitle()); attachTreeBaseID(xmlOTUs,taxonLabelSet,TaxonLabelSet.class); for ( TaxonLabel taxonLabel : taxonLabelSet.getTaxonLabelsReadOnly() ) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2011-06-10 16:47:39
|
Revision: 908 http://treebase.svn.sourceforge.net/treebase/?rev=908&view=rev Author: rvos Date: 2011-06-10 16:47:32 +0000 (Fri, 10 Jun 2011) Log Message: ----------- Removed unused import Modified Paths: -------------- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlOTUConverter.java Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlOTUConverter.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlOTUConverter.java 2011-06-10 14:51:54 UTC (rev 907) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlOTUConverter.java 2011-06-10 16:47:32 UTC (rev 908) @@ -1,7 +1,5 @@ package org.cipres.treebase.domain.nexus.nexml; -import java.net.URI; - import org.cipres.treebase.domain.study.Study; import org.cipres.treebase.domain.taxon.TaxonLabel; import org.cipres.treebase.domain.taxon.TaxonLabelHome; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2011-08-25 14:31:34
|
Revision: 944 http://treebase.svn.sourceforge.net/treebase/?rev=944&view=rev Author: rvos Date: 2011-08-25 14:31:28 +0000 (Thu, 25 Aug 2011) Log Message: ----------- Added skos:historyNote to keep track of which version of the converter we're using Modified Paths: -------------- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlOTUConverter.java Property Changed: ---------------- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlOTUConverter.java Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlOTUConverter.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlOTUConverter.java 2011-08-25 14:29:19 UTC (rev 943) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlOTUConverter.java 2011-08-25 14:31:28 UTC (rev 944) @@ -1,5 +1,6 @@ package org.cipres.treebase.domain.nexus.nexml; +import org.cipres.treebase.Constants; import org.cipres.treebase.domain.study.Study; import org.cipres.treebase.domain.taxon.TaxonLabel; import org.cipres.treebase.domain.taxon.TaxonLabelHome; @@ -46,7 +47,11 @@ */ public OTUs fromTreeBaseToXml(TaxonLabelSet taxonLabelSet) { OTUs xmlOTUs = getDocument().createOTUs(); + + // attach base uri and skos:historyNote xmlOTUs.setBaseURI(mTaxonBaseURI); + getDocument().addAnnotationValue("skos:historyNote", Constants.SKOSURI, "Mapped from TreeBASE schema using NexmlOTUConverter $Rev$"); + xmlOTUs.setLabel(taxonLabelSet.getTitle()); attachTreeBaseID(xmlOTUs,taxonLabelSet,TaxonLabelSet.class); for ( TaxonLabel taxonLabel : taxonLabelSet.getTaxonLabelsReadOnly() ) { Property changes on: trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlOTUConverter.java ___________________________________________________________________ Added: svn:keywords + Rev This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2011-08-25 14:40:25
|
Revision: 947 http://treebase.svn.sourceforge.net/treebase/?rev=947&view=rev Author: rvos Date: 2011-08-25 14:40:19 +0000 (Thu, 25 Aug 2011) Log Message: ----------- Actually, the skos:historyNote should probably be attached to the taxa, not the study Modified Paths: -------------- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlOTUConverter.java Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlOTUConverter.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlOTUConverter.java 2011-08-25 14:39:44 UTC (rev 946) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlOTUConverter.java 2011-08-25 14:40:19 UTC (rev 947) @@ -50,7 +50,7 @@ // attach base uri and skos:historyNote xmlOTUs.setBaseURI(mTaxonBaseURI); - getDocument().addAnnotationValue("skos:historyNote", Constants.SKOSURI, "Mapped from TreeBASE schema using NexmlOTUConverter $Rev$"); + xmlOTUs.addAnnotationValue("skos:historyNote", Constants.SKOSURI, "Mapped from TreeBASE schema using NexmlOTUConverter $Rev$"); xmlOTUs.setLabel(taxonLabelSet.getTitle()); attachTreeBaseID(xmlOTUs,taxonLabelSet,TaxonLabelSet.class); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |