[Gephi-plugins] Proper way of using customized attribute columns

Sébastien Heymann sebastien.heymann at gephi.org
Thu Nov 4 16:10:38 CET 2010


Please do this now, and the plug-in will be publish-able :)

Seb

2010/11/4 Shaun Roach <sroach at alchemyapi.com>

> No,
>
> Sorry, I will next time.
>
> Shaun
>
>
> On Thu, Nov 4, 2010 at 5:45 AM, Sébastien Heymann <
> sebastien.heymann at gephi.org> wrote:
>
>> Hi Shaun,
>>
>> Did you used the Update NBM button isntead of submitting another plug-in?
>>
>> cheers,
>> Seb
>>
>> 2010/11/4 Shaun Roach <sroach at alchemyapi.com>
>>
>>
>>> That was my problem.
>>>
>>> I was using
>>> AttributeModel attributeModel = Lookup.getDefault().lookup(
>>> AttributeController.class).getModel();
>>>
>>> once I changed to
>>> AttributeModel attributeModel = container.getAttributeModel();
>>>
>>> it worked.
>>>
>>> Thanks very much for your help, I'm submitting a new nbm soon.
>>>
>>> Shaun
>>>
>>>
>>>
>>>
>>>>
>>>>
>>>> On Wed, Nov 3, 2010 at 5:08 PM, Mathieu Bastian <
>>>> mathieu.bastian at gmail.com> wrote:
>>>>
>>>>> Shaun,
>>>>>
>>>>> I can't reproduce the problem. Is the 'attributeModel' in your code
>>>>> coming from the container (container.getLoader().getAttributeModel()) as it
>>>>> should be ?
>>>>>
>>>>> Mathieu
>>>>>
>>>>>
>>>>> On Wed, Nov 3, 2010 at 11:48 PM, Mathieu Bastian <
>>>>> mathieu.bastian at gmail.com> wrote:
>>>>>
>>>>>> Hi Shaun,
>>>>>>
>>>>>> That seems correct, I'll check it out if something is wrong on my
>>>>>> side.
>>>>>>
>>>>>> Mathieu
>>>>>>
>>>>>> On Wed, Nov 3, 2010 at 8:25 PM, Shaun Roach <sroach at alchemyapi.com>wrote:
>>>>>>
>>>>>>> Hello,
>>>>>>>
>>>>>>> I am trying to fix my plugin.  On the newest release of Gephi, it
>>>>>>> crashes when I attempt to use new attribute columns.
>>>>>>> Here is how I am trying to set these columns:
>>>>>>>
>>>>>>> AttributeTable nodeTable = attributeModel.getNodeTable();
>>>>>>> AttributeColumn inCol = nodeTable.addColumn("alchemyrelevance",
>>>>>>> "AlchemyAPI Relevance", AttributeType.DOUBLE, AttributeOrigin.DATA, 0.0);
>>>>>>>
>>>>>>> NodeDraft firstNode = container.factory().newNodeDraft();
>>>>>>> firstNode.addAttributeValue(inCol,  0.75);
>>>>>>>
>>>>>>> When I do this I get an exception :
>>>>>>>
>>>>>>> java.lang.IllegalArgumentException: The value column doesn't exist
>>>>>>>         at
>>>>>>> org.gephi.data.attributes.AttributeRowImpl.setValue(AttributeRowImpl.java:109)
>>>>>>>         at
>>>>>>> org.gephi.data.attributes.AttributeRowImpl.setValue(AttributeRowImpl.java:101)
>>>>>>>         at
>>>>>>> org.gephi.io.importer.impl.NodeDraftImpl.addAttributeValue(NodeDraftImpl.java:215)
>>>>>>>         at
>>>>>>> com.alchemyapi.gephi.plugin.AlchemyAction.generate(AlchemyAction.java:151)
>>>>>>>
>>>>>>>
>>>>>>> What's the proper way to put an attribute value into a new NodeDraft
>>>>>>> for my generator?
>>>>>>>
>>>>>>> Thanks for your help!
>>>>>>>
>>>>>>> Shaun
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> gephi-plugins mailing list
>>>>>>> gephi-plugins at lists.gephi.org
>>>>>>> http://gephi.org/mailman/listinfo/gephi-plugins
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> gephi-plugins mailing list
>>>>> gephi-plugins at lists.gephi.org
>>>>> http://gephi.org/mailman/listinfo/gephi-plugins
>>>>>
>>>>>
>>>>
>>>
>>> _______________________________________________
>>> gephi-plugins mailing list
>>> gephi-plugins at lists.gephi.org
>>> http://gephi.org/mailman/listinfo/gephi-plugins
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gephi.org/pipermail/gephi-plugins/attachments/20101104/f8c121ec/attachment-0001.html>


More information about the gephi-plugins mailing list