Class DynamicGraph
A
WrapperGraph that provides read/write dictionary and dynamic functionality.
Inheritance
System.Object
DynamicGraph
Implements
System.IDisposable
System.Xml.Serialization.IXmlSerializable
System.Runtime.Serialization.ISerializable
System.Dynamic.IDynamicMetaObjectProvider
System.Collections.Generic.IDictionary<
INode,
System.Object>
System.Collections.Generic.ICollection<
System.Collections.Generic.KeyValuePair<
INode,
System.Object>>
System.Collections.Generic.IEnumerable<
System.Collections.Generic.KeyValuePair<
INode,
System.Object>>
System.Collections.Generic.IDictionary<System.String, System.Object>
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String, System.Object>>
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, System.Object>>
System.Collections.Generic.IDictionary<System.Uri, System.Object>
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.Uri, System.Object>>
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.Uri, System.Object>>
System.Collections.IEnumerable
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: dotNetRDF.dll
Syntax
public class DynamicGraph : WrapperGraph, IGraph, INodeFactory, IDisposable, IXmlSerializable, ISerializable, IDynamicMetaObjectProvider, IDictionary<INode, object>, ICollection<KeyValuePair<INode, object>>, IEnumerable<KeyValuePair<INode, object>>, IDictionary<string, object>, ICollection<KeyValuePair<string, object>>, IEnumerable<KeyValuePair<string, object>>, IDictionary<Uri, object>, ICollection<KeyValuePair<Uri, object>>, IEnumerable<KeyValuePair<Uri, object>>, IEnumerable
Constructors
|
Improve this Doc
View Source
DynamicGraph(IGraph, Uri, Uri)
Declaration
public DynamicGraph(IGraph graph = null, Uri subjectBaseUri = null, Uri predicateBaseUri = null)
Parameters
Type |
Name |
Description |
IGraph |
graph |
The IGraph to wrap. |
System.Uri |
subjectBaseUri |
The System.Uri used for resolving relative subject references. |
System.Uri |
predicateBaseUri |
The System.Uri used for resolving relative predicate references. |
Properties
|
Improve this Doc
View Source
Count
Gets the number of URI nodes in this graph.
Declaration
public int Count { get; }
Property Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
IsReadOnly
Gets a value indicating whether this graph dictionary is read only (always false).
Declaration
public bool IsReadOnly { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Item[String]
Gets nodes equivalent to node
or sets statements with subject equivalent to node
and predicate and objects equivalent to value
.
Declaration
public object this[string node] { get; set; }
Parameters
Type |
Name |
Description |
System.String |
node |
The node to wrap dynamically. |
Property Value
Type |
Description |
System.Object |
A DynamicNode wrapped around the node . |
Exceptions
Type |
Condition |
System.ArgumentNullException |
When node is null. |
|
Improve this Doc
View Source
Item[Uri]
Gets nodes equivalent to node
or sets statements with subject equivalent to node
and predicate and objects equivalent to value
.
Declaration
public object this[Uri node] { get; set; }
Parameters
Type |
Name |
Description |
System.Uri |
node |
The node to wrap dynamically. |
Property Value
Type |
Description |
System.Object |
A DynamicNode wrapped around the node . |
Exceptions
Type |
Condition |
System.ArgumentNullException |
When node is null. |
|
Improve this Doc
View Source
Item[INode]
Gets nodes equal to node
or sets statements with subject equal to node
and predicate and objects equivalent to value
.
Declaration
public object this[INode node] { get; set; }
Parameters
Type |
Name |
Description |
INode |
node |
The node to wrap dynamically. |
Property Value
Type |
Description |
System.Object |
A DynamicNode wrapped around the node . |
Exceptions
Type |
Condition |
System.ArgumentNullException |
When node is null. |
|
Improve this Doc
View Source
Keys
Gets an System.Collections.Generic.ICollection<T> containing Uri subject node names shortened as much as possible.
Declaration
public ICollection<string> Keys { get; }
Property Value
Type |
Description |
System.Collections.Generic.ICollection<System.String> |
|
|
Improve this Doc
View Source
PredicateBaseUri
Gets the URI used for resolving relative predicate references.
Declaration
public Uri PredicateBaseUri { get; }
Property Value
Type |
Description |
System.Uri |
|
|
Improve this Doc
View Source
SubjectBaseUri
Gets the System.Uri used for resolving relative subject references.
Declaration
public Uri SubjectBaseUri { get; }
Property Value
Type |
Description |
System.Uri |
|
|
Improve this Doc
View Source
Values
Gets a collection of
DynamicNodes representing URI nodes in this graph.
Declaration
public ICollection<object> Values { get; }
Property Value
Type |
Description |
System.Collections.Generic.ICollection<System.Object> |
|
Methods
|
Improve this Doc
View Source
Add(String, Object)
Asserts statements equivalent to the parameters.
Declaration
public void Add(string subject, object predicateAndObjects)
Parameters
Type |
Name |
Description |
System.String |
subject |
The subject to assert. |
System.Object |
predicateAndObjects |
An object with public properties or a dictionary representing predicates and objects to assert. |
Exceptions
Type |
Condition |
System.ArgumentNullException |
When subject or predicateAndObjects is null. |
|
Improve this Doc
View Source
Add(Uri, Object)
Asserts statements equivalent to the parameters.
Declaration
public void Add(Uri subject, object predicateAndObjects)
Parameters
Type |
Name |
Description |
System.Uri |
subject |
The subject to assert. |
System.Object |
predicateAndObjects |
An object with public properties or a dictionary representing predicates and objects to assert. |
Exceptions
Type |
Condition |
System.ArgumentNullException |
When subject . |
|
Improve this Doc
View Source
Add(INode, Object)
Asserts statements equivalent to the parameters.
Declaration
public void Add(INode subject, object predicateAndObjects)
Parameters
Type |
Name |
Description |
INode |
subject |
The subject to assert. |
System.Object |
predicateAndObjects |
An object with public properties or a dictionary representing predicates and objects to assert. |
Exceptions
Type |
Condition |
System.ArgumentNullException |
When subject or predicateAndObjects is null. |
System.InvalidOperationException |
When predicateAndObjects is a dictionary with keys other than INode, System.Uri or System.String. |
|
Improve this Doc
View Source
Contains(String, Object)
Checks whether statements exist equivalent to the parameters.
Declaration
public bool Contains(string subject, object predicateAndObjects)
Parameters
Type |
Name |
Description |
System.String |
subject |
The subject to check. |
System.Object |
predicateAndObjects |
An object with public properties or a dictionary representing predicates and objects to check. |
Returns
Type |
Description |
System.Boolean |
Whether statements exist equivalent to the parameters. |
|
Improve this Doc
View Source
Contains(Uri, Object)
Checks whether statements exist equivalent to the parameters.
Declaration
public bool Contains(Uri subject, object predicateAndObjects)
Parameters
Type |
Name |
Description |
System.Uri |
subject |
The subject to check. |
System.Object |
predicateAndObjects |
An object with public properties or a dictionary representing predicates and objects to check. |
Returns
Type |
Description |
System.Boolean |
Whether statements exist equivalent to the parameters. |
|
Improve this Doc
View Source
Contains(INode, Object)
Checks whether statements exist equivalent to the parameters.
Declaration
public bool Contains(INode subject, object predicateAndObjects)
Parameters
Type |
Name |
Description |
INode |
subject |
The subject to check. |
System.Object |
predicateAndObjects |
An object with public properties or a dictionary representing predicates and objects to check. |
Returns
Type |
Description |
System.Boolean |
Whether statements exist equivalent to the parameters. |
Exceptions
Type |
Condition |
System.InvalidOperationException |
When predicateAndObjects is a dictionary with keys other than INode, System.Uri or System.String. |
|
Improve this Doc
View Source
ContainsKey(String)
Checks whether a URI node equivalent to key
exists.
Declaration
public bool ContainsKey(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
The node to check. |
Returns
Type |
Description |
System.Boolean |
Whether a URI node equivalent to key exists. |
|
Improve this Doc
View Source
ContainsKey(Uri)
Checks whether a URI node equivalent to key
exists.
Declaration
public bool ContainsKey(Uri key)
Parameters
Type |
Name |
Description |
System.Uri |
key |
The node to check. |
Returns
Type |
Description |
System.Boolean |
Whether a URI node equivalent to key exists. |
|
Improve this Doc
View Source
ContainsKey(INode)
Checks whether a URI node equal to key
exists.
Declaration
public bool ContainsKey(INode key)
Parameters
Type |
Name |
Description |
INode |
key |
The node to check. |
Returns
Type |
Description |
System.Boolean |
Whether a URI node equal to key exists. |
|
Improve this Doc
View Source
Remove(String)
Retracts statements with subject
.
Declaration
public bool Remove(string subject)
Parameters
Type |
Name |
Description |
System.String |
subject |
The subject to retract. |
Returns
Type |
Description |
System.Boolean |
Whether any statements were retracted. |
|
Improve this Doc
View Source
Remove(String, Object)
Retracts statements equivalent to the parameters.
Declaration
public bool Remove(string subject, object predicateAndObjects)
Parameters
Type |
Name |
Description |
System.String |
subject |
The subject to retract. |
System.Object |
predicateAndObjects |
An object with public properties or a dictionary representing predicates and objects to retract. |
Returns
Type |
Description |
System.Boolean |
Whether any statements were retracted. |
|
Improve this Doc
View Source
Remove(Uri)
Retracts statements with subject
.
Declaration
public bool Remove(Uri subject)
Parameters
Type |
Name |
Description |
System.Uri |
subject |
The subject to retract. |
Returns
Type |
Description |
System.Boolean |
Whether any statements were retracted. |
Exceptions
Type |
Condition |
System.ArgumentNullException |
When subject is null. |
|
Improve this Doc
View Source
Remove(Uri, Object)
Retracts statements equivalent to parameters.
Declaration
public bool Remove(Uri subject, object predicateAndObjects)
Parameters
Type |
Name |
Description |
System.Uri |
subject |
The subject to retract. |
System.Object |
predicateAndObjects |
An object with public properties or a dictionary representing predicates and objects to retract. |
Returns
Type |
Description |
System.Boolean |
Whether any statements were retracted. |
|
Improve this Doc
View Source
Remove(INode)
Retracts statements with subject
.
Declaration
public bool Remove(INode subject)
Parameters
Type |
Name |
Description |
INode |
subject |
The subject to retract. |
Returns
Type |
Description |
System.Boolean |
Whether any statements were retracted. |
|
Improve this Doc
View Source
Remove(INode, Object)
Retracts statements equivalent to the parameters.
Declaration
public bool Remove(INode subject, object predicateAndObjects)
Parameters
Type |
Name |
Description |
INode |
subject |
The subject to retract. |
System.Object |
predicateAndObjects |
An object with public properties or a dictionary representing predicates and objects to retract. |
Returns
Type |
Description |
System.Boolean |
Whether any statements were retracted. |
|
Improve this Doc
View Source
TryGetValue(String, out Object)
Tries to get a node from the graph.
Declaration
public bool TryGetValue(string node, out object value)
Parameters
Type |
Name |
Description |
System.String |
node |
The node to try. |
System.Object |
value |
A DynamicNode wrapped around the node . |
Returns
Type |
Description |
System.Boolean |
A value representing whether a value was set or not. |
|
Improve this Doc
View Source
TryGetValue(Uri, out Object)
Tries to get a node from the graph.
Declaration
public bool TryGetValue(Uri node, out object value)
Parameters
Type |
Name |
Description |
System.Uri |
node |
The node to try. |
System.Object |
value |
A DynamicNode wrapped around the node . |
Returns
Type |
Description |
System.Boolean |
A value representing whether a value was set or not. |
|
Improve this Doc
View Source
TryGetValue(INode, out Object)
Tries to get a node from the graph.
Declaration
public bool TryGetValue(INode node, out object value)
Parameters
Type |
Name |
Description |
INode |
node |
The node to try. |
System.Object |
value |
A DynamicNode wrapped around the node . |
Returns
Type |
Description |
System.Boolean |
A value representing whether a value was set or not. |
Explicit Interface Implementations
|
Improve this Doc
View Source
ICollection<KeyValuePair<String, Object>>.Add(KeyValuePair<String, Object>)
Declaration
void ICollection<KeyValuePair<string, object>>.Add(KeyValuePair<string, object> item)
Parameters
Type |
Name |
Description |
System.Collections.Generic.KeyValuePair<System.String, System.Object> |
item |
|
|
Improve this Doc
View Source
ICollection<KeyValuePair<String, Object>>.Contains(KeyValuePair<String, Object>)
Declaration
bool ICollection<KeyValuePair<string, object>>.Contains(KeyValuePair<string, object> item)
Parameters
Type |
Name |
Description |
System.Collections.Generic.KeyValuePair<System.String, System.Object> |
item |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
ICollection<KeyValuePair<String, Object>>.CopyTo(KeyValuePair<String, Object>[], Int32)
Declaration
void ICollection<KeyValuePair<string, object>>.CopyTo(KeyValuePair<string, object>[] array, int arrayIndex)
Parameters
Type |
Name |
Description |
System.Collections.Generic.KeyValuePair<System.String, System.Object>[] |
array |
|
System.Int32 |
arrayIndex |
|
|
Improve this Doc
View Source
ICollection<KeyValuePair<String, Object>>.Remove(KeyValuePair<String, Object>)
Declaration
bool ICollection<KeyValuePair<string, object>>.Remove(KeyValuePair<string, object> item)
Parameters
Type |
Name |
Description |
System.Collections.Generic.KeyValuePair<System.String, System.Object> |
item |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
ICollection<KeyValuePair<Uri, Object>>.Add(KeyValuePair<Uri, Object>)
Declaration
void ICollection<KeyValuePair<Uri, object>>.Add(KeyValuePair<Uri, object> item)
Parameters
Type |
Name |
Description |
System.Collections.Generic.KeyValuePair<System.Uri, System.Object> |
item |
|
|
Improve this Doc
View Source
ICollection<KeyValuePair<Uri, Object>>.Contains(KeyValuePair<Uri, Object>)
Declaration
bool ICollection<KeyValuePair<Uri, object>>.Contains(KeyValuePair<Uri, object> item)
Parameters
Type |
Name |
Description |
System.Collections.Generic.KeyValuePair<System.Uri, System.Object> |
item |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
ICollection<KeyValuePair<Uri, Object>>.CopyTo(KeyValuePair<Uri, Object>[], Int32)
Declaration
void ICollection<KeyValuePair<Uri, object>>.CopyTo(KeyValuePair<Uri, object>[] array, int arrayIndex)
Parameters
Type |
Name |
Description |
System.Collections.Generic.KeyValuePair<System.Uri, System.Object>[] |
array |
|
System.Int32 |
arrayIndex |
|
|
Improve this Doc
View Source
ICollection<KeyValuePair<Uri, Object>>.Remove(KeyValuePair<Uri, Object>)
Declaration
bool ICollection<KeyValuePair<Uri, object>>.Remove(KeyValuePair<Uri, object> item)
Parameters
Type |
Name |
Description |
System.Collections.Generic.KeyValuePair<System.Uri, System.Object> |
item |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
ICollection<KeyValuePair<INode, Object>>.Add(KeyValuePair<INode, Object>)
Declaration
void ICollection<KeyValuePair<INode, object>>.Add(KeyValuePair<INode, object> item)
Parameters
Type |
Name |
Description |
System.Collections.Generic.KeyValuePair<INode, System.Object> |
item |
|
|
Improve this Doc
View Source
ICollection<KeyValuePair<INode, Object>>.Contains(KeyValuePair<INode, Object>)
Declaration
bool ICollection<KeyValuePair<INode, object>>.Contains(KeyValuePair<INode, object> item)
Parameters
Type |
Name |
Description |
System.Collections.Generic.KeyValuePair<INode, System.Object> |
item |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
ICollection<KeyValuePair<INode, Object>>.CopyTo(KeyValuePair<INode, Object>[], Int32)
Declaration
void ICollection<KeyValuePair<INode, object>>.CopyTo(KeyValuePair<INode, object>[] array, int arrayIndex)
Parameters
Type |
Name |
Description |
System.Collections.Generic.KeyValuePair<INode, System.Object>[] |
array |
|
System.Int32 |
arrayIndex |
|
|
Improve this Doc
View Source
ICollection<KeyValuePair<INode, Object>>.Remove(KeyValuePair<INode, Object>)
Declaration
bool ICollection<KeyValuePair<INode, object>>.Remove(KeyValuePair<INode, object> item)
Parameters
Type |
Name |
Description |
System.Collections.Generic.KeyValuePair<INode, System.Object> |
item |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IDictionary<Uri, Object>.Keys
Declaration
ICollection<Uri> IDictionary<Uri, object>.Keys { get; }
Returns
Type |
Description |
System.Collections.Generic.ICollection<System.Uri> |
|
|
Improve this Doc
View Source
IDictionary<INode, Object>.Keys
Declaration
ICollection<INode> IDictionary<INode, object>.Keys { get; }
Returns
Type |
Description |
System.Collections.Generic.ICollection<INode> |
|
|
Improve this Doc
View Source
IEnumerable<KeyValuePair<String, Object>>.GetEnumerator()
Declaration
IEnumerator<KeyValuePair<string, object>> IEnumerable<KeyValuePair<string, object>>.GetEnumerator()
Returns
Type |
Description |
System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<System.String, System.Object>> |
|
|
Improve this Doc
View Source
IEnumerable<KeyValuePair<Uri, Object>>.GetEnumerator()
Declaration
IEnumerator<KeyValuePair<Uri, object>> IEnumerable<KeyValuePair<Uri, object>>.GetEnumerator()
Returns
Type |
Description |
System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<System.Uri, System.Object>> |
|
|
Improve this Doc
View Source
IEnumerable<KeyValuePair<INode, Object>>.GetEnumerator()
Declaration
IEnumerator<KeyValuePair<INode, object>> IEnumerable<KeyValuePair<INode, object>>.GetEnumerator()
Returns
Type |
Description |
System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<INode, System.Object>> |
|
|
Improve this Doc
View Source
IEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type |
Description |
System.Collections.IEnumerator |
|
|
Improve this Doc
View Source
Declaration
DynamicMetaObject IDynamicMetaObjectProvider.GetMetaObject(Expression parameter)
Parameters
Type |
Name |
Description |
System.Linq.Expressions.Expression |
parameter |
|
Returns
Type |
Description |
System.Dynamic.DynamicMetaObject |
|
Implements
System.IDisposable
System.Xml.Serialization.IXmlSerializable
System.Runtime.Serialization.ISerializable
System.Dynamic.IDynamicMetaObjectProvider
System.Collections.Generic.IDictionary<TKey, TValue>
System.Collections.Generic.ICollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.Generic.IDictionary<TKey, TValue>
System.Collections.Generic.ICollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.Generic.IDictionary<TKey, TValue>
System.Collections.Generic.ICollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
Extension Methods