Package com.ojn.gexf4j.core.data

Examples of com.ojn.gexf4j.core.data.Attribute


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


      .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")
View Full Code Here

    }
  }
 
  @Test
  public void getAttributeValues() {
    Attribute attrib = new AttributeImpl(AttributeType.STRING, "test", AttributeClass.EDGE);
    AttributeValue av = attrib.createValue("testing");
   
    int a = e.getAttributeValues().size();
    e.getAttributeValues().add(av);
    int b = e.getAttributeValues().size();
   
View Full Code Here

    n.setLabel(null);
  }
 
  @Test
  public void getAttributeValues() {
    Attribute attrib = new AttributeImpl(AttributeType.STRING, "test", AttributeClass.NODE);
    AttributeValue av = attrib.createValue("testing");
    Node n = newNode(UUID.randomUUID().toString());
   
    int a = n.getAttributeValues().size();
    n.getAttributeValues().add(av);
    int b = n.getAttributeValues().size();
View Full Code Here

    checkArgument(id != null, "ID cannot be null.");
    checkArgument(!id.trim().isEmpty(), "ID cannot be empty or blank.");
    checkArgument(title != null, "Title cannot be null.");
    checkArgument(!title.trim().isEmpty(), "Title cannot be empty or blank.");
   
    Attribute rv = new AttributeImpl(id, type, title);
    this.add(rv);
    return rv;
  }
View Full Code Here

TOP

Related Classes of com.ojn.gexf4j.core.data.Attribute

Copyright © 2018 www.massapicom. 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.