== How Metanodes Are Stored In An XGMML File? == (Under construction) There are three types of nodes in Cytoscape XGMML files. 1. Base Node - node without children. 1. Meta Node - node which has at least one child. 1. Node Reference - pointer to actual node data structure. === Base Node === {{{ }}} A Base Node is a node which has no internal structure. This type of entry has the following members. * '''ID''' - ID of the node. Must be unique. * '''Label''' - Label of the node. * '''Name''' - '''''Type of the node.''''' Base, metaNode or reference. This is a bit confusing, but in XGMML standard, ''type'' attribute is used as XLink ([[http://www.w3.org/TR/2001/REC-xlink-20010627/|XML Linking Language]]). So ''name'' is used to repredent node type in Cytoscape. * '''Attributes''' - Arbitrary number of user attributes. * '''Graphics''' - Graphical information, such as node shape, size, etc. === Metanode === (The example below does not have edges. Will be updated shortly.) {{{ }}} Most of the part is the same as base nodes. The difference is, metanode always has a subgraph, which contains child nodes and edges. To avoid redundancy, nodes and edges in metanodes are references to the actual XML data element. Also, metanode can have metanodes as children. ScooterMorris 04-05-06: This is a good start, and very exciting to see, but I have a number of problems, particularly from the standpoint of being able to read a "normal" XGMML file into Cytoscape: * First, while '''type''' is, indeed part of XLink, within the context of an XGMML document, it must be preceded by its own namespace (e.g. xlink:type), so there will never be any confusion. Further, the spec specifically states that '''type''' is used for the type of an attribute. , so you should definitely use it in that context. * As far as node '''type''' I don't really see a need for typing nodes as you have currently done. A metaNode node should be defined exclusively as the result of containing a element. If a node contains a then it ''must'' be a metaNode. Indeed, any XGMML graph generator will not provide the extra '''name''' attribute, which will cause your reader to incorrectly convert the file to a Cytoscape network. References can be handled cleanly using XLink within the document (e.g. xlink:href="#GAL80"). * The XGMML reader must be able to handle hierarchies -- a might contain a which contains s which might contain s, etc. This will be critical for our application, and any XGMML generator will certainly assume that will be the case. You will also need to be able to handle "real" nodes embedded within an embedded . Its not clear how your current implementation handles this. * Be careful with your use of '''id''' in your example. '''ID''' must always be unique in any DOM-compliant XML language, but doesn't always have to be present. === Example === The example below describes a small graph in xgmml which contains a sub-graph and will import successfully into '''Cytoscape v2.8.2''' with '''metaNodePlugin2 v1.6''' loaded {{{ }}} please note that: * every , and element '''must''' contain a ''label'' attribute. Failure to do so will result in a null-pointer error during the import. * all of the ''xmsns'' attributes in the root element '''must''' be present * the containing the sub-graph '''must''' contain as shown in the example (note the 2 underline characters) * including data associated with , and elements requires an element with the attributes ''name'', ''type'' and ''value'' as shown