Examples of GEXF


Examples of com.ojn.gexf4j.core.Gexf

    return "dynamic";
  }
 
  @Override
  public Gexf buildGexf() {
    Gexf gexf = new GexfImpl();
   
    gexf.getMetadata()
      .setLastModified(toDate("2009-03-20"))
      .setCreator("Gexf.net")
      .setDescription("A Web network changing over time");
   
    gexf.getGraph()
      .setStartDate(toDate("2009-01-01"))
      .setEndDate(toDate("2009-03-20"));
   
    AttributeList attrListStatic = new AttributeListImpl(AttributeClass.NODE);
    gexf.getGraph().getAttributeLists().add(attrListStatic);
   
    AttributeList attrListDynamic = new AttributeListImpl(AttributeClass.NODE)
      .setMode(Mode.DYNAMIC);
    gexf.getGraph().getAttributeLists().add(attrListDynamic);
   
    Attribute attUrl = attrListStatic.createAttribute("0", AttributeType.STRING, "url");
    Attribute attFrog = attrListStatic.createAttribute("1", AttributeType.BOOLEAN, "frog")
      .setDefaultValue("true");
   
    Attribute attIndegree = attrListDynamic.createAttribute("2", AttributeType.FLOAT, "indegree");
   
    Node gephi = gexf.getGraph().createNode("0");
    gephi
      .setLabel("Gephi")
      .setStartDate(toDate("2009-03-01"))
      .getAttributeValues()
        .addValue(attUrl, "http://gephi.org")
        .addValue(attIndegree, "1");
   
    Node webatlas = gexf.getGraph().createNode("1");
    webatlas
      .setLabel("Webatlas")
      .getAttributeValues()
        .addValue(attUrl, "http://webatlas.fr");
     
    webatlas.getAttributeValues().createValue(attIndegree, "1")
      .setEndDate(toDate("2009-03-01"));
    webatlas.getAttributeValues().createValue(attIndegree, "2")
      .setStartDate(toDate("2009-03-01"))
      .setEndDate(toDate("2009-03-10"));
    webatlas.getAttributeValues().createValue(attIndegree, "1")
      .setStartDate(toDate("2009-03-10"));
     
    Node rtgi = gexf.getGraph().createNode("2");
    rtgi
      .setLabel("RTGI")
      .getAttributeValues()
        .addValue(attUrl, "http://rtgi.fr");
   
    rtgi.getAttributeValues().createValue(attIndegree, "0")
      .setEndDate(toDate("2009-03-01"));
    rtgi.getAttributeValues().createValue(attIndegree, "1")
      .setStartDate(toDate("2009-03-01"));
   
    rtgi.getSlices().add(new SliceImpl()
      .setEndDate(toDate("2009-03-01")));
    rtgi.getSlices().add(new SliceImpl()
      .setStartDate(toDate("2009-03-05"))
      .setEndDate(toDate("2009-03-10")));
   
    Node blab = gexf.getGraph().createNode("3");
    blab
      .setLabel("BarabasiLab")
      .getAttributeValues()
        .addValue(attUrl, "http://barabasilab.com")
        .addValue(attFrog, "false");
View Full Code Here

Examples of com.ojn.gexf4j.core.Gexf

    return "viz";
  }
 
  @Override
  public Gexf buildGexf() {
    Gexf gexf = new GexfImpl();
   
    gexf
      .setVisualization(true)
      .getGraph().createNode("a")
        .setLabel("glossy")
        .setColor(new ColorImpl(239, 173, 66))
        .setPosition(new PositionImpl(15.783598f, 40.109245f, 0.0f))
View Full Code Here

Examples of com.ojn.gexf4j.core.Gexf

    return "hierarchyInline";
  }
 
  @Override
  public Gexf buildGexf() {
    Gexf gexf = new GexfImpl();
   
    gexf.getGraph()
      .setMode(Mode.STATIC)
      .setDefaultEdgeType(EdgeType.DIRECTED);
   
    Node kb = gexf.getGraph().createNode("a");
    kb.setLabel("Kevin Bacon");
   
    Node god = kb.createNode("b");
    god.setLabel("God");
   
View Full Code Here

Examples of com.ojn.gexf4j.core.Gexf

    return "hierarchyPID";
  }
 
  @Override
  public Gexf buildGexf() {
    Gexf gexf = new GexfImpl();
   
   
    gexf.getGraph()
      .setMode(Mode.STATIC)
      .setDefaultEdgeType(EdgeType.DIRECTED);
   
    Node g = gexf.getGraph().createNode("g");
    g.setLabel("frog2")
      .setPID("e");
   
    Node a = gexf.getGraph().createNode("a");
    a.setLabel("Kevin Bacon");
   
    Node c = gexf.getGraph().createNode("c");
    c.setLabel("human1")
      .setPID("b");
   
        Node b = gexf.getGraph().createNode("b");
    b.setLabel("God")
      .setPID("a");
   
        Node e = gexf.getGraph().createNode("e");
    e.setLabel("Me")
      .setPID("a");
       
        Node d = gexf.getGraph().createNode("d");
    d.setLabel("human2")
      .setPID("b");
   
        Node f = gexf.getGraph().createNode("f");
    f.setLabel("frog1")
      .setPID("e");
   
   
    b.connectTo("0", e);
View Full Code Here

Examples of com.ojn.gexf4j.core.Gexf

    return "basic";
  }
 
  @Override
  public Gexf buildGexf() {
    Gexf gexf = new GexfImpl();
    Graph g = gexf.getGraph();
   
    Node hello = g.createNode("0")
      .setLabel("Hello");
    Node world = g.createNode("1")
      .setLabel("World");
View Full Code Here

Examples of com.ojn.gexf4j.core.Gexf

    return "data";
  }
 
  @Override
  public Gexf buildGexf() {
    Gexf gexf = new GexfImpl();
   
    gexf.getMetadata()
      .setLastModified(toDate("2009-03-20"))
      .setCreator("Gephi.org")
      .setDescription("A Web network");
   
    AttributeList attrList = new AttributeListImpl(AttributeClass.NODE);
    gexf.getGraph().getAttributeLists().add(attrList);
   
    Attribute attUrl = attrList.createAttribute("0", AttributeType.STRING, "url");
    Attribute attIndegree = attrList.createAttribute("1", AttributeType.FLOAT, "indegree");
    Attribute attFrog = attrList.createAttribute("2", AttributeType.BOOLEAN, "frog")
      .setDefaultValue("true");
   
    Node gephi = gexf.getGraph().createNode("0");
    gephi
      .setLabel("Gephi")
      .getAttributeValues()
        .addValue(attUrl, "http://gephi.org")
        .addValue(attIndegree, "1");
   
    Node webatlas = gexf.getGraph().createNode("1");
    webatlas
      .setLabel("Webatlas")
      .getAttributeValues()
        .addValue(attUrl, "http://webatlas.fr")
        .addValue(attIndegree, "2");
   
    Node rtgi = gexf.getGraph().createNode("2");
    rtgi
      .setLabel("RTGI")
      .getAttributeValues()
        .addValue(attUrl, "http://rtgi.fr")
        .addValue(attIndegree, "1");
   
    Node blab = gexf.getGraph().createNode("3");
    blab
      .setLabel("BarabasiLab")
      .getAttributeValues()
        .addValue(attUrl, "http://barabasilab.com")
        .addValue(attIndegree, "1")
View Full Code Here

Examples of com.ojn.gexf4j.core.Gexf

    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;
View Full Code Here

Examples of org.graphstream.stream.file.gexf.GEXF

  Context createContext(Writer w) throws IOException {
    Context ctx = new Context();

    ctx.output = w;
    ctx.closeStreamAtEnd = false;
    ctx.gexf = new GEXF();

    try {
      ctx.stream = new SmartXMLWriter(w, true);
    } catch (Exception e) {
      throw new IOException(e);
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.