RFC Name : Supporting "namespaces" for attributes

Editor(s): ScooterMorris

TableOfContents([2])

About this document

This is an official Request for Comment (RFC) for supporting the concept of namespaces for CyAttributes.

For details on RFCs in general, check out the [http://www.answers.com/main/ntquery?method=4&dsid=2222&dekey=Request+for+Comments&gwp=8&curtab=2222_1&linktext=Request%20for%20Comments Wikipedia Entry: Request for Comments (RFCs)]

Status

6/27/2007: Not yet completely written

How to Comment

To view/add comments, click on any of 'Comment' links below. By adding your ideas to the Wiki directly, we can more easily organize everyone's ideas, and keep clear records. Be sure to include today's date and your name for each comment. Here is an example to get things started: ["/Comment"].

Try to keep your comments as concrete and constructive as possible. For example, if you find a part of the RFC makes no sense, please say so, but don't stop there. Take the extra step and propose alternatives.

Proposal

The proposal is to extend the CyAttributes API to add "namespaces" that would provide some way to scope a name. This is particularly important now that plugin authors are being encouraged to use attributes as the primary way to store information related to a node, edge, or network. Plugin authors are wondering how to make sure their attribute names will be unique. In addition, namespaces would allow us to restrict attributes to specific networks, nodes, or edges, thus simplifying the presentation of attributes to users.

Biological Questions / Use Cases

Backward Compatibility

By default, there could be a "null" namespace, which would be inferred when the existing CyAttributes API is used. In this manner, the existing functionality will be preserved, both in terms of the user expectations and in terms of the API.

Implementation Plan

The plan is to extend the existing APIs as follows:

  1. Cytoscape.getNodeAttributes and Cytoscape.getEdgeAttributes will get additional signatures:
    • Cytoscape.getNodeAttributes(String namespace)
    • Cytoscape.getEdgeAttributes(String namespace)
    The existing signatures will return all node and edge attributes as they currently do.
  2. All get and set routines will get additional signatures to by adding a String namespace argument that will indicate the namespace to be used.

  3. Internal representations of namespaces will need to be determined. Initially, I would imagine that a namespace will simply be some form of prefix or suffix added to the attribute name. This would be scanned as appropriate when setting or getting namespaced attributes. If this turns out to be a bottleneck, we can examine setting up internal maps to the namespaced attributes.

Comments

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