|
From: <rv...@us...> - 2009-07-07 09:05:25
|
Revision: 179
http://treebase.svn.sourceforge.net/treebase/?rev=179&view=rev
Author: rvos
Date: 2009-07-07 09:05:13 +0000 (Tue, 07 Jul 2009)
Log Message:
-----------
NPE prevention changes
Modified Paths:
--------------
trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlTreeBlockConverter.java
Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlTreeBlockConverter.java
===================================================================
--- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlTreeBlockConverter.java 2009-07-06 10:04:34 UTC (rev 178)
+++ trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlTreeBlockConverter.java 2009-07-07 09:05:13 UTC (rev 179)
@@ -84,11 +84,21 @@
if ( null != phyloTree.getLabel() ) {
xmlTree.setLabel(phyloTree.getLabel());
}
- xmlTree.addAnnotationValue("tb:identifier.tree", mTBTermsURI, phyloTree.getId());
- xmlTree.addAnnotationValue("tb:kind.tree", mTBTermsURI, phyloTree.getKindDescription());
- xmlTree.addAnnotationValue("tb:type.tree", mTBTermsURI, phyloTree.getTypeDescription());
- xmlTree.addAnnotationValue("tb:quality.tree", mTBTermsURI, phyloTree.getQualityDescription());
- xmlTree.addAnnotationValue("tb:ntax.tree", mTBTermsURI, phyloTree.getnTax());
+ if ( null != phyloTree.getId() ) {
+ xmlTree.addAnnotationValue("tb:identifier.tree", mTBTermsURI, phyloTree.getId());
+ }
+ if ( null != phyloTree.getKindDescription() ) {
+ xmlTree.addAnnotationValue("tb:kind.tree", mTBTermsURI, phyloTree.getKindDescription());
+ }
+ if ( null != phyloTree.getTypeDescription() ) {
+ xmlTree.addAnnotationValue("tb:type.tree", mTBTermsURI, phyloTree.getTypeDescription());
+ }
+ if ( null != phyloTree.getQualityDescription() ) {
+ xmlTree.addAnnotationValue("tb:quality.tree", mTBTermsURI, phyloTree.getQualityDescription());
+ }
+ if ( null != phyloTree.getnTax() ) {
+ xmlTree.addAnnotationValue("tb:ntax.tree", mTBTermsURI, phyloTree.getnTax());
+ }
attachTreeBaseID(xmlTree, phyloTree,PhyloTree.class);
copyTreeBaseTree(phyloTree, xmlTree);
return xmlTree;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rv...@us...> - 2011-04-19 11:19:09
|
Revision: 791
http://treebase.svn.sourceforge.net/treebase/?rev=791&view=rev
Author: rvos
Date: 2011-04-19 11:19:03 +0000 (Tue, 19 Apr 2011)
Log Message:
-----------
Now setting the xml:base attribute to <phylowsPurl>/tree/TB2: on every tree block, and using the TreeBaseIDString as the xml id on every node.
Modified Paths:
--------------
trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlTreeBlockConverter.java
Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlTreeBlockConverter.java
===================================================================
--- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlTreeBlockConverter.java 2011-04-19 11:17:37 UTC (rev 790)
+++ trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlTreeBlockConverter.java 2011-04-19 11:19:03 UTC (rev 791)
@@ -99,6 +99,7 @@
TaxonLabelSet taxonLabelSet = treeBlock.getTaxonLabelSet();
OTUs xmlOTUs = getOTUsById(taxonLabelSet.getId());
org.nexml.model.TreeBlock xmlTreeBlock = getDocument().createTreeBlock(xmlOTUs);
+ xmlTreeBlock.setBaseURI(mTreeBaseURI);
if ( null != treeBlock.getTitle() ) {
xmlTreeBlock.setLabel(treeBlock.getTitle());
}
@@ -143,6 +144,7 @@
}
for ( PhyloTreeNode tbChildNode : tbNode.getChildNodes() ) {
Node xmlChildNode = xmlTree.createNode();
+ xmlChildNode.setId(tbChildNode.getTreebaseIDString().toString());
FloatEdge xmlEdge = xmlTree.createEdge(xmlNode, xmlChildNode);
if ( null != tbChildNode.getBranchLength() ) {
xmlEdge.setLength(tbChildNode.getBranchLength());
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rv...@us...> - 2011-05-19 12:57:55
|
Revision: 872
http://treebase.svn.sourceforge.net/treebase/?rev=872&view=rev
Author: rvos
Date: 2011-05-19 12:57:49 +0000 (Thu, 19 May 2011)
Log Message:
-----------
In rooted trees the root attribute needs to be set on the node it applies to. Omitting the attribute caused jsPhyloSVG to complain.
Modified Paths:
--------------
trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlTreeBlockConverter.java
Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlTreeBlockConverter.java
===================================================================
--- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlTreeBlockConverter.java 2011-05-17 21:03:38 UTC (rev 871)
+++ trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlTreeBlockConverter.java 2011-05-19 12:57:49 UTC (rev 872)
@@ -3,7 +3,6 @@
import java.util.Iterator;
import java.util.Set;
-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;
@@ -130,6 +129,9 @@
if ( null != tbNode.getName() ) {
xmlNode.setLabel(tbNode.getName());
}
+ if ( tbNode.isRootNode() ) {
+ xmlNode.setRoot(true);
+ }
attachTreeBaseID(xmlNode, tbNode,PhyloTreeNode.class);
TaxonLabel taxonLabel = tbNode.getTaxonLabel();
if ( null != taxonLabel ) {
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:35:19
|
Revision: 945
http://treebase.svn.sourceforge.net/treebase/?rev=945&view=rev
Author: rvos
Date: 2011-08-25 14:35:13 +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/NexmlTreeBlockConverter.java
Property Changed:
----------------
trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlTreeBlockConverter.java
Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlTreeBlockConverter.java
===================================================================
--- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlTreeBlockConverter.java 2011-08-25 14:31:28 UTC (rev 944)
+++ trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlTreeBlockConverter.java 2011-08-25 14:35:13 UTC (rev 945)
@@ -3,6 +3,7 @@
import java.util.Iterator;
import java.util.Set;
+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;
@@ -98,7 +99,11 @@
TaxonLabelSet taxonLabelSet = treeBlock.getTaxonLabelSet();
OTUs xmlOTUs = getOTUsById(taxonLabelSet.getId());
org.nexml.model.TreeBlock xmlTreeBlock = getDocument().createTreeBlock(xmlOTUs);
+
+ // attach base uri and skos:historyNote
+ getDocument().addAnnotationValue("skos:historyNote", Constants.SKOSURI, "Mapped from TreeBASE schema using NexmlTreeBlockConverter $Rev$");
xmlTreeBlock.setBaseURI(mTreeBaseURI);
+
if ( null != treeBlock.getTitle() ) {
xmlTreeBlock.setLabel(treeBlock.getTitle());
}
Property changes on: trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlTreeBlockConverter.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 15:00:17
|
Revision: 948
http://treebase.svn.sourceforge.net/treebase/?rev=948&view=rev
Author: rvos
Date: 2011-08-25 15:00:11 +0000 (Thu, 25 Aug 2011)
Log Message:
-----------
Actually, the skos:historyNote should probably be attached to the tree block, not the study
Modified Paths:
--------------
trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlTreeBlockConverter.java
Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlTreeBlockConverter.java
===================================================================
--- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlTreeBlockConverter.java 2011-08-25 14:40:19 UTC (rev 947)
+++ trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlTreeBlockConverter.java 2011-08-25 15:00:11 UTC (rev 948)
@@ -101,7 +101,7 @@
org.nexml.model.TreeBlock xmlTreeBlock = getDocument().createTreeBlock(xmlOTUs);
// attach base uri and skos:historyNote
- getDocument().addAnnotationValue("skos:historyNote", Constants.SKOSURI, "Mapped from TreeBASE schema using NexmlTreeBlockConverter $Rev$");
+ xmlTreeBlock.addAnnotationValue("skos:historyNote", Constants.SKOSURI, "Mapped from TreeBASE schema using NexmlTreeBlockConverter $Rev$");
xmlTreeBlock.setBaseURI(mTreeBaseURI);
if ( null != treeBlock.getTitle() ) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|