You can subscribe to this list here.
2009 |
Jan
|
Feb
|
Mar
(1) |
Apr
(14) |
May
(36) |
Jun
(148) |
Jul
(33) |
Aug
(2) |
Sep
(17) |
Oct
(42) |
Nov
(137) |
Dec
(88) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2010 |
Jan
(89) |
Feb
(80) |
Mar
(217) |
Apr
(76) |
May
(5) |
Jun
(39) |
Jul
(35) |
Aug
(4) |
Sep
(7) |
Oct
(14) |
Nov
(12) |
Dec
(9) |
2011 |
Jan
(6) |
Feb
(4) |
Mar
(11) |
Apr
(55) |
May
(90) |
Jun
(39) |
Jul
(15) |
Aug
(15) |
Sep
(23) |
Oct
(12) |
Nov
(17) |
Dec
(20) |
2012 |
Jan
(22) |
Feb
(63) |
Mar
|
Apr
(1) |
May
(6) |
Jun
(3) |
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
(3) |
Feb
(6) |
Mar
|
Apr
|
May
|
Jun
(4) |
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
(7) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <rv...@us...> - 2011-05-12 20:42:42
|
Revision: 864 http://treebase.svn.sourceforge.net/treebase/?rev=864&view=rev Author: rvos Date: 2011-05-12 20:42:36 +0000 (Thu, 12 May 2011) Log Message: ----------- Commenting out all phylowidget-related javascript hacks. Hopefully this fixes the bug @jsPhyloSVG seems to see on his side. Modified Paths: -------------- trunk/treebase-web/src/main/webapp/WEB-INF/pages/limitedPhylowidget.jsp Modified: trunk/treebase-web/src/main/webapp/WEB-INF/pages/limitedPhylowidget.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/pages/limitedPhylowidget.jsp 2011-05-12 20:39:59 UTC (rev 863) +++ trunk/treebase-web/src/main/webapp/WEB-INF/pages/limitedPhylowidget.jsp 2011-05-12 20:42:36 UTC (rev 864) @@ -8,8 +8,8 @@ <title>-Tree viewer</title> <script type="text/javascript" src="<c:url value='/scripts/prototype/prototype-1.6.0.3.js'/>"></script> -<script type="text/javascript" src="<c:url value='/scripts/phylowidget/lib.js'/>"></script> -<script type="text/javascript" src="<c:url value='/scripts/phylowidget.js'/>"></script> +<!-- script type="text/javascript" src="<c:url value='/scripts/phylowidget/lib.js'/>"></script--> +<!-- script type="text/javascript" src="<c:url value='/scripts/phylowidget.js'/>"></script--> <script type="text/javascript" src="<c:url value='/scripts/raphael-min.js'/>"></script> <script type="text/javascript" src="<c:url value='/scripts/jsphylosvg-min.js'/>"></script> @@ -85,7 +85,7 @@ </style> </head> <body> - <script type="text/javascript"> + <!-- script type="text/javascript"> TreeBASE.register( function () { var treeList = $('treeList'); @@ -95,7 +95,7 @@ updateJavaTree(); } ); - </script> + </script --> <form name="TreeForm"> <table id="content" style="margin-top: 5px"> <tr> @@ -189,7 +189,7 @@ </c:forEach> </select> </fieldset> - <input + <!-- input type="hidden" name="treeText" id="treeText" @@ -200,7 +200,7 @@ name="clipText" id="clipText" onchange="updateJavaClip();" - value="" /> + value="" /--> <div id="comments" style="margin: 5px"> Make a selection by clicking on the tree list. </div> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2011-05-12 20:40:05
|
Revision: 863 http://treebase.svn.sourceforge.net/treebase/?rev=863&view=rev Author: rvos Date: 2011-05-12 20:39:59 +0000 (Thu, 12 May 2011) Log Message: ----------- Passing in the containing study to the overloaded serialize method is supposed to prevent the NPEs we were apparently getting when trying to download a tree as nexml (not a study). This should fix things. Modified Paths: -------------- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/DownloadATreeController.java Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/DownloadATreeController.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/DownloadATreeController.java 2011-05-12 20:36:56 UTC (rev 862) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/DownloadATreeController.java 2011-05-12 20:39:59 UTC (rev 863) @@ -96,7 +96,7 @@ treeBlock.setTaxonLabelSet(tls); treeBlock.addPhyloTree(tree); nds.getTreeBlocks().add(treeBlock); - return getNexmlService().serialize(nds,getDefaultProperties(request)); + return getNexmlService().serialize(nds,getDefaultProperties(request),tree.getStudy()); } else if ( getFormat(request) == FORMAT_RDF ) { NexusDataSet nds = new NexusDataSet(); @@ -105,7 +105,7 @@ treeBlock.setTaxonLabelSet(tls); treeBlock.addPhyloTree(tree); nds.getTreeBlocks().add(treeBlock); - return getRdfaService().serialize(nds,getDefaultProperties(request)); + return getRdfaService().serialize(nds,getDefaultProperties(request),tree.getStudy()); } else { StringBuilder builder = new StringBuilder(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2011-05-12 20:37:03
|
Revision: 862 http://treebase.svn.sourceforge.net/treebase/?rev=862&view=rev Author: rvos Date: 2011-05-12 20:36:56 +0000 (Thu, 12 May 2011) Log Message: ----------- Added empty stub for the overloaded case where we both have a nexus data set (generated de novo, perhaps) and a containing study. It seems we need this instead of the one without the study but with the nexus data set: looks like we're getting NPEs that way. Modified Paths: -------------- trunk/treebase-core/src/main/java/org/cipres/treebase/service/nexus/NexusServiceMesquite.java Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/service/nexus/NexusServiceMesquite.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/service/nexus/NexusServiceMesquite.java 2011-05-12 20:36:03 UTC (rev 861) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/service/nexus/NexusServiceMesquite.java 2011-05-12 20:36:56 UTC (rev 862) @@ -262,4 +262,10 @@ return null; } + public String serialize(NexusDataSet pNexusDataSet, Properties pProperties, + Study study) { + // TODO Auto-generated method stub + return null; + } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2011-05-12 20:36:09
|
Revision: 861 http://treebase.svn.sourceforge.net/treebase/?rev=861&view=rev Author: rvos Date: 2011-05-12 20:36:03 +0000 (Thu, 12 May 2011) Log Message: ----------- Added interface for the overloaded case where we both have a nexus data set (generated de novo, perhaps) and a containing study. It seems we need this instead of the one without the study but with the nexus data set: looks like we're getting NPEs that way. Modified Paths: -------------- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/NexusService.java Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/NexusService.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/NexusService.java 2011-05-12 20:34:56 UTC (rev 860) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/NexusService.java 2011-05-12 20:36:03 UTC (rev 861) @@ -47,6 +47,7 @@ */ String serialize(NexusDataSet pNexusDataSet); String serialize(NexusDataSet pNexusDataSet, Properties pProperties); + String serialize(NexusDataSet pNexusDataSet, Properties pProperties,Study study); /** * Write the NexusDataSet to a string that represents the object. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2011-05-12 20:35:02
|
Revision: 860 http://treebase.svn.sourceforge.net/treebase/?rev=860&view=rev Author: rvos Date: 2011-05-12 20:34:56 +0000 (Thu, 12 May 2011) Log Message: ----------- Overloaded serialize for the case where we both have a NexusDataSet (generated de novo, e.g. when creating a tree to download) and a Study (the one containing the tree). We need the study, it seems, for some housekeeping, (well, at least to avoid an NPE) Modified Paths: -------------- trunk/treebase-core/src/main/java/org/cipres/treebase/service/nexus/NexusServiceNexml.java trunk/treebase-core/src/main/java/org/cipres/treebase/service/nexus/NexusServiceRDFa.java Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/service/nexus/NexusServiceNexml.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/service/nexus/NexusServiceNexml.java 2011-05-12 20:32:51 UTC (rev 859) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/service/nexus/NexusServiceNexml.java 2011-05-12 20:34:56 UTC (rev 860) @@ -96,6 +96,11 @@ NexmlDocumentConverter ndc = getNexmlDocumentConverter(null, properties); return ndc.fromTreeBaseToXml(nexusDataSet).getXmlString(); } + + public String serialize(NexusDataSet nexusDataSet, Properties properties,Study study) { + NexmlDocumentConverter ndc = getNexmlDocumentConverter(study, properties); + return ndc.fromTreeBaseToXml(nexusDataSet).getXmlString(); + } public String serialize(Study study, Properties properties) { NexmlDocumentConverter ndc = getNexmlDocumentConverter(study, properties); Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/service/nexus/NexusServiceRDFa.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/service/nexus/NexusServiceRDFa.java 2011-05-12 20:32:51 UTC (rev 859) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/service/nexus/NexusServiceRDFa.java 2011-05-12 20:34:56 UTC (rev 860) @@ -56,6 +56,14 @@ /** * */ + public String serialize(NexusDataSet nexusDataSet,Properties properties,Study study) { + NexmlDocumentConverter ndc = getNexmlDocumentConverter(study, properties); + return transform(ndc.fromTreeBaseToXml(nexusDataSet).getXmlString()); + } + + /** + * + */ public String serialize(NexusDataSet nexusDataSet) { NexmlDocumentConverter ndc = getNexmlDocumentConverter(null, null); return transform(ndc.fromTreeBaseToXml(nexusDataSet).getXmlString()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2011-05-12 20:32:57
|
Revision: 859 http://treebase.svn.sourceforge.net/treebase/?rev=859&view=rev Author: rvos Date: 2011-05-12 20:32:51 +0000 (Thu, 12 May 2011) Log Message: ----------- Added test case to check tree serialization Modified Paths: -------------- trunk/treebase-core/src/test/java/org/cipres/treebase/domain/nexus/NexmlSerializationTest.java Modified: trunk/treebase-core/src/test/java/org/cipres/treebase/domain/nexus/NexmlSerializationTest.java =================================================================== --- trunk/treebase-core/src/test/java/org/cipres/treebase/domain/nexus/NexmlSerializationTest.java 2011-05-12 20:00:14 UTC (rev 858) +++ trunk/treebase-core/src/test/java/org/cipres/treebase/domain/nexus/NexmlSerializationTest.java 2011-05-12 20:32:51 UTC (rev 859) @@ -14,6 +14,9 @@ import org.cipres.treebase.dao.AbstractDAOTest; import org.cipres.treebase.domain.study.Study; import org.cipres.treebase.domain.taxon.TaxonLabelHome; +import org.cipres.treebase.domain.taxon.TaxonLabelSet; +import org.cipres.treebase.domain.tree.PhyloTree; +import org.cipres.treebase.domain.tree.TreeBlock; import org.cipres.treebase.domain.nexus.nexml.NexmlDocumentConverter; import org.nexml.model.DocumentFactory; import org.nexml.model.Document; @@ -26,22 +29,28 @@ Study study = (Study)loadObject(Study.class, studyId); Document doc = DocumentFactory.safeCreateDocument(); NexmlDocumentConverter conv = new NexmlDocumentConverter(study,getTaxonLabelHome(),doc); - String xml = conv.fromTreeBaseToXml(study).getXmlString(); -// File file = new File("/Users/rvosa/Desktop/NexmlSerializationTest.xml"); -// try { -// Writer output = new BufferedWriter(new FileWriter(file)); -// output.write(xml); -// } catch (FileNotFoundException e) { -// // TODO Auto-generated catch block -// e.printStackTrace(); -// } catch (IOException e) { -// // TODO Auto-generated catch block -// e.printStackTrace(); -// } + String xml = conv.fromTreeBaseToXml(study).getXmlString(); System.out.println(xml); Assert.assertNotNull(xml); } + public void testSerializeTree() { + long treeId = 4816; + Document doc = DocumentFactory.safeCreateDocument(); + PhyloTree tree = (PhyloTree)loadObject(PhyloTree.class,treeId); + TaxonLabelSet tls = tree.getTreeBlock().getTaxonLabelSet(); + NexusDataSet nds = new NexusDataSet(); + nds.getTaxonLabelSets().add(tls); + TreeBlock treeBlock = new TreeBlock(); + treeBlock.setTaxonLabelSet(tls); + treeBlock.addPhyloTree(tree); + nds.getTreeBlocks().add(treeBlock); + NexmlDocumentConverter conv = new NexmlDocumentConverter(tree.getStudy(),getTaxonLabelHome(),doc); + String xml = conv.fromTreeBaseToXml(nds).getXmlString(); + System.out.println(xml); + Assert.assertNotNull(xml); + } + /** * Return the TaxonLabelHome field. * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2011-05-12 20:00:20
|
Revision: 858 http://treebase.svn.sourceforge.net/treebase/?rev=858&view=rev Author: rvos Date: 2011-05-12 20:00:14 +0000 (Thu, 12 May 2011) Log Message: ----------- Using onComplete, maybe then we have the whole response body? Modified Paths: -------------- trunk/treebase-web/src/main/webapp/WEB-INF/pages/limitedPhylowidget.jsp Modified: trunk/treebase-web/src/main/webapp/WEB-INF/pages/limitedPhylowidget.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/pages/limitedPhylowidget.jsp 2011-05-12 19:52:38 UTC (rev 857) +++ trunk/treebase-web/src/main/webapp/WEB-INF/pages/limitedPhylowidget.jsp 2011-05-12 20:00:14 UTC (rev 858) @@ -145,7 +145,7 @@ var uri = "/treebase-web/phylows/tree/"+document.TreeForm.treeList.value+"?format=nexml"; new Ajax.Request(uri,{ method : 'get', - onSuccess : function(transport) { + onComplete : function(transport) { var dataObject = { nexml : transport.responseXML, fileSource : true This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2011-05-12 19:52:44
|
Revision: 857 http://treebase.svn.sourceforge.net/treebase/?rev=857&view=rev Author: rvos Date: 2011-05-12 19:52:38 +0000 (Thu, 12 May 2011) Log Message: ----------- Fixed messed up fieldset legend Modified Paths: -------------- trunk/treebase-web/src/main/webapp/WEB-INF/pages/limitedPhylowidget.jsp Modified: trunk/treebase-web/src/main/webapp/WEB-INF/pages/limitedPhylowidget.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/pages/limitedPhylowidget.jsp 2011-05-12 19:41:03 UTC (rev 856) +++ trunk/treebase-web/src/main/webapp/WEB-INF/pages/limitedPhylowidget.jsp 2011-05-12 19:52:38 UTC (rev 857) @@ -139,15 +139,13 @@ </applet> </fieldset --%> <fieldset> - <legend>jsPhyloSVG - <a href="#" class="openHelp" onclick="openHelp('jsPhyloSVG')"><img class="iconButton" src="<fmt:message key="icons.help"/>" /></a> - </legend> + <legend>Tree window</legend> <script type="text/javascript"> function drawjsPhyloSVGTree(){ var uri = "/treebase-web/phylows/tree/"+document.TreeForm.treeList.value+"?format=nexml"; new Ajax.Request(uri,{ method : 'get', - onSuccess : function(transport){ + onSuccess : function(transport) { var dataObject = { nexml : transport.responseXML, fileSource : true This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2011-05-12 19:41:09
|
Revision: 856 http://treebase.svn.sourceforge.net/treebase/?rev=856&view=rev Author: rvos Date: 2011-05-12 19:41:03 +0000 (Thu, 12 May 2011) Log Message: ----------- Now hardcodes the format parameter Modified Paths: -------------- trunk/treebase-web/src/main/webapp/WEB-INF/pages/limitedPhylowidget.jsp Modified: trunk/treebase-web/src/main/webapp/WEB-INF/pages/limitedPhylowidget.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/pages/limitedPhylowidget.jsp 2011-05-12 19:19:04 UTC (rev 855) +++ trunk/treebase-web/src/main/webapp/WEB-INF/pages/limitedPhylowidget.jsp 2011-05-12 19:41:03 UTC (rev 856) @@ -144,10 +144,9 @@ </legend> <script type="text/javascript"> function drawjsPhyloSVGTree(){ - var uri = "/treebase-web/phylows/tree/"+document.TreeForm.treeList.value; + var uri = "/treebase-web/phylows/tree/"+document.TreeForm.treeList.value+"?format=nexml"; new Ajax.Request(uri,{ method : 'get', - parameters : { format : 'nexml' }, onSuccess : function(transport){ var dataObject = { nexml : transport.responseXML, @@ -159,7 +158,9 @@ 600, 600 ); }, - onFailure: function(){ alert('Something went wrong while attempting to fetch '+uri) } + onFailure: function(){ + alert('Something went wrong while attempting to fetch '+uri) + } }); }; </script> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2011-05-12 19:19:11
|
Revision: 855 http://treebase.svn.sourceforge.net/treebase/?rev=855&view=rev Author: rvos Date: 2011-05-12 19:19:04 +0000 (Thu, 12 May 2011) Log Message: ----------- nexml now fetched using prototypejs Modified Paths: -------------- trunk/treebase-web/src/main/webapp/WEB-INF/pages/limitedPhylowidget.jsp Modified: trunk/treebase-web/src/main/webapp/WEB-INF/pages/limitedPhylowidget.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/pages/limitedPhylowidget.jsp 2011-05-12 18:42:19 UTC (rev 854) +++ trunk/treebase-web/src/main/webapp/WEB-INF/pages/limitedPhylowidget.jsp 2011-05-12 19:19:04 UTC (rev 855) @@ -143,24 +143,24 @@ <a href="#" class="openHelp" onclick="openHelp('jsPhyloSVG')"><img class="iconButton" src="<fmt:message key="icons.help"/>" /></a> </legend> <script type="text/javascript"> - function drawTree(){ - YUI().use('oop', 'json-stringify', 'io-base', 'event', 'event-delegate', function(Y){ - var uri = "/treebase-web/phylows/tree/"+document.TreeForm.treeList.value+"?format=nexml"; - function complete(id, o, args) { - var data = o.responseXML; // Response data. + function drawjsPhyloSVGTree(){ + var uri = "/treebase-web/phylows/tree/"+document.TreeForm.treeList.value; + new Ajax.Request(uri,{ + method : 'get', + parameters : { format : 'nexml' }, + onSuccess : function(transport){ var dataObject = { - nexml: data, - fileSource: true + nexml : transport.responseXML, + fileSource : true }; phylocanvas = new Smits.PhyloCanvas( dataObject, 'svgCanvas', 600, 600 ); - }; - Y.on('io:complete', complete, Y); - var request = Y.io(uri); - }); + }, + onFailure: function(){ alert('Something went wrong while attempting to fetch '+uri) } + }); }; </script> <div id="svgCanvas" style="width:600px;height:600px"></div> @@ -180,7 +180,7 @@ <select name="treeList" size="10" - onclick="javascript:drawTree();" + onclick="javascript:drawjsPhyloSVGTree();" id="treeList"> <%--c:forEach var="x" items="${NEWICKSTRINGSMAP}" > <option value="${x.value}">${x.key}</option> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2011-05-12 18:42:25
|
Revision: 854 http://treebase.svn.sourceforge.net/treebase/?rev=854&view=rev Author: rvos Date: 2011-05-12 18:42:19 +0000 (Thu, 12 May 2011) Log Message: ----------- Corrected to use namespacedGUID Modified Paths: -------------- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/DirectMapToPhyloWidgetController.java Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/DirectMapToPhyloWidgetController.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/DirectMapToPhyloWidgetController.java 2011-05-12 18:42:09 UTC (rev 853) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/DirectMapToPhyloWidgetController.java 2011-05-12 18:42:19 UTC (rev 854) @@ -72,7 +72,7 @@ for (PhyloTree aTree : TB.getTreeList()) { treeMap.put(getMapKey(aTree), aTree.getId() + separator + aTree.getNewickString() + separator + "T"); - phylowsMap.put(getMapKey(aTree), aTree.getPhyloWSPath().getPath()); + phylowsMap.put(getMapKey(aTree), aTree.getTreebaseIDString().getNamespacedGUID().toString()); if ( defaultNewick.equals("") ) { defaultNewick = aTree.getNewickString(); } @@ -98,7 +98,7 @@ // use "T" to enable the edit menu items. treeMap.put(getMapKey(aTree), TreeId + separator + aTree.getNewickString() + separator + "T"); - phylowsMap.put(getMapKey(aTree), aTree.getPhyloWSPath().getPath()); + phylowsMap.put(getMapKey(aTree), aTree.getTreebaseIDString().getNamespacedGUID().toString()); newickStringName = aTree.getTitle(); Study study = aTree.getStudy(); if ( study != null && study.isPublished() ) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2011-05-12 18:42:15
|
Revision: 853 http://treebase.svn.sourceforge.net/treebase/?rev=853&view=rev Author: rvos Date: 2011-05-12 18:42:09 +0000 (Thu, 12 May 2011) Log Message: ----------- Corrected to use namespacedGUID Modified Paths: -------------- trunk/treebase-web/src/main/webapp/WEB-INF/pages/limitedPhylowidget.jsp Modified: trunk/treebase-web/src/main/webapp/WEB-INF/pages/limitedPhylowidget.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/pages/limitedPhylowidget.jsp 2011-05-12 17:47:20 UTC (rev 852) +++ trunk/treebase-web/src/main/webapp/WEB-INF/pages/limitedPhylowidget.jsp 2011-05-12 18:42:09 UTC (rev 853) @@ -145,7 +145,7 @@ <script type="text/javascript"> function drawTree(){ YUI().use('oop', 'json-stringify', 'io-base', 'event', 'event-delegate', function(Y){ - var uri = "/treebase-web/"+document.TreeForm.treeList.value+"?format=nexml"; + var uri = "/treebase-web/phylows/tree/"+document.TreeForm.treeList.value+"?format=nexml"; function complete(id, o, args) { var data = o.responseXML; // Response data. var dataObject = { @@ -163,7 +163,7 @@ }); }; </script> - <div id="svgCanvas"></div> + <div id="svgCanvas" style="width:600px;height:600px"></div> </fieldset> </td> <td style="vertical-align:top"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2011-05-12 17:47:26
|
Revision: 852 http://treebase.svn.sourceforge.net/treebase/?rev=852&view=rev Author: rvos Date: 2011-05-12 17:47:20 +0000 (Thu, 12 May 2011) Log Message: ----------- Changed to use jsPhyloSVG Modified Paths: -------------- trunk/treebase-web/src/main/webapp/WEB-INF/pages/limitedPhylowidget.jsp Modified: trunk/treebase-web/src/main/webapp/WEB-INF/pages/limitedPhylowidget.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/pages/limitedPhylowidget.jsp 2011-05-12 17:46:33 UTC (rev 851) +++ trunk/treebase-web/src/main/webapp/WEB-INF/pages/limitedPhylowidget.jsp 2011-05-12 17:47:20 UTC (rev 852) @@ -5,11 +5,13 @@ <html> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> -<title>-Tree viewer/editor (PhyloWidget)</title> +<title>-Tree viewer</title> <script type="text/javascript" src="<c:url value='/scripts/prototype/prototype-1.6.0.3.js'/>"></script> <script type="text/javascript" src="<c:url value='/scripts/phylowidget/lib.js'/>"></script> <script type="text/javascript" src="<c:url value='/scripts/phylowidget.js'/>"></script> +<script type="text/javascript" src="<c:url value='/scripts/raphael-min.js'/>"></script> +<script type="text/javascript" src="<c:url value='/scripts/jsphylosvg-min.js'/>"></script> <style type="text/css"> body { @@ -98,7 +100,7 @@ <table id="content" style="margin-top: 5px"> <tr> <td style="vertical-align:top"> - <fieldset> + <%-- fieldset> <legend>PhyloWidget <a href="#" class="openHelp" onclick="openHelp('newPhyloWidget')"><img class="iconButton" src="<fmt:message key="icons.help"/>" /></a> </legend> @@ -135,6 +137,33 @@ To view this content, you need to install Java from <a href="http://java.com">java.com</a> </applet> + </fieldset --%> + <fieldset> + <legend>jsPhyloSVG + <a href="#" class="openHelp" onclick="openHelp('jsPhyloSVG')"><img class="iconButton" src="<fmt:message key="icons.help"/>" /></a> + </legend> + <script type="text/javascript"> + function drawTree(){ + YUI().use('oop', 'json-stringify', 'io-base', 'event', 'event-delegate', function(Y){ + var uri = "/treebase-web/"+document.TreeForm.treeList.value+"?format=nexml"; + function complete(id, o, args) { + var data = o.responseXML; // Response data. + var dataObject = { + nexml: data, + fileSource: true + }; + phylocanvas = new Smits.PhyloCanvas( + dataObject, + 'svgCanvas', + 600, 600 + ); + }; + Y.on('io:complete', complete, Y); + var request = Y.io(uri); + }); + }; + </script> + <div id="svgCanvas"></div> </fieldset> </td> <td style="vertical-align:top"> @@ -151,10 +180,13 @@ <select name="treeList" size="10" - onclick="javascript:pickTree();" + onclick="javascript:drawTree();" id="treeList"> - <c:forEach var="x" items="${NEWICKSTRINGSMAP}" > + <%--c:forEach var="x" items="${NEWICKSTRINGSMAP}" > <option value="${x.value}">${x.key}</option> + </c:forEach --%> + <c:forEach var="x" items="${PHYLOWSMAP}"> + <option value="${x.value}">${x.key}</option> </c:forEach> </select> </fieldset> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2011-05-12 17:46:39
|
Revision: 851 http://treebase.svn.sourceforge.net/treebase/?rev=851&view=rev Author: rvos Date: 2011-05-12 17:46:33 +0000 (Thu, 12 May 2011) Log Message: ----------- Added map to go from tree names to phylows paths Modified Paths: -------------- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/DirectMapToPhyloWidgetController.java Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/DirectMapToPhyloWidgetController.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/DirectMapToPhyloWidgetController.java 2011-05-12 17:38:26 UTC (rev 850) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/DirectMapToPhyloWidgetController.java 2011-05-12 17:46:33 UTC (rev 851) @@ -53,6 +53,7 @@ String defaultNewick = ""; String separator = "@"; Map<String, String> treeMap = new HashMap<String, String>(); + Map<String,String> phylowsMap = new HashMap<String,String>(); String newickStringName = null; if (pRequest.getParameter("treeblockid") != null) { @@ -71,6 +72,7 @@ for (PhyloTree aTree : TB.getTreeList()) { treeMap.put(getMapKey(aTree), aTree.getId() + separator + aTree.getNewickString() + separator + "T"); + phylowsMap.put(getMapKey(aTree), aTree.getPhyloWSPath().getPath()); if ( defaultNewick.equals("") ) { defaultNewick = aTree.getNewickString(); } @@ -96,6 +98,7 @@ // use "T" to enable the edit menu items. treeMap.put(getMapKey(aTree), TreeId + separator + aTree.getNewickString() + separator + "T"); + phylowsMap.put(getMapKey(aTree), aTree.getPhyloWSPath().getPath()); newickStringName = aTree.getTitle(); Study study = aTree.getStudy(); if ( study != null && study.isPublished() ) { @@ -107,6 +110,7 @@ pRequest.getSession().setAttribute("DEFAULTNEWICK", defaultNewick); pRequest.getSession().setAttribute("NEWICKSTRINGSMAP", treeMap); + pRequest.getSession().setAttribute("PHYLOWSMAP", phylowsMap); pRequest.getSession().setAttribute("NEWICKSTRINGNAME", newickStringName); return new ModelAndView(getDefaultView()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2011-05-12 17:38:35
|
Revision: 850 http://treebase.svn.sourceforge.net/treebase/?rev=850&view=rev Author: rvos Date: 2011-05-12 17:38:26 +0000 (Thu, 12 May 2011) Log Message: ----------- Adding jsPhyloSVG + prerequisites Added Paths: ----------- trunk/treebase-web/src/main/webapp/scripts/jsphylosvg-min.js trunk/treebase-web/src/main/webapp/scripts/raphael-min.js Added: trunk/treebase-web/src/main/webapp/scripts/jsphylosvg-min.js =================================================================== --- trunk/treebase-web/src/main/webapp/scripts/jsphylosvg-min.js (rev 0) +++ trunk/treebase-web/src/main/webapp/scripts/jsphylosvg-min.js 2011-05-12 17:38:26 UTC (rev 850) @@ -0,0 +1,73 @@ +Smits={}; +Smits.Common={nodeIdIncrement:0,activeNode:0,roundFloat:function(a,c){for(var b=0,f=1;b<c;)f*=10,b++;return Math.round(a*f)/f},apply:function(a,c){if(a&&typeof c=="object")for(var b in c)a[b]=c[b];return a},addEventHandler:function(a,c,b,f){try{a.addEventListener(c,function(a){return function(c){f.e=c;a(f)}}(b,f),!1)}catch(l){}},isInteger:function(a){return!isNaN(parseInt(a))},isXMLSerializerAvailable:function(){return typeof XMLSerializer=="function"?!0:!1},createSvgEl:function(a,c){a=document.createElementNS("http://www.w3.org/2000/svg",a); +if(c)for(var b in c)c.hasOwnProperty(b)&&a.setAttribute(b,String(c[b]));return a},createGradientEl:function(a,c,b){if(c.type!="radialGradient")return!1;a=Smits.Common.createSvgEl("radialGradient",{id:a,gradientUnits:"userSpaceOnUse",cx:b[0],cy:b[1],r:b[2],fx:b[0],fy:b[1]});if(c.stop){c=c.stop;for(b=0;b<c.length;b++){var f=c[b];f["@attributes"]?a.appendChild(Smits.Common.createSvgEl("stop",f["@attributes"])):(f._attributes&&delete f._attributes,f._children&&delete f._children,f.__proto__&&delete f.__proto__, +a.appendChild(Smits.Common.createSvgEl("stop",f)))}}return a},setCssStyle:function(a,c){var b=document.styleSheets[0];b.addRule?b.addRule(a,c):b.insertRule&&b.insertRule(a+" { "+c+" }",b.cssRules.length)}}; +Smits.PhyloCanvas=function(){var a,c,b,f;return function(l,m,q,g,n){this.getNewickObject=function(){};this.clear=function(){};this.scale=function(d){b.svg.scale(d)};this.getSvg=function(){return b};this.getPhylogram=function(){return a};this.getSvgSource=function(){return Raphael.svg&&Smits.Common.isXMLSerializerAvailable()?(new XMLSerializer).serializeToString(b.svg.canvas):!1};if(typeof l==="object")if(l.xml){var d=l.fileSource?l.xml:XMLObjectifier.textToXML(l.xml),d=XMLObjectifier.xmlToJSON(d); +f=new Smits.PhyloCanvas.PhyloxmlParse(d)}else l.phyloxml?(d=l.fileSource?l.phyloxml:XMLObjectifier.textToXML(l.phyloxml),d=XMLObjectifier.xmlToJSON(d),f=new Smits.PhyloCanvas.PhyloxmlParse(d)):l.nexml?(d=l.fileSource?l.nexml:XMLObjectifier.textToXML(l.nexml),d=XMLObjectifier.xmlToJSON(d),f=new Smits.PhyloCanvas.NexmlParse(d,l)):l.json?f=new Smits.PhyloCanvas.PhyloxmlParse(l.json):l.newick?f=new Smits.PhyloCanvas.NewickParse(l.newick):l.nexmlJson?f=new Smits.PhyloCanvas.NexmlJsonParse(l):alert("Please set the format of input data"); +else f=new Smits.PhyloCanvas.NewickParse(l);c=m;b=new Smits.PhyloCanvas.Render.SVG(c,q,g);a=n=="circular"?new Smits.PhyloCanvas.Render.CircularPhylogram(b,f):new Smits.PhyloCanvas.Render.Phylogram(b,f)}}();Smits.PhyloCanvas.prototype={};Smits.PhyloCanvas.Node=function(){return function(a,c){this.id=Smits.Common.nodeIdIncrement+=1;this.newickLen=this.len=this.level=0;this.type=this.name="";this.chart={};this.img=[];a&&Smits.Common.apply(this,a);this.children=[];c&&c.children.push(this)}}(); +Smits.PhyloCanvas.Node.prototype={getCountAllChildren:function(){var a=0,c;for(c in this.children)if(Smits.Common.isInteger(c)){var b=this.children[c];b.children&&b.children.length>0?a+=b.getCountAllChildren():a++}return a},getCountImmediateChildren:function(){var a=0,c;for(c in this.children)a+=this.children[c].length;return a},getMidbranchPosition:function(){for(var a=[0,0],c=0;c<this.children.length;c++){var b=this.children[c];b.children&&b.children.length>0?c==0?(a[0]=b.getMidbranchPosition(), +a[1]+=b.getCountAllChildren()):a[1]+=c==this.children.length-1?b.getMidbranchPosition():b.getCountAllChildren():(c==0&&(a[0]=1),a[1]+=1)}return a[1]>=a[0]?(a[1]-a[0])/2+a[0]:a[0]}}; +Smits.PhyloCanvas.NewickParse=function(){var a,c,b,f=0,l=0,m,q=function(a){for(var e=new Smits.PhyloCanvas.Node;c!==")"&&c!==",";)if(c===":"){if(d(),e.len=Smits.Common.roundFloat(n(),4),e.len==0)e.len=1.0E-4}else if(c==="'"||c==='"'){e.type="label";for(var g=e,k=c,b="";c!==k;)b+=c,d();g.name=b}else e.type="label",e.name=n();e.level=a.level+1;return e},g=function(a){var e=new Smits.PhyloCanvas.Node;if(a)e.level=a.level+1;for(;c!==")";)d(),c==="("?e.children.push(g(e)):e.children.push(q(e));d();if(c!== +":"&&c!==")"&&c!==","&&c!==";")e.type="label",e.name=n();if(c===":"){d();e.len=Smits.Common.roundFloat(n(),4);if(e.len==0)e.len=1.0E-4;e.type="stem"}return e},n=function(){for(var a="";c!==":"&&c!==")"&&c!==","&&c!==";";)a+=c,d();return a},d=function(){c=a.charAt(b);b+=1;return c},k=function(d){if(d.children&&d.children.length)for(var a=0;a<d.children.length;a++){var c=d.children[a];if(c.len===0)c.len=1;c.newickLen=Smits.Common.roundFloat(c.len+d.newickLen,4);if(c.level>f)f=c.level;if(c.newickLen> +l)l=c.newickLen;c.children.length>0&&k(c,d)}return d};return function(c){this.getRoot=function(){return m};this.getLevels=function(){return f};this.getNewickLen=function(){return l};this.getValidate=function(){};a=c;b=0;d();m=g();m=k(m)}}();Smits.PhyloCanvas.NewickParse.prototype={}; +Smits.PhyloCanvas.PhyloxmlParse=function(){var a=0,c=0,b,f,l=function(a,c){var d=new Smits.PhyloCanvas.Node;if(c)d.level=c.level+1;if(a.clade&&a.clade.length)for(var k=0;k<a.clade.length;k++)d.children.push(l(a.clade[k],d));if(a.branch_length){if(typeof a.branch_length==="object")a.branch_length=a.branch_length[0].Text;d.len=Smits.Common.roundFloat(a.branch_length,4);if(d.len==0)d.len=1.0E-4}if(a.name){d.type="label";d.name=a.name[0].Text;if(a.name[0]&&a.name[0].style)d.style=a.name[0].style;if(a.name[0]&& +a.name[0].bgStyle)d.bgStyle=a.name[0].bgStyle}else if(a.confidence)d.name=a.confidence[0].Text;if(a.sequence&&a.sequence[0]&&a.sequence[0].name&&a.sequence[0].name[0]&&a.sequence[0].name[0].Text)d.sequenceName=a.sequence[0].name[0].Text;if(a.taxonomy&&a.taxonomy[0]){if(a.taxonomy[0].scientific_name&&a.taxonomy[0].scientific_name[0]&&a.taxonomy[0].scientific_name[0].Text)d.taxonomyScientificName=a.taxonomy[0].scientific_name[0].Text;if(a.taxonomy[0].common_name&&a.taxonomy[0].common_name[0]&&a.taxonomy[0].common_name[0].Text)d.taxonomyCommonName= +a.taxonomy[0].common_name[0].Text}if(a.sequence&&a.sequence[0]&&a.sequence[0].accession&&a.sequence[0].accession[0]&&a.sequence[0].accession[0].Text)d.sequenceAccession=a.sequence[0].accession[0].Text;if(a.point)d.LatLong=[a.point[0].lat[0].Text,a.point[0]["long"][0].Text];if(!d.name){if(d.sequenceName)d.name=d.sequenceName;else if(d.taxonomyScientificName)d.name=d.taxonomyScientificName;else if(d.taxonomyCommonName)d.name=d.taxonomyCommonName;else if(d.sequenceAccession)d.name=d.sequenceAccession; +if(d.name)d.type="label"}if(a.annotation){if(a.annotation[0]&&a.annotation[0].desc&&a.annotation[0].desc[0]&&a.annotation[0].desc[0].Text)d.description=a.annotation[0].desc[0].Text;if(a.annotation[0]&&a.annotation[0].uri&&a.annotation[0].uri[0]&&a.annotation[0].uri[0].Text)d.uri=a.annotation[0].uri[0].Text;if(a.annotation[0]&&a.annotation[0].img)for(k in a.annotation[0].img)if(Smits.Common.isInteger(k))d.img[k]=a.annotation[0].img[k].Text}if(a.chart&&a.chart[0])for(k in a.chart[0])if(k!="Text"&&k!= +"_children")d.chart[k]=a.chart[0][k][0].Text;d&&d.level>1&&(d.len||(f="Error. Please include Branch Lengths - we only draw rooted phylogenetic trees."));return d},m=function(b){if(b.children&&b.children.length)for(var f=0;f<b.children.length;f++){var d=b.children[f];d.newickLen=Math.round((d.len+b.newickLen)*1E4)/1E4;if(d.level>a)a=d.level;if(d.newickLen>c)c=d.newickLen;d.children.length>0&&m(d,b)}return b},q=function(a,c){for(var d in a)d!="_children"&&d!="Text"&&(d=="rectangular"||d=="circular"? +q(a[d][0],d):(Smits.PhyloCanvas.Render.Parameters[d]||(Smits.PhyloCanvas.Render.Parameters[d]={}),Smits.PhyloCanvas.Render.Parameters.set(d,a[d][0].Text,c)))};return function(g){this.getRoot=function(){return b};this.getLevels=function(){return a};this.getNewickLen=function(){return c};this.getValidate=function(){return f};g.phylogeny&&g.phylogeny[0]&&g.phylogeny[0].clade&&(b=l(g.phylogeny[0].clade[0]));if(g.phylogeny&&g.phylogeny[0]&&g.phylogeny[0].render&&g.phylogeny[0].render[0]){if((g=g.phylogeny[0].render[0])&& +g.styles){var n=g.styles[0],d;for(d in n)if(d!="_children"&&d!="Text")if(n[d][0].type&&n[d][0].type=="radialGradient"&&Raphael.svg)n[d][0].name=d,Smits.PhyloCanvas.Render.Style[d]=n[d][0],Smits.PhyloCanvas.Render.Style.jsphylosvgGradientList||(Smits.PhyloCanvas.Render.Style.jsphylosvgGradientList=[]),Smits.PhyloCanvas.Render.Style.jsphylosvgGradientList.push(d);else for(var k in Smits.PhyloCanvas.Render.Style[d]||(Smits.PhyloCanvas.Render.Style[d]={}),n[d][0])k!="_attributes"&&k!="_children"&&k!= +"type"&&(Smits.PhyloCanvas.Render.Style[d][k.replace("_","-")]=n[d][0][k])}g&&g.parameters&&q(g.parameters[0]);if(g&&g.charts)for(d in g=g.charts[0],g)if(d!="_children"&&d!="Text")for(k in g[d])if(g[d][k].type=="binary")g[d][k].chart=d,Smits.PhyloCanvas.Render.Parameters.binaryCharts.push(g[d][k]);else if(g[d][k].type=="integratedBinary")g[d][k].chart=d,Smits.PhyloCanvas.Render.Parameters.integratedBinaryCharts.push(g[d][k]);else if(g[d][k].type=="bar")g[d][k].chart=d,Smits.PhyloCanvas.Render.Parameters.barCharts.push(g[d][k])}b= +m(b)}}();Smits.PhyloCanvas.PhyloxmlParse.prototype={}; +Smits.PhyloCanvas.NexmlParse=function(){var a=0,c=0,b,f,l,m,q=function(a,d,c){var j=new Smits.PhyloCanvas.Node;if(c)j.level=c.level+1;for(c=0;c<l.length;c++)if(l[c].source==a.id)for(var e=0;e<m.length;e++)l[c].target==m[e].id&&j.children.push(q(m[e],l[c].length,j));if(d&&(j.len=Smits.Common.roundFloat(d,4),j.len==0))j.len=1.0E-4;if(a.label&&(j.type="label",j.name=a.label,a.style))j.style=a.style;j&&j.level>1&&(j.len||(f="Error. Please include Branch Lengths - we only draw rooted phylogenetic trees."));return j}, +g=function(b){if(b.children&&b.children.length)for(var d=0;d<b.children.length;d++){var k=b.children[d];k.newickLen=Math.round((k.len+b.newickLen)*1E4)/1E4;if(k.level>a)a=k.level;if(k.newickLen>c)c=k.newickLen;k.children.length>0&&g(k,b)}return b};return function(n,d){this.getRoot=function(){return b};this.getLevels=function(){return a};this.getNewickLen=function(){return c};this.getValidate=function(){return f};d.tree&&n.trees[0]&&n.trees[0].tree[d.tree-1]?(l=n.trees[0].tree[d.tree-1].edge,m=n.trees[0].tree[d.tree- +1].node):(l=n.trees[0].tree[0].edge,m=n.trees[0].tree[0].node);for(i=0;i<m.length;i++)m[i].root&&m[i].root=="true"&&(b=m[i]);b?(b=q(b),b=g(b)):f="Error. Currently, only rooted NeXML trees are supported."}}();Smits.PhyloCanvas.NexmlParse.prototype={}; +Smits.PhyloCanvas.NexmlJsonParse=function(){var a=0,c=0,b,f,l=[],m=[],q=function(a,c,j){var e=new Smits.PhyloCanvas.Node;if(j)e.level=j.level+1;for(j=0;j<l.length;j++)if(l[j].source==a.id)for(var b=0;b<m.length;b++)l[j].target==m[b].id&&e.children.push(q(m[b],l[j].length,e));if(c&&(e.len=Smits.Common.roundFloat(c,4),e.len==0))e.len=1.0E-4;if(a.label){e.type="label";e.name=a.label;if(a.accession)e.accession=a.accession;if(a.style)e.style=a.style;if(a.bgStyle)e.bgStyle=a.bgStyle}if(a.chart)e.chart= +a.chart;e&&e.level>1&&(e.len||(f="Error. Please include Branch Lengths - we only draw rooted phylogenetic trees."));return e},g=function(d){if(d.children&&d.children.length)for(var b=0;b<d.children.length;b++){var j=d.children[b];j.newickLen=Math.round((j.len+d.newickLen)*1E4)/1E4;if(j.level>a)a=j.level;if(j.newickLen>c)c=j.newickLen;j.children.length>0&&g(j,d)}return d},n=function(a,c){for(var b in a)b!="_children"&&b!="Text"&&(b=="rectangular"||b=="circular"?n(a[b],b):(Smits.PhyloCanvas.Render.Parameters[b]|| +(Smits.PhyloCanvas.Render.Parameters[b]={}),Smits.PhyloCanvas.Render.Parameters.set(b,a[b],c)))};return function(d){this.getRoot=function(){return b};this.getLevels=function(){return a};this.getNewickLen=function(){return c};this.getValidate=function(){return f};var k=d.nexmlJson.nexml,j=k.render;if(j&&j.styles){var e=j.styles,h;for(h in e)if(h!="_children"&&h!="Text")if(e[h]["@attributes"].type&&e[h]["@attributes"].type=="radialGradient"&&Raphael.svg)e[h].name=h,e[h].type=e[h]["@attributes"].type, +Smits.PhyloCanvas.Render.Style[h]=e[h],Smits.PhyloCanvas.Render.Style.jsphylosvgGradientList||(Smits.PhyloCanvas.Render.Style.jsphylosvgGradientList=[]),Smits.PhyloCanvas.Render.Style.jsphylosvgGradientList.push(h);else for(var o in Smits.PhyloCanvas.Render.Style[h]||(Smits.PhyloCanvas.Render.Style[h]={}),e[h]["@attributes"])o!="_attributes"&&o!="_children"&&o!="type"&&(Smits.PhyloCanvas.Render.Style[h][o.replace("_","-")]=e[h]["@attributes"][o])}j&&j.parameters&&n(j.parameters);if(j&&j.charts)for(h in j= +j.charts,j)j[h]["@attributes"].chart=h,j[h]["@attributes"].type=="binary"?Smits.PhyloCanvas.Render.Parameters.binaryCharts.push(j[h]["@attributes"]):j[h]["@attributes"].type=="integratedBinary"?Smits.PhyloCanvas.Render.Parameters.integratedBinaryCharts.push(j[h]["@attributes"]):j[h]["@attributes"].type=="bar"&&Smits.PhyloCanvas.Render.Parameters.barCharts.push(j[h]["@attributes"]);if(d.tree&&k.trees[0]&&k.trees[0].tree[d.tree-1])l=k.trees[0].tree[d.tree-1].edge,m=k.trees[0].tree[d.tree-1].node;else{for(h= +0;h<k.trees.tree.edge.length;h++)l.push(k.trees.tree.edge[h]["@attributes"]);for(h=0;h<k.trees.tree.node.length;h++){d=k.trees.tree.node[h]["@attributes"];if(d.label)d.chart=k.trees.tree.node[h].chart;m.push(d)}}for(h=0;h<m.length;h++)m[h].root&&m[h].root=="true"&&(b=m[h]);b?(b=q(b),b=g(b)):f="Error. Currently, only rooted NeXML trees are supported."}}();Smits.PhyloCanvas.NexmlParse.prototype={};Smits.PhyloCanvas.Render={}; +Smits.PhyloCanvas.Render.Style={line:{stroke:"rgb(0,0,0)","stroke-width":1},text:{"font-family":"Verdana","font-size":12,"text-anchor":"start"},path:{stroke:"rgb(0,0,0)","stroke-width":1},connectedDash:{stroke:"rgb(200,200,200)","stroke-dasharray":". "},textSecantBg:{fill:"#EEE",stroke:"#DDD"},highlightedEdgeCircle:{fill:"red"},barChart:{fill:"#003300",stroke:"#DDD"},getStyle:function(a,c){return this[a]?this[a]:this[c]}}; +Smits.PhyloCanvas.Render.Parameters={jsOverride:0,Rectangular:{bufferX:200,bufferY:40,bufferInnerLabels:10,bufferOuterLabels:5,minHeightBetweenLeaves:10,alignPadding:0,alignRight:!1,showScaleBar:!1},Circular:{bufferRadius:0.33,bufferAngle:20,initStartAngle:160,innerCircleRadius:0,minHeightBetweenLeaves:5,bufferInnerLabels:2,bufferOuterLabels:5},binaryCharts:[],integratedBinaryCharts:[],barCharts:[],binaryChartBufferInner:5,binaryChartBufferSiblings:0.01,binaryChartThickness:15,binaryChartDisjointed:!1, +barChartBufferInner:3,barChartHeight:50,barChartWidth:0.5,mouseRollOver:function(a){if(a.node.edgeCircleHighlight)a.node.edgeCircleHighlight.show();else{var c=a.svg.draw(new Smits.PhyloCanvas.Render.Circle(a.x,a.y,5,{attr:Smits.PhyloCanvas.Render.Style.highlightedEdgeCircle}));a.node.edgeCircleHighlight=c[0]}a.textEl.attr({fill:"red"})},mouseRollOut:function(a){a.node.edgeCircleHighlight.hide();a.textEl.attr({fill:"#000"})},set:function(a,c,b){this.jsOverride||(b?b=="circular"?this.Circular[a]=parseFloat(c): +b=="rectangular"&&(this.Rectangular[a]=parseFloat(c)):this[a]=parseFloat(c))}};Smits.PhyloCanvas.Render.Line=function(){return function(a,c,b,f,l){this.type="line";this.attr=Smits.PhyloCanvas.Render.Style.line;this.x1=a;this.x2=c;this.y1=b;this.y2=f;if(l&&(Smits.Common.apply(this,l),l.attr))this.attr=l.attr}}(); +Smits.PhyloCanvas.Render.Text=function(){return function(a,c,b,f){this.type="text";this.attr=Smits.PhyloCanvas.Render.Style.text;this.x=a;this.y=c;this.text=b;if(f&&(Smits.Common.apply(this,f),f.attr))this.attr=f.attr}}();Smits.PhyloCanvas.Render.Path=function(){return function(a,c){this.type="path";this.attr=Smits.PhyloCanvas.Render.Style.path;this.path=a;if(c&&(Smits.Common.apply(this,c),c.attr))this.attr=c.attr}}(); +Smits.PhyloCanvas.Render.Circle=function(){return function(a,c,b,f){this.type="circle";this.x=a;this.y=c;this.radius=b;if(f&&(Smits.Common.apply(this,f),f.attr))this.attr=f.attr}}();Smits.PhyloCanvas.Render.SVG=function(){return function(a,c,b){this.canvasSize=[c,b];this.svg=Raphael(a,this.canvasSize[0],this.canvasSize[1])}}(); +Smits.PhyloCanvas.Render.SVG.prototype={render:function(){for(var a=this.phylogramObject.getDrawInstructs(),c=0;c<a.length;c++)if(a[c].type=="line")this.svg.path(["M",a[c].x1,a[c].y1,"L",a[c].x2,a[c].y2]).attr(Smits.PhyloCanvas.Render.Style.line);else if(a[c].type=="path")this.svg.path(a[c].path).attr(a[c].attr);else if(a[c].type=="circle")this.svg.circle(a[c].x,a[c].y,a[c].radius).attr({stroke:"red"});else{var b=this.svg.text(a[c].x,a[c].y,a[c].text).attr(Smits.PhyloCanvas.Render.Style.text);a[c].attr&& +b.attr(a[c].attr);a[c].rotate&&b.rotate(a[c].rotate);b.getBBox()}},draw:function(a){var c,b;a.type=="line"?c=this.svg.path(["M",a.x1,a.y1,"L",a.x2,a.y2]).attr(Smits.PhyloCanvas.Render.Style.line):a.type=="path"?c=this.svg.path(a.path).attr(a.attr):a.type=="circle"?c=this.svg.circle(a.x,a.y,a.radius).attr({stroke:"red"}):a.type=="text"&&(c=this.svg.text(a.x,a.y,a.text).attr(Smits.PhyloCanvas.Render.Style.text),a.attr&&c.attr(a.attr),a.rotate&&c.rotate(a.rotate),a=c.getBBox(),b=Math.sqrt(a.height*a.height+ +a.width*a.width));return[c,b]}}; +Smits.PhyloCanvas.Render.Phylogram=function(){var a,c=Smits.PhyloCanvas.Render.Parameters.Rectangular,b,f,l,m,q,g,n=!0,d=0,k=0,j,e,h,o,p=[],r=function(b,e){b.len&&(n?n=!1:b.children.length==0&&(d=Smits.Common.roundFloat(d+m,4)));if(b.children.length>0){var j=[],h,f,o,g;b.len&&(h=e,f=e=Smits.Common.roundFloat(e+l*b.len,4),g=o=d+b.getMidbranchPosition()*m,a.draw(new Smits.PhyloCanvas.Render.Line(h,f,o,g)));if(b.name){h={};h=Smits.PhyloCanvas.Render.Style.getStyle("bootstrap","text");if(b.uri)h.href= +b.uri;if(b.description)h.title=b.description;if(b.level==0){f=2;var u=d+b.getMidbranchPosition()*m}else u=g;a.draw(new Smits.PhyloCanvas.Render.Text(f+5,u,b.name,{attr:h}))}if(b.children&&b.children.length)for(f=0;f<b.children.length;f++)j.push(r(b.children[f],e));h=[];for(f=0;f<j.length;f++)j[f][0]&&h.push(j[f][0]),j[f][1]&&h.push(j[f][1]);j=Math.min.apply(null,h);h=Math.max.apply(null,h);a.draw(new Smits.PhyloCanvas.Render.Path(["M",e+1.0E-4,j,"L",e,j,"L",e,h,"L",e+1.0E-4,h],{attr:Smits.PhyloCanvas.Render.Style.line}))}else if(h= +e,f=Smits.Common.roundFloat(e+l*b.len,2),g=o=d,b.y=d,p.push(b),a.draw(new Smits.PhyloCanvas.Render.Line(h,f,o,g)),c.alignRight&&a.draw(new Smits.PhyloCanvas.Render.Path(["M",f,o,"L",c.alignPadding+q,g],{attr:Smits.PhyloCanvas.Render.Style.connectedDash})),b.name){h={};b.style&&(h=Smits.PhyloCanvas.Render.Style.getStyle(b.style,"text"));h["text-anchor"]="start";if(b.uri)h.href=b.uri;if(b.description)h.title=b.description;j=a.draw(new Smits.PhyloCanvas.Render.Text(c.alignRight?q+c.bufferInnerLabels+ +c.alignPadding:f+c.bufferInnerLabels,g,b.name,{attr:h}));b.style&&console.log([b,h]);k=Math.max(j[1],k);Smits.PhyloCanvas.Render.Parameters.mouseRollOver&&Smits.Common.addEventHandler(j[0].node,"mouseover",Smits.PhyloCanvas.Render.Parameters.mouseRollOver,{svg:a,node:b,x:f,y:g,textEl:j[0]});Smits.PhyloCanvas.Render.Parameters.mouseRollOut&&Smits.Common.addEventHandler(j[0].node,"mouseout",Smits.PhyloCanvas.Render.Parameters.mouseRollOut,{svg:a,node:b,x:f,y:g,textEl:j[0]});Smits.PhyloCanvas.Render.Parameters.onClickAction&& +Smits.Common.addEventHandler(j[0].node,"click",Smits.PhyloCanvas.Render.Parameters.onClickAction,{svg:a,node:b,x:f,y:g,textEl:j[0]})}return[o,g]},u=function(d,c,b){for(var e=(b&&b.bufferInner?b.bufferInner:0)|Smits.PhyloCanvas.Render.Parameters.binaryChartBufferInner,j=(b&&b.bufferSiblings?b.bufferSiblings*m:0)|(Smits.PhyloCanvas.Render.Parameters.binaryChartBufferSiblings<1?m*Smits.PhyloCanvas.Render.Parameters.binaryChartBufferSiblings:Smits.PhyloCanvas.Render.Parameters.binaryChartBufferSiblings), +b=(b&&b.thickness?b.thickness:0)|Smits.PhyloCanvas.Render.Parameters.binaryChartThickness,h=0;h<p.length;h++){var k=p[h];a.draw(new Smits.PhyloCanvas.Render.Path(["M",d+e,k.y-m/2+j/2,"L",d+e+b,k.y-m/2+j/2,"L",d+e+b,k.y+m/2-j/2,"L",d+e,k.y+m/2-j/2,"Z"],{attr:Smits.PhyloCanvas.Render.Style.getStyle(k.chart[c],"textSecantBg")}))}return d+e+b},A=function(d,c,b){for(var e=[],j=b&&b.bufferInner?b.bufferInner:0|Smits.PhyloCanvas.Render.Parameters.barChartBufferInner,h=b&&b.height?b.height:0|Smits.PhyloCanvas.Render.Parameters.barChartHeight, +b=b&&b.width?b.width<1?m*b.width:b.width:0|(Smits.PhyloCanvas.Render.Parameters.barChartWidth<1?m*Smits.PhyloCanvas.Render.Parameters.barChartWidth:Smits.PhyloCanvas.Render.Parameters.barChartWidth),k=0,f=0;f<p.length;f++)e.push(p[f].chart[c]);e=Math.max.apply(null,e);k=Smits.Common.roundFloat(h/e,4);for(f=0;f<p.length;f++)e=p[f],a.draw(new Smits.PhyloCanvas.Render.Path(["M",d+j,e.y-b/2,"L",d+j+k*e.chart[c],e.y-b/2,"L",d+j+k*e.chart[c],e.y+b/2,"L",d+j,e.y+b/2,"Z"],{attr:Smits.PhyloCanvas.Render.Style.getStyle(e.chart[c], +"barChart")}));return d+j+h};return function(p,n){d=0;this.getCanvasSize=function(){return[b,f]};this.getRoot=function(){return n.getRoot()};n.getValidate()&&a.draw(0,0,n.getValidate());a=p;var t=n.getRoot(),C=n.getNewickLen();b=a.canvasSize[0];f=a.canvasSize[1];h=c.bufferX;o=c.bufferY;g=c.minHeightBetweenLeaves;l=Math.round((b-h)/C);m=Math.round((f-o)/(c.showScaleBar?t.getCountAllChildren()+1:t.getCountAllChildren()));m<g&&(m=g);q=Math.round(b-h);if(Smits.PhyloCanvas.Render.Parameters.binaryCharts.length|| +Smits.PhyloCanvas.Render.Parameters.barCharts.length)c.alignRight=!0;r(t,0);c.showScaleBar&&(y=d+m,e=c.showScaleBar*l,a.draw(new Smits.PhyloCanvas.Render.Line(0,e,y,y)),a.draw(new Smits.PhyloCanvas.Render.Text((0+e)/2,y-8,c.showScaleBar)));j=q+k+c.bufferInnerLabels;if(Smits.PhyloCanvas.Render.Parameters.binaryCharts.length){var t=Smits.PhyloCanvas.Render.Parameters.binaryCharts,s;for(s in t)j=u(j,t[s].chart,t[s])}if(Smits.PhyloCanvas.Render.Parameters.barCharts.length)for(s in t=Smits.PhyloCanvas.Render.Parameters.barCharts, +t)A(j,t[s].chart,t[s])}}();Smits.PhyloCanvas.Render.Phylogram.prototype={}; +Smits.PhyloCanvas.Render.CircularPhylogram=function(){function a(a,d){d+=E;return[Smits.Common.roundFloat(t+a*Math.sin(d*G),4),Smits.Common.roundFloat(C+a*Math.cos(d*G),4)]}function c(a){a=l(90-a-E);if(a>90&&a<270){a+=180;var d="end"}else d="start";return[a,d]}function b(d,b,c,e){var j=a(d,b),h=a(d,c),k=[],f=0,b=Math.abs(l(c-b))>180?1:-1;e&&e.invertSecant&&(b*=-1,f=1);(!e||!e.noMove)&&k.push("M");k.push(j[0],j[1],"A",d,d,0,b<1?0:1,f,h[0],h[1]);return k}function f(d,b,c,e){var j=[],b=a(b,d),d=a(c, +d);(!e||!e.noMove)&&j.push("M");j.push(b[0],b[1],"L",d[0],d[1]);return j}function l(a){for(;a>360||a<0;)a>360?a-=360:a<0&&(a+=360);return a}function m(a,d,c,e){!d&&a.length>1&&(e=a[3],c=a[2],d=a[1],a=a[0]);return g("M",b(a,c,e,{noMove:1,invertSecant:0}),"L",b(d,e,c,{noMove:1,invertSecant:1}),"Z")}function q(d,h){d.len&&(F?(B=D||1,F=!1):d.children.length==0&&(B=Smits.Common.roundFloat(B+u,4)));if(d.children.length>0){var k=[],p,l,o;p=h;l=h+=Smits.Common.roundFloat(r*d.len,4);if(d.children&&d.children.length)for(var m= +0;m<d.children.length;m++){var n=q(d.children[m],h);n>0&&k.push(n)}m=Smits.Common.roundFloat(Math.min.apply(null,k),4);k=Smits.Common.roundFloat(Math.max.apply(null,k),4);j.draw(new Smits.PhyloCanvas.Render.Path(g("M",a(h+0.01,m),"L",b(h,m,k,{noMove:!0}),"L",a(h+0.01,k))));d.len&&(o=Smits.Common.roundFloat(m+(k-m)/2,4),j.draw(new Smits.PhyloCanvas.Render.Path(f(o,p,l))))}else if(d.y=B,w.push(d),p=h,l=Smits.Common.roundFloat(h+r*d.len),o=B,j.draw(new Smits.PhyloCanvas.Render.Path(f(o,p,l))),j.draw(new Smits.PhyloCanvas.Render.Path(f(o, +l,s),{attr:Smits.PhyloCanvas.Render.Style.connectedDash})),d.name){p=a(s+e.bufferInnerLabels,o);m=c(o);k=m[0];m=m[1];n={};d.style&&Smits.Common.apply(n,Smits.PhyloCanvas.Render.Style.getStyle(d.style,"text"));n["text-anchor"]=m;if(d.uri)n.href=d.uri;if(d.description)n.title=d.description;k=j.draw(new Smits.PhyloCanvas.Render.Text(p[0],p[1],d.name,{attr:n,rotate:[k,p[0],p[1]]}));d.bgStyle&&v.push([d.bgStyle,o]);p=a(l,o);Smits.PhyloCanvas.Render.Parameters.mouseRollOver&&Smits.Common.addEventHandler(k[0].node, +"mouseover",Smits.PhyloCanvas.Render.Parameters.mouseRollOver,{svg:j,node:d,x:p[0],y:p[1],textEl:k[0]});Smits.PhyloCanvas.Render.Parameters.mouseRollOut&&Smits.Common.addEventHandler(k[0].node,"mouseout",Smits.PhyloCanvas.Render.Parameters.mouseRollOut,{svg:j,node:d,x:p[0],y:p[1],textEl:k[0]});Smits.PhyloCanvas.Render.Parameters.onClickAction&&Smits.Common.addEventHandler(k[0].node,"click",Smits.PhyloCanvas.Render.Parameters.onClickAction,{svg:j,node:d,x:p[0],y:p[1],textEl:k[0]});z=Math.max(k[1], +z)}return o}function g(a){for(var d=a,b=1;b<arguments.length;b++)d=d.concat(arguments[b]);return d}function n(){var a=[];if(v.length>0){if(Smits.PhyloCanvas.Render.Style.jsphylosvgGradientList)for(var d=0;d<Smits.PhyloCanvas.Render.Style.jsphylosvgGradientList.length;d++){var b=Smits.PhyloCanvas.Render.Style.jsphylosvgGradientList[d],b=Smits.Common.createGradientEl(b,Smits.PhyloCanvas.Render.Style[b],[t,C,s+z+e.bufferOuterLabels]);j.svg.defs.appendChild(b)}for(d=0;d<v.length;d++)d!=v.length-1&&v[d][0]== +v[d+1][0]?v[d+1][2]=v[d][2]?v[d][2]:v[d][1]:(a=m(s,s+z+e.bufferOuterLabels,v[d][2]?v[d][2]-u/2:v[d][1]-u/2,v[d][1]+u/2),b=Smits.PhyloCanvas.Render.Style.getStyle(v[d][0],"textSecantBg"),a=j.draw(new Smits.PhyloCanvas.Render.Path(a,{attr:b.type?{}:b})),b.type&&b.type=="radialGradient"&&a[0].node.setAttribute("fill","url(#"+b.name+")"),b.type&&b.type=="radialGradient"&&a[0].node.setAttribute("stroke","none"),a[0].toBack())}a=m(s,s+z+e.bufferOuterLabels,(D||1)+u/2,360+u/2);a=j.draw(new Smits.PhyloCanvas.Render.Path(a, +{attr:Smits.PhyloCanvas.Render.Style.textSecantBg}));a[0].toBack();return s+z+e.bufferOuterLabels}function d(d,b,e){for(var h=e&&e.bufferInner?parseFloat(e.bufferInner):Smits.PhyloCanvas.Render.Parameters.binaryChartBufferInner,k=(e&&e.bufferSiblings?e.bufferSiblings*u:0)|(Smits.PhyloCanvas.Render.Parameters.binaryChartBufferSiblings<1?u*Smits.PhyloCanvas.Render.Parameters.binaryChartBufferSiblings:Smits.PhyloCanvas.Render.Parameters.binaryChartBufferSiblings),f=e&&e.thickness?parseFloat(e.thickness): +Smits.PhyloCanvas.Render.Parameters.binaryChartThickness,p=(e&&e.disjointed?e.disjointed:0)|Smits.PhyloCanvas.Render.Parameters.binaryChartDisjointed,e=e&&e.isInternal?e.isInternal:!1,o=!0,g,n=0;n<w.length;n++){var r=w[n];if((!w[n+1]||r.chart[b]!==w[n+1].chart[b]||p)&&r.chart[b]!="none"){var q=Smits.PhyloCanvas.Render.Style.getStyle(r.chart[b],"textSecantBg");g=e?[s-h-f,s-h,(g?g:r.y)-u/2+(o&&!p?0:k/2),r.y+u/2-(n==w.length-1&&!p?0:k/2)]:[d+h,d+h+f,(g?g:r.y)-u/2+(o&&!p?0:k/2),r.y+u/2-(n==w.length-1&& +!p?0:k/2)];if(q.label){var o=Smits.PhyloCanvas.Render.Style.getStyle(q.labelStyle,"text"),r=a((g[0]+g[1])/2,(g[2]+g[3])/2),t=c((g[2]+g[3])/2),t=l(t[0]+(o.rotate?parseFloat(o.rotate):0)),v=l(90-(g[2]+g[3])/2-E);v>90&&v<270&&(t+=180);o["text-anchor"]||(o["text-anchor"]="middle");j.draw(new Smits.PhyloCanvas.Render.Text(r[0],r[1],q.label,{attr:o,rotate:t}))[0].toBack()}q.borderStyle&&(o=Smits.PhyloCanvas.Render.Style.getStyle(q.borderStyle,"textSecantBg"),j.draw(new Smits.PhyloCanvas.Render.Path(m([s, +o.fullsize?g[1]:g[0],g[2],g[3]]),{attr:o}))[0].toBack());j.draw(new Smits.PhyloCanvas.Render.Path(m(g),{attr:q}))[0].toBack();g=0}else{if(!g)g=r.y;r.chart[b]=="none"&&(g=0)}o=!1}return e?d:d+h+f}function k(d,a,b){for(var c=[],e=b&&b.bufferInner?parseFloat(b.bufferInner):Smits.PhyloCanvas.Render.Parameters.barChartBufferInner,h=b&&b.height?parseFloat(b.height):Smits.PhyloCanvas.Render.Parameters.barChartHeight?Smits.PhyloCanvas.Render.Parameters.barChartHeight:0,b=b&&b.width?parseFloat(b.width)<1? +u*parseFloat(b.width):parseFloat(b.width):0|(Smits.PhyloCanvas.Render.Parameters.barChartWidth<1?u*Smits.PhyloCanvas.Render.Parameters.barChartWidth:Smits.PhyloCanvas.Render.Parameters.barChartWidth),k=0,f=0;f<w.length;f++)c.push(w[f].chart[a]);c=Math.max.apply(null,c);k=Smits.Common.roundFloat(h/c,4);for(f=0;f<w.length;f++)c=w[f],c.chart[a]>0&&j.draw(new Smits.PhyloCanvas.Render.Path(m(d+e,d+e+k*c.chart[a],c.y-b/2,c.y+b/2),{attr:Smits.PhyloCanvas.Render.Style.getStyle(c.chart[a],"barChart")}));return d+ +e+h}var j,e=Smits.PhyloCanvas.Render.Parameters.Circular,h,o,p,r,u,A,F=!0,B=0,t,C,s,w=[],v=[],D,x,z=0,E,G=Math.PI/180;return function(a,b,c){this.getCanvasSize=function(){return[h,o]};this.getRoot=function(){return b.getRoot()};if(b.getValidate())a.draw({type:"text",x:0,y:a.canvasSize[1]/3,text:b.getValidate()});else{j=a;var a=b.getRoot(),f=b.getNewickLen();h=j.canvasSize[0];o=j.canvasSize[1];t=h/2;C=o/2;p=Math.min.apply(null,[h,o]);c=e.bufferRadius>1?e.bufferRadius:Smits.Common.roundFloat(p*e.bufferRadius, +4);D=e.bufferAngle;A=e.innerCircleRadius;E=e.initStartAngle;s=Math.round((p-c-A)/2);r=(s-A)/f;u=Smits.Common.roundFloat((360-D)/a.getCountAllChildren(),4);q(a,A);x=s+z+e.bufferOuterLabels;if(Smits.PhyloCanvas.Render.Parameters.integratedBinaryCharts.length){var c=Smits.PhyloCanvas.Render.Parameters.integratedBinaryCharts,g;for(g in c)x=d(x-(c[g].thickness?c[g].thickness:Smits.PhyloCanvas.Render.Parameters.binaryChartThickness)-(c[g].bufferInner?c[g].bufferInner:Smits.PhyloCanvas.Render.Parameters.binaryChartBufferInner), +c[g].chart,c[g])}x=n();if(Smits.PhyloCanvas.Render.Parameters.binaryCharts.length)for(g in c=Smits.PhyloCanvas.Render.Parameters.binaryCharts,c)x=d(x,c[g].chart,c[g]);if(Smits.PhyloCanvas.Render.Parameters.barCharts.length)for(g in c=Smits.PhyloCanvas.Render.Parameters.barCharts,c)x=k(x,c[g].chart,c[g])}}}();Smits.PhyloCanvas.Render.CircularPhylogram.prototype={}; +var XMLObjectifier=function(){var a=function(a){var b="";a&&typeof a==="string"&&(b=a);return/^((-)?([0-9]*)((\.{0,1})([0-9]+))?$)/.test(b)};return{xmlToJSON:function(c){try{if(!c)return null;var b={typeOf:"JSXBObject"},f=c.nodeType==9?c.documentElement:c;b.RootName=f.nodeName||"";if(c.nodeType==3||c.nodeType==4)return c.nodeValue;var l=function(a){return a.replace(/^\s+|\s+$/gm,"")},m=function(a,b){if(b.attributes.length>0){var c=b.attributes.length-1,e;a._attributes=[];do e=String(String(b.attributes[c].name).replace(/-/g, +"_")),a._attributes.push(e),a[e]=l(b.attributes[c].value);while(c--)}};(function(){return{activate:function(){var a=[];a.getNodesByAttribute=function(b,c){if(a&&a.length>0){var e=[],h,f=a.length-1;try{do h=a[f],h[b]===c&&e.push(h);while(f--);e.reverse();return e}catch(g){}return null}};a.getNodeByAttribute=function(b,c){if(a&&a.length>0){var e,h=a.length-1;try{do if(e=a[h],e[b]===c)return e;while(h--)}catch(f){}return null}};a.getNodesByValue=function(b){if(a&&a.length>0){var c=[],e,h=a.length-1; +try{do e=a[h],e.Text&&e.Text===b&&c.push(e);while(h--);return c}catch(f){}return null}};a.contains=function(b,c){if(a&&a.length>0){var e=a.length-1;try{do if(a[e][b]===c)return!0;while(e--)}catch(h){}return!1}};a.indexOf=function(b,c){var e=-1;if(a&&a.length>0){var h=a.length-1;try{do a[h][b]===c&&(e=h);while(h--)}catch(f){return-1}return e}};a.SortByAttribute=function(b,c){if(a&&a.length>0){var e=function(a,b){var d=a[b];return d=bam.validation.isNumeric(d)?parseFloat(d):d};a.sort(function(a,d){var f, +g;f=e(a,b);g=e(d,b);f=f<g?-1:g<f?1:0;c&&(f=c.toUpperCase()==="DESC"?0-f:f);return f})}};a.SortByValue=function(b){if(a&&a.length>0){var c=function(a){a=a.Text;return a=bam.validation.isNumeric(a)?parseFloat(a):a};a.sort(function(a,d){var f,g;f=c(a);g=c(d);f=f<g?-1:g<f?1:0;b&&(f=b.toUpperCase()==="DESC"?0-f:f);return f})}};a.SortByNode=function(b,c){if(a&&a.length>0){var e=function(a,b){var d=a[b][0].Text;return d=bam.validation.isNumeric(d)?parseFloat(d):d};a.sort(function(a,d){var f,g;f=e(a,b);g= +e(d,b);f=f<g?-1:g<f?1:0;c&&(f=c.toUpperCase()==="DESC"?0-f:f);return f})}};return a}}})();var q=function(b){b.getNodeByAttribute=function(a,b){if(this.length>0){var d,c=this.length-1;try{do if(d=this[c],d[a]==b)return d;while(c--)}catch(f){}return!1}};b.contains=function(a,b){if(this.length>0){var d=this.length-1;try{do if(this[d][a]==b)return!0;while(d--)}catch(c){}return!1}};b.indexOf=function(a,b){var d=-1;if(this.length>0){var c=this.length-1;try{do this[c][a]==b&&(d=c);while(c--)}catch(f){return-1}return d}}; +b.SortByAttribute=function(b,d){if(this.length){var c=function(b,d){var c=b[d];return c=a(c)?parseFloat(c):c};this.sort(function(a,f){var g=0,l,m;l=c(a,b);m=c(f,b);l<m?g=-1:m<l&&(g=1);d&&(g=d.toUpperCase()=="DESC"?0-g:g);return g})}};b.SortByValue=function(b){if(this.length){var d=function(b){b=b.Text;return b=a(b)?parseFloat(b):b};this.sort(function(a,c){var f=0,g,l;g=d(a);l=d(c);g<l?f=-1:l<g&&(f=1);b&&(f=b.toUpperCase()=="DESC"?0-f:f);return f})}};b.SortByNode=function(b,d){if(this.length){var c= +function(b,d){var c=b[d][0].Text;return c=a(c)?parseFloat(c):c};this.sort(function(a,f){var g=0,l,m;l=c(a,b);m=c(f,b);l<m?g=-1:m<l&&(g=1);d&&(g=d.toUpperCase()=="DESC"?0-g:g);return g})}}},g=function(a,b){var c,e,f,n="";if(!b)return null;b.attributes.length>0&&m(a,b);a.Text="";if(b.hasChildNodes()){var p=b.childNodes.length-1,r=0;do switch(e=b.childNodes[r],e.nodeType){case 1:a._children=[];c=e.localName?e.localName:e.baseName;c=String(c).replace(/-/g,"_");n!=c&&a._children.push(c);a[c]||(a[c]=[]); +f={};a[c].push(f);e.attributes.length>0&&m(f,e);a[c].contains||q(a[c]);n=c;e.hasChildNodes()&&g(f,e);break;case 3:a.Text+=l(e.nodeValue);break;case 4:a.Text+=e.text?l(e.text):l(e.nodeValue)}while(r++<p)}};g(b,f);f=c=null;return b}catch(n){return null}},textToXML:function(a){var b=null;try{b=document.all?new ActiveXObject("Microsoft.XMLDOM"):new DOMParser,b.async=!1}catch(f){throw Error("XML Parser could not be instantiated");}var l;try{l=document.all?b.loadXML(a)?b:!1:b.parseFromString(a,"text/xml")}catch(m){throw Error("Error parsing XML string"); +}return l}}}(); Property changes on: trunk/treebase-web/src/main/webapp/scripts/jsphylosvg-min.js ___________________________________________________________________ Added: svn:executable + * Added: trunk/treebase-web/src/main/webapp/scripts/raphael-min.js =================================================================== --- trunk/treebase-web/src/main/webapp/scripts/raphael-min.js (rev 0) +++ trunk/treebase-web/src/main/webapp/scripts/raphael-min.js 2011-05-12 17:38:26 UTC (rev 850) @@ -0,0 +1,113 @@ +/* + * Raphael 1.4.3 - JavaScript Vector Library + * + * Copyright (c) 2010 Dmitry Baranovskiy (http://raphaeljs.com) + * Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license. + */ +Raphael=function(){function m(){if(m.is(arguments[0],U)){for(var a=arguments[0],b=Aa[K](m,a.splice(0,3+m.is(a[0],O))),c=b.set(),d=0,f=a[o];d<f;d++){var e=a[d]||{};nb.test(e.type)&&c[E](b[e.type]().attr(e))}return c}return Aa[K](m,arguments)}m.version="1.4.3";var V=/[, ]+/,nb=/^(circle|rect|path|ellipse|text|image)$/,p="prototype",z="hasOwnProperty",C=document,X=window,La={was:Object[p][z].call(X,"Raphael"),is:X.Raphael};function G(){}var y="appendChild",K="apply",M="concat",Ba="createTouch"in C,s= +"",P=" ",H="split",Ma="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend orientationchange touchcancel gesturestart gesturechange gestureend"[H](P),Ca={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},Q="join",o="length",ca=String[p].toLowerCase,w=Math,Y=w.max,$=w.min,O="number",ea="string",U="array",N="toString",aa="fill",ob=Object[p][N],D=w.pow,E="push",ga=/^(?=[\da-f]$)/,Na=/^url\(['"]?([^\)]+?)['"]?\)$/i,pb=/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+\s*,\s*[\d\.]+\s*,\s*[\d\.]+(?:\s*,\s*[\d\.]+)?)\s*\)|rgba?\(\s*([\d\.]+%\s*,\s*[\d\.]+%\s*,\s*[\d\.]+%(?:\s*,\s*[\d\.]+%))\s*\)|hs[bl]\(\s*([\d\.]+\s*,\s*[\d\.]+\s*,\s*[\d\.]+)\s*\)|hs[bl]\(\s*([\d\.]+%\s*,\s*[\d\.]+%\s*,\s*[\d\.]+%)\s*\))\s*$/i, +F=w.round,W="setAttribute",A=parseFloat,da=parseInt,Da=" progid:DXImageTransform.Microsoft",pa=String[p].toUpperCase,qa={blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"http://raphaeljs.com/",opacity:1,path:"M0,0",r:0,rotation:0,rx:0,ry:0,scale:"1 1",src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt", +"stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank","text-anchor":"middle",title:"Raphael",translation:"0 0",width:0,x:0,y:0},Ea={along:"along",blur:O,"clip-rect":"csv",cx:O,cy:O,fill:"colour","fill-opacity":O,"font-size":O,height:O,opacity:O,path:"path",r:O,rotation:"csv",rx:O,ry:O,scale:"csv",stroke:"colour","stroke-opacity":O,"stroke-width":O,translation:"csv",width:O,x:O,y:O},I="replace";m.type=X.SVGAngle||C.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", +"1.1")?"SVG":"VML";if(m.type=="VML"){var ha=C.createElement("div");ha.innerHTML="<!--[if vml]><br><br><![endif]--\>";if(ha.childNodes[o]!=2)return m.type=null;ha=null}m.svg=!(m.vml=m.type=="VML");G[p]=m[p];m._id=0;m._oid=0;m.fn={};m.is=function(a,b){b=ca.call(b);return b=="object"&&a===Object(a)||b=="undefined"&&typeof a==b||b=="null"&&a==null||ca.call(ob.call(a).slice(8,-1))==b};m.setWindow=function(a){X=a;C=X.document};function ra(a){if(m.vml){var b=/^\s+|\s+$/g;ra=T(function(d){var f;d=(d+s)[I](b, +s);try{var e=new X.ActiveXObject("htmlfile");e.write("<body>");e.close();f=e.body}catch(g){f=X.createPopup().document.body}e=f.createTextRange();try{f.style.color=d;var h=e.queryCommandValue("ForeColor");h=(h&255)<<16|h&65280|(h&16711680)>>>16;return"#"+("000000"+h[N](16)).slice(-6)}catch(i){return"none"}})}else{var c=C.createElement("i");c.title="Rapha\u00ebl Colour Picker";c.style.display="none";C.body[y](c);ra=T(function(d){c.style.color=d;return C.defaultView.getComputedStyle(c,s).getPropertyValue("color")})}return ra(a)} +function qb(){return"hsb("+[this.h,this.s,this.b]+")"}function rb(){return this.hex}m.hsb2rgb=T(function(a,b,c){if(m.is(a,"object")&&"h"in a&&"s"in a&&"b"in a){c=a.b;b=a.s;a=a.h}var d;if(c==0)return{r:0,g:0,b:0,hex:"#000"};if(a>1||b>1||c>1){a/=255;b/=255;c/=255}d=~~(a*6);a=a*6-d;var f=c*(1-b),e=c*(1-b*a),g=c*(1-b*(1-a));a=[c,e,f,f,g,c,c][d];b=[g,c,c,e,f,f,g][d];d=[f,f,g,c,c,e,f][d];a*=255;b*=255;d*=255;c={r:a,g:b,b:d,toString:rb};a=(~~a)[N](16);b=(~~b)[N](16);d=(~~d)[N](16);a=a[I](ga,"0");b=b[I](ga, +"0");d=d[I](ga,"0");c.hex="#"+a+b+d;return c},m);m.rgb2hsb=T(function(a,b,c){if(m.is(a,"object")&&"r"in a&&"g"in a&&"b"in a){c=a.b;b=a.g;a=a.r}if(m.is(a,ea)){var d=m.getRGB(a);a=d.r;b=d.g;c=d.b}if(a>1||b>1||c>1){a/=255;b/=255;c/=255}var f=Y(a,b,c),e=$(a,b,c);d=f;if(e==f)return{h:0,s:0,b:f};else{var g=f-e;e=g/f;a=a==f?(b-c)/g:b==f?2+(c-a)/g:4+(a-b)/g;a/=6;a<0&&a++;a>1&&a--}return{h:a,s:e,b:d,toString:qb}},m);var sb=/,?([achlmqrstvxz]),?/gi,sa=/\s*,\s*/,tb={hs:1,rg:1};m._path2string=function(){return this.join(",")[I](sb, +"$1")};function T(a,b,c){function d(){var f=Array[p].slice.call(arguments,0),e=f[Q]("\u25ba"),g=d.cache=d.cache||{},h=d.count=d.count||[];if(g[z](e))return c?c(g[e]):g[e];h[o]>=1000&&delete g[h.shift()];h[E](e);g[e]=a[K](b,f);return c?c(g[e]):g[e]}return d}m.getRGB=T(function(a){if(!a||(a+=s).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1};if(a=="none")return{r:-1,g:-1,b:-1,hex:"none"};!(tb[z](a.substring(0,2))||a.charAt()=="#")&&(a=ra(a));var b,c,d,f,e;if(a=a.match(pb)){if(a[2]){d=da(a[2].substring(5), +16);c=da(a[2].substring(3,5),16);b=da(a[2].substring(1,3),16)}if(a[3]){d=da((e=a[3].charAt(3))+e,16);c=da((e=a[3].charAt(2))+e,16);b=da((e=a[3].charAt(1))+e,16)}if(a[4]){a=a[4][H](sa);b=A(a[0]);c=A(a[1]);d=A(a[2]);f=A(a[3])}if(a[5]){a=a[5][H](sa);b=A(a[0])*2.55;c=A(a[1])*2.55;d=A(a[2])*2.55;f=A(a[3])}if(a[6]){a=a[6][H](sa);b=A(a[0]);c=A(a[1]);d=A(a[2]);return m.hsb2rgb(b,c,d)}if(a[7]){a=a[7][H](sa);b=A(a[0])*2.55;c=A(a[1])*2.55;d=A(a[2])*2.55;return m.hsb2rgb(b,c,d)}a={r:b,g:c,b:d};b=(~~b)[N](16); +c=(~~c)[N](16);d=(~~d)[N](16);b=b[I](ga,"0");c=c[I](ga,"0");d=d[I](ga,"0");a.hex="#"+b+c+d;isFinite(A(f))&&(a.o=f);return a}return{r:-1,g:-1,b:-1,hex:"none",error:1}},m);m.getColor=function(a){a=this.getColor.start=this.getColor.start||{h:0,s:1,b:a||0.75};var b=this.hsb2rgb(a.h,a.s,a.b);a.h+=0.075;if(a.h>1){a.h=0;a.s-=0.2;a.s<=0&&(this.getColor.start={h:0,s:1,b:a.b})}return b.hex};m.getColor.reset=function(){delete this.start};var ub=/([achlmqstvz])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?\s*,?\s*)+)/ig, +vb=/(-?\d*\.?\d*(?:e[-+]?\d+)?)\s*,?\s*/ig;m.parsePathString=T(function(a){if(!a)return null;var b={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},c=[];if(m.is(a,U)&&m.is(a[0],U))c=ta(a);c[o]||(a+s)[I](ub,function(d,f,e){var g=[];d=ca.call(f);e[I](vb,function(h,i){i&&g[E](+i)});if(d=="m"&&g[o]>2){c[E]([f][M](g.splice(0,2)));d="l";f=f=="m"?"l":"L"}for(;g[o]>=b[d];){c[E]([f][M](g.splice(0,b[d])));if(!b[d])break}});c[N]=m._path2string;return c});m.findDotsAtSegment=function(a,b,c,d,f,e,g,h,i){var j=1-i,l= +D(j,3)*a+D(j,2)*3*i*c+j*3*i*i*f+D(i,3)*g;j=D(j,3)*b+D(j,2)*3*i*d+j*3*i*i*e+D(i,3)*h;var n=a+2*i*(c-a)+i*i*(f-2*c+a),r=b+2*i*(d-b)+i*i*(e-2*d+b),q=c+2*i*(f-c)+i*i*(g-2*f+c),k=d+2*i*(e-d)+i*i*(h-2*e+d);a=(1-i)*a+i*c;b=(1-i)*b+i*d;f=(1-i)*f+i*g;e=(1-i)*e+i*h;h=90-w.atan((n-q)/(r-k))*180/w.PI;(n>q||r<k)&&(h+=180);return{x:l,y:j,m:{x:n,y:r},n:{x:q,y:k},start:{x:a,y:b},end:{x:f,y:e},alpha:h}};var va=T(function(a){if(!a)return{x:0,y:0,width:0,height:0};a=ua(a);for(var b=0,c=0,d=[],f=[],e,g=0,h=a[o];g<h;g++){e= +a[g];if(e[0]=="M"){b=e[1];c=e[2];d[E](b);f[E](c)}else{b=wb(b,c,e[1],e[2],e[3],e[4],e[5],e[6]);d=d[M](b.min.x,b.max.x);f=f[M](b.min.y,b.max.y);b=e[5];c=e[6]}}a=$[K](0,d);e=$[K](0,f);return{x:a,y:e,width:Y[K](0,d)-a,height:Y[K](0,f)-e}});function ta(a){var b=[];if(!m.is(a,U)||!m.is(a&&a[0],U))a=m.parsePathString(a);for(var c=0,d=a[o];c<d;c++){b[c]=[];for(var f=0,e=a[c][o];f<e;f++)b[c][f]=a[c][f]}b[N]=m._path2string;return b}var Oa=T(function(a){if(!m.is(a,U)||!m.is(a&&a[0],U))a=m.parsePathString(a); +var b=[],c=0,d=0,f=0,e=0,g=0;if(a[0][0]=="M"){c=a[0][1];d=a[0][2];f=c;e=d;g++;b[E](["M",c,d])}g=g;for(var h=a[o];g<h;g++){var i=b[g]=[],j=a[g];if(j[0]!=ca.call(j[0])){i[0]=ca.call(j[0]);switch(i[0]){case "a":i[1]=j[1];i[2]=j[2];i[3]=j[3];i[4]=j[4];i[5]=j[5];i[6]=+(j[6]-c).toFixed(3);i[7]=+(j[7]-d).toFixed(3);break;case "v":i[1]=+(j[1]-d).toFixed(3);break;case "m":f=j[1];e=j[2];default:for(var l=1,n=j[o];l<n;l++)i[l]=+(j[l]-(l%2?c:d)).toFixed(3)}}else{b[g]=[];if(j[0]=="m"){f=j[1]+c;e=j[2]+d}i=0;for(l= +j[o];i<l;i++)b[g][i]=j[i]}j=b[g][o];switch(b[g][0]){case "z":c=f;d=e;break;case "h":c+=+b[g][j-1];break;case "v":d+=+b[g][j-1];break;default:c+=+b[g][j-2];d+=+b[g][j-1]}}b[N]=m._path2string;return b},0,ta),ka=T(function(a){if(!m.is(a,U)||!m.is(a&&a[0],U))a=m.parsePathString(a);var b=[],c=0,d=0,f=0,e=0,g=0;if(a[0][0]=="M"){c=+a[0][1];d=+a[0][2];f=c;e=d;g++;b[0]=["M",c,d]}g=g;for(var h=a[o];g<h;g++){var i=b[g]=[],j=a[g];if(j[0]!=pa.call(j[0])){i[0]=pa.call(j[0]);switch(i[0]){case "A":i[1]=j[1];i[2]= +j[2];i[3]=j[3];i[4]=j[4];i[5]=j[5];i[6]=+(j[6]+c);i[7]=+(j[7]+d);break;case "V":i[1]=+j[1]+d;break;case "H":i[1]=+j[1]+c;break;case "M":f=+j[1]+c;e=+j[2]+d;default:for(var l=1,n=j[o];l<n;l++)i[l]=+j[l]+(l%2?c:d)}}else{l=0;for(n=j[o];l<n;l++)b[g][l]=j[l]}switch(i[0]){case "Z":c=f;d=e;break;case "H":c=i[1];break;case "V":d=i[1];break;default:c=b[g][b[g][o]-2];d=b[g][b[g][o]-1]}}b[N]=m._path2string;return b},null,ta);function wa(a,b,c,d){return[a,b,c,d,c,d]}function Pa(a,b,c,d,f,e){var g=1/3,h=2/3;return[g* +a+h*c,g*b+h*d,g*f+h*c,g*e+h*d,f,e]}function Qa(a,b,c,d,f,e,g,h,i,j){var l=w.PI,n=l*120/180,r=l/180*(+f||0),q=[],k,t=T(function(J,fa,xa){var xb=J*w.cos(xa)-fa*w.sin(xa);J=J*w.sin(xa)+fa*w.cos(xa);return{x:xb,y:J}});if(j){x=j[0];k=j[1];e=j[2];B=j[3]}else{k=t(a,b,-r);a=k.x;b=k.y;k=t(h,i,-r);h=k.x;i=k.y;w.cos(l/180*f);w.sin(l/180*f);k=(a-h)/2;x=(b-i)/2;B=k*k/(c*c)+x*x/(d*d);if(B>1){B=w.sqrt(B);c=B*c;d=B*d}B=c*c;var L=d*d;B=(e==g?-1:1)*w.sqrt(w.abs((B*L-B*x*x-L*k*k)/(B*x*x+L*k*k)));e=B*c*x/d+(a+h)/2;var B= +B*-d*k/c+(b+i)/2,x=w.asin(((b-B)/d).toFixed(7));k=w.asin(((i-B)/d).toFixed(7));x=a<e?l-x:x;k=h<e?l-k:k;x<0&&(x=l*2+x);k<0&&(k=l*2+k);if(g&&x>k)x-=l*2;if(!g&&k>x)k-=l*2}l=k-x;if(w.abs(l)>n){q=k;l=h;L=i;k=x+n*(g&&k>x?1:-1);h=e+c*w.cos(k);i=B+d*w.sin(k);q=Qa(h,i,c,d,f,0,g,l,L,[k,q,e,B])}l=k-x;f=w.cos(x);e=w.sin(x);g=w.cos(k);k=w.sin(k);l=w.tan(l/4);c=4/3*c*l;l=4/3*d*l;d=[a,b];a=[a+c*e,b-l*f];b=[h+c*k,i-l*g];h=[h,i];a[0]=2*d[0]-a[0];a[1]=2*d[1]-a[1];if(j)return[a,b,h][M](q);else{q=[a,b,h][M](q)[Q]()[H](","); +j=[];h=0;for(i=q[o];h<i;h++)j[h]=h%2?t(q[h-1],q[h],r).y:t(q[h],q[h+1],r).x;return j}}function la(a,b,c,d,f,e,g,h,i){var j=1-i;return{x:D(j,3)*a+D(j,2)*3*i*c+j*3*i*i*f+D(i,3)*g,y:D(j,3)*b+D(j,2)*3*i*d+j*3*i*i*e+D(i,3)*h}}var wb=T(function(a,b,c,d,f,e,g,h){var i=f-2*c+a-(g-2*f+c),j=2*(c-a)-2*(f-c),l=a-c,n=(-j+w.sqrt(j*j-4*i*l))/2/i;i=(-j-w.sqrt(j*j-4*i*l))/2/i;var r=[b,h],q=[a,g];w.abs(n)>1000000000000&&(n=0.5);w.abs(i)>1000000000000&&(i=0.5);if(n>0&&n<1){n=la(a,b,c,d,f,e,g,h,n);q[E](n.x);r[E](n.y)}if(i> +0&&i<1){n=la(a,b,c,d,f,e,g,h,i);q[E](n.x);r[E](n.y)}i=e-2*d+b-(h-2*e+d);j=2*(d-b)-2*(e-d);l=b-d;n=(-j+w.sqrt(j*j-4*i*l))/2/i;i=(-j-w.sqrt(j*j-4*i*l))/2/i;w.abs(n)>1000000000000&&(n=0.5);w.abs(i)>1000000000000&&(i=0.5);if(n>0&&n<1){n=la(a,b,c,d,f,e,g,h,n);q[E](n.x);r[E](n.y)}if(i>0&&i<1){n=la(a,b,c,d,f,e,g,h,i);q[E](n.x);r[E](n.y)}return{min:{x:$[K](0,q),y:$[K](0,r)},max:{x:Y[K](0,q),y:Y[K](0,r)}}}),ua=T(function(a,b){var c=ka(a),d=b&&ka(b);a={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null};b={x:0,y:0, +bx:0,by:0,X:0,Y:0,qx:null,qy:null};function f(q,k){var t;if(!q)return["C",k.x,k.y,k.x,k.y,k.x,k.y];!(q[0]in{T:1,Q:1})&&(k.qx=k.qy=null);switch(q[0]){case "M":k.X=q[1];k.Y=q[2];break;case "A":q=["C"][M](Qa[K](0,[k.x,k.y][M](q.slice(1))));break;case "S":t=k.x+(k.x-(k.bx||k.x));k=k.y+(k.y-(k.by||k.y));q=["C",t,k][M](q.slice(1));break;case "T":k.qx=k.x+(k.x-(k.qx||k.x));k.qy=k.y+(k.y-(k.qy||k.y));q=["C"][M](Pa(k.x,k.y,k.qx,k.qy,q[1],q[2]));break;case "Q":k.qx=q[1];k.qy=q[2];q=["C"][M](Pa(k.x,k.y,q[1], +q[2],q[3],q[4]));break;case "L":q=["C"][M](wa(k.x,k.y,q[1],q[2]));break;case "H":q=["C"][M](wa(k.x,k.y,q[1],k.y));break;case "V":q=["C"][M](wa(k.x,k.y,k.x,q[1]));break;case "Z":q=["C"][M](wa(k.x,k.y,k.X,k.Y));break}return q}function e(q,k){if(q[k][o]>7){q[k].shift();for(var t=q[k];t[o];)q.splice(k++,0,["C"][M](t.splice(0,6)));q.splice(k,1);i=Y(c[o],d&&d[o]||0)}}function g(q,k,t,L,B){if(q&&k&&q[B][0]=="M"&&k[B][0]!="M"){k.splice(B,0,["M",L.x,L.y]);t.bx=0;t.by=0;t.x=q[B][1];t.y=q[B][2];i=Y(c[o],d&& +d[o]||0)}}for(var h=0,i=Y(c[o],d&&d[o]||0);h<i;h++){c[h]=f(c[h],a);e(c,h);d&&(d[h]=f(d[h],b));d&&e(d,h);g(c,d,a,b,h);g(d,c,b,a,h);var j=c[h],l=d&&d[h],n=j[o],r=d&&l[o];a.x=j[n-2];a.y=j[n-1];a.bx=A(j[n-4])||a.x;a.by=A(j[n-3])||a.y;b.bx=d&&(A(l[r-4])||b.x);b.by=d&&(A(l[r-3])||b.y);b.x=d&&l[r-2];b.y=d&&l[r-1]}return d?[c,d]:c},null,ta),Ra=T(function(a){for(var b=[],c=0,d=a[o];c<d;c++){var f={},e=a[c].match(/^([^:]*):?([\d\.]*)/);f.color=m.getRGB(e[1]);if(f.color.error)return null;f.color=f.color.hex; +e[2]&&(f.offset=e[2]+"%");b[E](f)}c=1;for(d=b[o]-1;c<d;c++)if(!b[c].offset){a=A(b[c-1].offset||0);e=0;for(f=c+1;f<d;f++)if(b[f].offset){e=b[f].offset;break}if(!e){e=100;f=d}e=A(e);for(e=(e-a)/(f-c+1);c<f;c++){a+=e;b[c].offset=a+"%"}}return b});function Sa(a,b,c,d){if(m.is(a,ea)||m.is(a,"object")){a=m.is(a,ea)?C.getElementById(a):a;if(a.tagName)return b==null?{container:a,width:a.style.pixelWidth||a.offsetWidth,height:a.style.pixelHeight||a.offsetHeight}:{container:a,width:b,height:c}}else return{container:1, +x:a,y:b,width:c,height:d}}function Fa(a,b){var c=this;for(var d in b)if(b[z](d)&&!(d in a))switch(typeof b[d]){case "function":(function(f){a[d]=a===c?f:function(){return f[K](c,arguments)}})(b[d]);break;case "object":a[d]=a[d]||{};Fa.call(this,a[d],b[d]);break;default:a[d]=b[d];break}}function ia(a,b){a==b.top&&(b.top=a.prev);a==b.bottom&&(b.bottom=a.next);a.next&&(a.next.prev=a.prev);a.prev&&(a.prev.next=a.next)}function Ta(a,b){if(b.top!==a){ia(a,b);a.next=null;a.prev=b.top;b.top.next=a;b.top= +a}}function Ua(a,b){if(b.bottom!==a){ia(a,b);a.next=b.bottom;a.prev=null;b.bottom.prev=a;b.bottom=a}}function Va(a,b,c){ia(a,c);b==c.top&&(c.top=a);b.next&&(b.next.prev=a);a.next=b.next;a.prev=b;b.next=a}function Wa(a,b,c){ia(a,c);b==c.bottom&&(c.bottom=a);b.prev&&(b.prev.next=a);a.prev=b.prev;b.prev=a;a.next=b}function Xa(a){return function(){throw new Error("Rapha\u00ebl: you are calling to method \u201c"+a+"\u201d of removed object");}}var Ya=/^r(?:\(([^,]+?)\s*,\s*([^\)]+?)\))?/;if(m.svg){G[p].svgns= +"http://www.w3.org/2000/svg";G[p].xlink="http://www.w3.org/1999/xlink";F=function(a){return+a+(~~a===a)*0.5};var v=function(a,b){if(b)for(var c in b)b[z](c)&&a[W](c,b[c]+s);else{a=C.createElementNS(G[p].svgns,a);a.style.webkitTapHighlightColor="rgba(0,0,0,0)";return a}};m[N]=function(){return"Your browser supports SVG.\nYou are running Rapha\u00ebl "+this.version};var Za=function(a,b){var c=v("path");b.canvas&&b.canvas[y](c);b=new u(c,b);b.type="path";ba(b,{fill:"none",stroke:"#000",path:a});return b}, +ma=function(a,b,c){var d="linear",f=0.5,e=0.5,g=a.style;b=(b+s)[I](Ya,function(l,n,r){d="radial";if(n&&r){f=A(n);e=A(r);l=(e>0.5)*2-1;D(f-0.5,2)+D(e-0.5,2)>0.25&&(e=w.sqrt(0.25-D(f-0.5,2))*l+0.5)&&e!=0.5&&(e=e.toFixed(5)-1.0E-5*l)}return s});b=b[H](/\s*\-\s*/);if(d=="linear"){var h=b.shift();h=-A(h);if(isNaN(h))return null;h=[0,0,w.cos(h*w.PI/180),w.sin(h*w.PI/180)];var i=1/(Y(w.abs(h[2]),w.abs(h[3]))||1);h[2]*=i;h[3]*=i;if(h[2]<0){h[0]=-h[2];h[2]=0}if(h[3]<0){h[1]=-h[3];h[3]=0}}b=Ra(b);if(!b)return null; +i=a.getAttribute(aa);(i=i.match(/^url\(#(.*)\)$/))&&c.defs.removeChild(C.getElementById(i[1]));i=v(d+"Gradient");i.id="r"+(m._id++)[N](36);v(i,d=="radial"?{fx:f,fy:e}:{x1:h[0],y1:h[1],x2:h[2],y2:h[3]});c.defs[y](i);c=0;for(h=b[o];c<h;c++){var j=v("stop");v(j,{offset:b[c].offset?b[c].offset:!c?"0%":"100%","stop-color":b[c].color||"#fff"});i[y](j)}v(a,{fill:"url(#"+i.id+")",opacity:1,"fill-opacity":1});g.fill=s;g.opacity=1;return g.fillOpacity=1},Ga=function(a){var b=a.getBBox();v(a.pattern,{patternTransform:m.format("translate({0},{1})", +b.x,b.y)})},ba=function(a,b){var c={"":[0],none:[0],"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},d=a.node,f=a.attrs,e=a.rotate();function g(k,t){if(t=c[ca.call(t)]){var L=k.attrs["stroke-width"]||"1";k={round:L,square:L,butt:0}[k.attrs["stroke-linecap"]||b["stroke-linecap"]]||0;for(var B=[],x=t[o];x--;)B[x]=t[x]*L+(x%2?1:-1)*k;v(d,{"stroke-dasharray":B[Q](",")})}}b[z]("rotation")&&(e=b.rotation);var h= +(e+s)[H](V);if(h.length-1){h[1]=+h[1];h[2]=+h[2]}else h=null;A(e)&&a.rotate(0,true);for(var i in b)if(b[z](i))if(qa[z](i)){var j=b[i];f[i]=j;switch(i){case "blur":a.blur(j);break;case "rotation":a.rotate(j,true);break;case "href":case "title":case "target":var l=d.parentNode;if(ca.call(l.tagName)!="a"){var n=v("a");l.insertBefore(n,d);n[y](d);l=n}l.setAttributeNS(a.paper.xlink,i,j);break;case "cursor":d.style.cursor=j;break;case "clip-rect":l=(j+s)[H](V);if(l[o]==4){a.clip&&a.clip.parentNode.parentNode.removeChild(a.clip.parentNode); +var r=v("clipPath");n=v("rect");r.id="r"+(m._id++)[N](36);v(n,{x:l[0],y:l[1],width:l[2],height:l[3]});r[y](n);a.paper.defs[y](r);v(d,{"clip-path":"url(#"+r.id+")"});a.clip=n}if(!j){(j=C.getElementById(d.getAttribute("clip-path")[I](/(^url\(#|\)$)/g,s)))&&j.parentNode.removeChild(j);v(d,{"clip-path":s});delete a.clip}break;case "path":if(a.type=="path")v(d,{d:j?(f.path=ka(j)):"M0,0"});break;case "width":d[W](i,j);if(f.fx){i="x";j=f.x}else break;case "x":if(f.fx)j=-f.x-(f.width||0);case "rx":if(i== +"rx"&&a.type=="rect")break;case "cx":h&&(i=="x"||i=="cx")&&(h[1]+=j-f[i]);d[W](i,F(j));a.pattern&&Ga(a);break;case "height":d[W](i,j);if(f.fy){i="y";j=f.y}else break;case "y":if(f.fy)j=-f.y-(f.height||0);case "ry":if(i=="ry"&&a.type=="rect")break;case "cy":h&&(i=="y"||i=="cy")&&(h[2]+=j-f[i]);d[W](i,F(j));a.pattern&&Ga(a);break;case "r":a.type=="rect"?v(d,{rx:j,ry:j}):d[W](i,j);break;case "src":a.type=="image"&&d.setAttributeNS(a.paper.xlink,"href",j);break;case "stroke-width":d.style.strokeWidth= +j;d[W](i,j);f["stroke-dasharray"]&&g(a,f["stroke-dasharray"]);break;case "stroke-dasharray":g(a,j);break;case "translation":j=(j+s)[H](V);j[0]=+j[0]||0;j[1]=+j[1]||0;if(h){h[1]+=j[0];h[2]+=j[1]}ya.call(a,j[0],j[1]);break;case "scale":j=(j+s)[H](V);a.scale(+j[0]||1,+j[1]||+j[0]||1,isNaN(A(j[2]))?null:+j[2],isNaN(A(j[3]))?null:+j[3]);break;case aa:if(l=(j+s).match(Na)){r=v("pattern");var q=v("image");r.id="r"+(m._id++)[N](36);v(r,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1});v(q,{x:0,y:0}); +q.setAttributeNS(a.paper.xlink,"href",l[1]);r[y](q);j=C.createElement("img");j.style.cssText="position:absolute;left:-9999em;top-9999em";j.onload=function(){v(r,{width:this.offsetWidth,height:this.offsetHeight});v(q,{width:this.offsetWidth,height:this.offsetHeight});C.body.removeChild(this);a.paper.safari()};C.body[y](j);j.src=l[1];a.paper.defs[y](r);d.style.fill="url(#"+r.id+")";v(d,{fill:"url(#"+r.id+")"});a.pattern=r;a.pattern&&Ga(a);break}l=m.getRGB(j);if(l.error){if(({circle:1,ellipse:1}[z](a.type)|| +(j+s).charAt()!="r")&&ma(d,j,a.paper)){f.gradient=j;f.fill="none";break}}else{delete b.gradient;delete f.gradient;!m.is(f.opacity,"undefined")&&m.is(b.opacity,"undefined")&&v(d,{opacity:f.opacity});!m.is(f["fill-opacity"],"undefined")&&m.is(b["fill-opacity"],"undefined")&&v(d,{"fill-opacity":f["fill-opacity"]})}l[z]("o")&&v(d,{"fill-opacity":l.o/100});case "stroke":l=m.getRGB(j);d[W](i,l.hex);i=="stroke"&&l[z]("o")&&v(d,{"stroke-opacity":l.o/100});break;case "gradient":(({circle:1,ellipse:1})[z](a.type)|| +(j+s).charAt()!="r")&&ma(d,j,a.paper);break;case "opacity":case "fill-opacity":if(f.gradient){if(l=C.getElementById(d.getAttribute(aa)[I](/^url\(#|\)$/g,s))){l=l.getElementsByTagName("stop");l[l[o]-1][W]("stop-opacity",j)}break}default:i=="font-size"&&(j=da(j,10)+"px");l=i[I](/(\-.)/g,function(k){return pa.call(k.substring(1))});d.style[l]=j;d[W](i,j);break}}yb(a,b);if(h)a.rotate(h.join(P));else A(e)&&a.rotate(e,true)},$a=1.2,yb=function(a,b){if(!(a.type!="text"||!(b[z]("text")||b[z]("font")||b[z]("font-size")|| +b[z]("x")||b[z]("y")))){var c=a.attrs,d=a.node,f=d.firstChild?da(C.defaultView.getComputedStyle(d.firstChild,s).getPropertyValue("font-size"),10):10;if(b[z]("text")){for(c.text=b.text;d.firstChild;)d.removeChild(d.firstChild);b=(b.text+s)[H]("\n");for(var e=0,g=b[o];e<g;e++)if(b[e]){var h=v("tspan");e&&v(h,{dy:f*$a,x:c.x});h[y](C.createTextNode(b[e]));d[y](h)}}else{b=d.getElementsByTagName("tspan");e=0;for(g=b[o];e<g;e++)e&&v(b[e],{dy:f*$a,x:c.x})}v(d,{y:c.y});a=a.getBBox();(a=c.y-(a.y+a.height/2))&& +isFinite(a)&&v(d,{y:c.y+a})}},u=function(a,b){this[0]=a;this.id=m._oid++;this.node=a;a.raphael=this;this.paper=b;this.attrs=this.attrs||{};this.transformations=[];this._={tx:0,ty:0,rt:{deg:0,cx:0,cy:0},sx:1,sy:1};!b.bottom&&(b.bottom=this);(this.prev=b.top)&&(b.top.next=this);b.top=this;this.next=null};u[p].rotate=function(a,b,c){if(this.removed)return this;if(a==null){if(this._.rt.cx)return[this._.rt.deg,this._.rt.cx,this._.rt.cy][Q](P);return this._.rt.deg}var d=this.getBBox();a=(a+s)[H](V);if(a[o]- +1){b=A(a[1]);c=A(a[2])}a=A(a[0]);if(b!=null)this._.rt.deg=a;else this._.rt.deg+=a;c==null&&(b=null);this._.rt.cx=b;this._.rt.cy=c;b=b==null?d.x+d.width/2:b;c=c==null?d.y+d.height/2:c;if(this._.rt.deg){this.transformations[0]=m.format("rotate({0} {1} {2})",this._.rt.deg,b,c);this.clip&&v(this.clip,{transform:m.format("rotate({0} {1} {2})",-this._.rt.deg,b,c)})}else{this.transformations[0]=s;this.clip&&v(this.clip,{transform:s})}v(this.node,{transform:this.transformations[Q](P)});return this};u[p].hide= +function(){!this.removed&&(this.node.style.display="none");return this};u[p].show=function(){!this.removed&&(this.node.style.display="");return this};u[p].remove=function(){if(!this.removed){ia(this,this.paper);this.node.parentNode.removeChild(this.node);for(var a in this)delete this[a];this.removed=true}};u[p].getBBox=function(){if(this.removed)return this;if(this.type=="path")return va(this.attrs.path);if(this.node.style.display=="none"){this.show();var a=true}var b={};try{b=this.node.getBBox()}catch(c){}finally{b= +b||{}}if(this.type=="text"){b={x:b.x,y:Infinity,width:0,height:0};for(var d=0,f=this.node.getNumberOfChars();d<f;d++){var e=this.node.getExtentOfChar(d);e.y<b.y&&(b.y=e.y);e.y+e.height-b.y>b.height&&(b.height=e.y+e.height-b.y);e.x+e.width-b.x>b.width&&(b.width=e.x+e.width-b.x)}}a&&this.hide();return b};u[p].attr=function(a,b){if(this.removed)return this;if(a==null){a={};for(var c in this.attrs)if(this.attrs[z](c))a[c]=this.attrs[c];this._.rt.deg&&(a.rotation=this.rotate());(this._.sx!=1||this._.sy!= +1)&&(a.scale=this.scale());a.gradient&&a.fill=="none"&&(a.fill=a.gradient)&&delete a.gradient;return a}if(b==null&&m.is(a,ea)){if(a=="translation")return ya.call(this);if(a=="rotation")return this.rotate();if(a=="scale")return this.scale();if(a==aa&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;return this.attrs[a]}if(b==null&&m.is(a,U)){b={};c=0;for(var d=a.length;c<d;c++)b[a[c]]=this.attr(a[c]);return b}if(b!=null){c={};c[a]=b;ba(this,c)}else a!=null&&m.is(a,"object")&& +ba(this,a);return this};u[p].toFront=function(){if(this.removed)return this;this.node.parentNode[y](this.node);var a=this.paper;a.top!=this&&Ta(this,a);return this};u[p].toBack=function(){if(this.removed)return this;if(this.node.parentNode.firstChild!=this.node){this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild);Ua(this,this.paper)}return this};u[p].insertAfter=function(a){if(this.removed)return this;var b=a.node;b.nextSibling?b.parentNode.insertBefore(this.node,b.nextSibling): +b.parentNode[y](this.node);Va(this,a,this.paper);return this};u[p].insertBefore=function(a){if(this.removed)return this;var b=a.node;b.parentNode.insertBefore(this.node,b);Wa(this,a,this.paper);return this};u[p].blur=function(a){var b=this;if(+a!==0){var c=v("filter"),d=v("feGaussianBlur");b.attrs.blur=a;c.id="r"+(m._id++)[N](36);v(d,{stdDeviation:+a||1.5});c.appendChild(d);b.paper.defs.appendChild(c);b._blur=c;v(b.node,{filter:"url(#"+c.id+")"})}else{if(b._blur){b._blur.parentNode.removeChild(b._blur); +delete b._blur;delete b.attrs.blur}b.node.removeAttribute("filter")}};var ab=function(a,b,c,d){b=F(b);c=F(c);var f=v("circle");a.canvas&&a.canvas[y](f);a=new u(f,a);a.attrs={cx:b,cy:c,r:d,fill:"none",stroke:"#000"};a.type="circle";v(f,a.attrs);return a},bb=function(a,b,c,d,f,e){b=F(b);c=F(c);var g=v("rect");a.canvas&&a.canvas[y](g);a=new u(g,a);a.attrs={x:b,y:c,width:d,height:f,r:e||0,rx:e||0,ry:e||0,fill:"none",stroke:"#000"};a.type="rect";v(g,a.attrs);return a},cb=function(a,b,c,d,f){b=F(b);c=F(c); +var e=v("ellipse");a.canvas&&a.canvas[y](e);a=new u(e,a);a.attrs={cx:b,cy:c,rx:d,ry:f,fill:"none",stroke:"#000"};a.type="ellipse";v(e,a.attrs);return a},db=function(a,b,c,d,f,e){var g=v("image");v(g,{x:c,y:d,width:f,height:e,preserveAspectRatio:"none"});g.setAttributeNS(a.xlink,"href",b);a.canvas&&a.canvas[y](g);a=new u(g,a);a.attrs={x:c,y:d,width:f,height:e,src:b};a.type="image";return a},eb=function(a,b,c,d){var f=v("text");v(f,{x:b,y:c,"text-anchor":"middle"});a.canvas&&a.canvas[y](f);a=new u(f, +a);a.attrs={x:b,y:c,"text-anchor":"middle",text:d,font:qa.font,stroke:"none",fill:"#000"};a.type="text";ba(a,a.attrs);return a},fb=function(a,b){this.width=a||this.width;this.height=b||this.height;this.canvas[W]("width",this.width);this.canvas[W]("height",this.height);return this},Aa=function(){var a=Sa[K](0,arguments),b=a&&a.container,c=a.x,d=a.y,f=a.width;a=a.height;if(!b)throw new Error("SVG container not found.");var e=v("svg");c=c||0;d=d||0;f=f||512;a=a||342;v(e,{xmlns:"http://www.w3.org/2000/svg", +version:1.1,width:f,height:a});if(b==1){e.style.cssText="position:absolute;left:"+c+"px;top:"+d+"px";C.body[y](e)}else b.firstChild?b.insertBefore(e,b.firstChild):b[y](e);b=new G;b.width=f;b.height=a;b.canvas=e;Fa.call(b,b,m.fn);b.clear();return b};G[p].clear=function(){for(var a=this.canvas;a.firstChild;)a.removeChild(a.firstChild);this.bottom=this.top=null;(this.desc=v("desc"))[y](C.createTextNode("Created with Rapha\u00ebl"));a[y](this.desc);a[y](this.defs=v("defs"))};G[p].remove=function(){this.canvas.parentNode&& +this.canvas.parentNode.removeChild(this.canvas);for(var a in this)this[a]=Xa(a)}}if(m.vml){var gb={M:"m",L:"... [truncated message content] |
From: SourceForge.net <no...@so...> - 2011-05-12 16:15:50
|
Bugs item #2978840, was opened at 2010-03-29 21:24 Message generated for change (Comment added) made by rvos You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=2978840&group_id=248804 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: internals Group: None >Status: Closed Priority: 8 Private: No Submitted By: Vladimir Gapeyev (vgapeyev) Assigned to: Vladimir Gapeyev (vgapeyev) Summary: Set up a build server at treebase-dev.nescent.org Initial Comment: A new SVN check in should initiate an automated build and deployment on treebase-dev. ---------------------------------------------------------------------- >Comment By: Rutger Vos (rvos) Date: 2011-05-12 16:15 Message: This has been working quite well for a while now so I presume this bug can be closed. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=2978840&group_id=248804 |
From: SourceForge.net <no...@so...> - 2011-05-12 16:13:51
|
Bugs item #2846456, was opened at 2009-08-28 19:28 Message generated for change (Settings changed) made by rvos You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=2846456&group_id=248804 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: data Group: None >Status: Closed Priority: 6 Private: No Submitted By: William Piel (sfrgpiel) Assigned to: Rutger Vos (rvos) Summary: Need PhyloWS API search by date-time-stamp Initial Comment: We need to be sure that our API can search using data-time-stamps. i.e. "find all studies that were modified since Jan 23, 2010." (and separately, "find all studies that were made public after Jan 23, 2010"). This may require investigating how and where TreeBASE2 is currently tracking modification stamps. If it does not do so yet, we should probably add modification stamp fields on some key tables -- and it's probably easier to do this with a postgresql-level trigger or part of the schema. At any rate, any of the following modifications should stamped and searchable by the API: modifications to the citation, matrix metadata (including row-segment additions/subtractions), tree metadata (including re-rooting a tree), taxon labels, and mapping between taxon labels and taxon variants, and mapping between taxon variants and taxa. i.e., if a study contains a matrix for which a taxon label gets re-mapped to a different taxon variant or taxon at time/date x, then the whole study should be considered changed at time/date x. ---------------------------------------------------------------------- >Comment By: Rutger Vos (rvos) Date: 2011-05-12 16:13 Message: The PhyloWS API is extended so that studies can now be searched on creation date, modification date and publication date. Whether modification dates for studies are updated correctly when some contained object changes, I don't know. If they aren't, perhaps that should be filed as a bug that's not related to the PhyloWS API per se. ---------------------------------------------------------------------- Comment By: Rutger Vos (rvos) Date: 2010-06-16 15:51 Message: "If it does not do so yet, we should probably add modification stamp fields on some key tables -- and it's probably easier to do this with a postgresql-level trigger or part of the schema." I have no idea how to do this. ---------------------------------------------------------------------- Comment By: Rutger Vos (rvos) Date: 2010-06-16 15:51 Message: Thanks for reporting this bug. We'll look into it as soon as possible. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=2846456&group_id=248804 |
From: <rv...@us...> - 2011-05-12 14:47:16
|
Revision: 849 http://treebase.svn.sourceforge.net/treebase/?rev=849&view=rev Author: rvos Date: 2011-05-12 14:47:10 +0000 (Thu, 12 May 2011) Log Message: ----------- Added test for all studies published in 2011. I assert that this number is larger than 0. Modified Paths: -------------- trunk/treebase-core/src/test/java/org/cipres/treebase/dao/study/StudyDAOTest.java Modified: trunk/treebase-core/src/test/java/org/cipres/treebase/dao/study/StudyDAOTest.java =================================================================== --- trunk/treebase-core/src/test/java/org/cipres/treebase/dao/study/StudyDAOTest.java 2011-05-12 14:45:41 UTC (rev 848) +++ trunk/treebase-core/src/test/java/org/cipres/treebase/dao/study/StudyDAOTest.java 2011-05-12 14:47:10 UTC (rev 849) @@ -3,6 +3,7 @@ import java.sql.Clob; import java.util.ArrayList; import java.util.Collection; +import java.util.Date; import java.util.List; import org.hibernate.Hibernate; @@ -14,6 +15,8 @@ import org.cipres.treebase.domain.study.StudyStatus; import org.cipres.treebase.domain.study.StudyStatusHome; +import com.ibm.icu.text.DateFormat; + /** * The class <code>StudyDAOTest</code> contains tests for the class {@link <code>StudyDAO</code>} * @@ -278,6 +281,23 @@ logger.info(testName + " verified."); } } + + public void testFindByPublicationDateRange() { + String testName = "findByPublicationDateRange"; + logger.info("\n\t\tRunning Test: " + testName); + Date j2010 = null; + Date j2011 = null; + DateFormat df = DateFormat.getDateInstance(); + try { + j2010 = df.parse("Jan 1, 2011"); + j2011 = df.parse("Jan 1, 2011"); + } catch ( Exception e ) { + e.printStackTrace(); + } + Collection<Study> results = getFixture().findByPublicationDateRange(j2010, j2011); + logger.info("Found this many results: " + results.size()); + assertTrue(results.size() > 0); + } /** * Run the Study findByAccessionNumber(String) method test This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2011-05-12 14:45:48
|
Revision: 848 http://treebase.svn.sourceforge.net/treebase/?rev=848&view=rev Author: rvos Date: 2011-05-12 14:45:41 +0000 (Thu, 12 May 2011) Log Message: ----------- re-implemented using a range expression Modified Paths: -------------- trunk/treebase-core/src/main/java/org/cipres/treebase/dao/study/StudyDAO.java Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/dao/study/StudyDAO.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/dao/study/StudyDAO.java 2011-05-12 13:38:45 UTC (rev 847) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/dao/study/StudyDAO.java 2011-05-12 14:45:41 UTC (rev 848) @@ -9,6 +9,7 @@ import java.util.Set; import org.apache.log4j.Logger; +import org.cipres.treebase.RangeExpression.MalformedRangeExpression; import org.cipres.treebase.TreebaseUtil; import org.cipres.treebase.dao.AbstractDAO; import org.cipres.treebase.domain.admin.Person; @@ -402,19 +403,20 @@ } public Collection<Study> findByPublicationDateRange(Date from, Date until) { - int begin = from.getYear(); - int end = until.getYear(); - if ( begin != end ) { - Query q = getSession().createQuery("select study from Citation where publishyear between :begin and :end"); - q.setInteger("begin", begin); - q.setInteger("end", end); - return q.list(); + int begin = from.getYear() + 1900; + int end = until.getYear() + 1900; + String range = begin + ".." + end; + Collection<Citation> citations = null; + try { + citations = this.findSomethingByRangeExpression(Citation.class, "publishYear", range); + } catch (MalformedRangeExpression e) { + e.printStackTrace(); } - else { - Query q = getSession().createQuery("select study from Citation where publishyear = :begin"); - q.setInteger("begin",begin); - return q.list(); + Collection<Study> studies = new HashSet<Study>(); + for ( Citation citation : citations ) { + studies.add(citation.getStudy()); } + return studies; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2011-05-12 13:38:52
|
Revision: 847 http://treebase.svn.sourceforge.net/treebase/?rev=847&view=rev Author: rvos Date: 2011-05-12 13:38:45 +0000 (Thu, 12 May 2011) Log Message: ----------- Refined to make sure it can deal with queries where begin year and end year are identical Modified Paths: -------------- trunk/treebase-core/src/main/java/org/cipres/treebase/dao/study/StudyDAO.java Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/dao/study/StudyDAO.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/dao/study/StudyDAO.java 2011-05-12 12:38:13 UTC (rev 846) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/dao/study/StudyDAO.java 2011-05-12 13:38:45 UTC (rev 847) @@ -402,16 +402,19 @@ } public Collection<Study> findByPublicationDateRange(Date from, Date until) { - Query q = getSession().createQuery( - "from Citation where publishyear between :begin and :end"); - q.setInteger("begin", from.getYear()); - q.setInteger("end", until.getYear()); - Collection<Citation> citations = q.list(); - Set<Study> results = new HashSet<Study>(); - for ( Citation citation : citations ) { - results.add(citation.getStudy()); + int begin = from.getYear(); + int end = until.getYear(); + if ( begin != end ) { + Query q = getSession().createQuery("select study from Citation where publishyear between :begin and :end"); + q.setInteger("begin", begin); + q.setInteger("end", end); + return q.list(); } - return results; + else { + Query q = getSession().createQuery("select study from Citation where publishyear = :begin"); + q.setInteger("begin",begin); + return q.list(); + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2011-05-12 12:38:19
|
Revision: 846 http://treebase.svn.sourceforge.net/treebase/?rev=846&view=rev Author: rvos Date: 2011-05-12 12:38:13 +0000 (Thu, 12 May 2011) Log Message: ----------- Now using prism.modificationDate instead of tb.lastModifiedDate as search predicate to indicate when a study record was last modified. Modified Paths: -------------- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/StudySearchController.java Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/StudySearchController.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/StudySearchController.java 2011-05-12 12:37:33 UTC (rev 845) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/StudySearchController.java 2011-05-12 12:38:13 UTC (rev 846) @@ -217,7 +217,7 @@ results.addAll(doSearch(request,response, SearchType.byCreationDate, errors, term.getTerm(),exactMatch,relation)); } else if ( index.startsWith("prism.publicationDate") ) { results.addAll(doSearch(request,response, SearchType.byPublicationDate, errors, term.getTerm(),exactMatch,relation)); - } else if ( index.startsWith("tb.lastModifiedDate") ) { + } else if ( index.startsWith("prism.modificationDate") ) { results.addAll(doSearch(request,response, SearchType.byLastModifiedDate, errors, term.getTerm(),exactMatch,relation)); } else { // issue warnings This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2011-05-12 12:37:40
|
Revision: 845 http://treebase.svn.sourceforge.net/treebase/?rev=845&view=rev Author: rvos Date: 2011-05-12 12:37:33 +0000 (Thu, 12 May 2011) Log Message: ----------- Now using prism:modificationDate instead of tb:lastModifiedDate as study annotation predicate to indicate when a study record was last modified. Modified Paths: -------------- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/study/Study.java Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/domain/study/Study.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/study/Study.java 2011-05-12 12:13:55 UTC (rev 844) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/domain/study/Study.java 2011-05-12 12:37:33 UTC (rev 845) @@ -719,7 +719,7 @@ annotations.add(new Annotation(Constants.DCURI,"dc:date",getReleaseDate().toString())); } if ( null != getLastModifiedDate() ) { - annotations.add(new Annotation(Constants.TBTermsURI, "tb:lastModifiedDate", getLastModifiedDate().toString())); + annotations.add(new Annotation(Constants.PrismURI, "prism:modificationDate", getLastModifiedDate().toString())); } if ( null != getSubmission() ) { if ( null != getSubmission().getSubmitter() ) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2011-05-12 12:14:01
|
Revision: 844 http://treebase.svn.sourceforge.net/treebase/?rev=844&view=rev Author: rvos Date: 2011-05-12 12:13:55 +0000 (Thu, 12 May 2011) Log Message: ----------- The submission creation date (prism.creationDate), study last modification date (tb.lastModifiedDate) and the citation publication date (prism.publicationDate) can now also be used as search predicates. A query must be phrased either as before, i.e. <index> < <date>, or after, i.e. <index> > <date>. The date string must be parseable using DateFormat.parse(s). Modified Paths: -------------- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/StudySearchController.java Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/StudySearchController.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/StudySearchController.java 2011-05-12 12:09:30 UTC (rev 843) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/StudySearchController.java 2011-05-12 12:13:55 UTC (rev 844) @@ -2,7 +2,9 @@ package org.cipres.treebase.web.controllers; import java.io.IOException; +import java.text.ParseException; import java.util.Collection; +import java.util.Date; import java.util.HashMap; import java.util.HashSet; import java.util.Map; @@ -20,6 +22,8 @@ import org.cipres.treebase.domain.search.StudySearchResults; import org.cipres.treebase.domain.study.Study; import org.cipres.treebase.domain.study.StudyService; +import org.cipres.treebase.domain.study.Submission; +import org.cipres.treebase.domain.study.SubmissionService; import org.cipres.treebase.web.Constants; import org.cipres.treebase.web.util.RequestMessageSetter; import org.springframework.validation.BindException; @@ -31,8 +35,11 @@ import org.z3950.zing.cql.CQLOrNode; import org.z3950.zing.cql.CQLParseException; import org.z3950.zing.cql.CQLParser; +import org.z3950.zing.cql.CQLRelation; import org.z3950.zing.cql.CQLTermNode; +import com.ibm.icu.text.DateFormat; + /** * StudySearchController.java * @@ -78,7 +85,11 @@ byLegacyID, byTitle, byKeyword, - byJournal + byJournal, + byCreationDate, + byPublicationDate, + byReleaseDate, + byLastModifiedDate } protected ModelAndView onSubmit( @@ -132,7 +143,7 @@ } // XXX we now never do an exact match with terms provided through the web app. We can change // this, e.g. by adding a check box whose value is the boolean argument of doSearch() - Collection<Study> matches = doSearch(request, response, searchType, errors,searchTerm,false); + Collection<Study> matches = doSearch(request, response, searchType, errors,searchTerm,false,null); if ( TreebaseUtil.isEmpty(request.getParameter("format")) || ! request.getParameter("format").equals("rss1") ) { SearchResults<Study> newRes = intersectSearchResults(oldRes, new StudySearchResults(matches), new RequestMessageSetter(request), "No matching studies found"); @@ -154,7 +165,7 @@ HttpServletRequest request, HttpServletResponse response, BindException errors - ) throws InstantiationException { + ) throws InstantiationException, ParseException { if ( node instanceof CQLBooleanNode ) { Set<Study> resultsLeft = doCQLQuery(((CQLBooleanNode)node).left,results, request, response, errors); Set<Study> resultsRight = doCQLQuery(((CQLBooleanNode)node).right,results, request, response, errors); @@ -182,23 +193,32 @@ else if ( node instanceof CQLTermNode ) { CQLTermNode term = (CQLTermNode)node; boolean exactMatch = term.getRelation().getBase().equals("=="); + CQLRelation relation = term.getRelation(); String index = term.getIndex(); if ( index.startsWith("tb.title") ) { - results.addAll(doSearch(request, response, SearchType.byTitle, errors, term.getTerm(),exactMatch)); + results.addAll(doSearch(request, response, SearchType.byTitle, errors, term.getTerm(),exactMatch,relation)); } else if ( index.equals("tb.identifier.study") ) { - results.addAll(doSearch(request, response, SearchType.byID, errors, term.getTerm(),exactMatch)); + results.addAll(doSearch(request, response, SearchType.byID, errors, term.getTerm(),exactMatch,relation)); } else if ( index.startsWith("dcterms.contributor") ) { - results.addAll(doSearch(request, response, SearchType.byAuthorName, errors, term.getTerm(),exactMatch)); + results.addAll(doSearch(request, response, SearchType.byAuthorName, errors, term.getTerm(),exactMatch,relation)); } else if ( index.startsWith("dcterms.abstract") ) { - results.addAll(doSearch(request, response, SearchType.inAbstract, errors, term.getTerm(),exactMatch)); + results.addAll(doSearch(request, response, SearchType.inAbstract, errors, term.getTerm(),exactMatch,relation)); } else if ( index.startsWith("dcterms.subject") ) { - results.addAll(doSearch(request, response, SearchType.byKeyword, errors, term.getTerm(),exactMatch)); + results.addAll(doSearch(request, response, SearchType.byKeyword, errors, term.getTerm(),exactMatch,relation)); } else if ( index.startsWith("dcterms.bibliographicCitation") ) { - results.addAll(doSearch(request, response, SearchType.inCitation, errors, term.getTerm(),exactMatch)); + results.addAll(doSearch(request, response, SearchType.inCitation, errors, term.getTerm(),exactMatch,relation)); } else if ( index.equals("tb.identifier.study.tb1") ) { - results.addAll(doSearch(request, response, SearchType.byLegacyID, errors, term.getTerm(),exactMatch)); + results.addAll(doSearch(request, response, SearchType.byLegacyID, errors, term.getTerm(),exactMatch,relation)); } else if ( index.startsWith("prism.publicationName") ) { - results.addAll(doSearch(request, response, SearchType.byJournal, errors, term.getTerm(),exactMatch)); + results.addAll(doSearch(request, response, SearchType.byJournal, errors, term.getTerm(),exactMatch,relation)); + } else if ( index.startsWith("dc.date") ) { + results.addAll(doSearch(request,response, SearchType.byReleaseDate, errors, term.getTerm(),exactMatch,relation)); + } else if ( index.startsWith("prism.creationDate") ) { + results.addAll(doSearch(request,response, SearchType.byCreationDate, errors, term.getTerm(),exactMatch,relation)); + } else if ( index.startsWith("prism.publicationDate") ) { + results.addAll(doSearch(request,response, SearchType.byPublicationDate, errors, term.getTerm(),exactMatch,relation)); + } else if ( index.startsWith("tb.lastModifiedDate") ) { + results.addAll(doSearch(request,response, SearchType.byLastModifiedDate, errors, term.getTerm(),exactMatch,relation)); } else { // issue warnings addMessage(request, "Unsupported index: " + index); @@ -215,11 +235,12 @@ SearchType searchType, BindException errors, String searchTerm, - boolean exactMatch) throws InstantiationException { + boolean exactMatch, CQLRelation relation) throws InstantiationException, ParseException { String keywordSearchTerm = "%" + searchTerm + "%"; Collection<Study> matches; - StudyService studyService = getSearchService().getStudyService(); + StudyService studyService = getSearchService().getStudyService(); + SubmissionService submissionService = getSearchService().getSubmissionService(); switch (searchType) { case byID: @@ -257,6 +278,15 @@ case byKeyword: matches = studyService.findByKeyword(keywordSearchTerm); break; + case byLastModifiedDate: + matches = findByLastModified(searchTerm, relation, submissionService); + break; + case byPublicationDate: + matches = findByPublicationDate(searchTerm, relation, studyService); + break; + case byCreationDate: + matches = findByCreationDate(searchTerm, relation, submissionService); + break; case byJournal: { if ( exactMatch ) { @@ -273,6 +303,67 @@ return matches; } + private Collection<Study> findByCreationDate(String searchTerm, + CQLRelation relation, SubmissionService submissionService) throws ParseException { + Collection<Study> matches; + Date from = null; + Date until = null; + DateFormat df = DateFormat.getDateInstance(); + if ( relation.getBase().startsWith(">") ) { + from = df.parse(searchTerm); + until = new Date(); // i.e. now + } + else if ( relation.getBase().startsWith("<") ) { + from = new Date(0); // i.e. epoch + until = df.parse(searchTerm); + } + Collection<Submission> submissions = submissionService.findSubmissionByCreateDateRange(from, until); + matches = new HashSet<Study>(); + for ( Submission submission : submissions ) { + matches.add(submission.getStudy()); + } + return matches; + } + + private Collection<Study> findByPublicationDate(String searchTerm, + CQLRelation relation, StudyService studyService) throws ParseException { + Date from = null; + Date until = null; + DateFormat df = DateFormat.getDateInstance(); + if ( relation.getBase().startsWith(">") ) { + from = df.parse(searchTerm); + until = new Date(); // i.e. now + } + else if ( relation.getBase().startsWith("<") ) { + from = new Date(0); // i.e. epoch + until = df.parse(searchTerm); + } + return studyService.findByPublicationDateRange(from, until); + } + + private Collection<Study> findByLastModified(String searchTerm, + CQLRelation relation, SubmissionService submissionService) + throws ParseException { + Collection<Study> matches; + Date from = null; + Date until = null; + DateFormat df = DateFormat.getDateInstance(); + if ( relation.getBase().startsWith(">") ) { + from = df.parse(searchTerm); + until = new Date(); // i.e. now + } + else if ( relation.getBase().startsWith("<") ) { + from = new Date(0); // i.e. epoch + until = df.parse(searchTerm); + } + Collection<Submission> submissions = submissionService.findSubmissionByLastModifiedDateRange(from, until); + matches = new HashSet<Study>(); + for ( Submission submission : submissions ) { + matches.add(submission.getStudy()); + } + return matches; + } + @Override SearchResultsType currentSearchType() { return SearchResultsType.STUDY; @@ -286,7 +377,7 @@ @Override protected ModelAndView handleQueryRequest(HttpServletRequest request, HttpServletResponse response, BindException errors,String query) - throws CQLParseException, IOException, InstantiationException { + throws CQLParseException, IOException, InstantiationException, ParseException { //String query = request.getParameter("query"); CQLParser parser = new CQLParser(); CQLNode root = parser.parse(query); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2011-05-12 12:09:36
|
Revision: 843 http://treebase.svn.sourceforge.net/treebase/?rev=843&view=rev Author: rvos Date: 2011-05-12 12:09:30 +0000 (Thu, 12 May 2011) Log Message: ----------- added throws declaration for date format parsing errors Modified Paths: -------------- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/SearchController.java Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/SearchController.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/SearchController.java 2011-05-12 12:08:25 UTC (rev 842) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/SearchController.java 2011-05-12 12:09:30 UTC (rev 843) @@ -6,6 +6,7 @@ import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; +import java.text.ParseException; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; @@ -54,7 +55,7 @@ protected String formView; private TaxonLabelService mTaxonLabelService; - protected abstract ModelAndView handleQueryRequest(HttpServletRequest request,HttpServletResponse response,BindException errors,String query) throws CQLParseException, IOException, InstantiationException; + protected abstract ModelAndView handleQueryRequest(HttpServletRequest request,HttpServletResponse response,BindException errors,String query) throws CQLParseException, IOException, InstantiationException, ParseException; /** * Recursively traverses a CQL parse tree (presumably starting from its This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2011-05-12 12:08:31
|
Revision: 842 http://treebase.svn.sourceforge.net/treebase/?rev=842&view=rev Author: rvos Date: 2011-05-12 12:08:25 +0000 (Thu, 12 May 2011) Log Message: ----------- implemented findByPublicationDateRange Modified Paths: -------------- trunk/treebase-core/src/main/java/org/cipres/treebase/service/study/StudyServiceImpl.java Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/service/study/StudyServiceImpl.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/service/study/StudyServiceImpl.java 2011-05-12 12:07:09 UTC (rev 841) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/service/study/StudyServiceImpl.java 2011-05-12 12:08:25 UTC (rev 842) @@ -1,20 +1,14 @@ package org.cipres.treebase.service.study; -import java.io.BufferedReader; import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileReader; -import java.io.IOException; -import java.sql.Clob; import java.util.Collection; -import java.util.HashSet; +import java.util.Date; import java.util.Iterator; import java.util.LinkedHashSet; import java.util.Set; import org.apache.log4j.Logger; -import org.hibernate.Hibernate; import org.jdom.Element; import org.jdom.output.Format; import org.jdom.output.XMLOutputter; @@ -535,4 +529,8 @@ boolean pCaseSensitive) { return getStudyHome().findByJournal(pJournal,pCaseSensitive); } + + public Collection<Study> findByPublicationDateRange(Date from, Date until) { + return getStudyHome().findByPublicationDateRange(from, until); + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |