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-08-25 13:57:50
|
Revision: 940 http://treebase.svn.sourceforge.net/treebase/?rev=940&view=rev Author: rvos Date: 2011-08-25 13:57:44 +0000 (Thu, 25 Aug 2011) Log Message: ----------- Molecular states in the xml should now be reconciled with the singleton identifiers in treebase Modified Paths: -------------- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlMatrixConverter.java Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlMatrixConverter.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlMatrixConverter.java 2011-08-25 10:30:19 UTC (rev 939) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlMatrixConverter.java 2011-08-25 13:57:44 UTC (rev 940) @@ -2,6 +2,7 @@ import java.util.ArrayList; import java.util.Collection; +import java.util.HashSet; import java.util.List; import java.util.Set; @@ -29,6 +30,7 @@ import org.cipres.treebase.domain.matrix.PhyloChar; import org.cipres.treebase.domain.matrix.RowSegment; import org.cipres.treebase.domain.matrix.StandardMatrix; +import org.cipres.treebase.domain.matrix.StateSet; import org.cipres.treebase.domain.study.Study; import org.cipres.treebase.domain.taxon.TaxonLabelHome; import org.cipres.treebase.domain.taxon.TaxonLabelSet; @@ -184,10 +186,7 @@ CharacterState xmlState = xmlStateSet.createCharacterState(tbState.getSymbol().toString()); if ( null != tbState.getDescription() ) { xmlState.setLabel(tbState.getDescription()); - } -// if ( null != tbState.getNotes() ) { -// ((Annotatable)xmlState).addAnnotationValue("dcterms:description", Constants.DCURI, tbState.getNotes()); -// } + } attachTreeBaseID((Annotatable)xmlState,tbState,DiscreteCharState.class); } org.nexml.model.Character xmlCharacter = xmlMatrix.createCharacter(xmlStateSet); @@ -212,6 +211,8 @@ String tbDataType = tbMatrix.getDataType().getDescription(); MolecularMatrix xmlMatrix = null; CharacterStateSet xmlStateSet = null; + + // create the matrix and constant state set if ( tbDataType.equals(MatrixDataType.MATRIX_DATATYPE_DNA) ) { xmlMatrix = getDocument().createMolecularMatrix(xmlOTUs, MolecularMatrix.DNA); xmlStateSet = ((MolecularMatrix)xmlMatrix).getDNACharacterStateSet(); @@ -224,16 +225,28 @@ xmlMatrix = getDocument().createMolecularMatrix(xmlOTUs, MolecularMatrix.Protein); xmlStateSet = ((MolecularMatrix)xmlMatrix).getProteinCharacterStateSet(); } + + // attach base uri xmlMatrix.setBaseURI(mMatrixBaseURI); + + // lookup the equivalent state in tb and attach identifiers, only keep those in matrix + Set<CharacterState> seenStates = new HashSet<CharacterState>(); + for(StateSet tbStateSet : tbMatrix.getStateSets() ) { + for (DiscreteCharState tbState : tbStateSet.getStates() ) { + String tbSymbol = tbState.getSymbol().toString().toUpperCase(); + CharacterState xmlState = xmlStateSet.lookupCharacterStateBySymbol(tbSymbol); + if ( null == xmlState ) { + xmlState = xmlStateSet.createCharacterState(tbSymbol); + } + attachTreeBaseID((Annotatable)xmlState,tbState,DiscreteCharState.class); + seenStates.add(xmlState); + } + } + xmlStateSet.setCharacterStates(seenStates); + + // create columns and attach identifiers for ( MatrixColumn tbColumn : tbMatrix.getColumnsReadOnly() ) { org.nexml.model.Character xmlCharacter = xmlMatrix.createCharacter(xmlStateSet); - PhyloChar tbCharacter = tbColumn.getCharacter(); - if ( null != tbCharacter.getDescription() ) { - xmlCharacter.setLabel(tbCharacter.getDescription()); - } - if ( null != tbCharacter.getDescription() && ! tbCharacter.getDescription().equals(tbDataType) ) { - ((Annotatable)xmlCharacter).addAnnotationValue("dcterms:description", Constants.DCTermsURI, tbCharacter.getDescription()); - } attachTreeBaseID((Annotatable)xmlCharacter,tbColumn,MatrixColumn.class); } return xmlMatrix; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2011-08-25 10:30:26
|
Revision: 939 http://treebase.svn.sourceforge.net/treebase/?rev=939&view=rev Author: rvos Date: 2011-08-25 10:30:19 +0000 (Thu, 25 Aug 2011) Log Message: ----------- Because the nexml2cdao.xsl sheet has subsumed the functionality of the RDFa2RDFXML.xsl sheet this class has been considerably simplified: we now no longer need to do two transformations and reconcile the two resulting RDF graphs - we only need to do the one and return its results. Modified Paths: -------------- 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/NexusServiceRDFa.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/service/nexus/NexusServiceRDFa.java 2011-08-25 09:20:59 UTC (rev 938) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/service/nexus/NexusServiceRDFa.java 2011-08-25 10:30:19 UTC (rev 939) @@ -1,38 +1,17 @@ package org.cipres.treebase.service.nexus; import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.net.MalformedURLException; -import java.net.URL; -import java.net.URLEncoder; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; import java.util.Properties; -import javax.xml.parsers.ParserConfigurationException; - -import org.apache.log4j.Logger; -import org.cipres.treebase.Constants; -import org.cipres.treebase.TreebaseUtil; import org.cipres.treebase.domain.nexus.NexusDataSet; import org.cipres.treebase.domain.nexus.nexml.NexmlDocumentConverter; import org.cipres.treebase.domain.study.Study; import org.dom4j.DocumentException; -import org.dom4j.Node; -import org.dom4j.QName; import org.dom4j.io.DocumentResult; import org.dom4j.io.DocumentSource; import org.dom4j.io.SAXReader; -import org.jdom.Namespace; -import org.nexml.model.Document; -import org.nexml.model.DocumentFactory; import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerConfigurationException; import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerFactory; import javax.xml.transform.stream.StreamSource; @@ -43,14 +22,23 @@ * */ public class NexusServiceRDFa extends NexusServiceNexml { - private static final Logger LOGGER = Logger.getLogger(NexusServiceRDFa.class); /** * */ public String serialize(NexusDataSet nexusDataSet,Properties properties) { NexmlDocumentConverter ndc = getNexmlDocumentConverter(null, properties); - return transform(ndc.fromTreeBaseToXml(nexusDataSet).getXmlString()); + String result = null; + try { + result = transform(ndc.fromTreeBaseToXml(nexusDataSet).getXmlString()); + } catch (DocumentException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (TransformerException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + return result; } /** @@ -58,7 +46,17 @@ */ public String serialize(NexusDataSet nexusDataSet,Properties properties,Study study) { NexmlDocumentConverter ndc = getNexmlDocumentConverter(study, properties); - return transform(ndc.fromTreeBaseToXml(nexusDataSet).getXmlString()); + String result = null; + try { + result = transform(ndc.fromTreeBaseToXml(nexusDataSet).getXmlString()); + } catch (DocumentException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (TransformerException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + return result; } /** @@ -66,7 +64,17 @@ */ public String serialize(NexusDataSet nexusDataSet) { NexmlDocumentConverter ndc = getNexmlDocumentConverter(null, null); - return transform(ndc.fromTreeBaseToXml(nexusDataSet).getXmlString()); + String result = null; + try { + result = transform(ndc.fromTreeBaseToXml(nexusDataSet).getXmlString()); + } catch (DocumentException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (TransformerException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + return result; } /** @@ -74,7 +82,17 @@ */ public String serialize(Study study,Properties properties) { NexmlDocumentConverter ndc = getNexmlDocumentConverter(study, properties); - return transform(ndc.fromTreeBaseToXml(study).getXmlString()); + String result = null; + try { + result = transform(ndc.fromTreeBaseToXml(study).getXmlString()); + } catch (DocumentException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (TransformerException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + return result; } /** @@ -82,105 +100,37 @@ */ public String serialize(Study study) { NexmlDocumentConverter ndc = getNexmlDocumentConverter(study, null); - return transform(ndc.fromTreeBaseToXml(study).getXmlString()); - } - - /** - * Changes local URIs into global ones, based on owl:sameAs annotations - * @param cdaoDoc - */ - private void normalizeCdaoDoc (org.dom4j.Document cdaoDoc) { - Map<String,String> resourceForId = new HashMap<String,String>(); - QName rdfAboutQName = QName.get("about", "rdf", Constants.RDFURI.toString()); - QName rdfResourceQName = QName.get("resource", "rdf", Constants.RDFURI.toString()); - QName rdfIDQName = QName.get("ID", "rdf", Constants.RDFURI.toString()); - - LOGGER.info("inside normalizeCdaoDoc"); - List<org.dom4j.Element> sameAsObjects = cdaoDoc.selectNodes("//owl:sameAs[@rdf:resource]"); - for ( org.dom4j.Element sameAsElt : sameAsObjects ) { - org.dom4j.Element subjectElt = sameAsElt.getParent(); - String id = subjectElt.attributeValue(rdfAboutQName).substring(1); // remove # - String resource = sameAsElt.attributeValue(rdfResourceQName); - resourceForId.put(id, resource); - subjectElt.detach(); - } - - // replace ID attributes - List<org.dom4j.Element> identifiableObjects = cdaoDoc.selectNodes("//rdf:Description[@rdf:ID]"); - for ( org.dom4j.Element identifiableObject : identifiableObjects ) { - String rdfID = identifiableObject.attributeValue(rdfIDQName); - if ( resourceForId.containsKey(rdfID) ) { - org.dom4j.Attribute idAttr = identifiableObject.attribute(rdfIDQName); - identifiableObject.remove(idAttr); - identifiableObject.addAttribute(rdfAboutQName, resourceForId.get(rdfID)); - } - } - - // replace about and resource references - for ( String rdfID : resourceForId.keySet() ) { - List<org.dom4j.Element> referencingObjects = cdaoDoc.selectNodes("//rdf:Description[@rdf:about='#"+rdfID+"']"); - referencingObjects.addAll(cdaoDoc.selectNodes("//*[@rdf:resource='#"+rdfID+"']")); - for ( org.dom4j.Element referencingObject : referencingObjects ) { - org.dom4j.Attribute attr = referencingObject.attribute(rdfAboutQName); - if ( null == attr ) { - attr = referencingObject.attribute(rdfResourceQName); - } - if ( null != attr ) { - attr.setValue(resourceForId.get(rdfID)); - } - } + String result = null; + try { + result = transform(ndc.fromTreeBaseToXml(study).getXmlString()); + } catch (DocumentException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (TransformerException e) { + // TODO Auto-generated catch block + e.printStackTrace(); } - + return result; } + /** * * @param input * @return + * @throws DocumentException + * @throws TransformerException */ - @SuppressWarnings("unchecked") - private String transform(String input) { + private String transform(String input) throws DocumentException, TransformerException { SAXReader reader = new SAXReader(); - ByteArrayInputStream bs = new ByteArrayInputStream(input.getBytes()); - org.dom4j.Document nexmlDocument = null; - try { - nexmlDocument = reader.read( bs ); - } catch (DocumentException e) { - System.out.println(input); - e.printStackTrace(); - } - - TransformerFactory factory = TransformerFactory.newInstance(); - Transformer rdfaTransformer = null; - Transformer cdaoTransformer = null; - try { - rdfaTransformer = factory.newTransformer( new StreamSource( "http://www.nexml.org/nexml/xslt/RDFa2RDFXML.xsl" ) ); - cdaoTransformer = factory.newTransformer( new StreamSource( "http://www.nexml.org/nexml/xslt/nexml2cdao.xsl" ) ); - } catch (TransformerConfigurationException e1) { - e1.printStackTrace(); - } - DocumentSource nexmlSource = new DocumentSource( nexmlDocument ); - DocumentResult rdfaResult = new DocumentResult(); + org.dom4j.Document nexmlDocument = reader.read( new ByteArrayInputStream(input.getBytes()) ); + DocumentResult cdaoResult = new DocumentResult(); - try { - rdfaTransformer.transform( nexmlSource, rdfaResult ); - cdaoTransformer.transform( nexmlSource, cdaoResult ); - } catch (TransformerException e) { - e.printStackTrace(); - } + + Transformer cdaoTransformer = TransformerFactory.newInstance().newTransformer( new StreamSource( "http://www.nexml.org/nexml/xslt/nexml2cdao.xsl" ) ); + cdaoTransformer.transform( new DocumentSource( nexmlDocument ), cdaoResult ); - org.dom4j.Document rdfaDoc = rdfaResult.getDocument(); org.dom4j.Document cdaoDoc = cdaoResult.getDocument(); - QName qName = QName.get("base", "xml", "http://www.w3.org/XML/1998/namespace"); - String sourceBase = nexmlDocument.getRootElement().attributeValue(qName); - cdaoDoc.getRootElement().setAttributeValue(qName, sourceBase); - Iterator<org.dom4j.Element> elementIterator = rdfaDoc.getRootElement().elementIterator(); - while ( elementIterator.hasNext() ) { - org.dom4j.Element elt = elementIterator.next(); - elt.detach(); - cdaoDoc.getRootElement().add(elt); - } - normalizeCdaoDoc(cdaoDoc); return cdaoDoc.asXML(); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2011-08-25 09:21:05
|
Revision: 938 http://treebase.svn.sourceforge.net/treebase/?rev=938&view=rev Author: rvos Date: 2011-08-25 09:20:59 +0000 (Thu, 25 Aug 2011) Log Message: ----------- Didn't yet have an ID string prefix for MatrixColumn.class. Henceforth, this shall be "Col". Modified Paths: -------------- trunk/treebase-core/src/main/java/org/cipres/treebase/TreebaseIDString.java Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/TreebaseIDString.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/TreebaseIDString.java 2011-08-25 09:08:48 UTC (rev 937) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/TreebaseIDString.java 2011-08-25 09:20:59 UTC (rev 938) @@ -7,6 +7,7 @@ import org.cipres.treebase.domain.matrix.DiscreteCharState; import org.cipres.treebase.domain.matrix.DiscreteMatrixElement; import org.cipres.treebase.domain.matrix.Matrix; +import org.cipres.treebase.domain.matrix.MatrixColumn; import org.cipres.treebase.domain.matrix.PhyloChar; import org.cipres.treebase.domain.study.Algorithm; import org.cipres.treebase.domain.study.Analysis; @@ -47,6 +48,7 @@ val.put(Study.class, "S"); val.put(Matrix.class, "M"); val.put(PhyloChar.class, "C"); + val.put(MatrixColumn.class, "Col"); val.put(DiscreteCharState.class, "Dcs"); val.put(DiscreteMatrixElement.class, "Dme"); val.put(PhyloTree.class, "Tr"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2011-08-25 09:08:54
|
Revision: 937 http://treebase.svn.sourceforge.net/treebase/?rev=937&view=rev Author: rvos Date: 2011-08-25 09:08:48 +0000 (Thu, 25 Aug 2011) Log Message: ----------- TreeBASE uses singleton PhyloChar objects for matrices (as a space-saving hack), so it is no good to use the PhyloChar.id to create PhyloWS URIs. Instead, we should use MatrixColumn identifiers. Modified Paths: -------------- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlMatrixConverter.java Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlMatrixConverter.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlMatrixConverter.java 2011-08-11 19:44:41 UTC (rev 936) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlMatrixConverter.java 2011-08-25 09:08:48 UTC (rev 937) @@ -195,7 +195,7 @@ if ( null != tbCharacter.getDescription() ) { xmlCharacter.setLabel(tbCharacter.getDescription()); } - attachTreeBaseID((Annotatable)xmlCharacter,tbCharacter,PhyloChar.class); + attachTreeBaseID((Annotatable)xmlCharacter,tbColumns.get(i),MatrixColumn.class); } return xmlMatrix; } @@ -233,10 +233,8 @@ } if ( null != tbCharacter.getDescription() && ! tbCharacter.getDescription().equals(tbDataType) ) { ((Annotatable)xmlCharacter).addAnnotationValue("dcterms:description", Constants.DCTermsURI, tbCharacter.getDescription()); - } - if ( null != tbCharacter.getId() && tbCharacter.getId() != 2 ) { // XXX is PhyloChar.id 2 some sort of magic number? - attachTreeBaseID((Annotatable)xmlCharacter,tbCharacter,PhyloChar.class); } + attachTreeBaseID((Annotatable)xmlCharacter,tbColumn,MatrixColumn.class); } return xmlMatrix; } @@ -259,7 +257,7 @@ xmlCharacter.setLabel(tbCharacter.getDescription()); ((Annotatable)xmlCharacter).addAnnotationValue("dcterms:description", Constants.DCTermsURI, tbCharacter.getDescription()); } - attachTreeBaseID((Annotatable)xmlCharacter,tbCharacter,PhyloChar.class); + attachTreeBaseID((Annotatable)xmlCharacter,tbColumn,MatrixColumn.class); //coerce the tbMatrix into a character matrix to get its character sets CharacterMatrix tbCharacterMatrix = (CharacterMatrix)tbMatrix; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lol...@us...> - 2011-08-11 19:44:47
|
Revision: 936 http://treebase.svn.sourceforge.net/treebase/?rev=936&view=rev Author: loloyohe Date: 2011-08-11 19:44:41 +0000 (Thu, 11 Aug 2011) Log Message: ----------- Added testNexmlEmptyMatrix() in response to bug#3303002 in which some matrices of studies were not returned in nexml. Modified Paths: -------------- trunk/treebase-core/src/test/java/org/cipres/treebase/domain/nexus/NexmlMatrixConverterTest.java Modified: trunk/treebase-core/src/test/java/org/cipres/treebase/domain/nexus/NexmlMatrixConverterTest.java =================================================================== --- trunk/treebase-core/src/test/java/org/cipres/treebase/domain/nexus/NexmlMatrixConverterTest.java 2011-08-01 20:18:08 UTC (rev 935) +++ trunk/treebase-core/src/test/java/org/cipres/treebase/domain/nexus/NexmlMatrixConverterTest.java 2011-08-11 19:44:41 UTC (rev 936) @@ -17,6 +17,7 @@ import org.cipres.treebase.domain.matrix.ColumnRange; import org.cipres.treebase.domain.matrix.ContinuousMatrixElement; import org.cipres.treebase.domain.matrix.DiscreteChar; +import org.cipres.treebase.domain.matrix.DiscreteCharState; import org.cipres.treebase.domain.matrix.DiscreteMatrix; import org.cipres.treebase.domain.matrix.DiscreteMatrixElement; import org.cipres.treebase.domain.matrix.MatrixColumn; @@ -152,7 +153,11 @@ /** * Test for {@link org.cipres.treebase.domain.nexus.nexml.NexmlMatrixConverter#}. - * This verfies that all row-segment annotation are expressed for a particular study. + * This ensures that a matrix prints for a DiscreteMatrix matrices that + * suit the condition : if ( characterList.size() <= MAX_GRANULAR_NCHAR && xmlOTUs.getAllOTUs().size() <= MAX_GRANULAR_NTAX ) + * in populateXmlMatrix() of NexmlMatrixConverter. + * + * This is in response to bug #3303002 */ public void testNexmlEmptyMatrix() { String testName = "testNexmlEmptyMatrix()"; @@ -191,38 +196,57 @@ // there most be more than zero matrices because every treebase study has at least one matrix Assert.assertTrue(nexMatrices.size() != 0 ); + // now we're going to match up the NeXML matrices with their equivalent treebase ones for ( Matrix<?> nexMatrix : nexMatrices ) { // the xml id is the same as the primary key of the equivalent matrix stored by treebase String nexId = nexMatrix.getId(); + for ( org.cipres.treebase.domain.matrix.Matrix tbMatrix : tbMatrices ) { String tbId = "M" + tbMatrix.getId(); // if true, the matrices are equivalent + System.out.println(tbId); + int otuIndex = 0; + for ( MatrixRow tbRow : ((CharacterMatrix) tbMatrix).getRowsReadOnly() ) { + OTUs xmlOTUs = nexMatrix.getOTUs(); + + //need to make an OTU list because getOTUByID cannot be is private + List<OTU> xmlOTUList = xmlOTUs.getAllOTUs();//getOTUById(xmlOTUs, tbRow.getTaxonLabel().getId()); + OTU xmlOTU = xmlOTUList.get(otuIndex); //get xmlOTUs + List<org.nexml.model.Character> characterList = nexMatrix.getCharacters(); - System.out.println(tbMatrix.getClass()); - System.out.println(nexMatrix.getClass().toString() + "hi"); + int charIndex = 0; + if ( characterList.size() <= MAX_GRANULAR_NCHAR && xmlOTUs.getAllOTUs().size() <= MAX_GRANULAR_NTAX ) { + + //tbColumn is not used, but is in the actual NexmlMatrixConverter class. + //it is necessary so the for loop does not crash + for ( MatrixColumn tbColumn : ((CharacterMatrix)tbMatrix).getColumns() ) { + + //this builds the matrix + String string = tbRow.buildElementAsString(); + nexMatrix.setSeq(string, xmlOTU); + + //in NexmlMatrixConverter attachTreeBASEID would be called here. Not necessary for the test. + } + charIndex++; + otuIndex++; + + } if ( nexId.equals(tbId) ) { Assert.assertTrue("NeXML matrix "+nexId+ " is one of the known subclasses", nexMatrix instanceof CategoricalMatrix || nexMatrix instanceof MolecularMatrix || nexMatrix instanceof ContinuousMatrix); - Assert.assertNotNull(nexMatrix); Assert.assertNotNull(tbMatrix); - - - for ( MatrixRow tbRow : ((CharacterMatrix) tbMatrix).getRowsReadOnly() ) { - System.out.println (tbRow.buildElementAsString()); - } + } - //print out the rows of the nexml matrix to see if there are sequences + } } - } - - //System.out.println(nexDoc.getXmlString()); + System.out.println(nexDoc.getXmlString()); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lol...@us...> - 2011-08-01 20:18:16
|
Revision: 935 http://treebase.svn.sourceforge.net/treebase/?rev=935&view=rev Author: loloyohe Date: 2011-08-01 20:18:08 +0000 (Mon, 01 Aug 2011) Log Message: ----------- Updated the jsphylosvg-min.js with the most recent version hoping to see what happens with the tree visualizer. Modified Paths: -------------- trunk/treebase-web/src/main/webapp/scripts/jsphylosvg-min.js Modified: trunk/treebase-web/src/main/webapp/scripts/jsphylosvg-min.js =================================================================== --- trunk/treebase-web/src/main/webapp/scripts/jsphylosvg-min.js 2011-07-27 21:58:58 UTC (rev 934) +++ trunk/treebase-web/src/main/webapp/scripts/jsphylosvg-min.js 2011-08-01 20:18:08 UTC (rev 935) @@ -1,2505 +1,75 @@ -Smits = {};Smits.Common = { - nodeIdIncrement : 0, - activeNode: 0, - - /* Rounds float to a defined number of decimal places */ - roundFloat : function(num, digits){ - var i = 0, - dec = 1; - while(i < digits){ - dec *= 10; - i++; - } - return Math.round(num*dec)/dec; - }, - - /* Copies properties from one object to another */ - apply : function(obj, extObj){ - if (obj && typeof extObj == 'object') { - for (var key in extObj) { - obj[key] = extObj[key]; - } - } - return obj; - }, - - addEventHandler : function(el, eventType, fn, paramsObj){ - try{ - el.addEventListener( - eventType, - (function(fn, args){ - return( - function(e,o) { - var params = paramsObj; - params.e = e; - fn(params); - } - ); - }(fn, paramsObj)), - false - ); - } catch (err){} - }, - - isInteger : function(s) { - return !isNaN(parseInt(s)); - }, - - isXMLSerializerAvailable : function(){ - if (typeof(XMLSerializer) == "function"){ - return true; - } else { - return false; - } - }, - - createSvgEl : function (el, attr) { - el = document.createElementNS("http://www.w3.org/2000/svg", el); - if (attr) { - for (var key in attr) { - if (attr.hasOwnProperty(key)) { - el.setAttribute(key, String(attr[key])); - } - } - } - return el; - }, - - createGradientEl : function(name, obj, coords){ - if(obj.type != "radialGradient") return false; - - var radialEl = Smits.Common.createSvgEl("radialGradient", { - id: name, - gradientUnits:"userSpaceOnUse", - cx: coords[0], - cy: coords[1], - r: coords[2], - fx: coords[0], - fy: coords[1] - }); - - if(obj.stop){ - var stop = obj.stop; - for(var i = 0; i < stop.length; i++){ - var stopObj = stop[i]; - if(stopObj['@attributes']){ - radialEl.appendChild(Smits.Common.createSvgEl("stop", stopObj['@attributes'])); - } else { - if(stopObj['_attributes']) delete stopObj['_attributes']; - if(stopObj['_children']) delete stopObj['_children']; - if(stopObj['__proto__']) delete stopObj['__proto__']; - radialEl.appendChild(Smits.Common.createSvgEl("stop", stopObj)); - } - } - } - - return radialEl; - }, - - setCssStyle : function(selector, rule) { - var stylesheet = document.styleSheets[0]; - if( stylesheet.addRule ){ - stylesheet.addRule(selector, rule); - } else if( stylesheet.insertRule ){ - stylesheet.insertRule(selector + ' { ' + rule + ' }', stylesheet.cssRules.length); - } - } - -};Smits.PhyloCanvas = function(){ - var phylogram, - divId, - newickObject, - svg, - dataObject; - - return function(inputFormat, sDivId, canvasWidth, canvasHeight, type){ - /* Privileged Methods */ - this.getNewickObject = function(){ - return newickObject; - }; - this.clear = function(){ - - }; - this.scale = function(multiplier){ - svg.svg.scale(multiplier); - }; - this.getSvg = function(){ - return svg; - }; - this.getPhylogram = function(){ - return phylogram; - }; - this.getSvgSource = function(){ - if(Raphael.svg && Smits.Common.isXMLSerializerAvailable()){ - var serialize = new XMLSerializer(); - return serialize.serializeToString(svg.svg.canvas); - } else { - return false; - } - } - - /* CONSTRUCTOR */ - - // Process dataset -- assume newick format, else needs to provide format - if(typeof inputFormat === "object"){ - if(inputFormat.xml){ // default xml format is phyloXML - if(!inputFormat.fileSource){ - var xj = XMLObjectifier.textToXML(inputFormat.xml); // assume we need to clean it up - } else { - var xj = inputFormat.xml; - } - xj = XMLObjectifier.xmlToJSON(xj); - dataObject = new Smits.PhyloCanvas.PhyloxmlParse(xj); - } else if(inputFormat.phyloxml){ - if(!inputFormat.fileSource){ - var xj = XMLObjectifier.textToXML(inputFormat.phyloxml); // assume we need to clean it up - } else { - var xj = inputFormat.phyloxml; - } - xj = XMLObjectifier.xmlToJSON(xj); - dataObject = new Smits.PhyloCanvas.PhyloxmlParse(xj); - } else if(inputFormat.nexml){ - if(!inputFormat.fileSource){ - var xj = XMLObjectifier.textToXML(inputFormat.nexml); // assume we need to clean it up - } else { - var xj = inputFormat.nexml; - } - xj = XMLObjectifier.xmlToJSON(xj); - dataObject = new Smits.PhyloCanvas.NexmlParse(xj, inputFormat) - } else if(inputFormat.json){ - dataObject = new Smits.PhyloCanvas.PhyloxmlParse(inputFormat.json); - } else if(inputFormat.newick){ - dataObject = new Smits.PhyloCanvas.NewickParse(inputFormat.newick); - } else if(inputFormat.nexmlJson){ - dataObject = new Smits.PhyloCanvas.NexmlJsonParse(inputFormat); - } else { - alert('Please set the format of input data'); - } - } else { - dataObject = new Smits.PhyloCanvas.NewickParse(inputFormat); - } - - divId = sDivId; - svg = new Smits.PhyloCanvas.Render.SVG( divId, canvasWidth, canvasHeight ); - - /* FACTORY */ - if(type == "circular"){ - phylogram = new Smits.PhyloCanvas.Render.CircularPhylogram( - svg, - dataObject - ); - } else { - phylogram = new Smits.PhyloCanvas.Render.Phylogram( - svg, - dataObject - ); - } - - } - -}(); - -Smits.PhyloCanvas.prototype = { -};Smits.PhyloCanvas.Node = function(){ - - /** - * Node Class - * Allows objects to be traversed across children - * - */ - return function(o, parentInstance){ - // initiate object - this.id = Smits.Common.nodeIdIncrement += 1; - this.level = 0; - this.len = 0; - this.newickLen = 0; - this.name = ''; - this.type = ''; - this.chart = {}; - this.img = []; - - if(o) Smits.Common.apply(this, o); - - this.children = new Array(); - - if(parentInstance){ - parentInstance.children.push(this); - } - } -}(); - - -Smits.PhyloCanvas.Node.prototype = { - - getCountAllChildren : function(){ - var nodeCount = 0; - - for (var key in this.children) { - if(Smits.Common.isInteger(key)){ - var child = this.children[key]; - if(child.children && child.children.length > 0){ - nodeCount += child.getCountAllChildren(); - } else { - nodeCount ++; - } - } - } - return nodeCount; - }, - - getCountImmediateChildren : function(){ - var nodeCount = 0; - - for (var key in this.children) { - var child = this.children[key]; - nodeCount += child.length; - } - return nodeCount; - }, - - getMidbranchPosition : function(){ - var y = [0,0]; // bounds - - for (var i = 0; i < this.children.length; i++) { - var child = this.children[i]; - - if(child.children && child.children.length > 0){ - if(i == 0){ - y[0] = child.getMidbranchPosition(); - y[1] += child.getCountAllChildren(); - } else if (i == this.children.length - 1){ - y[1] += child.getMidbranchPosition(); - } else { - y[1] += child.getCountAllChildren(); - } - } else { - if(i == 0){ - y[0] = 1; - y[1] += 1; - } else if (i == this.children.length - 1){ - y[1] += 1; - } else { - y[1] += 1; - } - } - } - - return y[1] >= y[0] ? ((y[1] - y[0]) / 2) + y[0] : y[0]; - } - -};Smits.PhyloCanvas.NewickParse = function(){ - - var text, - ch, - pos, - mLevel = 0, - mNewickLen = 0, - root, - validate, - - object = function (parentNode) { - var node = new Smits.PhyloCanvas.Node(); - - while (ch !== ')' && ch !== ',') { - if (ch === ':'){ - next(); - node.len = Smits.Common.roundFloat(string(), 4); // round to 4 decimal places - if(node.len == 0){ - node.len = 0.0001; - } - } else if (ch === "'" || ch === '"'){ - node.type = "label"; - node.name = quotedString(ch); - } else { - node.type = "label"; - node.name = string(); - } - } - node.level = parentNode.level + 1; - return node; - }, - - objectIterate = function(parentNode){ - var node = new Smits.PhyloCanvas.Node(); - if(parentNode){ - node.level = parentNode.level + 1; - } - - while( ch !== ')' ){ - next() - if( ch === '(' ) { - node.children.push(objectIterate(node)); - } else { - node.children.push(object(node)); - } - } - - next(); - if(ch !== ':' && ch !== ')' && ch !== ',' && ch !== ';'){ - node.type = "label"; - node.name = string(); - } - if(ch === ':'){ - next(); - node.len = Smits.Common.roundFloat(string(), 4); - if(node.len == 0){ - node.len = 0.0001; - } - node.type = "stem"; - - } - return node; - }, - - string = function(){ - var string = ''; - - while (ch !== ':' && ch !== ')' && ch !== ',' && ch !== ';'){ - string += ch; - next(); - } - return string; - }, - - quotedString = function(quoteType){ - var string = ''; - - while (ch !== quoteType){ - string += ch; - next(); - } - return string; - }, - - next = function() { - ch = text.charAt(pos); - pos += 1; - return ch; - }, - - recursiveProcessRoot = function(node, parentNode){ - - if(node.children && node.children.length){ - for( var i = 0; i < node.children.length; i++ ){ - var child = node.children[i]; - if(child.len === 0) { // Dendogram - child.len = 1; - } - child.newickLen = Smits.Common.roundFloat(child.len + node.newickLen, 4); - if(child.level > mLevel) mLevel = child.level; - if(child.newickLen > mNewickLen) mNewickLen = child.newickLen; - if(child.children.length > 0){ - recursiveProcessRoot(child, node); - } - } - } - return node; - }; - - return function(parseText){ - /* Privileged Methods */ - this.getRoot = function(){ - return root; - }; - this.getLevels = function(){ - return mLevel; - }; - this.getNewickLen = function(){ - return mNewickLen; - }; - this.getValidate = function(){ - return validate; - }; - - - /* CONSTRUCTOR */ - text = parseText; - pos = 0; - - next(); - root = objectIterate(); - root = recursiveProcessRoot(root); - } - -}(); - -Smits.PhyloCanvas.NewickParse.prototype = { - -};Smits.PhyloCanvas.PhyloxmlParse = function(){ - - var mLevel = 0, - mNewickLen = 0, - root, - validate, - - recursiveParse = function(clade, parentNode){ - var node = new Smits.PhyloCanvas.Node(); - if(parentNode){ - node.level = parentNode.level + 1; - } - - if(clade.clade && clade.clade.length){ - for(var i = 0; i < clade.clade.length; i++){ - var thisClade = clade.clade[i]; - node.children.push(recursiveParse(thisClade, node)); - } - } - if(clade.branch_length){ // Branches can be attributes or own element - if(typeof clade.branch_length === 'object'){ - clade.branch_length = clade.branch_length[0].Text; - } - - node.len = Smits.Common.roundFloat(clade.branch_length, 4); // round to 4 decimal places - if(node.len == 0){ - node.len = 0.0001; - } - } - if(clade.name){ - node.type = 'label'; - node.name = clade.name[0].Text; - if(clade.name[0] && clade.name[0].style){ - node.style = clade.name[0].style; - } - if(clade.name[0] && clade.name[0].bgStyle){ - node.bgStyle = clade.name[0].bgStyle; - } - } else if(clade.confidence){ - node.name = clade.confidence[0].Text; - } - - /* Collect further info that might be used as a label */ - if (clade.sequence && clade.sequence[0] && clade.sequence[0].name && clade.sequence[0].name[0] && clade.sequence[0].name[0].Text){ - node.sequenceName = clade.sequence[0].name[0].Text; - } - if (clade.taxonomy && clade.taxonomy[0]){ - if(clade.taxonomy[0].scientific_name && clade.taxonomy[0].scientific_name[0] && clade.taxonomy[0].scientific_name[0].Text){ - node.taxonomyScientificName = clade.taxonomy[0].scientific_name[0].Text; - } - if (clade.taxonomy[0].common_name && clade.taxonomy[0].common_name[0] && clade.taxonomy[0].common_name[0].Text){ - node.taxonomyCommonName = clade.taxonomy[0].common_name[0].Text; - } - } - if (clade.sequence && clade.sequence[0] && clade.sequence[0].accession && clade.sequence[0].accession[0] && clade.sequence[0].accession[0].Text){ - node.sequenceAccession = clade.sequence[0].accession[0].Text; - } - if (clade.point ){ - node.LatLong = [clade.point[0].lat[0].Text, clade.point[0]['long'][0].Text]; - } - - - /* Prioritization of Label */ - if(!node.name){ - if(node.sequenceName){ - node.name = node.sequenceName; - } else if (node.taxonomyScientificName){ - node.name = node.taxonomyScientificName; - } else if (node.taxonomyCommonName){ - node.name = node.taxonomyCommonName; - } else if (node.sequenceAccession){ - node.name = node.sequenceAccession; - } - if(node.name){ // if name is now set, type is 'label' - node.type = 'label'; - } - } - - if(clade.annotation){ - if(clade.annotation[0] && clade.annotation[0].desc && clade.annotation[0].desc[0] && clade.annotation[0].desc[0].Text){ - node.description = clade.annotation[0].desc[0].Text; - } - if(clade.annotation[0] && clade.annotation[0].uri && clade.annotation[0].uri[0] && clade.annotation[0].uri[0].Text){ - node.uri = clade.annotation[0].uri[0].Text; - } - if(clade.annotation[0] && clade.annotation[0].img){ - for(var i in clade.annotation[0].img){ - if(Smits.Common.isInteger(i)){ - node.img[i] = clade.annotation[0].img[i].Text; - } - } - } - } - if(clade.chart){ - if(clade.chart[0]){ - for(var i in clade.chart[0]){ - if(i != 'Text' && i != '_children'){ - node.chart[i] = clade.chart[0][i][0].Text; - } - } - } - - } - - // Validation - if(node && node.level > 1){ - if(!node.len){ - validate = 'Error. Please include Branch Lengths - we only draw rooted phylogenetic trees.'; - } - } - - return node; - }, - - recursiveProcessRoot = function(node, parentNode){ - if(node.children && node.children.length){ - for( var i = 0; i < node.children.length; i++){ - var child = node.children[i]; - child.newickLen = Math.round( (child.len + node.newickLen) *10000)/10000; - if(child.level > mLevel) mLevel = child.level; - if(child.newickLen > mNewickLen) mNewickLen = child.newickLen; - if(child.children.length > 0){ - recursiveProcessRoot(child, node); - } - } - } - return node; - }, - - recursiveProcessParameters = function(parametersEl, treeType){ - for (var i in parametersEl){ - if(i != '_children' && i != 'Text'){ - if(i == 'rectangular' || i == 'circular'){ - recursiveProcessParameters(parametersEl[i][0], i); - } else { - if(!Smits.PhyloCanvas.Render.Parameters[i]) { Smits.PhyloCanvas.Render.Parameters[i] = {}; }; - Smits.PhyloCanvas.Render.Parameters.set(i, parametersEl[i][0].Text, treeType); - } - } - } - return; - }; - - return function(jsonString){ - /* Privileged Methods */ - this.getRoot = function(){ - return root; - }; - this.getLevels = function(){ - return mLevel; - }; - this.getNewickLen = function(){ - return mNewickLen; - }; - this.getValidate = function(){ - return validate; - }; - - - /* CONSTRUCTOR */ - if(jsonString.phylogeny && jsonString.phylogeny[0] && jsonString.phylogeny[0].clade){ - root = recursiveParse(jsonString.phylogeny[0].clade[0]); - } - - if(jsonString.phylogeny && jsonString.phylogeny[0] && jsonString.phylogeny[0].render && jsonString.phylogeny[0].render[0]){ - var render = jsonString.phylogeny[0].render[0]; - - // Custom Styles - if(render && render.styles){ - var styles = render.styles[0]; - for (var i in styles){ - if(i != '_children' && i != 'Text'){ - if(styles[i][0]['type'] && styles[i][0]['type'] == "radialGradient" && Raphael.svg){ - // radialGradient only supported by SVG - styles[i][0]['name'] = i; - Smits.PhyloCanvas.Render.Style[i] = styles[i][0]; - if(!Smits.PhyloCanvas.Render.Style['jsphylosvgGradientList']) { Smits.PhyloCanvas.Render.Style['jsphylosvgGradientList'] = [] }; - Smits.PhyloCanvas.Render.Style['jsphylosvgGradientList'].push(i); - } else { - if(!Smits.PhyloCanvas.Render.Style[i]) { Smits.PhyloCanvas.Render.Style[i] = {}; }; - for(var j in styles[i][0]){ - if(j != '_attributes' && j != '_children' && j != 'type'){ - Smits.PhyloCanvas.Render.Style[i][j.replace('_', '-')] = styles[i][0][j]; // This is quite painful, as xml does not allow dashes - } - } - } - - } - } - } - - // Custom Parameters - if(render && render.parameters){ - recursiveProcessParameters(render.parameters[0]); - } - - // Charts - if(render && render.charts){ - var charts = render.charts[0]; - for (var i in charts){ - if(i != '_children' && i != 'Text'){ - for(var j in charts[i]){ - if(charts[i][j].type == "binary"){ - charts[i][j].chart = i; - Smits.PhyloCanvas.Render.Parameters.binaryCharts.push(charts[i][j]); - } else if (charts[i][j].type == "integratedBinary"){ - charts[i][j].chart = i; - Smits.PhyloCanvas.Render.Parameters.integratedBinaryCharts.push(charts[i][j]); - } else if (charts[i][j].type == "bar"){ - charts[i][j].chart = i; - Smits.PhyloCanvas.Render.Parameters.barCharts.push(charts[i][j]); - } - } - } - } - } - - } - - root = recursiveProcessRoot(root); - - } - -}(); - -Smits.PhyloCanvas.PhyloxmlParse.prototype = { - -};Smits.PhyloCanvas.NexmlParse = function(){ - - var mLevel = 0, - mNewickLen = 0, - root, - validate, - nexEdges, - nexNodes, - - recursiveParse = function(nexnode, nexlen, parentNode){ - var node = new Smits.PhyloCanvas.Node(); - if(parentNode){ - node.level = parentNode.level + 1; - } - - for(var i = 0; i < nexEdges.length; i++){ - if(nexEdges[i].source == nexnode.id){ - for(var j = 0; j < nexNodes.length; j++){ - if(nexEdges[i].target == nexNodes[j].id){ - node.children.push(recursiveParse(nexNodes[j], nexEdges[i].length, node)); - } - } - } - } - - if(nexlen) { - node.len = Smits.Common.roundFloat(nexlen, 4); // round to 4 decimal places - if(node.len == 0){ - node.len = 0.0001; - } - } - - if(nexnode.label){ - node.type = 'label'; - node.name = nexnode.label; - if(nexnode.style){ - node.style = nexnode.style; - } - } - - - // Validation - if(node && node.level > 1){ - if(!node.len){ - validate = 'Error. Please include Branch Lengths - we only draw rooted phylogenetic trees.'; - } - } - - return node; - }, - - recursiveProcessRoot = function(node, parentNode){ - if(node.children && node.children.length){ - for( var i = 0; i < node.children.length; i++){ - var child = node.children[i]; - child.newickLen = Math.round( (child.len + node.newickLen) *10000)/10000; - if(child.level > mLevel) mLevel = child.level; - if(child.newickLen > mNewickLen) mNewickLen = child.newickLen; - if(child.children.length > 0){ - recursiveProcessRoot(child, node); - } - } - } - return node; - }, - recursiveProcessParameters = function(parametersEl, treeType){ - for (var i in parametersEl){ - if(i != '_children' && i != 'Text'){ - if(i == 'rectangular' || i == 'circular'){ - recursiveProcessParameters(parametersEl[i][0], i); - } else { - if(!Smits.PhyloCanvas.Render.Parameters[i]) { Smits.PhyloCanvas.Render.Parameters[i] = {}; }; - Smits.PhyloCanvas.Render.Parameters.set(i, parametersEl[i][0].Text, treeType); - } - } - } - return; - }; - - return function(jsonString, inputFormat){ - /* Privileged Methods */ - this.getRoot = function(){ - return root; - }; - this.getLevels = function(){ - return mLevel; - }; - this.getNewickLen = function(){ - return mNewickLen; - }; - this.getValidate = function(){ - return validate; - }; - - - if(inputFormat.tree && jsonString.trees[0] && jsonString.trees[0].tree[(inputFormat.tree-1)]){ - nexEdges = jsonString.trees[0].tree[(inputFormat.tree-1)].edge; - nexNodes = jsonString.trees[0].tree[(inputFormat.tree-1)].node; - } else { - nexEdges = jsonString.trees[0].tree[0].edge; - nexNodes = jsonString.trees[0].tree[0].node; - } - - // RAV: it is more robust to search for the root by the tree topology - // then by looking for a @root attribute. Valid NeXML tree structures - // always have one node without normal edges pointing into it. The - // root attribute is used to indicate that this tree is actually rooted. - // Compare this with nexus/newick: newick strings are always implicitly - // rooted, even if the tree is called a utree or the [&U] token is used. - for(i = 0; i < nexNodes.length; i++){ - for(i = 0; i < nexNodes.length; i++) { - var targetCount = 0; - for(j = 0; j < nexEdges.length; j++) { - if(nexEdges[j].target == nexNodes[i].id) { - targetCount++; - } - } - if ( targetCount == 0 ) { - root = nexNodes[i]; - } - } - } - - if(root){ - root = recursiveParse(root); - - root = recursiveProcessRoot(root); - } else { - validate = 'Error. Currently, only rooted NeXML trees are supported.'; - } - - }; - -}(); - -Smits.PhyloCanvas.NexmlParse.prototype = { - -};Smits.PhyloCanvas.NexmlJsonParse = function(){ - - var mLevel = 0, - mNewickLen = 0, - root, - validate, - nexEdges = [], nexNodes = [], - - recursiveParse = function(nexnode, nexlen, parentNode){ - var node = new Smits.PhyloCanvas.Node(); - if(parentNode){ - node.level = parentNode.level + 1; - } - - for(var i = 0; i < nexEdges.length; i++){ - if(nexEdges[i].source == nexnode.id){ - for(var j = 0; j < nexNodes.length; j++){ - if(nexEdges[i].target == nexNodes[j].id){ - node.children.push(recursiveParse(nexNodes[j], nexEdges[i].length, node)); - } - } - } - } - - if(nexlen) { - node.len = Smits.Common.roundFloat(nexlen, 4); // round to 4 decimal places - if(node.len == 0){ - node.len = 0.0001; - } - } - - if(nexnode.label){ - node.type = 'label'; - node.name = nexnode.label; - if(nexnode.accession){ - node.accession = nexnode.accession; - } - if(nexnode.style){ - node.style = nexnode.style; - } - if(nexnode.bgStyle){ - node.bgStyle = nexnode.bgStyle; - } - } - - if(nexnode.chart){ - node.chart = nexnode.chart; - } - - // Validation - if(node && node.level > 1){ - if(!node.len){ - validate = 'Error. Please include Branch Lengths - we only draw rooted phylogenetic trees.'; - } - } - - return node; - }, - - recursiveProcessRoot = function(node, parentNode){ - if(node.children && node.children.length){ - for( var i = 0; i < node.children.length; i++){ - var child = node.children[i]; - child.newickLen = Math.round( (child.len + node.newickLen) *10000)/10000; - if(child.level > mLevel) mLevel = child.level; - if(child.newickLen > mNewickLen) mNewickLen = child.newickLen; - if(child.children.length > 0){ - recursiveProcessRoot(child, node); - } - } - } - return node; - }, - - recursiveProcessParameters = function(parametersEl, treeType){ - for (var i in parametersEl){ - if(i != '_children' && i != 'Text'){ - if(i == 'rectangular' || i == 'circular'){ - recursiveProcessParameters(parametersEl[i], i); - } else { - if(!Smits.PhyloCanvas.Render.Parameters[i]) { Smits.PhyloCanvas.Render.Parameters[i] = {}; }; - Smits.PhyloCanvas.Render.Parameters.set(i, parametersEl[i], treeType); - } - } - } - return; - }; - - return function(inputFormat){ - /* Privileged Methods */ - this.getRoot = function(){ - return root; - }; - this.getLevels = function(){ - return mLevel; - }; - this.getNewickLen = function(){ - return mNewickLen; - }; - this.getValidate = function(){ - return validate; - }; - - var jsonString = inputFormat.nexmlJson.nexml; - - - /* RENDER STYLES */ - var render = jsonString.render; - - // Custom Styles - if(render && render.styles){ - var styles = render.styles; - for (var i in styles){ - if(i != '_children' && i != 'Text'){ - if(styles[i]['@attributes']['type'] && styles[i]['@attributes']['type'] == "radialGradient" && Raphael.svg){ - // radialGradient only supported by SVG - styles[i]['name'] = i; - styles[i]['type'] = styles[i]['@attributes']['type']; - Smits.PhyloCanvas.Render.Style[i] = styles[i]; - if(!Smits.PhyloCanvas.Render.Style['jsphylosvgGradientList']) { Smits.PhyloCanvas.Render.Style['jsphylosvgGradientList'] = [] }; - Smits.PhyloCanvas.Render.Style['jsphylosvgGradientList'].push(i); - } else { - if(!Smits.PhyloCanvas.Render.Style[i]) { Smits.PhyloCanvas.Render.Style[i] = {}; }; - for(var j in styles[i]['@attributes']){ - if(j != '_attributes' && j != '_children' && j != 'type'){ - Smits.PhyloCanvas.Render.Style[i][j.replace('_', '-')] = styles[i]['@attributes'][j]; // This is quite painful, as xml does not allow dashes - } - } - } - } - } - } - // Custom Parameters - if(render && render.parameters){ - recursiveProcessParameters(render.parameters); - } - - // Charts - if(render && render.charts){ - var charts = render.charts; - for (var i in charts){ - charts[i]['@attributes'].chart = i; - if(charts[i]['@attributes'].type == "binary"){ - Smits.PhyloCanvas.Render.Parameters.binaryCharts.push(charts[i]['@attributes']); - } else if(charts[i]['@attributes'].type == "integratedBinary"){ - Smits.PhyloCanvas.Render.Parameters.integratedBinaryCharts.push(charts[i]['@attributes']); - } else if(charts[i]['@attributes'].type == "bar"){ - Smits.PhyloCanvas.Render.Parameters.barCharts.push(charts[i]['@attributes']); - } - } - } - - if(inputFormat.tree && jsonString.trees[0] && jsonString.trees[0].tree[(inputFormat.tree-1)]){ - nexEdges = jsonString.trees[0].tree[(inputFormat.tree-1)].edge; - nexNodes = jsonString.trees[0].tree[(inputFormat.tree-1)].node; - } else { - for(var i = 0; i < jsonString.trees.tree.edge.length; i++){ - nexEdges.push(jsonString.trees.tree.edge[i]['@attributes']); - } - for(var i = 0; i < jsonString.trees.tree.node.length; i++){ - var node = jsonString.trees.tree.node[i]['@attributes']; - if(node.label){ - node.chart = jsonString.trees.tree.node[i].chart; - } - nexNodes.push(node); - } - } - - for(var i = 0; i < nexNodes.length; i++){ - if(nexNodes[i].root && nexNodes[i].root == "true"){ - root = nexNodes[i]; - } - } - - if(root){ - root = recursiveParse(root); - - root = recursiveProcessRoot(root); - } else { - validate = 'Error. Currently, only rooted NeXML trees are supported.'; - } - - }; - -}(); - -Smits.PhyloCanvas.NexmlParse.prototype = { - -};Smits.PhyloCanvas.Render = {};Smits.PhyloCanvas.Render.Style = { - - /* Default Styles */ - - 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(requestStyle, fallbackStyle){ - if(this[requestStyle]){ - return this[requestStyle]; - } else { - return this[fallbackStyle]; - } - - } - - - -};Smits.PhyloCanvas.Render.Parameters = { - - /* DEFAULT PARAMETERS */ - jsOverride: 0, // If set, js will override chart's file setting - - /** Phylogram parameters are separated because they behave very differently **/ - - /* Rectangular Phylogram */ - Rectangular : { - bufferX : 200, // Reduces the available canvas space for tree branches, allowing - // for more space for the textual/charting components - bufferY : 40, - bufferInnerLabels : 10, // Pixels - bufferOuterLabels : 5, // Pixels - minHeightBetweenLeaves : 10, // Should probably set pretty low, as clipping may occur if it needs to be implemented - - alignPadding : 0, // Pixels to push the labels out by - this extension should be - // compensated by an increase in bufferX too - alignRight : false, - - showScaleBar : false // (STRING, e.g. "0.05") Shows a scale bar at the bottom of the tree - }, - - /* Circular Phylogram */ - Circular : { - bufferRadius : 0.33, // Margins of Tree Circle - // If > 1, it is in pixels - // If < 1, it is a percentage of the full canvas size - bufferAngle : 20, // controls split size in circle - initStartAngle : 160, - innerCircleRadius : 0, - minHeightBetweenLeaves : 5, - - /* Labels */ - bufferInnerLabels : 2, // Pixels - bufferOuterLabels : 5 // Pixels - }, - - /* Charts */ - binaryCharts : [], - integratedBinaryCharts : [], - barCharts : [], - - /* Binary Defaults */ - binaryChartBufferInner : 5, - binaryChartBufferSiblings : 0.01, - binaryChartThickness : 15, - binaryChartDisjointed : false, - - /* Bar Defaults */ - barChartBufferInner : 3, - barChartHeight : 50, - barChartWidth : 0.5, // If > 1, it is in pixels - // If < 1, it is a percentage of the node width - - /* - Rollover Events - At minimum, the params object has the following properties: - .svg - .node - .x - .y - .textEl - */ - mouseRollOver : function(params) { - if(params.node.edgeCircleHighlight){ - params.node.edgeCircleHighlight.show(); - } else { - var circleObject = params.svg.draw( - new Smits.PhyloCanvas.Render.Circle( - params.x, params.y, 5, - { attr: Smits.PhyloCanvas.Render.Style.highlightedEdgeCircle } - ) - ); - params.node.edgeCircleHighlight = circleObject[0]; - } - params.textEl.attr({ fill: 'red' }); - }, - mouseRollOut : function(params) { - params.node.edgeCircleHighlight.hide(); - params.textEl.attr({ fill: '#000' }); - }, - - set : function(param, value, treeType){ - if(!this.jsOverride){ - if(treeType){ - if(treeType == 'circular'){ - this['Circular'][param] = parseFloat(value); - } else if (treeType == 'rectangular'){ - this['Rectangular'][param] = parseFloat(value); - } - } else { - this[param] = parseFloat(value); - } - } - } -};Smits.PhyloCanvas.Render.Line = function(){ - - return function(x1, x2, y1, y2, params){ - /* Defaults */ - this.type = 'line'; - this.attr = Smits.PhyloCanvas.Render.Style.line; - - this.x1 = x1; - this.x2 = x2; - this.y1 = y1; - this.y2 = y2; - - if(params) { - Smits.Common.apply(this, params); - if(params.attr) this.attr = params.attr; - } - - } -}();Smits.PhyloCanvas.Render.Text = function(){ - - return function(x, y, text, params){ - /* Defaults */ - this.type = 'text'; - this.attr = Smits.PhyloCanvas.Render.Style.text; - - this.x = x; - this.y = y; - this.text = text; - - if(params) { - Smits.Common.apply(this, params); - if(params.attr) this.attr = params.attr; - } - } -}();Smits.PhyloCanvas.Render.Path = function(){ - var attr = Smits.PhyloCanvas.Render.Style.path; - - return function(path, params){ - /* Defaults */ - this.type = 'path'; - this.attr = Smits.PhyloCanvas.Render.Style.path; - - this.path = path; - if(params) { - Smits.Common.apply(this, params); - if(params.attr) this.attr = params.attr; - } - - } -}();Smits.PhyloCanvas.Render.Circle = function(){ - - return function(x, y, radius, params){ - /* Defaults */ - this.type = 'circle'; - - this.x = x; - this.y = y; - this.radius = radius; - - if(params) { - Smits.Common.apply(this, params); - if(params.attr) this.attr = params.attr; - } - - } -}();Smits.PhyloCanvas.Render.SVG = function(){ - var divId, - canvasSize; - - return function(sDivId, canvasWidth, canvasHeight){ - - /* CONSTRUCTOR */ - divId = sDivId; - this.canvasSize = [canvasWidth, canvasHeight]; - - this.svg = Raphael(sDivId, this.canvasSize[0], this.canvasSize[1]); - - } - -}(); - -Smits.PhyloCanvas.Render.SVG.prototype = { - - render : function(){ - var instructs = this.phylogramObject.getDrawInstructs(); - - for (var i = 0; i < instructs.length; i++) { - if(instructs[i].type == 'line'){ - var line = this.svg.path(["M", instructs[i].x1, instructs[i].y1, "L", instructs[i].x2, instructs[i].y2]).attr(Smits.PhyloCanvas.Render.Style.line); - } else if(instructs[i].type == 'path'){ - var path = this.svg.path(instructs[i].path).attr(instructs[i].attr); - } else if(instructs[i].type == 'circle'){ - var path = this.svg.circle(instructs[i].x, instructs[i].y, instructs[i].radius).attr({ - "stroke": 'red' - }); - } else { - var text = this.svg.text(instructs[i].x, instructs[i].y, instructs[i].text).attr(Smits.PhyloCanvas.Render.Style.text); - if(instructs[i].attr){ - text.attr(instructs[i].attr); - } - if(instructs[i].rotate){ - text.rotate(instructs[i].rotate); - } - - var bbox = text.getBBox(); - var hyp = Math.sqrt( (bbox.height * bbox.height) + (bbox.width * bbox.width) ); // get hypotenuse - - } - } - }, - - draw : function(instruct){ - var obj, - param; - if(instruct.type == 'line'){ - obj = this.svg.path(["M", instruct.x1, instruct.y1, "L", instruct.x2, instruct.y2]).attr(Smits.PhyloCanvas.Render.Style.line); - } else if(instruct.type == 'path'){ - obj = this.svg.path(instruct.path).attr(instruct.attr); - } else if(instruct.type == 'circle'){ - obj = this.svg.circle(instruct.x, instruct.y, instruct.radius).attr({ - "stroke": 'red' - }); - } else if(instruct.type == 'text'){ - obj = this.svg.text(instruct.x, instruct.y, instruct.text).attr(Smits.PhyloCanvas.Render.Style.text); - if(instruct.attr){ - obj.attr(instruct.attr); - } - if(instruct.rotate){ - obj.rotate(instruct.rotate); - } - - var bbox = obj.getBBox(); - param = Math.sqrt( (bbox.height * bbox.height) + (bbox.width * bbox.width) ); // get hypotenuse - } - - return [obj, param]; - } - -};Smits.PhyloCanvas.Render.Phylogram = function(){ - - var svg, - sParams = Smits.PhyloCanvas.Render.Parameters.Rectangular, // Easy Reference - canvasX, canvasY, - scaleX, scaleY, maxBranch, - minHeightBetweenLeaves, - firstBranch = true, - absoluteY = 0, maxLabelLength = 0, - outerX, outerY, outerRadius, - x1, x2, y1, y2, - positionX, positionY, - bufferX, bufferY, labelsHold = [], - - textPadding = function (y){ - return y + Math.round(y / 4); - }, - - rectLinePathArray = function (x1, y1, x2, y2){ - return ["M", x1, y1, "L", x2, y1, "L", x2, y2, "L", x1, y2, "Z"]; - }, - - recursiveCalculateNodePositions = function (node, positionX){ - if(node.len){ - if(firstBranch){ - firstBranch = false; - } else { - if(node.children.length == 0) absoluteY = Smits.Common.roundFloat(absoluteY + scaleY, 4); - } - } - - if(node.children.length > 0){ - var nodeCoords = [], x1,x2,y1,y2; - if(node.len){ // draw stem - x1 = positionX; - x2 = positionX = Smits.Common.roundFloat(positionX + (scaleX * node.len), 4); - y1 = absoluteY + (node.getMidbranchPosition() * scaleY); - y2 = y1; - - svg.draw(new Smits.PhyloCanvas.Render.Line(x1, x2, y1, y2)); - } - - if(node.name){ // draw bootstrap values - var attr = {}; - attr = Smits.PhyloCanvas.Render.Style.getStyle('bootstrap', 'text'); - if(node.uri) { attr.href = node.uri }; - if(node.description) {attr.title = node.description }; - if(node.level == 0){ - var innerX2 = 2; - var innerY2 = absoluteY + (node.getMidbranchPosition() * scaleY); - } else { - var innerX2 = x2; - var innerY2 = y2; - } - - svg.draw( - new Smits.PhyloCanvas.Render.Text( - innerX2 + 5, innerY2, - node.name, - { - attr: attr - } - ) - ); - //svg.draw(new Smits.PhyloCanvas.Render.Text(x2 + 5, y2, node.name)); - } - - if(node.children && node.children.length){ - for(var i = 0; i < node.children.length; i++){ - var child = node.children[i]; - nodeCoords.push(recursiveCalculateNodePositions(child, positionX)); - } - } - - var flatNodeCoords = []; // establish vertical bounds - for ( var i = 0; i < nodeCoords.length; i++ ){ - if(nodeCoords[i][0]) flatNodeCoords.push(nodeCoords[i][0]); - if(nodeCoords[i][1]) flatNodeCoords.push(nodeCoords[i][1]); - } - var verticalY1 = Math.min.apply(null, flatNodeCoords ); - var verticalY2 = Math.max.apply(null, flatNodeCoords); - - // draw vertical - // hack: little elbows at ends in order to prevent stair-effects at edges - svg.draw( - new Smits.PhyloCanvas.Render.Path( - [ - "M", positionX + 0.0001, verticalY1, - "L", positionX, verticalY1, - "L", positionX, verticalY2, - "L", positionX + 0.0001, verticalY2 - ], - { attr : Smits.PhyloCanvas.Render.Style.line } - ) - ); - - } else { - // label - x1 = positionX; - x2 = Smits.Common.roundFloat(positionX + (scaleX * node.len), 2); - y1 = absoluteY; - y2 = absoluteY; - - // preserve for later processing - node.y = absoluteY; - labelsHold.push(node); - - svg.draw(new Smits.PhyloCanvas.Render.Line(x1, x2, y1, y2)); - if(sParams.alignRight){ - svg.draw( - new Smits.PhyloCanvas.Render.Path( - ["M", x2, y1, "L", sParams.alignPadding + maxBranch, y2], - { attr : Smits.PhyloCanvas.Render.Style.connectedDash } - ) - ); - } - - if(node.name){ - var attr = {}; - if(node.style){ - attr = Smits.PhyloCanvas.Render.Style.getStyle(node.style, 'text'); - } - attr["text-anchor"] = 'start'; - if(node.uri) { attr.href = node.uri }; - if(node.description) {attr.title = node.description }; - - var draw = svg.draw( - new Smits.PhyloCanvas.Render.Text( - sParams.alignRight ? maxBranch + sParams.bufferInnerLabels + sParams.alignPadding : x2 + sParams.bufferInnerLabels, y2, - node.name, - { - attr: attr - } - ) - ); - if(node.style){ - console.log([node, attr]); - } - maxLabelLength = Math.max(draw[1], maxLabelLength); - - // Rollover, Rollout and Click Events - if(Smits.PhyloCanvas.Render.Parameters.mouseRollOver){ - Smits.Common.addEventHandler( - draw[0].node, - 'mouseover', - Smits.PhyloCanvas.Render.Parameters.mouseRollOver, - { svg: svg, node: node, x: x2, y: y2, textEl: draw[0] } - ); - } - if(Smits.PhyloCanvas.Render.Parameters.mouseRollOut){ - Smits.Common.addEventHandler( - draw[0].node, - 'mouseout', - Smits.PhyloCanvas.Render.Parameters.mouseRollOut, - { svg: svg, node: node, x: x2, y: y2, textEl: draw[0] } - ); - } - if(Smits.PhyloCanvas.Render.Parameters.onClickAction){ - Smits.Common.addEventHandler( - draw[0].node, - 'click', - Smits.PhyloCanvas.Render.Parameters.onClickAction, - { svg: svg, node: node, x: x2, y: y2, textEl: draw[0] } - ); - } - } - - } - - return [y1, y2]; - - }, - - drawScaleBar = function (){ - y = absoluteY + scaleY; - x1 = 0; - x2 = sParams.showScaleBar * scaleX; - svg.draw(new Smits.PhyloCanvas.Render.Line(x1, x2, y, y)); - svg.draw(new Smits.PhyloCanvas.Render.Text( - (x1+x2)/2, - y-8, - sParams.showScaleBar) - ); - }, - - renderBinaryChart = function(x, groupName, params){ - var bufferInner = (params && params.bufferInner ? params.bufferInner : 0) | Smits.PhyloCanvas.Render.Parameters.binaryChartBufferInner, - bufferSiblings = (params && params.bufferSiblings ? params.bufferSiblings * scaleY : 0) | (Smits.PhyloCanvas.Render.Parameters.binaryChartBufferSiblings < 1 ? scaleY * Smits.PhyloCanvas.Render.Parameters.binaryChartBufferSiblings : Smits.PhyloCanvas.Render.Parameters.binaryChartBufferSiblings), - thickness = (params && params.thickness ? params.thickness : 0) | Smits.PhyloCanvas.Render.Parameters.binaryChartThickness, - beginY; - - for(var i = 0; i < labelsHold.length; i++){ - var node = labelsHold[i]; - svg.draw( - new Smits.PhyloCanvas.Render.Path( - rectLinePathArray( - x + bufferInner, - node.y - (scaleY/2) + (bufferSiblings/2), - x + bufferInner + thickness, - node.y + (scaleY/2) - (bufferSiblings/2) - ), - { attr: Smits.PhyloCanvas.Render.Style.getStyle(node.chart[groupName], 'textSecantBg') } - ) - ); - } - return x + bufferInner + thickness; - }, - - renderBarChart = function(x, groupName, params){ - var allValues = [], maxValue, - bufferInner = params && params.bufferInner ? params.bufferInner : 0 | Smits.PhyloCanvas.Render.Parameters.barChartBufferInner, - height = params && params.height ? params.height : 0 | Smits.PhyloCanvas.Render.Parameters.barChartHeight, - width = params && params.width ? (params.width < 1 ? scaleY * params.width : params.width ) : 0 | (Smits.PhyloCanvas.Render.Parameters.barChartWidth < 1 ? scaleY * Smits.PhyloCanvas.Render.Parameters.barChartWidth : Smits.PhyloCanvas.Render.Parameters.barChartWidth), - scaleHeight = 0; - - // Need to get max value - for(var i = 0; i < labelsHold.length; i++){ - allValues.push(labelsHold[i].chart[groupName]); - } - maxValue = Math.max.apply(null, allValues); - scaleHeight = Smits.Common.roundFloat(height / maxValue, 4); - - for(var i = 0; i < labelsHold.length; i++){ - var node = labelsHold[i]; - svg.draw( - new Smits.PhyloCanvas.Render.Path( - rectLinePathArray( - x + bufferInner, - node.y - (width/2), - x + bufferInner + (scaleHeight * node.chart[groupName]), - node.y + (width/2) - ), - { attr: Smits.PhyloCanvas.Render.Style.getStyle(node.chart[groupName], 'barChart') } - ) - ); - } - - return x + bufferInner + height; - }; - - return function(sSvg, dataObject){ - absoluteY = 0; - - /* Privileged Methods */ - this.getCanvasSize = function(){ - return [canvasX, canvasY]; - }; - this.getRoot = function(){ - return dataObject.getRoot(); - }; - - /* CONSTRUCTOR */ - if(dataObject.getValidate()){ // Validate - svg.draw(0,0, dataObject.getValidate()); - } - - svg = sSvg; - var node = dataObject.getRoot(); - var mNewickLen = dataObject.getNewickLen(); - - canvasX = svg.canvasSize[0]; // Full Canvas Width - canvasY = svg.canvasSize[1]; // Full Canvas Height - - bufferX = sParams.bufferX; - bufferY = sParams.bufferY; - minHeightBetweenLeaves = sParams.minHeightBetweenLeaves; - - scaleX = Math.round((canvasX - bufferX) / mNewickLen); - scaleY = Math.round((canvasY - bufferY) / (sParams.showScaleBar ? node.getCountAllChildren() + 1 : node.getCountAllChildren()) ); - if(scaleY < minHeightBetweenLeaves){ - scaleY = minHeightBetweenLeaves; - } - maxBranch = Math.round( canvasX - bufferX ); - - if(Smits.PhyloCanvas.Render.Parameters.binaryCharts.length || Smits.PhyloCanvas.Render.Parameters.barCharts.length){ - sParams.alignRight = true; - } - - recursiveCalculateNodePositions(node, 0); - - // Draw Scale Bar - if(sParams.showScaleBar){ - drawScaleBar(); - } - - outerX = maxBranch + maxLabelLength + sParams.bufferInnerLabels; - // Draw secant highlights - if(Smits.PhyloCanvas.Render.Parameters.binaryCharts.length){ - var binaryCharts = Smits.PhyloCanvas.Render.Parameters.binaryCharts; - for(var i in binaryCharts){ - outerX = renderBinaryChart(outerX, binaryCharts[i].chart, binaryCharts[i]); - } - } - - // Draw Bar Chart - if(Smits.PhyloCanvas.Render.Parameters.barCharts.length){ - var barCharts = Smits.PhyloCanvas.Render.Parameters.barCharts; - for(var i in barCharts){ - outerRadius = renderBarChart(outerX, barCharts[i].chart, barCharts[i]); - } - } - - } -}(); - -Smits.PhyloCanvas.Render.Phylogram.prototype = { - -};Smits.PhyloCanvas.Render.CircularPhylogram = (function(){ - - var svg, - sParams = Smits.PhyloCanvas.Render.Parameters.Circular, // Easy Reference - canvasX, canvasY, canvasMinEdge, - scaleRadius, scaleAngle, - minHeightBetweenLeaves, - innerCircleRadius, - firstBranch = true, - absoluteY = 0, cx, cy, maxBranch, - labelsHold = [], bgLabelsHold = [], - bufferRadius, bufferAngle, outerRadius, - maxLabelLength = 0, - initStartAngle, - rad = (Math.PI / 180); - - function secPosition(r, deg){ - deg += initStartAngle; - return [ - Smits.Common.roundFloat(cx + r * Math.sin(deg * rad), 4), - Smits.Common.roundFloat(cy + r * Math.cos(deg * rad), 4) - ]; // x,y - }; - function rotateTextByY(yCoord){ - var rotateAngle = normalizeAngle( 90 - yCoord - initStartAngle ); - - if(rotateAngle > 90 && rotateAngle < 270){ - rotateAngle += 180; - var alignment = "end"; - } else { - var alignment = "start"; - } - - return [rotateAngle, alignment]; - }; - function secant(r, startAngle, endAngle, params){ - var startPos = secPosition(r, startAngle); - var endPos = secPosition(r, endAngle); - var arr = [], - n, inv = 0; - - if(Math.abs(normalizeAngle(endAngle-startAngle)) > 180) { - n = 1; - } else { - n = -1; - } - - // Parameter changes - if(params && params.invertSecant){ - n *= -1; - inv = 1; - } - if(params && params.noMove){ - } else { - arr.push('M'); - } - - arr.push(startPos[0], startPos[1], "A", r, r, 0, n < 1 ? 0 : 1, inv, endPos[0], endPos[1]); - return arr; - }; - function secLinePath(deg, x1, x2, params){ - var arr = []; - var startPos = secPosition(x1, deg); - var endPos = secPosition(x2, deg); - if(params && params.noMove){ - } else { - arr.push('M'); - } - arr.push(startPos[0], startPos[1], "L", endPos[0], endPos[1]); - return arr; - }; - function normalizeAngle(ang){ - while(ang > 360 || ang < 0){ - if(ang > 360){ - ang -= 360; - } else if (ang < 0){ - ang += 360; - } - } - return ang; - }; - function sector(r1, r2, y1, y2){ - if(!r2 && r1.length > 1){ - var y2 = r1[3]; - var y1 = r1[2]; - var r2 = r1[1]; - var r1 = r1[0]; - } - var arr = array_merge( "M", - secant( - r1, - y1, - y2, - { noMove: 1, invertSecant: 0} - ), "L", - secant( - r2, - y2, - y1, - { noMove: 1, invertSecant: 1} - ), - 'Z' - ); - return arr; - }; - - function recursiveCalculateNodePositions(node, positionX){ - positionX = positionX; - - if(node.len){ // If first branch, pad only margin - if(firstBranch){ - absoluteY = bufferAngle || 1; // Has to be at least 1 - firstBranch = false; - } else { - if(node.children.length == 0) absoluteY = Smits.Common.roundFloat(absoluteY + scaleAngle, 4); - } - } - - if(node.children.length > 0){ - var nodeCoords = [], x1,x2,y1,y2; - x1 = positionX; - x2 = positionX += Smits.Common.roundFloat(scaleRadius * node.len, 4); - - - if(node.name){ // draw bootstrap values - - } - - if(node.children && node.children.length){ - for(var i = 0; i < node.children.length; i++){ - var child = node.children[i]; - var y = recursiveCalculateNodePositions(child, positionX); - if(y > 0) nodeCoords.push(y); - } - } - - var minAngle = Smits.Common.roundFloat(Math.min.apply(null, nodeCoords ), 4); - var maxAngle = Smits.Common.roundFloat(Math.max.apply(null, nodeCoords ), 4); - - // hack: little elbows at ends in order to prevent stair-effects at edges - svg.draw( - new Smits.PhyloCanvas.Render.Path( - array_merge( - "M", secPosition(positionX + 0.01, minAngle), - "L", secant(positionX, minAngle, maxAngle, {noMove: true}), - "L", secPosition(positionX + 0.01, maxAngle) - ) - ) - ); - - if(node.len){ // draw stem - y1 = Smits.Common.roundFloat( minAngle + (maxAngle-minAngle)/2, 4 ); - svg.draw(new Smits.PhyloCanvas.Render.Path(secLinePath(y1, x1, x2))); - } - - } else { - // LABEL - - // preserve for later processing - node.y = absoluteY; - labelsHold.push(node); - - x1 = positionX; - x2 = positionX = Smits.Common.roundFloat(positionX + (scaleRadius * node.len)); - y1 = absoluteY; - - svg.draw(new Smits.PhyloCanvas.Render.Path(secLinePath(y1, x1, x2))); - svg.draw( - new Smits.PhyloCanvas.Render.Path( - secLinePath(y1, x2, maxBranch), - { attr : Smits.PhyloCanvas.Render.Style.connectedDash } - ) - ); - - - - if(node.name){ - var pos = secPosition(maxBranch + sParams.bufferInnerLabels, y1); - var rotateParam = rotateTextByY(y1); - var rotateAngle = rotateParam[0]; - var alignment = rotateParam[1]; - - var attr = {}; - if(node.style){ - Smits.Common.apply(attr, Smits.PhyloCanvas.Render.Style.getStyle(node.style, 'text')); - } - attr["text-anchor"] = alignment; - if(node.uri) { attr.href = node.uri }; - if(node.description) {attr.title = node.description }; - - var draw = svg.draw( - new Smits.PhyloCanvas.Render.Text( - pos[0], pos[1], - node.name, - { - attr: attr, - rotate: [rotateAngle, pos[0], pos[1]] - } - ) - ); - - // Background Style - if(node.bgStyle){ - bgLabelsHold.push([node.bgStyle, y1]); - } - - // Rollover, Rollout and Click Events - var pos = secPosition(x2, y1); - if(Smits.PhyloCanvas.Render.Parameters.mouseRollOver){ - Smits.Common.addEventHandler( - draw[0].node, - 'mouseover', - Smits.PhyloCanvas.Render.Parameters.mouseRollOver, - { svg: svg, node: node, x: pos[0], y: pos[1], textEl: draw[0] } - ); - } - if(Smits.PhyloCanvas.Render.Parameters.mouseRollOut){ - Smits.Common.addEventHandler( - draw[0].node, - 'mouseout', - Smits.PhyloCanvas.Render.Parameters.mouseRollOut, - { svg: svg, node: node, x: pos[0], y: pos[1], textEl: draw[0] } - ); - } - if(Smits.PhyloCanvas.Render.Parameters.onClickAction){ - Smits.Common.addEventHandler( - draw[0].node, - 'click', - Smits.PhyloCanvas.Render.Parameters.onClickAction, - { svg: svg, node: node, x: pos[0], y: pos[1], textEl: draw[0] } - ); - } - - maxLabelLength = Math.max(draw[1], maxLabelLength); - } - } - return y1; - }; - - - function array_merge(arr) { - var merged = arr; - for (var i = 1; i < arguments.length; i++) { - merged = merged.concat(arguments[i]); - } - return merged; - }; - - function renderBackground(){ - var arr = []; - - // Highlighted Labels - if(bgLabelsHold.length > 0){ - - // Setup Gradients if defined - if(Smits.PhyloCanvas.Render.Style['jsphylosvgGradientList']){ - for(var i = 0; i < Smits.PhyloCanvas.Render.Style['jsphylosvgGradientList'].length; i++){ - var gradientName = Smits.PhyloCanvas.Render.Style['jsphylosvgGradientList'][i]; - var radialEl = Smits.Common.createGradientEl(gradientName, Smits.PhyloCanvas.Render.Style[gradientName], [cx, cy, maxBranch + maxLabelLength + sParams.bufferOuterLabels]); - svg.svg.defs.appendChild(radialEl); - } - } - - for(var i = 0; i < bgLabelsHold.length; i++){ - if(i != bgLabelsHold.length - 1 && bgLabelsHold[i][0] == bgLabelsHold[(i+1)][0]){ - bgLabelsHold[(i+1)][2] = bgLabelsHold[i][2] ? bgLabelsHold[i][2] : bgLabelsHold[i][1]; - continue; - } - - var arr = sector( - maxBranch, - maxBranch + maxLabelLength + sParams.bufferOuterLabels, - bgLabelsHold[i][2] ? bgLabelsHold[i][2] - scaleAngle/2 : bgLabelsHold[i][1] - scaleAngle/2, - bgLabelsHold[i][1] + scaleAngle/2 - ); - var attr = Smits.PhyloCanvas.Render.Style.getStyle(bgLabelsHold[i][0], 'textSecantBg'); - var bgObj = svg.draw( - new Smits.PhyloCanvas.Render.Path( - arr, - { attr: attr.type ? {} : attr} - ) - ); - //if(attr.type && attr.type == "radialGradient") { bgObj[0].node.setAttribute('class', 'jsphylosvg-' + attr.name); }; - if(attr.type && attr.type == "radialGradient") { bgObj[0].node.setAttribute('fill', 'url(#' + attr.name + ')'); }; - if(attr.type && attr.type == "radialGradient") { bgObj[0].node.setAttribute('stroke', 'none'); }; - bgObj[0].toBack(); // Put it behind the labels - } - } - - // Neutral Background - var arr = sector( - maxBranch, - maxBranch + maxLabelLength + sParams.bufferOuterLabels, - (bufferAngle || 1) + (scaleAngle/2), - 360 + (scaleAngle/2) - ); - var bgObj = svg.draw( - new Smits.PhyloCanvas.Render.Path( - arr, - { attr: Smits.PhyloCanvas.Render.Style.textSecantBg } - ) - ); - - bgObj[0].toBack(); // Put it behind the labels - - return maxBranch + maxLabelLength + sParams.bufferOuterLabels; - }; - - function renderBinaryChart(outerRadius, groupName, params){ - var bufferInner = (params && params.bufferInner) ? parseFloat(params.bufferInner) : Smits.PhyloCanvas.Render.Parameters.binaryChartBufferInner, - bufferSiblings = (params && params.bufferSiblings ? params.bufferSiblings * scaleAngle : 0) | (Smits.PhyloCanvas.Render.Parameters.binaryChartBufferSiblings < 1 ? scaleAngle * Smits.PhyloCanvas.Render.Parameters.binaryChartBufferSiblings : Smits.PhyloCanvas.Render.Parameters.binaryChartBufferSiblings), - thickness = (params && params.thickness) ? parseFloat(params.thickness) : Smits.PhyloCanvas.Render.Parameters.binaryChartThickness, - disjointed = (params && params.disjointed ? params.disjointed : false) | Smits.PhyloCanvas.Render.Parameters.binaryChartDisjointed, - isInternal = (params && params.isInternal) ? params.isInternal : false, - isFirst = true, - beginY; - - - for(var i = 0; i < labelsHold.length; i++){ - var node = labelsHold[i]; - if( (!labelsHold[i+1] || node.chart[groupName] !== labelsHold[i+1].chart[groupName] || disjointed) && node.chart[groupName] != "none" ){ - var attr = Smits.PhyloCanvas.Render.Style.getStyle(node.chart[groupName], 'textSecantBg'); - if(isInternal){ - var sectorCoords = [ - maxBranch - bufferInner - thickness, - maxBranch - bufferInner, - (beginY ? beginY : node.y) - (scaleAngle/2) + (isFirst && !disjointed ? 0 : (bufferSiblings/2)), - node.y + (scaleAngle/2) - (i == labelsHold.length-1 && !disjointed ? 0 : (bufferSiblings/2)) - ]; - } else { - var sectorCoords = [ - outerRadius + bufferInner, - outerRadius + bufferInner + thickness, - (beginY ? beginY : node.y) - (scaleAngle/2) + (isFirst && !disjointed ? 0 : (bufferSiblings/2)), - node.y + (scaleAngle/2) - (i == labelsHold.length-1 && !disjointed ? 0 : (bufferSiblings/2)) - ]; - } - - if(attr.label){ - var textAttr = Smits.PhyloCanvas.Render.Style.getStyle(attr.labelStyle, 'text'); - var pos = secPosition( (sectorCoords[0] + sectorCoords[1]) / 2, (sectorCoords[2] + sectorCoords[3]) / 2 ); - var rotateParam = rotateTextByY((sectorCoords[2] + sectorCoords[3]) / 2); - var rotateLabelBy = normalizeAngle(rotateParam[0] + (textAttr["rotate"] ? parseFloat(textAttr["rotate"]) : 0)); - - var rotateAngle = normalizeAngle( 90 - (sectorCoords[2] + sectorCoords[3])/2 - initStartAngle ); - if(rotateAngle > 90 && rotateAngle < 270){ - rotateLabelBy += 180; - } - - if(!textAttr["text-anchor"]){ - textAttr["text-anchor"] = "middle"; - } - - var binText = svg.draw( - new Smits.PhyloCanvas.Render.Text( - pos[0], - pos[1], - attr.label, - { - attr: textAttr, - rotate: rotateLabelBy - } - ) - ); - binText[0].toBack(); - } - - if(attr.borderStyle){ - var borderAttr = Smits.PhyloCanvas.Render.Style.getStyle(attr.borderStyle, 'textSecantBg'); - var borderSectorCoords = [ - maxBranch, - borderAttr.fullsize ? sectorCoords[1] : sectorCoords[0], - sectorCoords[2], - sectorCoords[3] - ]; - var binBorder = svg.draw( - new Smits.PhyloCanvas.Render.Path( - sector( - borderSectorCoords - ), - { attr: borderAttr } - ) - ); - binBorder[0].toBack(); - } - - var binObj = svg.draw( - new Smits.PhyloCanvas.Render.Path( - sector( - sectorCoords - ), - { attr: attr } - ) - ); - binObj[0].toBack(); - - beginY = 0; - isFirst = false; - } else { - if(!beginY){ beginY = node.y; } - if(node.chart[groupName] == "none"){ - beginY = 0; - } - } - isFirst = false; - } - return isInternal ? outerRadius : outerRadius + bufferInner + thickness; - }; - - function renderBarChart(outerRadius, groupName, params){ - var allValues = [], maxValue, - bufferInner = params && params.bufferInner ? parseFloat(params.bufferInner) : Smits.PhyloCanvas.Render.Parameters.barChartBufferInner, - height = params && params.height ? parseFloat(params.height) : (Smits.PhyloCanvas.Render.Parameters.barChartHeight ? Smits.PhyloCanvas.Render.Parameters.barChartHeight : 0), - width = params && params.width ? (parseFloat(params.width) < 1 ? scaleAngle * parseFloat(params.width) : parseFloat(params.width) ) : 0 | (Smits.PhyloCanvas.Render.Parameters.barChartWidth < 1 ? scaleAngle * Smits.PhyloCanvas.Render.Parameters.barChartWidth : Smits.PhyloCanvas.Render.Parameters.barChartWidth), - scaleHeight = 0; - - // Need to get max value - for(var i = 0; i < labelsHold.length; i++){ - allValues.push(labelsHold[i].chart[groupName]); - } - maxValue = Math.max.apply(null, allValues); - scaleHeight = Smits.Common.roundFloat(height / maxValue, 4); - - for(var i = 0; i < labelsHold.length; i++){ - var node = labelsHold[i]; - if(node.chart[groupName] > 0){ - svg.draw( - new Smits.PhyloCanvas.Render.Path( - sector( - outerRadius + bufferInner, - outerRadius + bufferInner + (scaleHeight * node.chart[groupName]), - node.y - (width/2), - node.y + (width/2) - ), - { attr: Smits.PhyloCanvas.Render.Style.getStyle(node.chart[groupName], 'barChart') } - ) - ); - } - } - - return outerRadius + bufferInner + height; - }; - - return function(sSvg, dataObject, bufferRadius){ - /* Privileged Methods */ - this.getCanvasSize = function(){ - return [canvasX, canvasY]; - }; - this.getRoot = function(){ - return dataObject.getRoot(); - }; - - /* CONSTRUCTOR */ - // Validation - if(dataObject.getValidate()){ - sSvg.draw({type: 'text', x: 0, y: sSvg.canvasSize[1] / 3, text: dataObject.getValidate() }); - return - } - - // Properties Setup - svg = sSvg; - var node = dataObject.getRoot(); - var mNewickLen = dataObject.getNewickLen(); - canvasX = svg.canvasSize[0]; // Full Canvas Width - canvasY = svg.canvasSize[1]; // Full Canvas Height - cx = canvasX / 2; // Set Center Position - cy = canvasY / 2; - canvasMinEdge = Math.min.apply(null, [canvasX,canvasY]); - - bufferRadius = (sParams.bufferRadius > 1) ? sParams.bufferRadius : Smits.Common.roundFloat(canvasMinEdge * sParams.bufferRadius, 4); - bufferAngle = sParams.bufferAngle; // controls split size in circle - innerCircleRadius = sParams.innerCircleRadius; - minHeightBetweenLeaves = sParams.minHeightBetweenLeaves; - initStartAngle = sParams.initStartAngle; // Angle at which the entire tree is rotated - - maxBranch = Math.round( (canvasMinEdge - bufferRadius - innerCircleRadius) / 2); // maximum branch length - scaleRadius = (maxBranch - innerCircleRadius) / mNewickLen; // scale multiplier to use - scaleAngle = Smits.Common.roundFloat( (360 - bufferAngle) / node.getCountAllChildren(), 4 ); - - // Draw Nodes and Labels - recursiveCalculateNodePositions(node, innerCircleRadius); - outerRadius = maxBranch + maxLabelLength + sParams.bufferOuterLabels; - - // Draw integrated secant highlights - if(Smits.PhyloCanvas.Render.Parameters.integratedBina... [truncated message content] |
From: SourceForge.net <no...@so...> - 2011-07-28 23:19:38
|
Bugs item #3381449, was opened at 2011-07-28 19:19 Message generated for change (Tracker Item Submitted) made by sfrgpiel You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=3381449&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: ui Group: None Status: Open Priority: 7 Private: No Submitted By: William Piel (sfrgpiel) Assigned to: hshyket (hshyket) Summary: Allow submitter to modify published citation Initial Comment: Currently, we have it set so that once a study is published, the submitter has to contact he...@tr... to update the citation information. This model should be relaxed because it puts excessive burden on the editor. Instead, let's allow the submitter (if logged in) to make updates to his or her citation information even after the submission status is set to "published". The relevant page is just the following: http://www.treebase.org/treebase-web/user/citationForm.html And it should be designed so that only the submitter and the administrator is can see the "Update" button, even if published. i.e. other users who, may be logged in, should not be able to save edits to this page. Note that this privilege does not extend to any other part of the submission -- e.g. the authors, matrices, trees, etc. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=3381449&group_id=248804 |
From: <hs...@us...> - 2011-07-27 21:59:04
|
Revision: 934 http://treebase.svn.sourceforge.net/treebase/?rev=934&view=rev Author: hshyket Date: 2011-07-27 21:58:58 +0000 (Wed, 27 Jul 2011) Log Message: ----------- Fixing issue where deleting Tree from Analysis Step throw a error due to phylotree study_id constraint Modified Paths: -------------- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/study/AnalysisStep.java Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/domain/study/AnalysisStep.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/study/AnalysisStep.java 2011-07-20 14:54:45 UTC (rev 933) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/domain/study/AnalysisStep.java 2011-07-27 21:58:58 UTC (rev 934) @@ -248,7 +248,8 @@ public void removeAnalyzedData(AnalyzedData pData) { if (pData != null) { getDataSet().remove(pData); - pData.registerAnalysisStep(null); + pData.setAnalysisStep(null); + //pData.registerAnalysisStep(null); if (getAnalysis() != null) { getAnalysis().setValidated(false); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: SourceForge.net <no...@so...> - 2011-07-20 15:09:00
|
Bugs item #3025925, was opened at 2010-07-06 12:25 Message generated for change (Settings changed) made by sfrgpiel You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=3025925&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: None Group: None >Status: Closed Priority: 6 Private: No Submitted By: William Piel (sfrgpiel) Assigned to: Nobody/Anonymous (nobody) Summary: Yikes when viewing taxa for S10508 Initial Comment: Looking at the taxa for S10508: http://treebase.nescent.org/treebase-web/search/study/taxa.html?id=10508 generates a Yikes! re. "javax.servlet.jsp.JspException: No bean specified" ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=3025925&group_id=248804 |
From: <lol...@us...> - 2011-07-20 14:54:51
|
Revision: 933 http://treebase.svn.sourceforge.net/treebase/?rev=933&view=rev Author: loloyohe Date: 2011-07-20 14:54:45 +0000 (Wed, 20 Jul 2011) Log Message: ----------- Wrote unit test to help track down issue of bug #3303002. Unit test added was testNexmlEmptyMatrix() Modified Paths: -------------- trunk/treebase-core/src/test/java/org/cipres/treebase/domain/nexus/NexmlMatrixConverterTest.java Modified: trunk/treebase-core/src/test/java/org/cipres/treebase/domain/nexus/NexmlMatrixConverterTest.java =================================================================== --- trunk/treebase-core/src/test/java/org/cipres/treebase/domain/nexus/NexmlMatrixConverterTest.java 2011-07-19 21:21:03 UTC (rev 932) +++ trunk/treebase-core/src/test/java/org/cipres/treebase/domain/nexus/NexmlMatrixConverterTest.java 2011-07-20 14:54:45 UTC (rev 933) @@ -6,25 +6,47 @@ import junit.framework.Assert; +import mesquite.lib.Annotatable; + import org.cipres.treebase.dao.AbstractDAOTest; +import org.cipres.treebase.dao.jdbc.DiscreteMatrixElementJDBC; +import org.cipres.treebase.dao.jdbc.MatrixColumnJDBC; +import org.cipres.treebase.domain.Annotation; import org.cipres.treebase.domain.matrix.CharSet; import org.cipres.treebase.domain.matrix.CharacterMatrix; import org.cipres.treebase.domain.matrix.ColumnRange; +import org.cipres.treebase.domain.matrix.ContinuousMatrixElement; +import org.cipres.treebase.domain.matrix.DiscreteChar; +import org.cipres.treebase.domain.matrix.DiscreteMatrix; +import org.cipres.treebase.domain.matrix.DiscreteMatrixElement; +import org.cipres.treebase.domain.matrix.MatrixColumn; +import org.cipres.treebase.domain.matrix.MatrixElement; +import org.cipres.treebase.domain.matrix.MatrixRow; import org.cipres.treebase.domain.matrix.PhyloChar; +import org.cipres.treebase.domain.matrix.RowSegment; import org.cipres.treebase.domain.nexus.nexml.NexmlDocumentConverter; +import org.cipres.treebase.domain.nexus.nexml.NexmlObjectConverter; import org.cipres.treebase.domain.study.Study; import org.cipres.treebase.domain.taxon.TaxonLabelHome; import org.nexml.model.CategoricalMatrix; +import org.nexml.model.Character; +import org.nexml.model.CharacterState; import org.nexml.model.ContinuousMatrix; import org.nexml.model.DocumentFactory; import org.nexml.model.Document; import org.nexml.model.Matrix; +import org.nexml.model.MatrixCell; import org.nexml.model.MolecularMatrix; +import org.nexml.model.OTU; +import org.nexml.model.OTUs; import org.nexml.model.Subset; public class NexmlMatrixConverterTest extends AbstractDAOTest { private TaxonLabelHome mTaxonLabelHome; + private static final int MAX_GRANULAR_NCHAR = 1000; + private static final int MAX_GRANULAR_NTAX = 30; + /** * Test for {@link org.cipres.treebase.domain.nexus.nexml.NexmlMatrixConverter#fromTreeBaseToXml(CharacterMatrix)}. * Finds an equivalent, created NexmlMatrix within a NeXML document to go with the matrix @@ -52,6 +74,7 @@ NexmlDocumentConverter ndc = new NexmlDocumentConverter(tbStudy,getTaxonLabelHome(),nexDoc); ndc.fromTreeBaseToXml(tbStudy); // here is where the conversion happens + // these are the NeXML matrices that were created from the study List<Matrix<?>> nexMatrices = nexDoc.getMatrices(); @@ -125,7 +148,87 @@ } } + + /** + * Test for {@link org.cipres.treebase.domain.nexus.nexml.NexmlMatrixConverter#}. + * This verfies that all row-segment annotation are expressed for a particular study. + */ + public void testNexmlEmptyMatrix() { + String testName = "testNexmlEmptyMatrix()"; + //signal beginning of test + if (logger.isInfoEnabled()) { + logger.info("Running Test: " + testName); + } + + long studyId = 586; //this study is known to output an empty Nexml matrix + + // this is the full study as it is stored by the database + Study tbStudy = (Study)loadObject(Study.class, studyId); + + // these are the character state matrices that are part of the study + Set<org.cipres.treebase.domain.matrix.Matrix> tbMatrices = tbStudy.getMatrices(); + + + // this is an object representation of a NeXML document + Document nexDoc = DocumentFactory.safeCreateDocument(); + + // the converter populates the NeXML document with the contents of the treebase study + NexmlDocumentConverter ndc = new NexmlDocumentConverter(tbStudy,getTaxonLabelHome(),nexDoc); + + ndc.fromTreeBaseToXml(tbStudy); // here is where the conversion happens + + + // these are the NeXML matrices that were created from the study + List<Matrix<?>> nexMatrices = nexDoc.getMatrices(); + + //returns true if matrix contains no elements + boolean nexTest = nexMatrices.isEmpty(); + + //should be false if the matrix contains elements + Assert.assertFalse(nexTest); + + // there most be more than zero matrices because every treebase study has at least one matrix + Assert.assertTrue(nexMatrices.size() != 0 ); + + // now we're going to match up the NeXML matrices with their equivalent treebase ones + for ( Matrix<?> nexMatrix : nexMatrices ) { + + // the xml id is the same as the primary key of the equivalent matrix stored by treebase + String nexId = nexMatrix.getId(); + + for ( org.cipres.treebase.domain.matrix.Matrix tbMatrix : tbMatrices ) { + String tbId = "M" + tbMatrix.getId(); + // if true, the matrices are equivalent + + System.out.println(tbMatrix.getClass()); + System.out.println(nexMatrix.getClass().toString() + "hi"); + + if ( nexId.equals(tbId) ) { + Assert.assertTrue("NeXML matrix "+nexId+ " is one of the known subclasses", + nexMatrix instanceof CategoricalMatrix || nexMatrix instanceof MolecularMatrix || nexMatrix instanceof ContinuousMatrix); + + Assert.assertNotNull(nexMatrix); + Assert.assertNotNull(tbMatrix); + + + for ( MatrixRow tbRow : ((CharacterMatrix) tbMatrix).getRowsReadOnly() ) { + System.out.println (tbRow.buildElementAsString()); + } + } + //print out the rows of the nexml matrix to see if there are sequences + + } + + } + + //System.out.println(nexDoc.getXmlString()); + } + + + + + /** * Test for {@link org.cipres.treebase.domain.nexus.nexml.NexmlMatrixConverter#}. * It verifies that NexmlCharSets have the same name and coordinates as those in the * TreeBASE matrix. @@ -166,7 +269,7 @@ // iterate over all treebase matrices for the study for ( org.cipres.treebase.domain.matrix.Matrix tbMatrix : tbMatrices ) { String tbId = "M" + tbMatrix.getId(); - + // if true, the matrices are equivalent if ( nexId.equals(tbId) ) { Assert.assertTrue("NeXML matrix "+nexId+ " is one of the known subclasses", @@ -191,7 +294,7 @@ //get names of TreeBASE and NeXML character set String tbCharSetName = tbCharSet.getLabel(); String nexCharSetName = nexSubset.getLabel(); - + //verify that the names are the same Assert.assertEquals("The NeXML character set must have copied the label of the TreeBASE character set",tbCharSetName,nexCharSetName); @@ -230,6 +333,7 @@ PhyloChar tbCharacter = tbCharacterMatrix.getCharacter(i); Assert.assertNotNull("The TreeBASE PhyloChar should not be null if there as an index into it in this set", tbCharacter); Assert.assertEquals("If the TreeBASE character has a label, then the NeXML character's label should match it", tbCharacter.getLabel(), nexCharacter.getLabel()); + } } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hs...@us...> - 2011-07-19 21:21:09
|
Revision: 932 http://treebase.svn.sourceforge.net/treebase/?rev=932&view=rev Author: hshyket Date: 2011-07-19 21:21:03 +0000 (Tue, 19 Jul 2011) Log Message: ----------- Adding identify reference so that the StudySearch controller can use the class Modified Paths: -------------- trunk/treebase-web/src/main/webapp/WEB-INF/treebase-servlet.xml Modified: trunk/treebase-web/src/main/webapp/WEB-INF/treebase-servlet.xml =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/treebase-servlet.xml 2011-07-19 19:37:41 UTC (rev 931) +++ trunk/treebase-web/src/main/webapp/WEB-INF/treebase-servlet.xml 2011-07-19 21:21:03 UTC (rev 932) @@ -759,7 +759,8 @@ <bean id="studySearchController" parent="searchController" class="org.cipres.treebase.web.controllers.StudySearchController"> <property name="formView"><value>search/studySearch</value></property> - <property name="successView"><value>search/studySearch</value></property> + <property name="successView"><value>search/studySearch</value></property> + <property name="identify"><ref bean="top.identify"></ref></property> </bean> <bean id="treeSearchController" parent="searchController" class="org.cipres.treebase.web.controllers.TreeSearchController"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: SourceForge.net <no...@so...> - 2011-07-19 20:30:37
|
Bugs item #2992022, was opened at 2010-04-25 12:04 Message generated for change (Settings changed) made by sfrgpiel You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=2992022&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: ui Group: None >Status: Closed Priority: 8 Private: No Submitted By: William Piel (sfrgpiel) Assigned to: William Piel (sfrgpiel) Summary: Yikes when viewing 2164: UTF8 handling problem? Initial Comment: An error is thrown when users try to browse to S2164. This *may* be an issue with UTF8 character set rendering, seeing as this study is from Hungarian authors. http://www.treebase.org/treebase-web/search/study/summary.html?id=2164 Yikes! javax.servlet.jsp.el.ELException: An error occurred while getting property "bibtexReference" from an instance of class org.cipres.treebase.domain.study.ArticleCitation at org.apache.commons.el.Logger.logError(Logger.java:484) at org.apache.commons.el.Logger.logError(Logger.java:588) at org.apache.commons.el.ArraySuffix.evaluate(ArraySuffix.java:318) at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:145) at org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:263) at org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:190) at org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:924) at org.apache.jsp.WEB_002dINF.pages.search.study.nav_jsp._jspx_meth_c_005fout_005f0(nav_jsp.java:285) at org.apache.jsp.WEB_002dINF.pages.search.study.nav_jsp._jspService(nav_jsp.java:89) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:584) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:497) at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:965) at org.apache.jsp.WEB_002dINF.pages.search.study.summary_jsp._jspService(summary_jsp.java:109) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:39) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:461) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:399) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301) at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:142) at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:239) at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1142) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:879) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:792) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:431) at javax.servlet.http.HttpServlet.service(HttpServlet.java:627) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:164) at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141) at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90) at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:406) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:217) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:191) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148) at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:90) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:873) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) at java.lang.Thread.run(Thread.java:636) ---------------------------------------------------------------------- Comment By: William Piel (sfrgpiel) Date: 2011-07-19 15:48 Message: The following query seems to be the better solution because it eliminates the problem in four records. However, it does require that we return to the submissions and fix any remaining problems with the citation. The studies that need attention are 2164 and 2375. DELETE FROM citation_author USING (SELECT citation_id, authors_person_id, max(author_order) AS maxorder FROM citation_author GROUP BY citation_id, authors_person_id HAVING count(*) > 1) deleteMe WHERE citation_author.citation_id = deleteMe.citation_id AND citation_author.authors_person_id = deleteMe.authors_person_id AND citation_author.author_order = deleteMe.maxorder; ---------------------------------------------------------------------- Comment By: William Piel (sfrgpiel) Date: 2011-05-05 16:48 Message: I just tested the SQL fix with DEV, and it works: DELETE FROM citation_author WHERE citation_id = 2101 AND authors_person_id = 3971; ... and then: DELETE FROM person WHERE person_id = 3971; Now reintroduce the last author using the web page UI: Tímea Balázs t.b...@gm... ---------------------------------------------------------------------- Comment By: Rutger Vos (rvos) Date: 2010-06-01 13:31 Message: This has nothing to do with UTF-8 handling. It's a database inconsistency: * in the person table, there's both an entry for "Balázs Tímea", person_id=3971 and for "Tímea Balázs", person_id=5609 * in the latter record, first and last name are in the correct order, but the author's email address is missing, and the author order index is 5, on a three-author paper. In the former record, the first and last name are switched around, but everything else is in the correct order. * here's my suggested fix: correct the name order in record 3971, purge record 5609 from person and from citation_author, i.e.: update person set firstname='Tímea', lastname='Balázs' where person_id=3971; delete from citation_author where authors_person_id=5609; delete from person where person_id=5609; ---------------------------------------------------------------------- Comment By: Rutger Vos (rvos) Date: 2010-06-01 13:31 Message: Thanks for reporting this bug. We'll look into it as soon as possible. ---------------------------------------------------------------------- Comment By: Rutger Vos (rvos) Date: 2010-04-27 12:27 Message: Also test this with issue 2669366 ---------------------------------------------------------------------- Comment By: Hilmar Lapp (hlapp) Date: 2010-04-27 11:36 Message: This may indicate a larger problem with UTF8 handling. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=2992022&group_id=248804 |
From: SourceForge.net <no...@so...> - 2011-07-19 19:48:26
|
Bugs item #2992022, was opened at 2010-04-25 12:04 Message generated for change (Comment added) made by sfrgpiel You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=2992022&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: ui Group: None Status: Open Priority: 8 Private: No Submitted By: William Piel (sfrgpiel) Assigned to: William Piel (sfrgpiel) Summary: Yikes when viewing 2164: UTF8 handling problem? Initial Comment: An error is thrown when users try to browse to S2164. This *may* be an issue with UTF8 character set rendering, seeing as this study is from Hungarian authors. http://www.treebase.org/treebase-web/search/study/summary.html?id=2164 Yikes! javax.servlet.jsp.el.ELException: An error occurred while getting property "bibtexReference" from an instance of class org.cipres.treebase.domain.study.ArticleCitation at org.apache.commons.el.Logger.logError(Logger.java:484) at org.apache.commons.el.Logger.logError(Logger.java:588) at org.apache.commons.el.ArraySuffix.evaluate(ArraySuffix.java:318) at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:145) at org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:263) at org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:190) at org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:924) at org.apache.jsp.WEB_002dINF.pages.search.study.nav_jsp._jspx_meth_c_005fout_005f0(nav_jsp.java:285) at org.apache.jsp.WEB_002dINF.pages.search.study.nav_jsp._jspService(nav_jsp.java:89) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:584) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:497) at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:965) at org.apache.jsp.WEB_002dINF.pages.search.study.summary_jsp._jspService(summary_jsp.java:109) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:39) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:461) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:399) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301) at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:142) at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:239) at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1142) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:879) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:792) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:431) at javax.servlet.http.HttpServlet.service(HttpServlet.java:627) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:164) at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141) at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90) at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:406) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:217) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:191) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148) at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:90) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:873) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) at java.lang.Thread.run(Thread.java:636) ---------------------------------------------------------------------- >Comment By: William Piel (sfrgpiel) Date: 2011-07-19 15:48 Message: The following query seems to be the better solution because it eliminates the problem in four records. However, it does require that we return to the submissions and fix any remaining problems with the citation. The studies that need attention are 2164 and 2375. DELETE FROM citation_author USING (SELECT citation_id, authors_person_id, max(author_order) AS maxorder FROM citation_author GROUP BY citation_id, authors_person_id HAVING count(*) > 1) deleteMe WHERE citation_author.citation_id = deleteMe.citation_id AND citation_author.authors_person_id = deleteMe.authors_person_id AND citation_author.author_order = deleteMe.maxorder; ---------------------------------------------------------------------- Comment By: William Piel (sfrgpiel) Date: 2011-05-05 16:48 Message: I just tested the SQL fix with DEV, and it works: DELETE FROM citation_author WHERE citation_id = 2101 AND authors_person_id = 3971; ... and then: DELETE FROM person WHERE person_id = 3971; Now reintroduce the last author using the web page UI: Tímea Balázs t.b...@gm... ---------------------------------------------------------------------- Comment By: Rutger Vos (rvos) Date: 2010-06-01 13:31 Message: This has nothing to do with UTF-8 handling. It's a database inconsistency: * in the person table, there's both an entry for "Balázs Tímea", person_id=3971 and for "Tímea Balázs", person_id=5609 * in the latter record, first and last name are in the correct order, but the author's email address is missing, and the author order index is 5, on a three-author paper. In the former record, the first and last name are switched around, but everything else is in the correct order. * here's my suggested fix: correct the name order in record 3971, purge record 5609 from person and from citation_author, i.e.: update person set firstname='Tímea', lastname='Balázs' where person_id=3971; delete from citation_author where authors_person_id=5609; delete from person where person_id=5609; ---------------------------------------------------------------------- Comment By: Rutger Vos (rvos) Date: 2010-06-01 13:31 Message: Thanks for reporting this bug. We'll look into it as soon as possible. ---------------------------------------------------------------------- Comment By: Rutger Vos (rvos) Date: 2010-04-27 12:27 Message: Also test this with issue 2669366 ---------------------------------------------------------------------- Comment By: Hilmar Lapp (hlapp) Date: 2010-04-27 11:36 Message: This may indicate a larger problem with UTF8 handling. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=2992022&group_id=248804 |
From: <hs...@us...> - 2011-07-19 19:37:51
|
Revision: 931 http://treebase.svn.sourceforge.net/treebase/?rev=931&view=rev Author: hshyket Date: 2011-07-19 19:37:41 +0000 (Tue, 19 Jul 2011) Log Message: ----------- Fixing issue with last commit where the doi: was not being replaced out of the URL. Modified Paths: -------------- trunk/treebase-web/src/main/java/org/cipres/treebase/web/util/CitationParser.java Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/util/CitationParser.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/util/CitationParser.java 2011-07-19 19:29:36 UTC (rev 930) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/util/CitationParser.java 2011-07-19 19:37:41 UTC (rev 931) @@ -104,7 +104,7 @@ //set the URL to use the DOI passed by Dryad Node doiUrl = getNode(pkgRoot,"identifier",dcterms); if (doiUrl!=null) { - citation.setURL("http://dx.doi.org/" + doiUrl.getText()); + citation.setURL("http://dx.doi.org/" + doiUrl.getText().replaceAll("doi:", "")); } List<Node> kl = getNodes(pkgRoot,"subject",dcterms); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hs...@us...> - 2011-07-19 19:29:45
|
Revision: 930 http://treebase.svn.sourceforge.net/treebase/?rev=930&view=rev Author: hshyket Date: 2011-07-19 19:29:36 +0000 (Tue, 19 Jul 2011) Log Message: ----------- Changing the way that Dryad submissions put data into the fields. The title of the paper in Dryad is now the study name and the dryad submission number is prefixed to the notes. The URL field is now prepopulated with the data DOI Modified Paths: -------------- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/ProcessUserController.java trunk/treebase-web/src/main/java/org/cipres/treebase/web/util/CitationParser.java Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/ProcessUserController.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/ProcessUserController.java 2011-07-18 21:56:02 UTC (rev 929) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/ProcessUserController.java 2011-07-19 19:29:36 UTC (rev 930) @@ -90,13 +90,18 @@ CitationParser cparser= new CitationParser(dataPath); Citation citation = cparser.getCitation(); Study study = new Study(); - study.setName(bagitPath.getName()); + //study.setName(bagitPath.getName()); + study.setName(citation.getTitle()); + study.setCitation(citation); citation.setStudy(study); - study.setNotes("Please enter these author names into the TreeBASE citation " + + study.setNotes(bagitPath.getName() + + ": Please enter these author names into the TreeBASE citation " + "by clicking on the highlighted \"Authors\" item in the Tool Box." + "\n\n" + citation.getAuthorsDryadNotes()); + + citation.setAuthors(null); Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/util/CitationParser.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/util/CitationParser.java 2011-07-18 21:56:02 UTC (rev 929) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/util/CitationParser.java 2011-07-19 19:29:36 UTC (rev 930) @@ -101,6 +101,12 @@ citation.setPages(pageStart.getText() + "-" + pageEnd.getText()); //end VG 2010-11-18 + //set the URL to use the DOI passed by Dryad + Node doiUrl = getNode(pkgRoot,"identifier",dcterms); + if (doiUrl!=null) { + citation.setURL("http://dx.doi.org/" + doiUrl.getText()); + } + List<Node> kl = getNodes(pkgRoot,"subject",dcterms); String keywords=""; for(int i = 0; i<kl.size(); i++) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: SourceForge.net <no...@so...> - 2011-07-19 18:47:50
|
Bugs item #3232373, was opened at 2011-03-21 11:51 Message generated for change (Settings changed) made by sfrgpiel You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=3232373&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: ui Group: None >Status: Closed Priority: 8 Private: No Submitted By: William Piel (sfrgpiel) Assigned to: hshyket (hshyket) Summary: Files from Dryad are empty Initial Comment: When someone creates a Dryad submission and the data are pushed onto TreeBASE, the source data file (i.e. the original data file that can normally be obtained when you click on the "Download Original" icons) only says "NEXUS" with all remaining data having been deleted. The "Download Original" buttons ought to download the original files that were pushed onto TreeBASE from Dryad. This can be tested by going to http://datadryad.org/ and creating a new user account and submission (but naming it "Testing Only" to inform Dryad editors that it is just for testing), and then submitting a NEXUS file and pushing it on to TreeBASE. ---------------------------------------------------------------------- Comment By: Ryan Scherle (rscherle) Date: 2011-03-21 15:03 Message: Instead of submitting content to the production instance of Dryad, you can submit test content to the demo instance of Dryad at demo.datadryad.org. This way, you don't need to worry about having your content come up for review by Dryad curators. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=3232373&group_id=248804 |
From: SourceForge.net <no...@so...> - 2011-07-19 18:47:03
|
Bugs item #3303002, was opened at 2011-05-16 15:46 Message generated for change (Comment added) made by sfrgpiel You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=3303002&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: ui Group: None Status: Open Priority: 8 Private: No Submitted By: William Piel (sfrgpiel) Assigned to: hshyket (hshyket) Summary: NeXML not working for matrix or tree Initial Comment: Downloading NeXML works for the whole study, e.g.: http://purl.org/phylo/treebase/phylows/study/TB2:S586?format=nexml But does not seem to work for matrices in this study, e.g.: http://purl.org/phylo/treebase/phylows/matrix/TB2:M2225?format=nexml Or trees in this study: http://www.treebase.org/treebase-web/phylows/tree/TB2:Tr3535?format=nexml ---------------------------------------------------------------------- >Comment By: William Piel (sfrgpiel) Date: 2011-07-19 14:47 Message: Actually, the NeXML download for the whole study doesn't work either. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=3303002&group_id=248804 |
From: SourceForge.net <no...@so...> - 2011-07-19 18:40:21
|
Bugs item #3313176, was opened at 2011-06-07 09:59 Message generated for change (Settings changed) made by sfrgpiel You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=3313176&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: ui Group: None >Status: Closed Priority: 8 Private: No Submitted By: William Piel (sfrgpiel) Assigned to: hshyket (hshyket) Summary: Taxon blocks do not have unique titles Initial Comment: This is a new bug introduced after fixing bug 3291519. The combined NEXUS download properly creates distinct taxon blocks for each analysis, and it properly links each tree block and character block with it's corresponding taxon block. The only problem here is that the title given to each taxon block is the same -- which will confuse Mesquite when reading the file. Each taxa block title must be unique, and perhaps the logical solution is to name it according to the Analysis ID (currently it is probably named according to the original name in the uploaded NEXUS). So, for example, this study has six taxon blocks, all called "Taxa": http://purl.org/phylo/treebase/phylows/study/TB2:S11618?format=nexus ... But perhaps they should be given titles like the analysis IDs shown in the analysis downloads, e.g. this one in the same study: http://treebase.org/treebase-web/search/downloadAnAnalysisStep.html?analysisid=7476&id=11618 ... which is "TaxaForAnalysisStep7476". (but perhaps better to write "Taxa_For_Analysis_Step_7476"). bp ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=3313176&group_id=248804 |
From: <hs...@us...> - 2011-07-18 21:56:08
|
Revision: 929 http://treebase.svn.sourceforge.net/treebase/?rev=929&view=rev Author: hshyket Date: 2011-07-18 21:56:02 +0000 (Mon, 18 Jul 2011) Log Message: ----------- Aligning study id with submission id in database Added Paths: ----------- trunk/treebase-core/db/cleaning/2011-07-18_align_studyid_submissionid/ trunk/treebase-core/db/cleaning/2011-07-18_align_studyid_submissionid/align_studyid_submissionid.sql Added: trunk/treebase-core/db/cleaning/2011-07-18_align_studyid_submissionid/align_studyid_submissionid.sql =================================================================== --- trunk/treebase-core/db/cleaning/2011-07-18_align_studyid_submissionid/align_studyid_submissionid.sql (rev 0) +++ trunk/treebase-core/db/cleaning/2011-07-18_align_studyid_submissionid/align_studyid_submissionid.sql 2011-07-18 21:56:02 UTC (rev 929) @@ -0,0 +1,10 @@ +SELECT +pg_catalog.nextval('study_id_sequence'), pg_catalog.nextval('submission_id_sequence'), + CASE + WHEN ( pg_catalog.currval('study_id_sequence') - pg_catalog.currval('submission_id_sequence') ) > 0 + THEN pg_catalog.setval('submission_id_sequence', ( pg_catalog.currval('study_id_sequence') ) ) + WHEN ( pg_catalog.currval('study_id_sequence') - pg_catalog.currval('submission_id_sequence') ) < 0 + THEN pg_catalog.setval('study_id_sequence', ( pg_catalog.currval('submission_id_sequence') ) ) + WHEN ( pg_catalog.currval('study_id_sequence') - pg_catalog.currval('submission_id_sequence') ) = 0 + THEN 0 + END; \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hs...@us...> - 2011-07-18 20:18:35
|
Revision: 928 http://treebase.svn.sourceforge.net/treebase/?rev=928&view=rev Author: hshyket Date: 2011-07-18 20:18:26 +0000 (Mon, 18 Jul 2011) Log Message: ----------- Fixing issue with null study_id in phylotree Modified Paths: -------------- trunk/treebase-core/src/main/resources/TBASE2_POSTGRES_CREATION.sql Added Paths: ----------- trunk/treebase-core/db/cleaning/2011-07-18_phlyotree_nullstudyid_fix/ trunk/treebase-core/db/cleaning/2011-07-18_phlyotree_nullstudyid_fix/fix_phylotree_studyid_null.sql Added: trunk/treebase-core/db/cleaning/2011-07-18_phlyotree_nullstudyid_fix/fix_phylotree_studyid_null.sql =================================================================== --- trunk/treebase-core/db/cleaning/2011-07-18_phlyotree_nullstudyid_fix/fix_phylotree_studyid_null.sql (rev 0) +++ trunk/treebase-core/db/cleaning/2011-07-18_phlyotree_nullstudyid_fix/fix_phylotree_studyid_null.sql 2011-07-18 20:18:26 UTC (rev 928) @@ -0,0 +1,37 @@ +begin work; + +-- check to see how many trees lack a study_id +SELECT count(*) FROM phylotree WHERE study_id IS NULL; + +-- for those trees that lack a study_id, +-- update the study_id based on the study_id +-- value found in the related taxonlabelset +UPDATE phylotree SET study_id = tls.study_id +FROM phylotree pt JOIN treeblock tb USING (treeblock_id) +JOIN taxonlabelset tls USING (taxonlabelset_id) +WHERE pt.study_id IS NULL +AND tls.study_id IS NOT NULL +AND phylotree.phylotree_id = pt.phylotree_id; + +-- check to see how many trees still lack a study_id +SELECT count(*) FROM phylotree WHERE study_id IS NULL; + +-- for those trees that still lack a study_id, +-- update the study_id based on the legacy study_id found +-- in the filename where the tree was pulled from + +UPDATE phylotree SET study_id = sta.study_id +FROM phylotree pt JOIN study sta ON (sta.tb_studyid = substring(pt.nexusfilename from 1 for @(position('A' in pt.nexusfilename )- 1)) ) +WHERE pt.study_id IS NULL +AND phylotree.phylotree_id = pt.phylotree_id; + +-- check to see how many trees still lack a study_id +SELECT count(*) FROM phylotree WHERE study_id IS NULL; + +-- if no more trees lack a study_id, we can now apply a new +-- constraint to ensure that trees always have a study_id + +ALTER TABLE phylotree +ALTER COLUMN study_id SET NOT NULL; + +commit; Modified: trunk/treebase-core/src/main/resources/TBASE2_POSTGRES_CREATION.sql =================================================================== --- trunk/treebase-core/src/main/resources/TBASE2_POSTGRES_CREATION.sql 2011-07-11 19:11:16 UTC (rev 927) +++ trunk/treebase-core/src/main/resources/TBASE2_POSTGRES_CREATION.sql 2011-07-18 20:18:26 UTC (rev 928) @@ -1,2534 +1,2534 @@ -CREATE TABLE algorithm -( - "type" character(1) NOT NULL, - algorithm_id bigint NOT NULL, - "version" integer, - description character varying(2000), - propertyname character varying(255), - propertyvalue character varying(255), - usertype_id bigint, - gapmode_id bigint, - polytcount_id bigint -) -WITH (OIDS=FALSE); -ALTER TABLE algorithm OWNER TO postgres; -CREATE SEQUENCE algorithm_id_sequence; -ALTER TABLE algorithm ALTER COLUMN algorithm_id SET DEFAULT nextval('algorithm_id_sequence'); --- alter sequence ancestralstate_id_sequence restart with 4885; - -CREATE TABLE analysis -( - analysis_id bigint NOT NULL, - "version" integer, - "name" character varying(255), - notes character varying(2000), - validated smallint, - study_id bigint, - analysis_order integer -) -WITH (OIDS=FALSE); -ALTER TABLE analysis OWNER TO postgres; -CREATE SEQUENCE analysis_id_sequence; -ALTER TABLE analysis ALTER COLUMN analysis_id SET DEFAULT nextval('analysis_id_sequence'); --- alter sequence analysis_id_sequence restart with 4887; - -CREATE TABLE analysisstep -( - analysisstep_id bigint NOT NULL, - "version" integer, - commands character varying(2000), - "name" character varying(255), - notes character varying(2000), - algorithm_id bigint, - analysis_id bigint, - software_id bigint, - step_order integer, - tb_analysisid character varying(34) -) -WITH (OIDS=FALSE); -ALTER TABLE analysisstep OWNER TO postgres; -CREATE SEQUENCE analysisstep_id_sequence; -ALTER TABLE analysisstep ALTER COLUMN analysisstep_id SET DEFAULT nextval('analysisstep_id_sequence'); --- alter sequence analysisstep_id_sequence restart with 4883; - -CREATE TABLE analyzeddata -( - "type" character(1) NOT NULL, - analyzeddata_id bigint NOT NULL, - "version" integer, - "input" smallint, - notes character varying(2000), - treelength integer, - analysisstep_id bigint NOT NULL, - matrix_id bigint, - phylotree_id bigint -) -WITH (OIDS=FALSE); -ALTER TABLE analyzeddata OWNER TO postgres; -CREATE SEQUENCE analyzeddata_id_sequence; -ALTER TABLE analyzeddata ALTER COLUMN analyzeddata_id SET DEFAULT nextval('analyzeddata_id_sequence'); --- alter sequence analyzeddata_id_sequence restart with 11063; - -CREATE TABLE ancestralstate -( - "type" character(1) NOT NULL, - ancestralstate_id bigint NOT NULL, - "version" integer, - title character varying(255), - ancvalue character varying(255), - discretecharstate_id bigint, - ancstateset_id bigint -) -WITH (OIDS=FALSE); -ALTER TABLE ancestralstate OWNER TO postgres; -CREATE SEQUENCE ancestralstate_id_sequence; -ALTER TABLE ancestralstate ALTER COLUMN ancestralstate_id SET DEFAULT nextval('ancestralstate_id_sequence'); --- alter sequence ancestralstate_id_sequence restart with 1; - -CREATE TABLE ancstateset -( - ancstateset_id bigint NOT NULL, - "version" integer, - title character varying(255), - matrix_id bigint -) -WITH (OIDS=FALSE); -ALTER TABLE ancstateset OWNER TO postgres; -CREATE SEQUENCE ancstateset_id_sequence; -ALTER TABLE ancstateset ALTER COLUMN ancstateset_id SET DEFAULT nextval('ancstateset_id_sequence'); --- alter sequence ancestralstate_id_sequence restart with 1; - -CREATE TABLE chargroup_colrange -( - chargroup_id bigint NOT NULL, - columnrange_id bigint NOT NULL -) -WITH (OIDS=FALSE); -ALTER TABLE chargroup_colrange OWNER TO postgres; - -CREATE TABLE chargroup -( - chargroup_id bigint NOT NULL, - "version" integer, - title character varying(255), - charpartition_id bigint -) -WITH (OIDS=FALSE); -ALTER TABLE chargroup OWNER TO postgres; -CREATE SEQUENCE chargroup_id_sequence; -ALTER TABLE chargroup ALTER COLUMN chargroup_id SET DEFAULT nextval('chargroup_id_sequence'); --- alter sequence ancestralstate_id_sequence restart with 1011; - -CREATE TABLE charpartition -( - charpartition_id bigint NOT NULL, - "version" integer, - title character varying(255), - matrix_id bigint -) -WITH (OIDS=FALSE); -ALTER TABLE charpartition OWNER TO postgres; -CREATE SEQUENCE charpartition_id_sequence; -ALTER TABLE charpartition ALTER COLUMN charpartition_id SET DEFAULT nextval('charpartition_id_sequence'); --- alter sequence charpartition_id_sequence restart with 429; - -CREATE TABLE charset_colrange -( - charset_id bigint NOT NULL, - columnrange_id bigint NOT NULL -) -WITH (OIDS=FALSE); -ALTER TABLE charset_colrange OWNER TO postgres; - -CREATE TABLE charset -( - "type" character(1) NOT NULL, - charset_id bigint NOT NULL, - "version" integer, - title character varying(255), - matrix_id bigint -) -WITH (OIDS=FALSE); -ALTER TABLE charset OWNER TO postgres; -CREATE SEQUENCE charset_id_sequence; -ALTER TABLE charset ALTER COLUMN charset_id SET DEFAULT nextval('charset_id_sequence'); --- alter sequence ancestralstate_id_sequence restart with 6335; - -CREATE TABLE charweight_colrange -( - charweight_id bigint NOT NULL, - columnrange_id bigint NOT NULL -) -WITH (OIDS=FALSE); -ALTER TABLE charweight_colrange OWNER TO postgres; - -CREATE TABLE charweight -( - "type" character(1) NOT NULL, - charweight_id bigint NOT NULL, - "version" integer, - weight integer, - realweight double precision, - charweightset_id bigint -) -WITH (OIDS=FALSE); -ALTER TABLE charweight OWNER TO postgres; -CREATE SEQUENCE charweight_id_sequence; -ALTER TABLE charweight ALTER COLUMN charweight_id SET DEFAULT nextval('charweight_id_sequence'); --- alter sequence charweight_id_sequence restart with 1; - -CREATE TABLE charweightset -( - charweightset_id bigint NOT NULL, - "version" integer, - title character varying(255), - matrix_id bigint -) -WITH (OIDS=FALSE); -ALTER TABLE charweightset OWNER TO postgres; -CREATE SEQUENCE charweightset_id_sequence; -ALTER TABLE charweightset ALTER COLUMN charweightset_id SET DEFAULT nextval('charweightset_id_sequence'); --- alter sequence charweightset_id_sequence restart with 208; - -CREATE TABLE citation_author -( - citation_id bigint NOT NULL, - authors_person_id bigint NOT NULL, - author_order integer NOT NULL -) -WITH (OIDS=FALSE); -ALTER TABLE citation_author OWNER TO postgres; - -CREATE TABLE citation_editor -( - citation_id bigint NOT NULL, - editors_person_id bigint NOT NULL, - editor_order integer NOT NULL -) -WITH (OIDS=FALSE); -ALTER TABLE citation_editor OWNER TO postgres; - -CREATE TABLE citation -( - "type" character(1) NOT NULL, - citation_id bigint NOT NULL, - "version" integer, - pmid character varying(255), - url character varying(255), - abstract character varying(10000), - doi character varying(255), - keywords character varying(255), - pages character varying(255), - publishyear integer, - published smallint, - title character varying(500), - issue character varying(255), - journal character varying(255), - volume character varying(255), - isbn character varying(255), - booktitle character varying(255), - city character varying(255), - publisher character varying(255), - citationstatus_id bigint, - tb_studyid character varying(30) -) -WITH (OIDS=FALSE); -ALTER TABLE citation OWNER TO postgres; -CREATE SEQUENCE citation_id_sequence; -ALTER TABLE citation ALTER COLUMN citation_id SET DEFAULT nextval('citation_id_sequence'); --- alter sequence citation_id_sequence restart with 18422; - -CREATE TABLE citationstatus -( - citationstatus_id bigint NOT NULL, - "version" integer, - description character varying(50) -) -WITH (OIDS=FALSE); -ALTER TABLE citationstatus OWNER TO postgres; -CREATE SEQUENCE citationstatus_id_sequence; -ALTER TABLE citationstatus ALTER COLUMN citationstatus_id SET DEFAULT nextval('citationstatus_id_sequence'); --- alter sequence citationstatus_id_sequence restart with 6; - -CREATE TABLE coderecord_colrange -( - geneticcoderecord_id bigint NOT NULL, - columnrange_id bigint NOT NULL -) -WITH (OIDS=FALSE); -ALTER TABLE coderecord_colrange OWNER TO postgres; - -CREATE TABLE codonchar1_colrange -( - codonpositionset_id bigint NOT NULL, - columnrange_id bigint NOT NULL -) -WITH (OIDS=FALSE); -ALTER TABLE codonchar1_colrange OWNER TO postgres; - -CREATE TABLE codonchar2_colrange -( - codonpositionset_id bigint NOT NULL, - columnrange_id bigint NOT NULL -) -WITH (OIDS=FALSE); -ALTER TABLE codonchar2_colrange OWNER TO postgres; - -CREATE TABLE codonchar3_colrange -( - codonpositionset_id bigint NOT NULL, - columnrange_id bigint NOT NULL -) -WITH (OIDS=FALSE); -ALTER TABLE codonchar3_colrange OWNER TO postgres; - -CREATE TABLE codonnoncoding_colrange -( - codonpositionset_id bigint NOT NULL, - columnrange_id bigint NOT NULL -) -WITH (OIDS=FALSE); -ALTER TABLE codonnoncoding_colrange OWNER TO postgres; - -CREATE TABLE codonpositionset -( - codonpositionset_id bigint NOT NULL, - "version" integer, - title character varying(255), - matrix_id bigint -) -WITH (OIDS=FALSE); -ALTER TABLE codonpositionset OWNER TO postgres; -CREATE SEQUENCE codonpositionset_id_sequence; -ALTER TABLE codonpositionset ALTER COLUMN codonpositionset_id SET DEFAULT nextval('codonpositionset_id_sequence'); --- alter sequence codonpositionset_id_sequence restart with 4495; - -CREATE TABLE columnrange -( - columnrange_id bigint NOT NULL, - "version" integer, - endcolindex integer, - repeatinterval integer, - startcolindex integer -) -WITH (OIDS=FALSE); -ALTER TABLE columnrange OWNER TO postgres; -CREATE SEQUENCE columnrange_id_sequence; -ALTER TABLE columnrange ALTER COLUMN columnrange_id SET DEFAULT nextval('columnrange_id_sequence'); --- alter sequence columnrange_id_sequence restart with 255521; - -CREATE TABLE compound_element -( - compound_id bigint NOT NULL, - element_id bigint NOT NULL -) -WITH (OIDS=FALSE); -ALTER TABLE compound_element OWNER TO postgres; - -CREATE TABLE contancstate_value -( - ancstate_id bigint NOT NULL, - element character varying(255) -) -WITH (OIDS=FALSE); -ALTER TABLE contancstate_value OWNER TO postgres; - -CREATE TABLE cstreenode -( - cstreenode_id bigint NOT NULL, - "version" integer, - discretecharstate_id bigint, - parentnode_id bigint, - cstree_id bigint NOT NULL -) -WITH (OIDS=FALSE); -ALTER TABLE cstreenode OWNER TO postgres; -CREATE SEQUENCE cstreenode_id_sequence; -ALTER TABLE cstreenode ALTER COLUMN cstreenode_id SET DEFAULT nextval('cstreenode_id_sequence'); --- alter sequence cstreenode_id_sequence restart with 1; - -CREATE TABLE discretecharstate -( - discretecharstate_id bigint NOT NULL, - "version" integer, - description character varying(255), - notes character varying(255), - symbol character(1), - phylochar_id bigint NOT NULL, - stateset_id bigint, - ancestralstate_id bigint -) -WITH (OIDS=FALSE); -ALTER TABLE discretecharstate OWNER TO postgres; -CREATE SEQUENCE discretecharstate_id_sequence; -ALTER TABLE discretecharstate ALTER COLUMN discretecharstate_id SET DEFAULT nextval('discretecharstate_id_sequence'); --- alter sequence discretecharstate_id_sequence restart with 169787; - -CREATE TABLE distancematrixelement -( - distancematrixelement_id bigint NOT NULL, - "version" integer, - distance double precision, - columnlabel_id bigint, - matrix_id bigint NOT NULL, - rowlabel_id bigint NOT NULL -) -WITH (OIDS=FALSE); -ALTER TABLE distancematrixelement OWNER TO postgres; -CREATE SEQUENCE distancematrixelement_id_sequence; -ALTER TABLE distancematrixelement ALTER COLUMN distancematrixelement_id SET DEFAULT nextval('distancematrixelement_id_sequence'); --- alter sequence distancematrixelement_id_sequence restart with 1; - -CREATE TABLE gapmode -( - gapmode_id bigint NOT NULL, - "version" integer, - description character varying(255) -) -WITH (OIDS=FALSE); -ALTER TABLE gapmode OWNER TO postgres; -CREATE SEQUENCE gapmode_id_sequence; -ALTER TABLE gapmode ALTER COLUMN gapmode_id SET DEFAULT nextval('gapmode_id_sequence'); --- alter sequence gapmode_id_sequence restart with 3; - -CREATE TABLE geneticcode -( - geneticcode_id bigint NOT NULL, - "version" integer, - codedescription character varying(1000), - codeorder character varying(255), - extensions character varying(255), - nucorder character varying(255), - predefined smallint, - title character varying(255) -) -WITH (OIDS=FALSE); -ALTER TABLE geneticcode OWNER TO postgres; -CREATE SEQUENCE geneticcode_id_sequence; -ALTER TABLE geneticcode ALTER COLUMN geneticcode_id SET DEFAULT nextval('geneticcode_id_sequence'); --- alter sequence geneticcode_id_sequence restart with 1; - -CREATE TABLE geneticcoderecord -( - geneticcoderecord_id bigint NOT NULL, - "version" integer, - geneticcode_id bigint, - geneticcodeset_id bigint NOT NULL -) -WITH (OIDS=FALSE); -ALTER TABLE geneticcoderecord OWNER TO postgres; -CREATE SEQUENCE geneticcoderecord_id_sequence; -ALTER TABLE geneticcoderecord ALTER COLUMN geneticcoderecord_id SET DEFAULT nextval('geneticcoderecord_id_sequence'); --- alter sequence geneticcoderecord_id_sequence restart with 1; - -CREATE TABLE geneticcodeset -( - geneticcodeset_id bigint NOT NULL, - "version" integer, - format character varying(255), - title character varying(255), - matrix_id bigint -) -WITH (OIDS=FALSE); -ALTER TABLE geneticcodeset OWNER TO postgres; -CREATE SEQUENCE geneticcodeset_id_sequence; -ALTER TABLE geneticcodeset ALTER COLUMN geneticcodeset_id SET DEFAULT nextval('geneticcodeset_id_sequence'); --- alter sequence geneticcodeset_id_sequence restart with 1; - -CREATE TABLE geospot -( - geospot_id bigint NOT NULL, - "version" integer, - elevation double precision, - latitude double precision, - longitude double precision, - "name" character varying(255), - notes character varying(2000) -) -WITH (OIDS=FALSE); -ALTER TABLE geospot OWNER TO postgres; -CREATE SEQUENCE geospot_id_sequence; -ALTER TABLE geospot ALTER COLUMN geospot_id SET DEFAULT nextval('geospot_id_sequence'); --- alter sequence geospot_id_sequence restart with 1; - -CREATE TABLE help -( - help_id bigint NOT NULL, - "version" integer, - helptext text, - tag character varying(255) -) -WITH (OIDS=FALSE); -ALTER TABLE help OWNER TO postgres; -CREATE SEQUENCE help_id_sequence; -ALTER TABLE help ALTER COLUMN help_id SET DEFAULT nextval('help_id_sequence'); --- alter sequence help_id_sequence restart with 183; - -CREATE TABLE itemdefinition -( - itemdefinition_id bigint NOT NULL, - "version" integer, - description character varying(255) -) -WITH (OIDS=FALSE); -ALTER TABLE itemdefinition OWNER TO postgres; -CREATE SEQUENCE itemdefinition_id_sequence; -ALTER TABLE itemdefinition ALTER COLUMN itemdefinition_id SET DEFAULT nextval('itemdefinition_id_sequence'); --- alter sequence itemdefinition_id_sequence restart with 9; - -CREATE TABLE itemvalue -( - itemvalue_id bigint NOT NULL, - "version" integer, - "value" character varying(255), - element_id bigint NOT NULL -) -WITH (OIDS=FALSE); -ALTER TABLE itemvalue OWNER TO postgres; -CREATE SEQUENCE itemvalue_id_sequence; -ALTER TABLE itemvalue ALTER COLUMN itemvalue_id SET DEFAULT nextval('itemvalue_id_sequence'); --- alter sequence itemvalue_id_sequence restart with 1; - -CREATE TABLE leftchangeset_charstate -( - statechangeset_id bigint NOT NULL, - discretecharstate_id bigint NOT NULL -) -WITH (OIDS=FALSE); -ALTER TABLE leftchangeset_charstate OWNER TO postgres; - -CREATE TABLE matrix_itemdefinition -( - matrix_id bigint NOT NULL, - itemdefinition_id bigint NOT NULL -) -WITH (OIDS=FALSE); -ALTER TABLE matrix_itemdefinition OWNER TO postgres; - -CREATE TABLE matrix -( - matrixtype character(1) NOT NULL, - matrix_id bigint NOT NULL, - "version" integer, - tb_matrixid character varying(30), - description character varying(2000), - gapsymbol character(1), - missingsymbol character(1), - nexusfilename character varying(255), - published smallint, - symbols character varying(255), - title character varying(255), - "nchar" integer, - ntax integer, - aligned smallint, - diagonal smallint, - triangle character varying(255), - casesensitive smallint, - matrixdatatype_id bigint, - matrixkind_id bigint, - study_id bigint, - taxonlabelset_id bigint, - ancstateset_id bigint, - codonpositionset_id bigint, - charset_id bigint, - typeset_id bigint, - charweightset_id bigint -) -WITH (OIDS=FALSE); -ALTER TABLE matrix OWNER TO postgres; -CREATE SEQUENCE matrix_id_sequence; -ALTER TABLE matrix ALTER COLUMN matrix_id SET DEFAULT nextval('matrix_id_sequence'); --- alter sequence matrix_id_sequence restart with 4151; - -CREATE TABLE matrixcolumn_itemdefinition -( - matrixcolumn_id bigint NOT NULL, - itemdefinition_id bigint NOT NULL -) -WITH (OIDS=FALSE); -ALTER TABLE matrixcolumn_itemdefinition OWNER TO postgres; - -CREATE TABLE matrixcolumn -( - matrixcolumn_id bigint NOT NULL, - "version" integer, - phylochar_id bigint, - matrix_id bigint, - stateformat_id bigint, - column_order integer -) -WITH (OIDS=FALSE); -ALTER TABLE matrixcolumn OWNER TO postgres; -CREATE SEQUENCE matrixcolumn_id_sequence; -ALTER TABLE matrixcolumn ALTER COLUMN matrixcolumn_id SET DEFAULT nextval('matrixcolumn_id_sequence'); --- alter sequence matrixcolumn_id_sequence restart with 5682181; - -CREATE TABLE matrixdatatype -( - matrixdatatype_id bigint NOT NULL, - "version" integer, - description character varying(255), - phylochar_id bigint -) -WITH (OIDS=FALSE); -ALTER TABLE matrixdatatype OWNER TO postgres; -CREATE SEQUENCE matrixdatatype_id_sequence; -ALTER TABLE matrixdatatype ALTER COLUMN matrixdatatype_id SET DEFAULT nextval('matrixdatatype_id_sequence'); --- alter sequence matrixdatatype_id_sequence restart with 8; - -CREATE TABLE matrixelement -( - "type" character(1) NOT NULL, - matrixelement_id bigint NOT NULL, - "version" integer, - andlogic smallint, - compoundvalue character varying(1000), - "value" double precision, - gap smallint, - matrixcolumn_id bigint, - matrixrow_id bigint, - itemdefinition_id bigint, - discretecharstate_id bigint, - element_order integer -) -WITH (OIDS=FALSE); -ALTER TABLE matrixelement OWNER TO postgres; -CREATE SEQUENCE matrixelement_id_sequence; -ALTER TABLE matrixelement ALTER COLUMN matrixelement_id SET DEFAULT nextval('matrixelement_id_sequence'); --- alter sequence matrixelement_id_sequence restart with 305807206; - -CREATE TABLE matrixkind -( - matrixkind_id bigint NOT NULL, - "version" integer, - description character varying(100) -) -WITH (OIDS=FALSE); -ALTER TABLE matrixkind OWNER TO postgres; -CREATE SEQUENCE matrixkind_id_sequence; -ALTER TABLE matrixkind ALTER COLUMN matrixkind_id SET DEFAULT nextval('matrixkind_id_sequence'); --- alter sequence matrixkind_id_sequence restart with 12; - -CREATE TABLE matrixrow -( - matrixrow_id bigint NOT NULL, - "version" integer, - symbolstring text, - matrix_id bigint, - taxonlabel_id bigint NOT NULL, - row_order integer -) -WITH (OIDS=FALSE); -ALTER TABLE matrixrow OWNER TO postgres; -CREATE SEQUENCE matrixrow_id_sequence; -ALTER TABLE matrixrow ALTER COLUMN matrixrow_id SET DEFAULT nextval('matrixrow_id_sequence'); --- alter sequence matrixrow_id_sequence restart with 183676; - -CREATE TABLE nodeattribute -( - nodeattribute_id bigint NOT NULL, - "version" integer -) -WITH (OIDS=FALSE); -ALTER TABLE nodeattribute OWNER TO postgres; -CREATE SEQUENCE nodeattribute_id_sequence; -ALTER TABLE nodeattribute ALTER COLUMN nodeattribute_id SET DEFAULT nextval('nodeattribute_id_sequence'); --- alter sequence nodeattribute_id_sequence restart with 1; - -CREATE TABLE person -( - person_id bigint NOT NULL, - "version" integer, - email character varying(255), - firstname character varying(255), - lastname character varying(255) NOT NULL, - mname character varying(255), - phone character varying(50), - authorid character varying(50) -) -WITH (OIDS=FALSE); -ALTER TABLE person OWNER TO postgres; -CREATE SEQUENCE person_id_sequence; -ALTER TABLE person ALTER COLUMN person_id SET DEFAULT nextval('person_id_sequence'); --- alter sequence person_id_sequence restart with 9961; - -CREATE TABLE phylochar -( - "type" character(1) NOT NULL, - phylochar_id bigint NOT NULL, - "version" integer, - description character varying(255), - lowerlimit double precision, - upperlimit double precision -) -WITH (OIDS=FALSE); -ALTER TABLE phylochar OWNER TO postgres; -CREATE SEQUENCE phylochar_id_sequence; -ALTER TABLE phylochar ALTER COLUMN phylochar_id SET DEFAULT nextval('phylochar_id_sequence'); --- alter sequence phylochar_id_sequence restart with 32903; - -CREATE TABLE phylotree -( - phylotree_id bigint NOT NULL, - "version" integer, - tb1_treeid character varying(30), - bigtree smallint, - label character varying(255), - ntax integer, - newickstring text, - nexusfilename character varying(255), - published smallint, - rootedtree smallint, - title character varying(255), - rootnode_id bigint, - study_id bigint, - treeattribute_id bigint, - treeblock_id bigint, - treekind_id bigint, - treequality_id bigint, - treetype_id bigint -) -WITH (OIDS=FALSE); -ALTER TABLE phylotree OWNER TO postgres; -CREATE SEQUENCE phylotree_id_sequence; -ALTER TABLE phylotree ALTER COLUMN phylotree_id SET DEFAULT nextval('phylotree_id_sequence'); --- alter sequence phylotree_id_sequence restart with 5982; - -CREATE TABLE phylotreenode -( - phylotreenode_id bigint NOT NULL, - "version" integer, - branchlength double precision, - leftnode bigint, - "name" character varying(255), - nodedepth integer, - rightnode bigint, - child_id bigint, - nodeattribute_id bigint, - parent_id bigint, - sibling_id bigint, - taxonlabel_id bigint, - phylotree_id bigint NOT NULL -) -WITH (OIDS=FALSE); -ALTER TABLE phylotreenode OWNER TO postgres; -CREATE SEQUENCE phylotreenode_id_sequence; -ALTER TABLE phylotreenode ALTER COLUMN phylotreenode_id SET DEFAULT nextval('phylotreenode_id_sequence'); --- alter sequence phylotreenode_id_sequence restart with 452286; --- GRANT ALL ON SEQUENCE phylotreenode_id_sequence TO postgres; - -CREATE TABLE polytcount -( - polytcount_id bigint NOT NULL, - "version" integer, - description character varying(255) -) -WITH (OIDS=FALSE); -ALTER TABLE polytcount OWNER TO postgres; -CREATE SEQUENCE polytcount_id_sequence; -ALTER TABLE polytcount ALTER COLUMN polytcount_id SET DEFAULT nextval('polytcount_id_sequence'); --- alter sequence polytcount_id_sequence restart with 3; - -CREATE TABLE rightchangeset_charstate -( - statechangeset_id bigint NOT NULL, - discretecharstate_id bigint NOT NULL -) -WITH (OIDS=FALSE); -ALTER TABLE rightchangeset_charstate OWNER TO postgres; - -CREATE TABLE rowsegment -( - rowsegment_id bigint NOT NULL, - "version" integer, - endindex integer, - catalognum character varying(50), - collectioncode character varying(50), - collector character varying(255), - country character varying(50), - elevation double precision, - genbaccession character varying(30), - instacronym character varying(50), - latitude double precision, - locality character varying(255), - longitude double precision, - notes character varying(2000), - otheraccession character varying(50), - sampledate date, - state character varying(50), - startindex integer, - title character varying(255), - matrixrow_id bigint NOT NULL, - taxonlabel_id bigint -) -WITH (OIDS=FALSE); -ALTER TABLE rowsegment OWNER TO postgres; -CREATE SEQUENCE rowsegment_id_sequence; -ALTER TABLE rowsegment ALTER COLUMN rowsegment_id SET DEFAULT nextval('rowsegment_id_sequence'); --- alter sequence rowsegment_id_sequence restart with 1; - -CREATE TABLE software -( - software_id bigint NOT NULL, - "version" integer, - description character varying(2000), - "name" character varying(255), - softwareurl character varying(500), - softwareversion character varying(255) -) -WITH (OIDS=FALSE); -ALTER TABLE software OWNER TO postgres; -CREATE SEQUENCE software_id_sequence; -ALTER TABLE software ALTER COLUMN software_id SET DEFAULT nextval('software_id_sequence'); --- alter sequence software_id_sequence restart with 4834; - -CREATE TABLE specimenlabel -( - specimenlabel_id bigint NOT NULL, - "version" integer, - genbankid character varying(255), - museumnumber character varying(255), - tissue character varying(255), - geospot_id bigint, - study_id bigint NOT NULL, - taxon_id bigint -) -WITH (OIDS=FALSE); -ALTER TABLE specimenlabel OWNER TO postgres; -CREATE SEQUENCE specimenlabel_id_sequence; -ALTER TABLE specimenlabel ALTER COLUMN specimenlabel_id SET DEFAULT nextval('specimenlabel_id_sequence'); --- alter sequence specimenlabel_id_sequence restart with 4499; - -CREATE TABLE statechangeset -( - statechangeset_id bigint NOT NULL, - "version" integer, - reversible smallint, - title character varying(255) -) -WITH (OIDS=FALSE); -ALTER TABLE statechangeset OWNER TO postgres; -CREATE SEQUENCE statechangeset_id_sequence; -ALTER TABLE statechangeset ALTER COLUMN statechangeset_id SET DEFAULT nextval('statechangeset_id_sequence'); --- alter sequence statechangeset_id_sequence restart with 1; - -CREATE TABLE stateformat -( - stateformat_id bigint NOT NULL, - "version" integer, - description character varying(255) -) -WITH (OIDS=FALSE); -ALTER TABLE stateformat OWNER TO postgres; -CREATE SEQUENCE stateformat_id_sequence; -ALTER TABLE stateformat ALTER COLUMN stateformat_id SET DEFAULT nextval('stateformat_id_sequence'); --- alter sequence stateformat_id_sequence restart with 5; - -CREATE TABLE statemodifier -( - statemodifier_id bigint NOT NULL, - "version" integer, - count integer, - frequency double precision, - discretecharstate_id bigint, - element_id bigint NOT NULL, - stateformat_id bigint NOT NULL -) -WITH (OIDS=FALSE); -ALTER TABLE statemodifier OWNER TO postgres; -CREATE SEQUENCE statemodifier_id_sequence; -ALTER TABLE statemodifier ALTER COLUMN statemodifier_id SET DEFAULT nextval('statemodifier_id_sequence'); --- alter sequence statemodifier_id_sequence restart with 1; - -CREATE TABLE stateset -( - stateset_id bigint NOT NULL, - "version" integer, - title character varying(255), - matrix_id bigint -) -WITH (OIDS=FALSE); -ALTER TABLE stateset OWNER TO postgres; -CREATE SEQUENCE stateset_id_sequence; -ALTER TABLE stateset ALTER COLUMN stateset_id SET DEFAULT nextval('stateset_id_sequence'); --- alter sequence stateset_id_sequence restart with 1; - -CREATE TABLE stepmatrixelement -( - discretecharstate_id bigint NOT NULL, - "version" integer, - transcost double precision, - state1_id bigint, - state2_id bigint, - stepmatrix_id bigint NOT NULL -) -WITH (OIDS=FALSE); -ALTER TABLE stepmatrixelement OWNER TO postgres; - -CREATE TABLE study_nexusfile -( - study_id bigint NOT NULL, - nexus text NOT NULL, - filename character varying(255) NOT NULL -) -WITH (OIDS=FALSE); -ALTER TABLE study_nexusfile OWNER TO postgres; - -CREATE TABLE study -( - study_id bigint NOT NULL, - "version" integer, - tb_studyid character varying(30), - accessionnumber character varying(255), - lastmodifieddate date, - "name" character varying(255), - notes character varying(2000), - releasedate date, - citation_id bigint, - user_id bigint, - studystatus_id bigint -) -WITH (OIDS=FALSE); -ALTER TABLE study OWNER TO postgres; -CREATE SEQUENCE study_id_sequence; -ALTER TABLE study ALTER COLUMN study_id SET DEFAULT nextval('study_id_sequence'); --- alter sequence study_id_sequence restart with 9931; - -CREATE TABLE studystatus -( - studystatus_id bigint NOT NULL, - "version" integer, - description character varying(255) -) -WITH (OIDS=FALSE); -ALTER TABLE studystatus OWNER TO postgres; -CREATE SEQUENCE studystatus_id_sequence; -ALTER TABLE studystatus ALTER COLUMN studystatus_id SET DEFAULT nextval('studystatus_id_sequence'); --- alter sequence studystatus_id_sequence restart with 4; - -CREATE TABLE sub_matrix -( - submission_id bigint NOT NULL, - matrix_id bigint NOT NULL, - collection_id bigint NOT NULL -) -WITH (OIDS=FALSE); -ALTER TABLE sub_matrix OWNER TO postgres; - -CREATE TABLE sub_taxonlabel -( - submission_id bigint NOT NULL, - taxonlabel_id bigint NOT NULL -) -WITH (OIDS=FALSE); -ALTER TABLE sub_taxonlabel OWNER TO postgres; - -CREATE TABLE sub_treeblock -( - submission_id bigint NOT NULL, - treeblock_id bigint NOT NULL, - collection_id bigint NOT NULL -) -WITH (OIDS=FALSE); -ALTER TABLE sub_treeblock OWNER TO postgres; - -CREATE TABLE submission -( - submission_id bigint NOT NULL, - "version" integer, - createdate date, - submissionnumber character varying(255), - test smallint NOT NULL, - study_id bigint NOT NULL, - user_id bigint -) -WITH (OIDS=FALSE); -ALTER TABLE submission OWNER TO postgres; -CREATE SEQUENCE submission_id_sequence; -ALTER TABLE submission ALTER COLUMN submission_id SET DEFAULT nextval('submission_id_sequence'); --- alter sequence submission_id_sequence restart with 9921; - -CREATE TABLE taxon -( - taxon_id bigint NOT NULL, - "version" integer, - ubionamebankid bigint, - description character varying(2000), - groupcode integer, - "name" character varying(255), - ncbitaxid integer, - tb1legacyid integer -) -WITH (OIDS=FALSE); -ALTER TABLE taxon OWNER TO postgres; -CREATE SEQUENCE taxon_id_sequence; -ALTER TABLE taxon ALTER COLUMN taxon_id SET DEFAULT nextval('taxon_id_sequence'); --- alter sequence taxon_id_sequence restart with 427168; - -CREATE TABLE taxonauthority -( - taxonauthority_id bigint NOT NULL, - "version" integer, - connectionstr character varying(1000), - description character varying(2000), - "name" character varying(255) -) -WITH (OIDS=FALSE); -ALTER TABLE taxonauthority OWNER TO postgres; -CREATE SEQUENCE taxonauthority_id_sequence; -ALTER TABLE taxonauthority ALTER COLUMN taxonauthority_id SET DEFAULT nextval('taxonauthority_id_sequence'); --- alter sequence taxonauthority_id_sequence restart with 1; - -CREATE TABLE taxonlabel -( - taxonlabel_id bigint NOT NULL, - "version" integer, - linked smallint, - taxonlabel character varying(255), - study_id bigint, - taxonvariant_id bigint -) -WITH (OIDS=FALSE); -ALTER TABLE taxonlabel OWNER TO postgres; -CREATE SEQUENCE taxonlabel_id_sequence; -ALTER TABLE taxonlabel ALTER COLUMN taxonlabel_id SET DEFAULT nextval('taxonlabel_id_sequence'); --- alter sequence taxonlabel_id_sequence restart with 239936; -GRANT ALL ON SEQUENCE taxonlabel_id_sequence TO postgres; -GRANT ALL ON SEQUENCE taxonlabel_id_sequence TO treebase_app; - -CREATE TABLE taxonlabelgroup -( - taxonlabelgroup_id bigint NOT NULL, - "version" integer, - title character varying(255), - taxonlabelpartition_id bigint -) -WITH (OIDS=FALSE); -ALTER TABLE taxonlabelgroup OWNER TO postgres; -CREATE SEQUENCE taxonlabelgroup_id_sequence; -ALTER TABLE taxonlabelgroup ALTER COLUMN taxonlabelgroup_id SET DEFAULT nextval('taxonlabelgroup_id_sequence'); --- alter sequence taxonlabelgroup_id_sequence restart with 1; - -CREATE TABLE taxonlabelpartition -( - taxonlabelpartition_id bigint NOT NULL, - "version" integer, - title character varying(255) -) -WITH (OIDS=FALSE); -ALTER TABLE taxonlabelpartition OWNER TO postgres; -CREATE SEQUENCE taxonlabelpartition_id_sequence; -ALTER TABLE taxonlabelpartition ALTER COLUMN taxonlabelpartition_id SET DEFAULT nextval('taxonlabelpartition_id_sequence'); --- alter sequence taxonlabelpartition_id_sequence restart with 1; - -CREATE TABLE taxonlabelroup_taxonlabel -( - taxonlabelgroup_id bigint NOT NULL, - taxonlabel_id bigint NOT NULL -) -WITH (OIDS=FALSE); -ALTER TABLE taxonlabelroup_taxonlabel OWNER TO postgres; - -CREATE TABLE taxonlabelset_taxonlabel -( - taxonlabelset_id bigint NOT NULL, - taxonlabel_id bigint NOT NULL, - taxonlabel_order integer NOT NULL -) -WITH (OIDS=FALSE); -ALTER TABLE taxonlabelset_taxonlabel OWNER TO postgres; - -CREATE TABLE taxonlabelset -( - taxonlabelset_id bigint NOT NULL, - "version" integer, - taxa smallint, - title character varying(255), - study_id bigint -) -WITH (OIDS=FALSE); -ALTER TABLE taxonlabelset OWNER TO postgres; -CREATE SEQUENCE taxonlabelset_id_sequence; -ALTER TABLE taxonlabelset ALTER COLUMN taxonlabelset_id SET DEFAULT nextval('taxonlabelset_id_sequence'); --- alter sequence taxonlabelset_id_sequence restart with 14371; - -CREATE TABLE taxonlink -( - linktype character(1) NOT NULL, - taxonlink_id bigint NOT NULL, - "version" integer, - foreigntaxonid character varying(255), - taxonauthority_id bigint NOT NULL, - taxon_id bigint NOT NULL -) -WITH (OIDS=FALSE); -ALTER TABLE taxonlink OWNER TO postgres; -CREATE SEQUENCE taxonlink_id_sequence; -ALTER TABLE taxonlink ALTER COLUMN taxonlink_id SET DEFAULT nextval('taxonlink_id_sequence'); --- alter sequence taxonlink_id_sequence restart with 1; - -CREATE TABLE taxonset_taxon -( - taxonset_id bigint NOT NULL, - taxon_id bigint NOT NULL, - taxon_order integer NOT NULL -) -WITH (OIDS=FALSE); -ALTER TABLE taxonset_taxon OWNER TO postgres; - -CREATE TABLE taxonset -( - taxonset_id bigint NOT NULL, - "version" integer, - title character varying(255) -) -WITH (OIDS=FALSE); -ALTER TABLE taxonset OWNER TO postgres; -CREATE SEQUENCE taxonset_id_sequence; -ALTER TABLE taxonset ALTER COLUMN taxonset_id SET DEFAULT nextval('taxonset_id_sequence'); --- alter sequence taxonset_id_sequence restart with 1; - -CREATE TABLE taxonvariant -( - taxonvariant_id bigint NOT NULL, - "version" integer, - fullname character varying(255), - lexicalqualifier character varying(50), - "name" character varying(255), - namebankid bigint, - taxon_id bigint NOT NULL, - tb1legacyid integer -) -WITH (OIDS=FALSE); -ALTER TABLE taxonvariant OWNER TO postgres; -CREATE SEQUENCE taxonvariant_id_sequence; -ALTER TABLE taxonvariant ALTER COLUMN taxonvariant_id SET DEFAULT nextval('taxonvariant_id_sequence'); --- alter sequence taxonvariant_id_sequence restart with 564331; - -CREATE TABLE treeattribute -( - treeattribute_id bigint NOT NULL, - "version" integer -) -WITH (OIDS=FALSE); -ALTER TABLE treeattribute OWNER TO postgres; -CREATE SEQUENCE treeattribute_id_sequence; -ALTER TABLE treeattribute ALTER COLUMN treeattribute_id SET DEFAULT nextval('treeattribute_id_sequence'); --- alter sequence treeattribute_id_sequence restart with 1; - -CREATE TABLE treeblock -( - treeblock_id bigint NOT NULL, - "version" integer, - title character varying(255), - taxonlabelset_id bigint -) -WITH (OIDS=FALSE); -ALTER TABLE treeblock OWNER TO postgres; -CREATE SEQUENCE treeblock_id_sequence; -ALTER TABLE treeblock ALTER COLUMN treeblock_id SET DEFAULT nextval('treeblock_id_sequence'); --- alter sequence treeblock_id_sequence restart with 9662; - -CREATE TABLE treegroup_phylotree -( - treegroup_id bigint NOT NULL, - phylotree_id bigint NOT NULL -) -WITH (OIDS=FALSE); -ALTER TABLE treegroup_phylotree OWNER TO postgres; - -CREATE TABLE treegroup -( - treegroup_id bigint NOT NULL, - "version" integer, - title character varying(255), - treepartition_id bigint -) -WITH (OIDS=FALSE); -ALTER TABLE treegroup OWNER TO postgres; -CREATE SEQUENCE treegroup_id_sequence; -ALTER TABLE treegroup ALTER COLUMN treegroup_id SET DEFAULT nextval('treegroup_id_sequence'); --- alter sequence treegroup_id_sequence restart with 1; - -CREATE TABLE treekind -( - treekind_id bigint NOT NULL, - "version" integer, - description character varying(100) -) -WITH (OIDS=FALSE); -ALTER TABLE treekind OWNER TO postgres; -CREATE SEQUENCE treekind_id_sequence; -ALTER TABLE treekind ALTER COLUMN treekind_id SET DEFAULT nextval('treekind_id_sequence'); --- alter sequence treekind_id_sequence restart with 7; - -CREATE TABLE treenodeedge -( - treenodeedge_id bigint NOT NULL, - "version" integer, - childnode_id bigint NOT NULL, - parentnode_id bigint NOT NULL -) -WITH (OIDS=FALSE); -ALTER TABLE treenodeedge OWNER TO postgres; -CREATE SEQUENCE treenodeedge_id_sequence; -ALTER TABLE treenodeedge ALTER COLUMN treenodeedge_id SET DEFAULT nextval('treenodeedge_id_sequence'); --- alter sequence treenodeedge_id_sequence restart with 1; - -CREATE TABLE treepartition -( - treepartition_id bigint NOT NULL, - "version" integer, - title character varying(255) -) -WITH (OIDS=FALSE); -ALTER TABLE treepartition OWNER TO postgres; -CREATE SEQUENCE treepartition_id_sequence; -ALTER TABLE treepartition ALTER COLUMN treepartition_id SET DEFAULT nextval('treepartition_id_sequence'); --- alter sequence treepartition_id_sequence restart with 1; - -CREATE TABLE treequality -( - treequality_id bigint NOT NULL, - "version" integer, - description character varying(255) -) -WITH (OIDS=FALSE); -ALTER TABLE treequality OWNER TO postgres; -CREATE SEQUENCE treequality_id_sequence; -ALTER TABLE treequality ALTER COLUMN treequality_id SET DEFAULT nextval('treequality_id_sequence'); --- alter sequence treequality_id_sequence restart with 5; - -CREATE TABLE treeset_phylotree -( - treeset_id bigint NOT NULL, - phylotree_id bigint NOT NULL, - tree_order integer NOT NULL -) -WITH (OIDS=FALSE); -ALTER TABLE treeset_phylotree OWNER TO postgres; - -CREATE TABLE treeset -( - treeset_id bigint NOT NULL, - "version" integer, - title character varying(255) -) -WITH (OIDS=FALSE); -ALTER TABLE treeset OWNER TO postgres; -CREATE SEQUENCE treeset_id_sequence; -ALTER TABLE treeset ALTER COLUMN treeset_id SET DEFAULT nextval('treeset_id_sequence'); --- alter sequence treeset_id_sequence restart with 1; - -CREATE TABLE treetype -( - treetype_id bigint NOT NULL, - "version" integer, - description character varying(255) -) -WITH (OIDS=FALSE); -ALTER TABLE treetype OWNER TO postgres; -CREATE SEQUENCE treetype_id_sequence; -ALTER TABLE treetype ALTER COLUMN treetype_id SET DEFAULT nextval('treetype_id_sequence'); --- alter sequence treetype_id_sequence restart with 4; - -CREATE TABLE typeset -( - typeset_id bigint NOT NULL, - "version" integer, - title character varying(255), - matrix_id bigint -) -WITH (OIDS=FALSE); -ALTER TABLE typeset OWNER TO postgres; -CREATE SEQUENCE typeset_id_sequence; -ALTER TABLE typeset ALTER COLUMN typeset_id SET DEFAULT nextval('typeset_id_sequence'); --- alter sequence typeset_id_sequence restart with 1; - -CREATE TABLE "user" -( - user_id bigint NOT NULL, - "version" integer, - "password" character varying(100) NOT NULL, - username character varying(100) NOT NULL, - person_id bigint NOT NULL, - userrole_id bigint NOT NULL -) -WITH (OIDS=FALSE); -ALTER TABLE "user" OWNER TO postgres; -CREATE SEQUENCE user_id_sequence; -ALTER TABLE "user" ALTER COLUMN user_id SET DEFAULT nextval('user_id_sequence'); --- alter sequence user_id_sequence restart with 9951; - -CREATE TABLE userrole -( - userrole_id bigint NOT NULL, - "version" integer, - authority character varying(255) NOT NULL -) -WITH (OIDS=FALSE); -ALTER TABLE userrole OWNER TO postgres; -CREATE SEQUENCE userrole_id_sequence; -ALTER TABLE "userrole" ALTER COLUMN userrole_id SET DEFAULT nextval('userrole_id_sequence'); --- alter sequence userrole_id_sequence restart with 4; - -CREATE TABLE usertype -( - "type" character(1) NOT NULL, - usertype_id bigint NOT NULL, - "version" integer, - title character varying(255) -) -WITH (OIDS=FALSE); -ALTER TABLE usertype OWNER TO postgres; -CREATE SEQUENCE usertype_id_sequence; -ALTER TABLE usertype ALTER COLUMN usertype_id SET DEFAULT nextval('usertype_id_sequence'); --- alter sequence usertype_id_sequence restart with 4; - -CREATE TABLE usertyperecord -( - usertyperecord_id bigint NOT NULL, - "version" integer, - usertype_id bigint, - typeset_id bigint -) -WITH (OIDS=FALSE); -ALTER TABLE usertyperecord OWNER TO postgres; -CREATE SEQUENCE usertyperecord_id_sequence; -ALTER TABLE usertyperecord ALTER COLUMN usertyperecord_id SET DEFAULT nextval('usertyperecord_id_sequence'); --- alter sequence usertyperecord_id_sequence restart with 1; - -CREATE TABLE usertyperrd_colrange -( - usertyperecord_id bigint NOT NULL, - columnrange_id bigint NOT NULL -) -WITH (OIDS=FALSE); -ALTER TABLE usertyperrd_colrange OWNER TO postgres; - -CREATE INDEX COLUMN_M_IDX - ON MATRIXCOLUMN(MATRIX_ID); -CREATE INDEX ELEMENT_COL_IDX - ON MATRIXELEMENT(MATRIXCOLUMN_ID); -CREATE INDEX ELEMENT_ROW_IDX - ON MATRIXELEMENT(MATRIXROW_ID); -CREATE INDEX ROW_M_IDX - ON MATRIXROW(MATRIX_ID); -CREATE INDEX PERSON_EMAIL_IDX - ON PERSON(EMAIL); -CREATE INDEX PERSON_LNAME_IDX - ON PERSON(LASTNAME); -CREATE INDEX TNODE_TREE_IDX - ON PHYLOTREENODE(PHYLOTREE_ID); -CREATE INDEX TNODE_TAXLABEL_IDX - ON PHYLOTREENODE(TAXONLABEL_ID); -CREATE INDEX SPECIM_INST_IDX - ON ROWSEGMENT(INSTACRONYM); -CREATE INDEX STUDY_NAME_IDX - ON STUDY(NAME); -CREATE INDEX TAXON_NAME_IDX - ON TAXON(NAME); -CREATE INDEX TLABEL_STUDY_IDX - ON TAXONLABEL(STUDY_ID); -CREATE INDEX TVARI_NBID_IDX - ON TAXONVARIANT(NAMEBANKID); -CREATE INDEX TVARI_TAXON_IDX - ON TAXONVARIANT(TAXON_ID); -CREATE INDEX TVARI_FNAME_IDX - ON TAXONVARIANT(FULLNAME); - -ALTER TABLE ALGORITHM - ADD CONSTRAINT SQL081219134217210 - PRIMARY KEY (ALGORITHM_ID); -ALTER TABLE ANALYSIS - ADD CONSTRAINT SQL081219134217310 - PRIMARY KEY (ANALYSIS_ID); -ALTER TABLE ANALYSISSTEP - ADD CONSTRAINT SQL081219134217470 - PRIMARY KEY (ANALYSISSTEP_ID); -ALTER TABLE ANALYZEDDATA - ADD CONSTRAINT SQL081219134217570 - PRIMARY KEY (ANALYZEDDATA_ID); -ALTER TABLE ANCESTRALSTATE - ADD CONSTRAINT SQL081219134217670 - PRIMARY KEY (ANCESTRALSTATE_ID); -ALTER TABLE ANCSTATESET - ADD CONSTRAINT SQL081219134217770 - PRIMARY KEY (ANCSTATESET_ID); -ALTER TABLE CHARGROUP - ADD CONSTRAINT SQL081219134217890 - PRIMARY KEY (CHARGROUP_ID); -ALTER TABLE CHARPARTITION - ADD CONSTRAINT SQL081219134217990 - PRIMARY KEY (CHARPARTITION_ID); -ALTER TABLE CHARSET - ADD CONSTRAINT SQL081219134218100 - PRIMARY KEY (CHARSET_ID); -ALTER TABLE CHARWEIGHT - ADD CONSTRAINT SQL081219134218200 - PRIMARY KEY (CHARWEIGHT_ID); -ALTER TABLE CHARWEIGHTSET - ADD CONSTRAINT SQL081219134218310 - PRIMARY KEY (CHARWEIGHTSET_ID); -ALTER TABLE CITATION_AUTHOR - ADD CONSTRAINT SQL081219134218670 - PRIMARY KEY (CITATION_ID, AUTHOR_ORDER); -ALTER TABLE CITATION_EDITOR - ADD CONSTRAINT SQL081219134218780 - PRIMARY KEY (CITATION_ID, EDITOR_ORDER); -ALTER TABLE CITATION - ADD CONSTRAINT SQL081219134218470 - PRIMARY KEY (CITATION_ID); -ALTER TABLE CITATIONSTATUS - ADD CONSTRAINT SQL081219134218570 - PRIMARY KEY (CITATIONSTATUS_ID); -ALTER TABLE CODONPOSITIONSET - ADD CONSTRAINT SQL081219134220130 - PRIMARY KEY (CODONPOSITIONSET_ID); -ALTER TABLE COLUMNRANGE - ADD CONSTRAINT SQL081219134218890 - PRIMARY KEY (COLUMNRANGE_ID); -ALTER TABLE COMPOUND_ELEMENT - ADD CONSTRAINT SQL081219134219000 - PRIMARY KEY (COMPOUND_ID, ELEMENT_ID); -ALTER TABLE CSTREENODE - ADD CONSTRAINT SQL081219134219200 - PRIMARY KEY (CSTREENODE_ID); -ALTER TABLE DISCRETECHARSTATE - ADD CONSTRAINT SQL081219134220230 - PRIMARY KEY (DISCRETECHARSTATE_ID); -ALTER TABLE DISTANCEMATRIXELEMENT - ADD CONSTRAINT SQL081219134220330 - PRIMARY KEY (DISTANCEMATRIXELEMENT_ID); -ALTER TABLE GAPMODE - ADD CONSTRAINT SQL081219134220440 - PRIMARY KEY (GAPMODE_ID); -ALTER TABLE GENETICCODE - ADD CONSTRAINT SQL081219134220650 - PRIMARY KEY (GENETICCODE_ID); -ALTER TABLE GENETICCODERECORD - ADD CONSTRAINT SQL081219134220760 - PRIMARY KEY (GENETICCODERECORD_ID); -ALTER TABLE GENETICCODESET - ADD CONSTRAINT SQL081219134220550 - PRIMARY KEY (GENETICCODESET_ID); -ALTER TABLE GEOSPOT - ADD CONSTRAINT SQL080428163906080 - PRIMARY KEY (GEOSPOT_ID); -ALTER TABLE HELP - ADD CONSTRAINT SQL081219134220860 - PRIMARY KEY (HELP_ID); -ALTER TABLE ITEMDEFINITION - ADD CONSTRAINT SQL081219134220970 - PRIMARY KEY (ITEMDEFINITION_ID); -ALTER TABLE ITEMVALUE - ADD CONSTRAINT SQL081219134221080 - PRIMARY KEY (ITEMVALUE_ID); -ALTER TABLE MATRIX_ITEMDEFINITION - ADD CONSTRAINT SQL081219134222010 - PRIMARY KEY (MATRIX_ID, ITEMDEFINITION_ID); -ALTER TABLE MATRIX - ADD CONSTRAINT SQL081219134221270 - PRIMARY KEY (MATRIX_ID); -ALTER TABLE MATRIXCOLUMN_ITEMDEFINITION - ADD CONSTRAINT SQL081219134221470 - PRIMARY KEY (MATRIXCOLUMN_ID, ITEMDEFINITION_ID); -ALTER TABLE MATRIXCOLUMN - ADD CONSTRAINT SQL081219134221370 - PRIMARY KEY (MATRIXCOLUMN_ID); -ALTER TABLE MATRIXDATATYPE - ADD CONSTRAINT SQL081219134221580 - PRIMARY KEY (MATRIXDATATYPE_ID); -ALTER TABLE MATRIXELEMENT - ADD CONSTRAINT SQL081219134221690 - PRIMARY KEY (MATRIXELEMENT_ID); -ALTER TABLE MATRIXKIND - ADD CONSTRAINT SQL081219134221790 - PRIMARY KEY (MATRIXKIND_ID); -ALTER TABLE MATRIXROW - ADD CONSTRAINT SQL081219134221900 - PRIMARY KEY (MATRIXROW_ID); -ALTER TABLE NODEATTRIBUTE - ADD CONSTRAINT SQL081219134222120 - PRIMARY KEY (NODEATTRIBUTE_ID); -ALTER TABLE PERSON - ADD CONSTRAINT SQL081219134222230 - PRIMARY KEY (PERSON_ID); -ALTER TABLE PHYLOCHAR - ADD CONSTRAINT SQL081219134222330 - PRIMARY KEY (PHYLOCHAR_ID); -ALTER TABLE PHYLOTREE - ADD CONSTRAINT SQL081219134222440 - PRIMARY KEY (PHYLOTREE_ID); -ALTER TABLE PHYLOTREENODE - ADD CONSTRAINT SQL081219134222560 - PRIMARY KEY (PHYLOTREENODE_ID); -ALTER TABLE POLYTCOUNT - ADD CONSTRAINT SQL081219134222660 - PRIMARY KEY (POLYTCOUNT_ID); -ALTER TABLE ROWSEGMENT - ADD CONSTRAINT SQL081219134222850 - PRIMARY KEY (ROWSEGMENT_ID); -ALTER TABLE SOFTWARE - ADD CONSTRAINT SQL081219134222960 - PRIMARY KEY (SOFTWARE_ID); -ALTER TABLE SPECIMENLABEL - ADD CONSTRAINT SQL080428163906480 - PRIMARY KEY (SPECIMENLABEL_ID); -ALTER TABLE STATECHANGESET - ADD CONSTRAINT SQL081219134223070 - PRIMARY KEY (STATECHANGESET_ID); -ALTER TABLE STATEFORMAT - ADD CONSTRAINT SQL081219134223190 - PRIMARY KEY (STATEFORMAT_ID); -ALTER TABLE STATEMODIFIER - ADD CONSTRAINT SQL081219134223290 - PRIMARY KEY (STATEMODIFIER_ID); -ALTER TABLE STATESET - ADD CONSTRAINT SQL081219134223390 - PRIMARY KEY (STATESET_ID); -ALTER TABLE STEPMATRIXELEMENT - ADD CONSTRAINT SQL081219134223500 - PRIMARY KEY (DISCRETECHARSTATE_ID); -ALTER TABLE STUDY_NEXUSFILE - ADD CONSTRAINT SQL081219134224240 - PRIMARY KEY (STUDY_ID, FILENAME); -ALTER TABLE STUDY - ADD CONSTRAINT SQL081219134223600 - PRIMARY KEY (STUDY_ID); -ALTER TABLE STUDYSTATUS - ADD CONSTRAINT SQL081219134223710 - PRIMARY KEY (STUDYSTATUS_ID); -ALTER TABLE SUB_MATRIX - ADD CONSTRAINT SQL081219134223910 - PRIMARY KEY (COLLECTION_ID); -ALTER TABLE SUB_TAXONLABEL - ADD CONSTRAINT SQL081219134224020 - PRIMARY KEY (SUBMISSION_ID, TAXONLABEL_ID); -ALTER TABLE SUB_TREEBLOCK - ADD CONSTRAINT SQL081219134224120 - PRIMARY KEY (COLLECTION_ID); -ALTER TABLE SUBMISSION - ADD CONSTRAINT SQL081219134223810 - PRIMARY KEY (SUBMISSION_ID); -ALTER TABLE TAXON - ADD CONSTRAINT SQL081219134224350 - PRIMARY KEY (TAXON_ID); -ALTER TABLE TAXONAUTHORITY - ADD CONSTRAINT SQL081219134224450 - PRIMARY KEY (TAXONAUTHORITY_ID); -ALTER TABLE TAXONLABEL - ADD CONSTRAINT SQL081219134224550 - PRIMARY KEY (TAXONLABEL_ID); -ALTER TABLE TAXONLABELGROUP - ADD CONSTRAINT SQL081219134224650 - PRIMARY KEY (TAXONLABELGROUP_ID); -ALTER TABLE TAXONLABELPARTITION - ADD CONSTRAINT SQL081219134224760 - PRIMARY KEY (TAXONLABELPARTITION_ID); -ALTER TABLE TAXONLABELSET_TAXONLABEL - ADD CONSTRAINT SQL081219134226750 - PRIMARY KEY (TAXONLABELSET_ID, TAXONLABEL_ORDER); -ALTER TABLE TAXONLABELSET - ADD CONSTRAINT SQL081219134226650 - PRIMARY KEY (TAXONLABELSET_ID); -ALTER TABLE TAXONLINK - ADD CONSTRAINT SQL081219134224950 - PRIMARY KEY (TAXONLINK_ID); -ALTER TABLE TAXONSET_TAXON - ADD CONSTRAINT SQL081219134225150 - PRIMARY KEY (TAXONSET_ID, TAXON_ORDER); -ALTER TABLE TAXONSET - ADD CONSTRAINT SQL081219134225050 - PRIMARY KEY (TAXONSET_ID); -ALTER TABLE TAXONVARIANT - ADD CONSTRAINT SQL081219134225250 - PRIMARY KEY (TAXONVARIANT_ID); -ALTER TABLE TREEATTRIBUTE - ADD CONSTRAINT SQL081219134225410 - PRIMARY KEY (TREEATTRIBUTE_ID); -ALTER TABLE TREEBLOCK - ADD CONSTRAINT SQL081219134225510 - PRIMARY KEY (TREEBLOCK_ID); -ALTER TABLE TREEGROUP_PHYLOTREE - ADD CONSTRAINT SQL081219134225720 - PRIMARY KEY (TREEGROUP_ID, PHYLOTREE_ID); -ALTER TABLE TREEGROUP - ADD CONSTRAINT SQL081219134225620 - PRIMARY KEY (TREEGROUP_ID); -ALTER TABLE TREEKIND - ADD CONSTRAINT SQL081219134225820 - PRIMARY KEY (TREEKIND_ID); -ALTER TABLE TREENODEEDGE - ADD CONSTRAINT SQL081219134225930 - PRIMARY KEY (TREENODEEDGE_ID); -ALTER TABLE TREEPARTITION - ADD CONSTRAINT SQL081219134226040 - PRIMARY KEY (TREEPARTITION_ID); -ALTER TABLE TREEQUALITY - ADD CONSTRAINT SQL081219134226140 - PRIMARY KEY (TREEQUALITY_ID); -ALTER TABLE TREESET_PHYLOTREE - ADD CONSTRAINT SQL081219134226340 - PRIMARY KEY (TREESET_ID, TREE_ORDER); -ALTER TABLE TREESET - ADD CONSTRAINT SQL081219134226240 - PRIMARY KEY (TREESET_ID); -ALTER TABLE TREETYPE - ADD CONSTRAINT SQL081219134226440 - PRIMARY KEY (TREETYPE_ID); -ALTER TABLE TYPESET - ADD CONSTRAINT SQL081219134226550 - PRIMARY KEY (TYPESET_ID); -ALTER TABLE "user" - ADD CONSTRAINT SQL081219134226850 - PRIMARY KEY (USER_ID); -ALTER TABLE USERROLE - ADD CONSTRAINT SQL081219134226960 - PRIMARY KEY (USERROLE_ID); -ALTER TABLE USERTYPE - ADD CONSTRAINT SQL081219134227060 - PRIMARY KEY (USERTYPE_ID); -ALTER TABLE USERTYPERECORD - ADD CONSTRAINT SQL081219134227170 - PRIMARY KEY (USERTYPERECORD_ID); -ALTER TABLE CHARGROUP_COLRANGE - ADD CONSTRAINT SQL081219134219300 - UNIQUE (COLUMNRANGE_ID); -ALTER TABLE CHARSET_COLRANGE - ADD CONSTRAINT SQL081219134219400 - UNIQUE (COLUMNRANGE_ID); -ALTER TABLE CHARWEIGHT_COLRANGE - ADD CONSTRAINT SQL081219134219510 - UNIQUE (COLUMNRANGE_ID); -ALTER TABLE CODERECORD_COLRANGE - ADD CONSTRAINT SQL081219134219610 - UNIQUE (COLUMNRANGE_ID); -ALTER TABLE CODONCHAR1_COLRANGE - ADD CONSTRAINT SQL081219134219710 - UNIQUE (COLUMNRANGE_ID); -ALTER TABLE CODONCHAR2_COLRANGE - ADD CONSTRAINT SQL081219134219810 - UNIQUE (COLUMNRANGE_ID); -ALTER TABLE CODONCHAR3_COLRANGE - ADD CONSTRAINT SQL081219134219910 - UNIQUE (COLUMNRANGE_ID); -ALTER TABLE CODONNONCODING_COLRANGE - ADD CONSTRAINT SQL081219134220010 - UNIQUE (COLUMNRANGE_ID); -ALTER TABLE COMPOUND_ELEMENT - ADD CONSTRAINT SQL081219134219010 - UNIQUE (ELEMENT_ID); -ALTER TABLE SUB_MATRIX - ADD CONSTRAINT SQL081219134223920 - UNIQUE (MATRIX_ID); -ALTER TABLE SUB_TAXONLABEL - ADD CONSTRAINT SQL081219134224030 - UNIQUE (TAXONLABEL_ID); -ALTER TABLE SUB_TREEBLOCK - ADD CONSTRAINT SQL081219134224130 - UNIQUE (TREEBLOCK_ID); -ALTER TABLE SUBMISSION - ADD CONSTRAINT SQL081219134223811 - UNIQUE (STUDY_ID); -ALTER TABLE "user" - ADD CONSTRAINT SQL081219134226851 - UNIQUE (USERNAME); -ALTER TABLE USERTYPERRD_COLRANGE - ADD CONSTRAINT SQL081219134227270 - UNIQUE (COLUMNRANGE_ID); -ALTER TABLE ALGORITHM - ADD CONSTRAINT FKB388C44FC6E814E6 - FOREIGN KEY(GAPMODE_ID) - REFERENCES GAPMODE(GAPMODE_ID) - ON DELETE NO ACTION - ON UPDATE NO ACTION; -ALTER TABLE ALGORITHM - ADD CONSTRAINT FKB388C44F9698D32E - FOREIGN KEY(POLYTCOUNT_ID) - REFERENCES POLYTCOUNT(POLYTCOUNT_ID) - ON DELETE NO ACTION - ON UPDATE NO ACTION; -ALTER TABLE ALGORITHM - ADD CONSTRAINT FKB388C44F92E6A38E - FOREIGN KEY(USERTYPE_ID) - REFERENCES USERTYPE(USERTYPE_ID) - ON DELETE NO ACTION - ON UPDATE NO ACTION; -ALTER TABLE ANALYSIS - ADD CONSTRAINT FKF19622DC3C572C3C - FOREIGN KEY(STUDY_ID) - REFERENCES STUDY(STUDY_ID) - ON DELETE NO ACTION - ON UPDATE NO ACTION; -ALTER TABLE ANALYSISSTEP - ADD CONSTRAINT FK21F853A8D1884DD8 - FOREIGN KEY(ANALYSIS_ID) - REFERENCES ANALYSIS(ANALYSIS_ID) - ON DELETE NO ACTION - ON UPDATE NO ACTION; -ALTER TABLE ANALYSISSTEP - ADD CONSTRAINT FK21F853A865EDD5F8 - FOREIGN KEY(SOFTWARE_ID) - REFERENCES SOFTWARE(SOFTWARE_ID) - ON DELETE NO ACTION - ON UPDATE NO ACTION; -ALTER TABLE ANALYSISSTEP - ADD CONSTRAINT FK21F853A848A2817C - FOREIGN KEY(ALGORITHM_ID) - REFERENCES ALGORITHM(ALGORITHM_ID) - ON DELETE NO ACTION - ON UPDATE NO ACTION; -ALTER TABLE ANALYZEDDATA - ADD CONSTRAINT FK8C961842B710CB23 - FOREIGN KEY(PHYLOTREE_ID) - REFERENCES PHYLOTREE(PHYLOTREE_ID) - ON DELETE NO ACTION - ON UPDATE NO ACTION; -ALTER TABLE ANALYZEDDATA - ADD CONSTRAINT FK8C96184255961AEE - FOREIGN KEY(MATRIX_ID) - REFERENCES MATRIX(MATRIX_ID) - ON DELETE NO ACTION - ON UPDATE NO ACTION; -ALTER TABLE ANALYZEDDATA - ADD CONSTRAINT FK8C9618424BA97F78 - FOREIGN KEY(ANALYSISSTEP_ID) - REFERENCES ANALYSISSTEP(ANALYSISSTEP_ID) - ON DELETE NO ACTION - ON UPDATE NO ACTION; -ALTER TABLE ANCESTRALSTATE - ADD CONSTRAINT FK3FA14284F4803CE6 - FOREIGN KEY(DISCRETECHARSTATE_ID) - REFERENCES DISCRETECHARSTATE(DISCRETECHARSTATE_ID) - ON DELETE NO ACTION - ON UPDATE NO ACTION; -ALTER TABLE ANCESTRALSTATE - ADD CONSTRAINT FK3FA14284684F6406 - FOREIGN KEY(ANCSTATESET_ID) - REFERENCES ANCSTATESET(ANCSTATESET_ID) - ON DELETE NO ACTION - ON UPDATE NO ACTION; -ALTER TABLE ANCSTATESET - ADD CONSTRAINT FK879339E7A414944F - FOREIGN KEY(MATRIX_ID) - REFERENCES MATRIX(MATRIX_ID) - ON DELETE NO ACTION - ON UPDATE NO ACTION; -ALTER TABLE CHARGROUP_COLRANGE - ADD CONSTRAINT FKB2D8C293971FFFA6 - FOREIGN KEY(CHARGROUP_ID) - REFERENCES CHARGROUP(CHARGROUP_ID) - ON DELETE NO ACTION - ON UPDATE NO ACTION; -ALTER TABLE CHARGROUP_COLRANGE - ADD CONSTRAINT FKB2D8C29379A523E6 - FOREIGN KEY(COLUMNRANGE_ID) - REFERENCES COLUMNRANGE(COLUMNRANGE_ID) - ON DELETE NO ACTION - ON UPDATE NO ACTION; -ALTER TABLE CHARGROUP - ADD CONSTRAINT FK3AF18C91AA11DC6 - FOREIGN KEY(CHARPARTITION_ID) - REFERENCES CHARPARTITION(CHARPARTITION_ID) - ON DELETE NO ACTION - ON UPDATE NO ACTION; -ALTER TABLE CHARPARTITION - ADD CONSTRAINT FKDEA9F834A414944F - FOREIGN KEY(MATRIX_ID) - REFERENCES MATRIX(MATRIX_ID) - ON DELETE NO ACTION - ON UPDATE NO ACTION; -ALTER TABLE CHARSET_COLRANGE - ADD CONSTRAINT FK2CBD9079A523E6 - FOREIGN KEY(COLUMNRANGE_ID) - REFERENCES COLUMNRANGE(COLUMNRANGE_ID) - ON DELETE NO ACTION - ON UPDATE NO ACTION; -ALTER TABLE CHARSET_COLRANGE - ADD CONSTRAINT FK2CBD90416D5B50 - FOREIGN KEY(CHARSET_ID) - REFERENCES CHARSET(CHARSET_ID) - ON DELETE NO ACTION - ON UPDATE NO ACTION; -ALTER TABLE CHARSET - ADD CONSTRAINT FK56D8ED2CA414944F - FOREIGN KEY(MATRIX_ID) - REFERENCES MATRIX(MATRIX_ID) - ON DELETE NO ACTION - ON UPDATE NO ACTION; -ALTER TABLE CHARWEIGHT_COLRANGE - ADD CONSTRAINT FK54CA674EF9A75EE - FOREIGN KEY(CHARWEIGHT_ID) - REFERENCES CHARWEIGHT(CHARWEIGHT_ID) - ON DELETE NO ACTION - ON UPDATE NO ACTION; -ALTER TABLE CHARWEIGHT_COLRANGE - ADD CONSTRAINT FK54CA674E79A523E6 - FOREIGN KEY(COLUMNRANGE_ID) - REFERENCES COLUMNRANGE(COLUMNRANGE_ID) - ON DELETE NO ACTION - ON UPDATE NO ACTION; -ALTER TABLE CHARWEIGHT - ADD CONSTRAINT FK8CC7694EE9B425A6 - FOREIGN KEY(CHARWEIGHTSET_ID) - REFERENCES CHARWEIGHTSET(CHARWEIGHTSET_ID) - ON DELETE NO ACTION - ON UPDATE NO ACTION; -ALTER TABLE CHARWEIGHTSET - ADD CONSTRAINT FK99B8AC34A414944F - FOREIGN KEY(MATRIX_ID) - REFERENCES MATRIX(MATRIX_ID) - ON DELETE NO ACTION - ON UPDATE NO ACTION; -ALTER TABLE CITATION_AUTHOR - ADD CONSTRAINT FK24AA55E38E1E4DF8 - FOREIGN KEY(CITATION_ID) - REFERENCES CITATION(CITATION_ID) - ON DELETE NO ACTION - ON UPDATE NO ACTION; -ALTER TABLE CITATION_AUTHOR - ADD CONSTRAINT FK24AA55E36707573B - FOREIGN KEY(AUTHORS_PERSON_ID) - REFERENCES PERSON(PERSON_ID) - ON DELETE NO ACTION - ON UPDATE NO ACTION; -ALTER TABLE CITATION_EDITOR - ADD CONSTRAINT FK2A8955C5EC93F501 - FOREIGN KEY(CITATION_ID) - REFERENCES CITATION(CITATION_ID) - ON DELETE NO ACTION - ON UPDATE NO ACTION; -ALTER TABLE CITATION_EDITOR - ADD CONSTRAINT FK2A8955C568F6F619 - FOREIGN KEY(EDITORS_PERSON_ID) - REFERENCES PERSON(PERSON_ID) - ON DELETE NO ACTION - ON UPDATE NO ACTION; -ALTER TABLE CITATION - ADD CONSTRAINT FKD8A7FAE74C983658 - FOREIGN KEY(CITATIONSTATUS_ID) - REFERENCES CITATIONSTATUS(CITATIONSTATUS_ID) - ON DELETE NO ACTION - ON UPDATE NO ACTION; -ALTER TABLE CODERECORD_COLRANGE - ADD CONSTRAINT FKA3E6C61EDC51C546 - FOREIGN KEY(GENETICCODERECORD_ID) - REFERENCES GENETICCODERECORD(GENETICCODERECORD_ID) - ON DELETE NO ACTION - ON UPDATE NO ACTION; -ALTER TABLE CODERECORD_COLRANGE - ADD CONSTRAINT FKA3E6C61E79A523E6 - FOREIGN KEY(COLUMNRANGE_ID) - REFERENCES COLUMNRANGE(COLUMNRANGE_ID) - ON DELETE NO ACTION - ON UPDATE NO ACTION; -ALTER TABLE CODONCHAR1_COLRANGE - ADD CONSTRAINT FKDA5AD4F879A523E6 - FOREIGN KEY(COLUMNRANGE_ID) - REFERENCES COLUMNRANGE(COLUMNRANGE_ID) - ON DELETE NO ACTION - ON UPDATE NO ACTION; -ALTER TABLE CODONCHAR1_COLRANGE - ADD CONSTRAINT FKDA5AD4F8491DB20E - FOREIGN KEY(CODONPOSITIONSET_ID) - REFERENCES CODONPOSITIONSET(CODONPOSITIONSET_ID) - ON DELETE NO ACTION - ON UPDATE NO ACTION; -ALTER TABLE CODONCHAR2_COLRANGE - ADD CONSTRAINT FKCEA4461779A523E6 - FOREIGN KEY(COLUMNRANGE_ID) - REFERENCES COLUMNRANGE(COLUMNRANGE_ID) - ON DELETE NO ACTION - ON UPDATE NO ACTION; -ALTER TABLE CODONCHAR2_COLRANGE - ADD CONSTRAINT FKCEA44617491DB20E - FOREIGN KEY(CODONPOSITIONSET_ID) - REFERENCES CODONPOSITIONSET(CODONPOSITIONSET_ID) - ON DELETE NO ACTION - ON UPDATE NO ACTION; -ALTER TABLE CODONCHAR3_COLRANGE - ADD CONSTRAINT FKC2EDB73679A523E6 - FOREIGN KEY(COLUMNRANGE_ID) - REFERENCES COLUMNRANGE(COLUMNRANGE_ID) - ON DELETE NO ACTION - ON UPDATE NO ACTION; -ALTER TABLE CODONCHAR3_COLRANGE - ADD CONSTRAINT FKC2EDB736491DB20E - FOREIGN KEY(CODONPOSITIONSET_ID) - REFERENCES CODONPOSITIONSET(CODONPOSITIONSET_ID) - ON DELETE NO ACTION - ON UPDATE NO ACTION; -ALTER TABLE CODONNONCODING_COLRANGE - ADD CONSTRAINT FK307897FC79A523E6 - FOREIGN KEY(COLUMNRANGE_ID) - REFERENCES COLUMNRANGE(COLUMNRANGE_ID) - ON DELETE NO ACTION - ON UPDATE NO ACTION; -ALTER TABLE CODONNONCODING_COLRANGE - ADD CONSTRAINT FK307897FC491DB20E - FOREIGN KEY(CODONPOSITIONSET_ID) - REFERENCES CODONPOSITIONSET(CODONPOSITIONSET_ID) - ON DELETE NO ACTION - ON UPDATE NO ACTION; -ALTER TABLE CODONPOSITIONSET - ADD CONSTRAINT FK4E501CC2A414944F - FOREIGN KEY(MATRIX_ID) - REFERENCES MATRIX(MATRIX_ID) - ON DELETE NO ACTION - ON UPDATE NO ACTION; -ALTER TABLE COMPOUND_ELEMENT - ADD CONSTRAINT FK311830485F4F7CEB - FOREIGN KEY(COMPOUND_ID) - REFERENCES MATRIXELEMENT(MATRIXELEMENT_ID) - ON DELETE NO ACTION - ON UPDATE NO ACTION; -ALTER TABLE COMPOUND_ELEMENT - ADD CONSTRAINT FK31183048459091E5 - FOREIGN KEY(ELEMENT_ID) - REFERENCES MATRIXELEMENT(MATRIXELEMENT_ID) - ON DELETE NO ACTION - ON UPDATE NO ACTION; -ALTER TABLE CONTANCSTATE_VALUE - ADD CONSTRAINT FKA84B8C3FD450D2BD - FOREIGN KEY(ANCSTATE_ID) - REFERENCES ANCESTRALSTATE(ANCESTRALSTATE_ID) - ON DELETE NO ACTION - ON UPDATE NO ACTION; -ALTER TABLE CSTREENODE - ADD CONSTRAINT FK82B9AB10F572A92 - FOREIGN KEY(PARENTNODE_ID) - REFERENCES CSTREENODE(CSTREENODE_ID) - ON DELETE NO ACTION - ON UPDATE NO ACTION; -ALTER TABLE... [truncated message content] |
From: <lol...@us...> - 2011-07-11 19:11:23
|
Revision: 927 http://treebase.svn.sourceforge.net/treebase/?rev=927&view=rev Author: loloyohe Date: 2011-07-11 19:11:16 +0000 (Mon, 11 Jul 2011) Log Message: ----------- Extended fromTreeBaseToXml() methods to include more row-segment metadata annotations. Modified Paths: -------------- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlMatrixConverter.java Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlMatrixConverter.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlMatrixConverter.java 2011-06-29 15:09:55 UTC (rev 926) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlMatrixConverter.java 2011-07-11 19:11:16 UTC (rev 927) @@ -377,14 +377,98 @@ attachTreeBaseID((Annotatable)xmlCell,tbCell,DiscreteMatrixElement.class); for ( RowSegment tbSegment : tbSegments ) { if ( tbSegment.getStartIndex() <= charIndex && charIndex <= tbSegment.getEndIndex() ) { + //declare variables for row-segment annotations + String title = tbSegment.getTitle(); + String institutionCode = tbSegment.getSpecimenLabel().getInstAcronym(); + String collectionCode = tbSegment.getSpecimenLabel().getCollectionCode(); + String catalogNumber = tbSegment.getSpecimenLabel().getCatalogNumber(); + String accessionNumber = tbSegment.getSpecimenLabel().getGenBankAccession(); + String otherAccessionNumber = tbSegment.getSpecimenLabel().getOtherAccession(); + String dateSampled = tbSegment.getSpecimenLabel().getSampleDateString(); + String scientificName = tbSegment.getSpecimenTaxonLabelAsString(); + String collector = tbSegment.getSpecimenLabel().getCollector(); Double latitude = tbSegment.getSpecimenLabel().getLatitude(); Double longitude = tbSegment.getSpecimenLabel().getLongitude(); + Double elevation = tbSegment.getSpecimenLabel().getElevation(); + String country = tbSegment.getSpecimenLabel().getCountry(); + String state = tbSegment.getSpecimenLabel().getState(); + String locality = tbSegment.getSpecimenLabel().getLocality(); + String notes = tbSegment.getSpecimenLabel().getNotes(); + + //if the value is not null, output the xmlOTU annotation. + //DwC refers to the Darwin Core term vocabulary for the associated annotation + if (null != title){ + //output name identifying the data set from which the record was derived + ((Annotatable)xmlCell).addAnnotationValue("DwC:datasetName", Constants.DwCURI, title); + } + if ( null != institutionCode ) { + //output name or acronym of institution that has custody of information referred to in record + ((Annotatable)xmlCell).addAnnotationValue("DwC:institutionCode", Constants.DwCURI, institutionCode); + } + if ( null != collectionCode ) { + //output name or code that identifies collection or data set from which record was derived + ((Annotatable)xmlCell).addAnnotationValue ("DwC:collectionCode", Constants.DwCURI, collectionCode); + } + if ( null != catalogNumber ){ + //output unique (usually) identifier for the record within data set or collection + ((Annotatable)xmlCell).addAnnotationValue("DwC:catalogNumber", Constants.DwCURI, catalogNumber); + } + if ( null != accessionNumber) { + //output a list of genetic sequence information associated with occurrence + ((Annotatable)xmlCell).addAnnotationValue("DwC:associatedSequences", Constants.DwCURI, accessionNumber); + } + if ( null != otherAccessionNumber ) { + //list of previous or alternate fully catalog numbers (i.e. Genbank) or human-used identifiers + ((Annotatable)xmlCell).addAnnotationValue("DwC:otherCatalogNumbers", Constants.DwCURI, otherAccessionNumber); + } + if ( null != dateSampled ) { + //output date sampled in ISO 8601 format + ((Annotatable)xmlCell).addAnnotationValue("DwC:eventDate", Constants.DwCURI, dateSampled); + } + if ( null != scientificName ) { + //output full scientific name + ((Annotatable)xmlCell).addAnnotationValue("DwC:scientificName", Constants.DwCURI, scientificName); + } + if ( null != collector ) { + //output names of people associated with recording of original occurrence + ((Annotatable)xmlCell).addAnnotationValue("DwC:recordedBy", Constants.DwCURI, collector); + } if ( null != latitude ) { - ((Annotatable)xmlCell).addAnnotationValue("DwC:DecimalLatitude", Constants.DwCURI, latitude); + //output geographic latitude in decimal degrees using geodeticDatum spatial reference system + ((Annotatable)xmlCell).addAnnotationValue("DwC:decimalLatitude", Constants.DwCURI, latitude); } if ( null != longitude ) { - ((Annotatable)xmlCell).addAnnotationValue("DwC:DecimalLongitude", Constants.DwCURI, longitude); + //output geographic longitude in decimal degrees using geodeticDatum spatial reference system + ((Annotatable)xmlCell).addAnnotationValue("DwC:decimalLongitude", Constants.DwCURI, longitude); } + if ( null != elevation ) { + //there are two different Darwin Core terms for elevation depending on elevation value + //outputs geographic elevation of sample + if ( elevation >= 0) { + //above local surface in meters + ((Annotatable)xmlCell).addAnnotationValue("DwC:verbatimElevation", Constants.DwCURI, elevation); + } + else { + //below local surface in meters + ((Annotatable)xmlCell).addAnnotationValue("DwC:verbatimDepth", Constants.DwCURI, elevation); + } + } + if ( null != country ) { + //output country in which location occurs + ((Annotatable)xmlCell).addAnnotationValue("DwC:country", Constants.DwCURI, country); + } + if ( null != state ) { + //output name of next smaller administrative region than country (i.e. state, province, region) + ((Annotatable)xmlCell).addAnnotationValue ("DwC:stateProvince", Constants.DwCURI, state); + } + if ( null != locality) { + //output brief description of sample location + ((Annotatable)xmlCell).addAnnotationValue("DwC:locality", Constants.DwCURI, locality); + } + if ( null != notes ) { + //output any additional information about specimen + ((Annotatable)xmlCell).addAnnotationValue("DwC:occurenceRemarks", Constants.DwCURI, notes); + } } } charIndex++; @@ -404,30 +488,98 @@ xmlMatrix.setSeq(seq,xmlOTU); } for ( RowSegment tbSegment : tbSegments ) { + //declare variables for row-segment annotations + String title = tbSegment.getTitle(); + String institutionCode = tbSegment.getSpecimenLabel().getInstAcronym(); + String collectionCode = tbSegment.getSpecimenLabel().getCollectionCode(); + String catalogNumber = tbSegment.getSpecimenLabel().getCatalogNumber(); String accessionNumber = tbSegment.getSpecimenLabel().getGenBankAccession(); + String otherAccessionNumber = tbSegment.getSpecimenLabel().getOtherAccession(); + String dateSampled = tbSegment.getSpecimenLabel().getSampleDateString(); + String scientificName = tbSegment.getSpecimenTaxonLabelAsString(); + String collector = tbSegment.getSpecimenLabel().getCollector(); Double latitude = tbSegment.getSpecimenLabel().getLatitude(); Double longitude = tbSegment.getSpecimenLabel().getLongitude(); Double elevation = tbSegment.getSpecimenLabel().getElevation(); - String collector = tbSegment.getSpecimenLabel().getCollector(); String country = tbSegment.getSpecimenLabel().getCountry(); + String state = tbSegment.getSpecimenLabel().getState(); + String locality = tbSegment.getSpecimenLabel().getLocality(); + String notes = tbSegment.getSpecimenLabel().getNotes(); + + //if the value is not null, output the xmlOTU annotation. + //DwC refers to the Darwin Core term vocabulary for the associated annotation + if (null != title){ + //output name identifying the data set from which the record was derived + xmlOTU.addAnnotationValue("DwC:datasetName", Constants.DwCURI, title); + } + if ( null != institutionCode ) { + //output name or acronym of institution that has custody of information referred to in record + xmlOTU.addAnnotationValue("DwC:institutionCode", Constants.DwCURI, institutionCode); + } + if ( null != collectionCode ) { + //output name or code that identifies collection or data set from which record was derived + xmlOTU.addAnnotationValue ("DwC:collectionCode", Constants.DwCURI, collectionCode); + } + if ( null != catalogNumber ){ + //output unique (usually) identifier for the record within data set or collection + xmlOTU.addAnnotationValue("DwC:catalogNumber", Constants.DwCURI, catalogNumber); + } if ( null != accessionNumber) { - xmlOTU.addAnnotationValue("DwC:StringGenbankAcessionNumber", Constants.DwCURI, accessionNumber); + //output a list of genetic sequence information associated with occurrence + xmlOTU.addAnnotationValue("DwC:associatedSequences", Constants.DwCURI, accessionNumber); } + if ( null != otherAccessionNumber ) { + //list of previous or alternate fully catalog numbers (i.e. Genbank) or human-used identifiers + xmlOTU.addAnnotationValue("DwC:otherCatalogNumbers", Constants.DwCURI, otherAccessionNumber); + } + if ( null != dateSampled ) { + //output date sampled in ISO 8601 format + xmlOTU.addAnnotationValue("DwC:eventDate", Constants.DwCURI, dateSampled); + } + if ( null != scientificName ) { + //output full scientific name + xmlOTU.addAnnotationValue("DwC:scientificName", Constants.DwCURI, scientificName); + } + if ( null != collector ) { + //output names of people associated with recording of original occurrence + xmlOTU.addAnnotationValue("DwC:recordedBy", Constants.DwCURI, collector); + } if ( null != latitude ) { - xmlOTU.addAnnotationValue("DwC:DecimalLatitude", Constants.DwCURI, latitude); + //output geographic latitude in decimal degrees using geodeticDatum spatial reference system + xmlOTU.addAnnotationValue("DwC:decimalLatitude", Constants.DwCURI, latitude); } if ( null != longitude ) { - xmlOTU.addAnnotationValue("DwC:DecimalLongitude", Constants.DwCURI, longitude); + //output geographic longitude in decimal degrees using geodeticDatum spatial reference system + xmlOTU.addAnnotationValue("DwC:decimalLongitude", Constants.DwCURI, longitude); } if ( null != elevation ) { - xmlOTU.addAnnotationValue("DwC:DecimalElevation", Constants.DwCURI, elevation); + //there are two different Darwin Core terms for elevation depending on elevation value + //outputs geographic elevation of sample + if ( elevation >= 0) { + //above local surface in meters + xmlOTU.addAnnotationValue("DwC:verbatimElevation", Constants.DwCURI, elevation); + } + else { + //below local surface in meters + xmlOTU.addAnnotationValue("DwC:verbatimDepth", Constants.DwCURI, elevation); + } } - if ( null != collector ) { - xmlOTU.addAnnotationValue("DwC:StringCollector", Constants.DwCURI, collector); - } if ( null != country ) { - xmlOTU.addAnnotationValue("DwC:StringCountry", Constants.DwCURI, country); + //output country in which location occurs + xmlOTU.addAnnotationValue("DwC:country", Constants.DwCURI, country); } + if ( null != state ) { + //output name of next smaller administrative region than country (i.e. state, province, region) + xmlOTU.addAnnotationValue ("DwC:stateProvince", Constants.DwCURI, state); + } + if ( null != locality) { + //output brief description of sample location + xmlOTU.addAnnotationValue("DwC:locality", Constants.DwCURI, locality); + } + if ( null != notes ) { + //output any additional information about specimen + xmlOTU.addAnnotationValue("DwC:occurenceRemarks", Constants.DwCURI, notes); + } } } } @@ -458,30 +610,98 @@ } Set<RowSegment> tbSegments = tbRow.getSegmentsReadOnly(); for ( RowSegment tbSegment : tbSegments ) { + //declare variables for row-segment annotations + String title = tbSegment.getTitle(); + String institutionCode = tbSegment.getSpecimenLabel().getInstAcronym(); + String collectionCode = tbSegment.getSpecimenLabel().getCollectionCode(); + String catalogNumber = tbSegment.getSpecimenLabel().getCatalogNumber(); String accessionNumber = tbSegment.getSpecimenLabel().getGenBankAccession(); + String otherAccessionNumber = tbSegment.getSpecimenLabel().getOtherAccession(); + String dateSampled = tbSegment.getSpecimenLabel().getSampleDateString(); + String scientificName = tbSegment.getSpecimenTaxonLabelAsString(); + String collector = tbSegment.getSpecimenLabel().getCollector(); Double latitude = tbSegment.getSpecimenLabel().getLatitude(); Double longitude = tbSegment.getSpecimenLabel().getLongitude(); Double elevation = tbSegment.getSpecimenLabel().getElevation(); - String collector = tbSegment.getSpecimenLabel().getCollector(); String country = tbSegment.getSpecimenLabel().getCountry(); + String state = tbSegment.getSpecimenLabel().getState(); + String locality = tbSegment.getSpecimenLabel().getLocality(); + String notes = tbSegment.getSpecimenLabel().getNotes(); + + //if the value is not null, output the xmlOTU annotation. + //DwC refers to the Darwin Core term vocabulary for the associated annotation + if (null != title){ + //output name identifying the data set from which the record was derived + xmlOTU.addAnnotationValue("DwC:datasetName", Constants.DwCURI, title); + } + if ( null != institutionCode ) { + //output name or acronym of institution that has custody of information referred to in record + xmlOTU.addAnnotationValue("DwC:institutionCode", Constants.DwCURI, institutionCode); + } + if ( null != collectionCode ) { + //output name or code that identifies collection or data set from which record was derived + xmlOTU.addAnnotationValue ("DwC:collectionCode", Constants.DwCURI, collectionCode); + } + if ( null != catalogNumber ){ + //output unique (usually) identifier for the record within data set or collection + xmlOTU.addAnnotationValue("DwC:catalogNumber", Constants.DwCURI, catalogNumber); + } if ( null != accessionNumber) { - xmlOTU.addAnnotationValue("DwC:StringGenbankAcessionNumber", Constants.DwCURI, accessionNumber); + //output a list of genetic sequence information associated with occurrence + xmlOTU.addAnnotationValue("DwC:associatedSequences", Constants.DwCURI, accessionNumber); } + if ( null != otherAccessionNumber ) { + //list of previous or alternate fully catalog numbers (i.e. Genbank) or human-used identifiers + xmlOTU.addAnnotationValue("DwC:otherCatalogNumbers", Constants.DwCURI, otherAccessionNumber); + } + if ( null != dateSampled ) { + //output date sampled in ISO 8601 format + xmlOTU.addAnnotationValue("DwC:eventDate", Constants.DwCURI, dateSampled); + } + if ( null != scientificName ) { + //output full scientific name + xmlOTU.addAnnotationValue("DwC:scientificName", Constants.DwCURI, scientificName); + } + if ( null != collector ) { + //output names of people associated with recording of original occurrence + xmlOTU.addAnnotationValue("DwC:recordedBy", Constants.DwCURI, collector); + } if ( null != latitude ) { - xmlOTU.addAnnotationValue("DwC:DecimalLatitude", Constants.DwCURI, latitude); + //output geographic latitude in decimal degrees using geodeticDatum spatial reference system + xmlOTU.addAnnotationValue("DwC:decimalLatitude", Constants.DwCURI, latitude); } if ( null != longitude ) { - xmlOTU.addAnnotationValue("DwC:DecimalLongitude", Constants.DwCURI, longitude); + //output geographic longitude in decimal degrees using geodeticDatum spatial reference system + xmlOTU.addAnnotationValue("DwC:decimalLongitude", Constants.DwCURI, longitude); } if ( null != elevation ) { - xmlOTU.addAnnotationValue("DwC:DecimalElevation", Constants.DwCURI, elevation); + //there are two different Darwin Core terms for elevation depending on elevation value + //outputs geographic elevation of sample + if ( elevation >= 0) { + //above local surface in meters + xmlOTU.addAnnotationValue("DwC:verbatimElevation", Constants.DwCURI, elevation); + } + else { + //below local surface in meters + xmlOTU.addAnnotationValue("DwC:verbatimDepth", Constants.DwCURI, elevation); + } } - if ( null != collector ) { - xmlOTU.addAnnotationValue("DwC:StringCollector", Constants.DwCURI, collector); - } if ( null != country ) { - xmlOTU.addAnnotationValue("DwC:StringCountry", Constants.DwCURI, country); + //output country in which location occurs + xmlOTU.addAnnotationValue("DwC:country", Constants.DwCURI, country); } + if ( null != state ) { + //output name of next smaller administrative region than country (i.e. state, province, region) + xmlOTU.addAnnotationValue ("DwC:stateProvince", Constants.DwCURI, state); + } + if ( null != locality) { + //output brief description of sample location + xmlOTU.addAnnotationValue("DwC:locality", Constants.DwCURI, locality); + } + if ( null != notes ) { + //output any additional information about specimen + xmlOTU.addAnnotationValue("DwC:occurenceRemarks", Constants.DwCURI, notes); + } } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: SourceForge.net <no...@so...> - 2011-06-29 16:32:06
|
Bugs item #3313183, was opened at 2011-06-07 10:08 Message generated for change (Settings changed) made by sfrgpiel You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=3313183&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: ui Group: None >Status: Closed Priority: 7 Private: No Submitted By: William Piel (sfrgpiel) Assigned to: hshyket (hshyket) Summary: Links to download trees don't use purl.org base Initial Comment: In the matrix page, the matrix download links all use purls. e.g. if you go here: http://treebase.org/treebase-web/search/study/matrices.html?id=11618 You can see these links, where purl is used whenever referencing a phylows object: http://purl.org/phylo/treebase/phylows/matrix/TB2:M9145?format=nexml http://purl.org/phylo/treebase/phylows/matrix/TB2:M9145?format=rdf http://purl.org/phylo/treebase/phylows/matrix/TB2:M9145?format=nexus However, the equivalent download links that reference tree objects are not using purl, e.g.: http://treebase.org/treebase-web/phylows/tree/TB2:Tr46502?format=nexml http://treebase.org/treebase-web/phylows/tree/TB2:Tr46502?format=rdf http://treebase.org/treebase-web/phylows/tree/TB2:Tr46502?format=nexus This will cause, for example, Google to try to index these pages, which I don't think would be wise. But also, we want to use purl to encourage people to recognize these as stable URIs to objects in TreeBASE. It is just a matter of changing the above tree links to: http://purl.org/phylo/treebase/phylows/tree/TB2:Tr46502?format=nexml [etc] And note that on dev, this should be the following: http://purl.org/phylo/treebase/dev/phylows/tree/TB2:Tr46502?format=nexml ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=3313183&group_id=248804 |
From: SourceForge.net <no...@so...> - 2011-06-29 15:42:07
|
Bugs item #3303390, was opened at 2011-05-17 11:40 Message generated for change (Settings changed) made by sfrgpiel You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=3303390&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: ui Group: None >Status: Closed Priority: 8 Private: No Submitted By: William Piel (sfrgpiel) Assigned to: hshyket (hshyket) Summary: Some tree newicks do not end in semi-colons Initial Comment: It appears that when TreeBASE downloads trees, the newick string is pulled straight from the "newickstring" field in the phylotree table, instead of being reconstructed on the fly using the nodes and edges. Some of these trees are missing a semi-colon at the end of the newickstring. For example, in study S10830, tree Tr25629 is missing a semi-colon, while tree Tr25630 is not missing the semi-colon. The missing semi-colon can happen as a result of rerooting the tree using PhyloWidget and then saving the new rerooted tree back to the "newickstring" field. But however this creeps in, whenever trees are written, we should check to add a semi-colon to the end of the newick string. For example, all these links end up creating trees in newick, and in each case they are missing the semi-colon for Tr25629: http://www.treebase.org/treebase-web/phylows/tree/TB2:Tr25629?format=nexus http://www.treebase.org/treebase-web/search/downloadAnAnalysisStep.html?analysisid=6642&id=10830 http://www.treebase.org/treebase-web/search/downloadATree.html?id=10830&treeid=25629 http://www.treebase.org/treebase-web/tree_for_phylowidget/TB2:Tr25629 http://purl.org/phylo/treebase/phylows/study/TB2:S10830?format=nexus ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=3303390&group_id=248804 |
From: SourceForge.net <no...@so...> - 2011-06-29 15:29:19
|
Bugs item #3344355, was opened at 2011-06-29 11:29 Message generated for change (Tracker Item Submitted) made by sfrgpiel You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=3344355&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: ui Group: None Status: Open Priority: 9 Private: No Submitted By: William Piel (sfrgpiel) Assigned to: hshyket (hshyket) Summary: NULL pointer exception when deleting tree Initial Comment: When deleting the following tree (either by deleting the tree itself or deleting the parent treeblock): submission_id = 11642 study_id = 11652 treeblock_id = 14731 tree_id = 47096 I get a null pointer exception (it's probably best to test this on treebase-dev). The problem appears to result from some trees lacking a value for phylotree.study_id. It's fairly rare, but very annoying for users, as it forces them to abandon their submissions and start new ones. I have tried replicating the problem on a new submission by re-uploading exactly the same files that were previously uploaded, but I can't replicate it -- all the trees I have uploaded are properly registered with their study_id. This seems to be a rare event, which will make finding the source of the problem difficult. If we fail to find the cause of the problem, one kluge is to relax the requirement that phylotree.study_id be not null for the deletion code to work -- but I don't know that this is possible, and anyway the absence of a proper phylotree.study_id will probably cause problems elsewhere, like in our search interface. So that's not a good solution. Alternatively, how about some code that is triggered each time a submission page for a study is opened, and it then checks that all trees in the submission have study_id values -- if they don't, the problem is corrected. This query finds all cases where this is a problem: select tls.study_id, pt.phylotree_id from phylotree pt join treeblock tb using(treeblock_id) join taxonlabelset tls using (taxonlabelset_id) where pt.study_id IS NULL and tls.study_id IS NOT NULL order by tls.study_id and this query seems to solve the problem (I've run it on treebase-stage and it has fixed the problem there -- subsequently allowing deletion): UPDATE phylotree SET study_id = tls.study_id FROM phylotree pt JOIN treeblock tb USING(treeblock_id) JOIN taxonlabelset tls USING (taxonlabelset_id) WHERE pt.study_id IS NULL AND tls.study_id IS NOT NULL AND phylotree.phylotree_id = pt.phylotree_id Running this update on production will, ultimately, be needed. bp http://treebase-dev.nescent.org/treebase-web/user/deleteATreeBlock.html?treeblockid=14731 Uncaught Exception Encountered java.lang.NullPointerException at org.cipres.treebase.web.controllers.DeleteATreeBlockController.referenceData(DeleteATreeBlockController.java:160) at org.springframework.web.servlet.mvc.SimpleFormController.referenceData(SimpleFormController.java:214) at org.springframework.web.servlet.mvc.AbstractFormController.showForm(AbstractFormController.java:574) at org.springframework.web.servlet.mvc.SimpleFormController.showForm(SimpleFormController.java:198) at org.cipres.treebase.web.controllers.BaseFormController.showForm(BaseFormController.java:171) at org.springframework.web.servlet.mvc.SimpleFormController.showForm(SimpleFormController.java:175) at org.springframework.web.servlet.mvc.AbstractFormController.showNewForm(AbstractFormController.java:338) at org.springframework.web.servlet.mvc.AbstractFormController.handleRequestInternal(AbstractFormController.java:278) at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:858) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:792) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:431) at javax.servlet.http.HttpServlet.service(HttpServlet.java:627) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:164) at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141) at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90) at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:406) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:70) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:217) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:191) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148) at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:90) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:837) at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:640) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1286) at java.lang.Thread.run(Thread.java:636) Cookies: __utmz=[5099126.1305666484.1.1.utmcsr] __utmc=[5099126] __utmb=[5099126.7.10.1309355320] __utma=[5099126.226138284.1305666484.1308419192.1309355320.24] itemToHighlight=[http%3A//treebase-dev.nescent.org/treebase-web/user/treeBlockList.html] JSESSIONID=[802CD543FEEDA1CE0A74F06C94542325] __utmc=[53240375] __utma=[53240375.1924499357.1236724314.1306793973.1309304847.132] __utmz=[53240375.1306793973.131.23.utmccn] ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=3344355&group_id=248804 |
From: <hs...@us...> - 2011-06-29 15:10:01
|
Revision: 926 http://treebase.svn.sourceforge.net/treebase/?rev=926&view=rev Author: hshyket Date: 2011-06-29 15:09:55 +0000 (Wed, 29 Jun 2011) Log Message: ----------- Changing it so that links to Nexus, NeXML and RDF now link to PURL instead of directly to TreeBASE Modified Paths: -------------- trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/study/trees.jsp Modified: trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/study/trees.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/study/trees.jsp 2011-06-29 14:16:56 UTC (rev 925) +++ trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/study/trees.jsp 2011-06-29 15:09:55 UTC (rev 926) @@ -61,7 +61,7 @@ <a href="${taxaURL}">View Taxa</a> </display:column> - <c:set var="baseURL" scope="request" value="/phylows/${tree.phyloWSPath}"/> + <c:set var="baseURL" scope="request" value="${tree.phyloWSPath.purl}"/> <display:column sortable="false" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |