Examples of fromTreeBaseToXml()


Examples of org.cipres.treebase.domain.nexus.nexml.NexmlDocumentWriter.fromTreeBaseToXml()

    // 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
    NexmlDocumentWriter ndc = new NexmlDocumentWriter(tbStudy,getTaxonLabelHome(),nexDoc);
    ndc.fromTreeBaseToXml(tbStudy); // here is where the conversion happens   
   
    attachAnalysisMetadata(analyzedDataForData, tbStudy, nexDoc);   
   
    // attach analysis step metadata to matrices
    for ( Matrix<?> nexMatrix : nexDoc.getMatrices() ) {
View Full Code Here

Examples of org.cipres.treebase.domain.nexus.nexml.NexmlDocumentWriter.fromTreeBaseToXml()

  public void testSerializeStudy() {
    long studyId = 1787;
    Study study = (Study)loadObject(Study.class, studyId);
    Document doc = DocumentFactory.safeCreateDocument();
    NexmlDocumentWriter conv = new NexmlDocumentWriter(study,getTaxonLabelHome(),doc);
    String xml = conv.fromTreeBaseToXml(study).getXmlString();   
    System.out.println(xml);
    Assert.assertNotNull(xml);
  }
 
  public void testSerializeTree() {
View Full Code Here

Examples of org.cipres.treebase.domain.nexus.nexml.NexmlDocumentWriter.fromTreeBaseToXml()

    TreeBlock treeBlock = new TreeBlock();
    treeBlock.setTaxonLabelSet(tls);
    treeBlock.addPhyloTree(tree);
    nds.getTreeBlocks().add(treeBlock);
    NexmlDocumentWriter conv = new NexmlDocumentWriter(tree.getStudy(),getTaxonLabelHome(),doc);
    String xml = conv.fromTreeBaseToXml(nds).getXmlString();
    System.out.println(xml);
    Assert.assertNotNull(xml);
  }
 
  /**
 
View Full Code Here

Examples of org.cipres.treebase.domain.nexus.nexml.NexmlDocumentWriter.fromTreeBaseToXml()

    // 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
    NexmlDocumentWriter ndc = new NexmlDocumentWriter(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();
   
View Full Code Here

Examples of org.cipres.treebase.domain.nexus.nexml.NexmlDocumentWriter.fromTreeBaseToXml()

    Document nexDoc = DocumentFactory.safeCreateDocument();
   
    // the converter populates the NeXML document with the contents of the treebase study
    NexmlDocumentWriter ndc = new NexmlDocumentWriter(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();
   
View Full Code Here

Examples of org.cipres.treebase.domain.nexus.nexml.NexmlDocumentWriter.fromTreeBaseToXml()

    // 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
    NexmlDocumentWriter ndc = new NexmlDocumentWriter(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();
   
    // there most be more than zero matrices because every treebase study has at least one matrix
View Full Code Here

Examples of org.cipres.treebase.domain.nexus.nexml.NexmlDocumentWriter.fromTreeBaseToXml()

    // this becomes an object representation of a NeXML document
    Document nexDoc = DocumentFactory.safeCreateDocument();
   
    // the converter populates the NeXML document with the contents of the treebase study
    NexmlDocumentWriter ndc = new NexmlDocumentWriter(tbStudy,getTaxonLabelHome(),nexDoc);
    ndc.fromTreeBaseToXml(tbStudy); // here is where the conversion happens
       
    // these are the NeXML tree blocks that were created from the study     
    List<org.nexml.model.TreeBlock> nexTreeBlocks = nexDoc.getTreeBlockList();
   
    // there most be more than zero tree blocks in this study
View Full Code Here

Examples of org.cipres.treebase.domain.nexus.nexml.NexmlDocumentWriter.fromTreeBaseToXml()

  }
 
  public void testStudySearchSerialization() {
    Document doc = DocumentFactory.safeCreateDocument();
    NexmlDocumentWriter ndw = new NexmlDocumentWriter(null, mTaxonLabelHome, doc);
    ndw.fromTreeBaseToXml(ssr);
    assertNotNull(doc.getXmlString());
  }
 
  public void testTaxonSearchSerialization() {
    Document doc = DocumentFactory.safeCreateDocument();
View Full Code Here

Examples of org.cipres.treebase.domain.nexus.nexml.NexmlDocumentWriter.fromTreeBaseToXml()

 
  public void testTaxonSearchSerialization() {
    Document doc = DocumentFactory.safeCreateDocument();
    NexmlDocumentWriter ndw = new NexmlDocumentWriter(null, mTaxonLabelHome, doc);   
    TaxonSearchResults tasr = ssr.convertToTaxa();
    ndw.fromTreeBaseToXml(tasr);
    assertNotNull(doc.getXmlString());
  }
 
  public void testMatrixSearchSerialization() {
    Document doc = DocumentFactory.safeCreateDocument();
View Full Code Here

Examples of org.cipres.treebase.domain.nexus.nexml.NexmlDocumentWriter.fromTreeBaseToXml()

 
  public void testMatrixSearchSerialization() {
    Document doc = DocumentFactory.safeCreateDocument();
    NexmlDocumentWriter ndw = new NexmlDocumentWriter(null, mTaxonLabelHome, doc);   
    MatrixSearchResults msr = ssr.convertToMatrices();
    ndw.fromTreeBaseToXml(msr);
    assertNotNull(doc.getXmlString());
  }
 
  public void testTreeSearchSerialization() {
    Document doc = DocumentFactory.safeCreateDocument();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.