Package com.ojn.gexf4j.core.testgraphs

Source Code of com.ojn.gexf4j.core.testgraphs.PhylogenyBuilder

package com.ojn.gexf4j.core.testgraphs;

import com.ojn.gexf4j.core.Gexf;
import com.ojn.gexf4j.core.Node;
import com.ojn.gexf4j.core.impl.GexfImpl;

public class PhylogenyBuilder extends GexfBuilder {

  @Override
  public String getSuffix() {
    return "phylogeny";
  }
 
  @Override
  public Gexf buildGexf() {
    Gexf gexf = new GexfImpl();
   
    Node a = gexf.getGraph().createNode("a");
    a.setLabel("cheese");
   
    Node b = gexf.getGraph().createNode("b");
    b.setLabel("cherry");
   
    Node c = gexf.getGraph().createNode("c");
    c.setLabel("cake");
    c.getParentForList().add(a);
    c.getParentForList().add(b);
   
    return gexf;
  }
}
TOP

Related Classes of com.ojn.gexf4j.core.testgraphs.PhylogenyBuilder

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.