Satsuma
a delicious .NET graph library
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Pages
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Properties | List of all members
Satsuma.IO.GraphML.GraphMLProperty Class Referenceabstract

Represents a GraphML property (or attribute). More...

Inheritance diagram for Satsuma.IO.GraphML.GraphMLProperty:
Satsuma.IO.GraphML.DictionaryProperty< T > Satsuma.IO.GraphML.NodeGraphicsProperty Satsuma.IO.GraphML.StandardProperty< T >

Public Member Functions

virtual XElement GetKeyElement ()
 Returns a <key> element for the property. More...
 
abstract void ReadData (XElement x, object key)
 Parses an XML value definition. More...
 
abstract XElement WriteData (object key)
 Writes an XML value definition. More...
 

Protected Member Functions

 GraphMLProperty ()
 
virtual void LoadFromKeyElement (XElement xKey)
 Loads the declaration of the property from the given <key> element (including the default value). More...
 

Static Protected Member Functions

static string DomainToGraphML (PropertyDomain domain)
 Converts the domain to a GraphML string representation. More...
 
static PropertyDomain ParseDomain (string s)
 Parses the string representation of a GraphML domain. More...
 

Properties

PropertyDomain Domain [get, set]
 The domain of the property, i.e. the kind of objects the property applies to. More...
 
string Id [get, set]
 The unique identifier of the property in the GraphML file. More...
 
string Name [get, set]
 The name of the property. More...
 

Detailed Description

Represents a GraphML property (or attribute).

Properties can assign extra values to nodes, arcs, or the whole graph.

Descendants of this abstract class must define ways to declare and recognize properties of this type, and store or retrieve property values from a GraphML file.

Note
Properties are called attributes in the original GraphML terminology, but Attribute has a special meaning in .NET identifiers, so, in Satsuma, they are called properties. In addition, this class had to be named GraphMLProperty instead of Property because of a name collision with the reserved Visual Basic .NET keyword Property.

Definition at line 52 of file IO.GraphML.cs.

Constructor & Destructor Documentation

Satsuma.IO.GraphML.GraphMLProperty.GraphMLProperty ( )
protected

Definition at line 64 of file IO.GraphML.cs.

Member Function Documentation

static string Satsuma.IO.GraphML.GraphMLProperty.DomainToGraphML ( PropertyDomain  domain)
staticprotected

Converts the domain to a GraphML string representation.

Definition at line 70 of file IO.GraphML.cs.

virtual XElement Satsuma.IO.GraphML.GraphMLProperty.GetKeyElement ( )
virtual

Returns a <key> element for the property.

This element declares the property in a GraphML file.

Reimplemented in Satsuma.IO.GraphML.NodeGraphicsProperty, and Satsuma.IO.GraphML.StandardProperty< T >.

Definition at line 108 of file IO.GraphML.cs.

virtual void Satsuma.IO.GraphML.GraphMLProperty.LoadFromKeyElement ( XElement  xKey)
protectedvirtual

Loads the declaration of the property from the given <key> element (including the default value).

Definition at line 95 of file IO.GraphML.cs.

static PropertyDomain Satsuma.IO.GraphML.GraphMLProperty.ParseDomain ( string  s)
staticprotected

Parses the string representation of a GraphML domain.

Possible input values: "node", "edge", "graph", "all".

Definition at line 83 of file IO.GraphML.cs.

abstract void Satsuma.IO.GraphML.GraphMLProperty.ReadData ( XElement  x,
object  key 
)
pure virtual

Parses an XML value definition.

Parameters
xA <data> or <default> element, which stores either the default value or the value taken on a node, arc or graph. If null, the data for key is erased.
keyA Node, Arc or IGraph, for which the loaded value will be stored. If null, the default value is loaded/erased.

Implemented in Satsuma.IO.GraphML.DictionaryProperty< T >.

abstract XElement Satsuma.IO.GraphML.GraphMLProperty.WriteData ( object  key)
pure virtual

Writes an XML value definition.

Parameters
keyA Node, Arc or IGraph, whose value will be returned as an XML representation. If null, the default value is used.
Returns
A data element, or null if there was no special value stored for the object.

Implemented in Satsuma.IO.GraphML.DictionaryProperty< T >.

Property Documentation

PropertyDomain Satsuma.IO.GraphML.GraphMLProperty.Domain
getset

The domain of the property, i.e. the kind of objects the property applies to.

Definition at line 58 of file IO.GraphML.cs.

string Satsuma.IO.GraphML.GraphMLProperty.Id
getset

The unique identifier of the property in the GraphML file.

This field is for internal use. When saving, it is ignored and replaced by an auto-generated identifier.

Definition at line 62 of file IO.GraphML.cs.

string Satsuma.IO.GraphML.GraphMLProperty.Name
getset

The name of the property.

Can be either null or a nonempty string. It is advisable but not necessary to keep names unique.

Definition at line 56 of file IO.GraphML.cs.


The documentation for this class was generated from the following file: