C# Class Smrf.XmlLib.GraphMLXmlDocument

Represents an XML document containing GraphML that represents a graph.
See the "GraphML Primer" for details on the GraphML XML schema:

http://graphml.graphdrawing.org/primer/graphml-primer.html

Creating a GraphMLXmlDocument automatically creates an XML declaration, a root "graphml" XML node, and a "graph" child XML node. Use DefineGraphMLAttribute, AppendVertexXmlNode, AppendEdgeXmlNode, and to populate the document with vertices, edges, and vertex/edge attributes.

Inheritance: System.Xml.XmlDocument
Show file Open project: 2014-sed-team3/term-project Class Usage Examples

Protected Properties

Property Type Description
m_iVertexXmlNodes System.Int32
m_oGraphMLXmlNode System.Xml.XmlNode
m_oGraphXmlNode System.Xml.XmlNode

Public Methods

Method Description
AppendEdgeXmlNode ( String vertex1ID, String vertex2ID ) : XmlNode
AppendGraphMLAttributeValue ( XmlNode edgeOrVertexXmlNode, String attributeID, Double attributeValue ) : void
AppendGraphMLAttributeValue ( XmlNode edgeOrVertexXmlNode, String attributeID, Int32 attributeValue ) : void
AppendGraphMLAttributeValue ( XmlNode edgeOrVertexXmlNode, String attributeID, String attributeValue ) : void
AppendVertexXmlNode ( String vertexID ) : XmlNode
CreateXmlNamespaceManager ( String prefix ) : XmlNamespaceManager
CreateXmlNamespaceManager ( XmlDocument graphMLXmlDocument, String prefix ) : XmlNamespaceManager
DefineEdgeStringGraphMLAttributes ( ) : void
DefineGraphMLAttribute ( System.Boolean forEdge, String attributeID, String attributeName, String attributeType, String defaultAttributeValue ) : void
DefineGraphMLAttributes ( System.Boolean forEdges, String attributeType ) : void
DefineStringGraphMLAttributes ( System.Boolean forEdges ) : void
DefineVertexStringGraphMLAttributes ( ) : void
GetHasVertexXmlNode ( XmlDocument graphMLXmlDocument ) : System.Boolean
GraphMLXmlDocument ( System.Boolean directed ) : System

Initializes a new instance of the GraphMLXmlDocument class.

Protected Methods

Method Description
AppendXmlNode ( XmlNode oParentXmlNode, String sChildName ) : XmlNode
AppendXmlNode ( XmlNode oParentXmlNode, String sChildName, String sInnerText ) : XmlNode
SetXmlNodeAttributes ( XmlNode oXmlNode ) : void

Private Methods

Method Description
AssertValid ( ) : void

Method Details

AppendEdgeXmlNode() public method

public AppendEdgeXmlNode ( String vertex1ID, String vertex2ID ) : XmlNode
vertex1ID String
vertex2ID String
return System.Xml.XmlNode

AppendGraphMLAttributeValue() public method

public AppendGraphMLAttributeValue ( XmlNode edgeOrVertexXmlNode, String attributeID, Double attributeValue ) : void
edgeOrVertexXmlNode System.Xml.XmlNode
attributeID String
attributeValue Double
return void

AppendGraphMLAttributeValue() public method

public AppendGraphMLAttributeValue ( XmlNode edgeOrVertexXmlNode, String attributeID, Int32 attributeValue ) : void
edgeOrVertexXmlNode System.Xml.XmlNode
attributeID String
attributeValue System.Int32
return void

AppendGraphMLAttributeValue() public method

public AppendGraphMLAttributeValue ( XmlNode edgeOrVertexXmlNode, String attributeID, String attributeValue ) : void
edgeOrVertexXmlNode System.Xml.XmlNode
attributeID String
attributeValue String
return void

AppendVertexXmlNode() public method

public AppendVertexXmlNode ( String vertexID ) : XmlNode
vertexID String
return System.Xml.XmlNode

AppendXmlNode() protected method

protected AppendXmlNode ( XmlNode oParentXmlNode, String sChildName ) : XmlNode
oParentXmlNode System.Xml.XmlNode
sChildName String
return System.Xml.XmlNode

AppendXmlNode() protected method

protected AppendXmlNode ( XmlNode oParentXmlNode, String sChildName, String sInnerText ) : XmlNode
oParentXmlNode System.Xml.XmlNode
sChildName String
sInnerText String
return System.Xml.XmlNode

CreateXmlNamespaceManager() public method

public CreateXmlNamespaceManager ( String prefix ) : XmlNamespaceManager
prefix String
return System.Xml.XmlNamespaceManager

CreateXmlNamespaceManager() public static method

public static CreateXmlNamespaceManager ( XmlDocument graphMLXmlDocument, String prefix ) : XmlNamespaceManager
graphMLXmlDocument System.Xml.XmlDocument
prefix String
return System.Xml.XmlNamespaceManager

DefineEdgeStringGraphMLAttributes() public method

public DefineEdgeStringGraphMLAttributes ( ) : void
return void

DefineGraphMLAttribute() public method

public DefineGraphMLAttribute ( System.Boolean forEdge, String attributeID, String attributeName, String attributeType, String defaultAttributeValue ) : void
forEdge System.Boolean
attributeID String
attributeName String
attributeType String
defaultAttributeValue String
return void

DefineGraphMLAttributes() public method

public DefineGraphMLAttributes ( System.Boolean forEdges, String attributeType ) : void
forEdges System.Boolean
attributeType String
return void

DefineStringGraphMLAttributes() public method

public DefineStringGraphMLAttributes ( System.Boolean forEdges ) : void
forEdges System.Boolean
return void

DefineVertexStringGraphMLAttributes() public method

public DefineVertexStringGraphMLAttributes ( ) : void
return void

GetHasVertexXmlNode() public static method

public static GetHasVertexXmlNode ( XmlDocument graphMLXmlDocument ) : System.Boolean
graphMLXmlDocument System.Xml.XmlDocument
return System.Boolean

GraphMLXmlDocument() public method

Initializes a new instance of the GraphMLXmlDocument class.
public GraphMLXmlDocument ( System.Boolean directed ) : System
directed System.Boolean /// true if the graph is directed, false if it is undirected. ///
return System

SetXmlNodeAttributes() protected method

protected SetXmlNodeAttributes ( XmlNode oXmlNode ) : void
oXmlNode System.Xml.XmlNode
return void

Property Details

m_iVertexXmlNodes protected property

protected Int32,System m_iVertexXmlNodes
return System.Int32

m_oGraphMLXmlNode protected property

protected XmlNode,System.Xml m_oGraphMLXmlNode
return System.Xml.XmlNode

m_oGraphXmlNode protected property

protected XmlNode,System.Xml m_oGraphXmlNode
return System.Xml.XmlNode