Describe RFC 1/RFC1 Comment Lists here.

IlianaAvila, 9/30/05 - What do you think of using Colt (http://dsd.lbl.gov/~hoschek/colt/api/index.html) for the backend implementation of Lists? This way we don't have to convert from Double to double, Integer to integer, etc.

IlianaAvila - 9/30/05- Since the methods are returning wrapper objects, ignore the comment above.

RowanChristmas - 10/03/05 - I don't like being able to have the user get direct access to Lists and Maps. It doesn't allow us to enforce, at compile time, what objects are actually going to be stored. I preferred, and this mirrors what CyData/CyDataDefinition has, is to have this class provide the List/Map methods itself, and force manipulations.

Current:

   1 List list = new ArrayList();
   2 list.add( new Double(5) );
   3 list.add( new Booolean(true) );
   4 
   5 CyAttributes.add(id, att, list );
   6 //---> exceptions thrown
   7 

Rowan preferred:

   1 CyAttribute.addListAttributeValue( id, att, new Double(5) );
   2 CyAttribute.addListAttributeValue( id, att, new Booloean(true) );
   3 //----> exceptions thrown
   4 

There is also the question of what happens when I set a single value, then set a list....does the single value get overwritten? What about for Maps?

EthanCerami - 10/4/05 - In Rowan's original interface for CytoscapeData, we had the following:

   1 public int addAttributeListValue (String identifier, String attribute, 
   2    Object value);
   3 

This won't enforce data typing at compile time either. Of course, neither will the new setAttributeList() method. So, I don't think we can use the compile-time check as a valid criteria to compare the two approaches. However, on grounds of simplicity of API, I would much rather see just one method with clear run-time checks over the 4-5 methods that Rowan's approach would require.

To Rowan's second point, if I set a single value, and then set a list, then the single value would be overwritten. I think that's OK, and not very confusing.

EthanCerami - 10/4/05 - Subgroup (Nerius, Iliana, Ethan) agreed to go with single set of getters/setters for Lists and Maps, e.g. we vote to go with setAttributeList(List list), and setAttributeMap(Map map).

James McIninch - 10/6/05 - Why not simplify things even more? A single value could be just a list of length one. A map could be just a nested instance of CyAttributes.

RFC_1/RFC1_Comment_Lists (last edited 2009-02-12 01:04:11 by localhost)

Funding for Cytoscape is provided by a federal grant from the U.S. National Institute of General Medical Sciences (NIGMS) of the Na tional Institutes of Health (NIH) under award number GM070743-01. Corporate funding is provided through a contract from Unilever PLC.

MoinMoin Appliance - Powered by TurnKey Linux