[Gephi-plugins] adding attributes for every node?

Chris Esposito chris.esposito at gmail.com
Wed Sep 28 07:08:36 CEST 2011


Hi,
     I'm finding the attributes API a bit hard to figure out how to put into
use. I'd like to add 2 attributes to every node - a boolean and a list of
integers. This seems like the right start:

        1) AttributeController ac =
Lookup.getDefault().lookup(AttributeController.class);
        2)  AttributeModel am = ac.getModel();
        3) AttributeTable ant = am.getNodeTable();

Is it the case that for a node, attributes correspond to columns in the
attributeTable? Is there one row per node?  If so, do I need to manually add
/ delete rows from this table as nodes come and go in the graph?

Given the node attribute table, it seems to me at this point that I need to
also add 2 columns, using an addColumn call for each. I'd have to make all
of these calls before adding any nodes to the graph as well, I suppose.

Thanks,
Chris

**
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gephi.org/pipermail/gephi-plugins/attachments/20110927/188fe1ff/attachment.html>


More information about the gephi-plugins mailing list