Package vg.core.graph

Examples of vg.core.graph.Attribute


  private final String type;
  private final int storableId;
  //-------------------------------------------------------------------------

  public StorableAttribute(final String name, final String value, final String type) {
    this(new Attribute(name, value), type);
  }
View Full Code Here


    this.attribute = attribute;
    this.storableId = getNextId();
    this.type = type;
  }
  public StorableAttribute(final int storableId, final String name, final String value, final String type) {
    this(storableId, new Attribute(name, value), type);
  }
View Full Code Here

    return(this.storableId);
  }
  public synchronized Edge getEdge() {
    Edge e = new Edge(this.source.getVertex(), this.target.getVertex(), this.id);
    for(StorableAttribute bufAttribute : this.attributes) {
      Attribute attr = bufAttribute.getAttribute();
      if(attr != null) {
        e.addAttribute(attr.getName(), attr.getValue());
      }
    }
    return(e);
  }
View Full Code Here

    return(e);
  }
  public synchronized List<Attribute> getAttributes() {
    ArrayList<Attribute>listAttr = new ArrayList<Attribute>();
    for(StorableAttribute bufAttribute : this.attributes) {
      Attribute attr = bufAttribute.getAttribute();
      if(attr != null) {
        listAttr.add(new Attribute(attr.getName(), attr.getValue()));
      }
    }
    return(listAttr);
  }
View Full Code Here

TOP

Related Classes of vg.core.graph.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.