EthanCerami - 10/11/2005 - Assuming we adopt CyAttributes, we have a bunch of unresolved issues re: access to those attributes that we haven't yet discussed. Here is a quick run-down:

1) I think we should keep CyAttributes as an interface, and then name the implementation CyAttributesImpl.

2) We need some factory methods that return CyAttributes for nodes and edges. Currently, you can obtain node/edge attributes via and (and possibly other ways too, that I am not familiar with.) I'd rather have just one way to get attributes, and preferably, separate it out from (mainly because is already so bloated). Perhaps we could have a factory class like this:

   1 pubic class GlobalAttributes {
   2         public static CyAttributes getNodeAttributes() {...}
   3         public static CyAttributes getEdgeAttributes() {...}
   4 }

3) and have a bunch of "helper" methods that set/get attribute values. For example:

   1   public static String[] getNodeAttributesList () {
   2   public static String[] getNodeAttributesList ( Node[] nodes ) {
   3   public static String[] getEdgeAttributesList () {
   4   public static String[] getNodeAttributesList ( Edge[] edges ) {
   5   public static boolean setNodeAttributeValue ( Node node, String   
   6         attribute, Object value )
   7   public static boolean setEdgeAttributeValue ( Edge edge, String 
   8         attribute, Object value )

I think we need to deprecate all of these, and eventually remove them altogether. People should just use CyAttributes directly, and why complicate things by providing the same functionality via three different interfaces?

4) We have the following code in and in

   1   public static CytoscapeData getNodeNetworkData () 
   2   public static CytoscapeData getEdgeNetworkData ()

   1   public CytoscapeData getNodeAttributes();
   2   public CytoscapeData getEdgeAttributes();
   3   public CytoscapeData getNodeData ();
   4   public CytoscapeData getEdgeData ();

I think these need to be reverted back to return GraphObjAttributes.

GaryBader - Oct.12.2005 - I favor all of these changes except the GlobalAttributes class. I think there should just be two methods on the Cytoscape class:

   1         public static CyAttributes getNodeAttributes() {...}
   2         public static CyAttributes getEdgeAttributes() {...}

that handle global attributes and that's it. The Cytoscape class can later be reduced, but getting global attributes is such a core action that I think it's fine for it to be there. I.e. we want to make the very common actions, like getting attributes, easy.

RFC_1/RFC1_Comment_Global_Attribute_Access (last edited 2009-02-12 01:04:12 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