![]() |
Satsuma
a delicious .NET graph library
|
Represents a GraphML property (or attribute). More...
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... | |
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.
Property
. Definition at line 52 of file IO.GraphML.cs.
|
protected |
Definition at line 64 of file IO.GraphML.cs.
|
staticprotected |
Converts the domain to a GraphML string representation.
Definition at line 70 of file IO.GraphML.cs.
|
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.
|
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.
|
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.
|
pure virtual |
Parses an XML value definition.
x | A <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. |
key | A 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 >.
|
pure virtual |
Writes an XML value definition.
key | A Node, Arc or IGraph, whose value will be returned as an XML representation. If null, the default value is used. |
Implemented in Satsuma.IO.GraphML.DictionaryProperty< T >.
|
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.
|
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.
|
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.