Show / Hide Table of Contents

Class DynamicNode

A wrapper that provides read/write dictionary and dynamic functionality.

Inheritance
System.Object
WrapperNode
DynamicNode
Implements
ILiteralNode
IUriNode
IBlankNode
IRefNode
INode
System.IComparable<T><INode>
System.IComparable<T><IBlankNode>
System.IComparable<T><IGraphLiteralNode>
System.IComparable<T><ILiteralNode>
System.IComparable<T><IUriNode>
System.IComparable<T><IVariableNode>
System.IComparable<T><IRefNode>
System.IComparable<T><ITripleNode>
System.IEquatable<T><INode>
System.IEquatable<T><IBlankNode>
System.IEquatable<T><IGraphLiteralNode>
System.IEquatable<T><ILiteralNode>
System.IEquatable<T><IUriNode>
System.IEquatable<T><IVariableNode>
System.IEquatable<T><IRefNode>
System.IEquatable<T><ITripleNode>
System.Dynamic.IDynamicMetaObjectProvider
System.Collections.Generic.IDictionary<TKey, TValue><INode, System.Object>
System.Collections.Generic.ICollection<T><KeyValuePair<INode, System.Object>>
System.Collections.Generic.IEnumerable<T><KeyValuePair<INode, System.Object>>
System.Collections.Generic.IDictionary<TKey, TValue><string, System.Object>
System.Collections.Generic.ICollection<T><KeyValuePair<string, System.Object>>
System.Collections.Generic.IEnumerable<T><KeyValuePair<string, System.Object>>
System.Collections.Generic.IDictionary<TKey, TValue><System.Uri, System.Object>
System.Collections.Generic.ICollection<T><KeyValuePair<System.Uri, System.Object>>
System.Collections.Generic.IEnumerable<T><KeyValuePair<System.Uri, System.Object>>
System.Collections.IEnumerable
Inherited Members
WrapperNode.NodeType
WrapperNode.Node
WrapperNode.Equals(object)
WrapperNode.GetHashCode()
WrapperNode.ToString()
WrapperNode.CompareTo(INode)
WrapperNode.CompareTo(IRefNode)
WrapperNode.CompareTo(IBlankNode)
WrapperNode.CompareTo(IGraphLiteralNode)
WrapperNode.CompareTo(ILiteralNode)
WrapperNode.CompareTo(IUriNode)
WrapperNode.CompareTo(IVariableNode)
WrapperNode.CompareTo(ITripleNode)
WrapperNode.Equals(INode)
WrapperNode.Equals(IRefNode)
WrapperNode.Equals(IBlankNode)
WrapperNode.Equals(IGraphLiteralNode)
WrapperNode.Equals(ILiteralNode)
WrapperNode.Equals(IUriNode)
WrapperNode.Equals(IVariableNode)
WrapperNode.Equals(ITripleNode)
WrapperNode.ToString(INodeFormatter)
WrapperNode.ToString(INodeFormatter, TripleSegment)
object.Equals(object, object)
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: VDS.RDF.Dynamic
Assembly: dotNetRdf.Dynamic.dll
Syntax
public class DynamicNode : WrapperNode, ILiteralNode, IUriNode, IBlankNode, IRefNode, INode, IComparable<INode>, IComparable<IBlankNode>, IComparable<IGraphLiteralNode>, IComparable<ILiteralNode>, IComparable<IUriNode>, IComparable<IVariableNode>, IComparable<IRefNode>, IComparable<ITripleNode>, IEquatable<INode>, IEquatable<IBlankNode>, IEquatable<IGraphLiteralNode>, IEquatable<ILiteralNode>, IEquatable<IUriNode>, IEquatable<IVariableNode>, IEquatable<IRefNode>, IEquatable<ITripleNode>, 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

DynamicNode(INode, IGraph, Uri)

Initializes a new instance of the DynamicNode class.

Declaration
public DynamicNode(INode node, IGraph graph, Uri baseUri = null)
Parameters
Type Name Description
INode node

The node to wrap.

IGraph graph

The graph context of the dynamic node.

System.Uri baseUri

The URI used to resolve relative predicate references.

Exceptions
Type Condition
System.InvalidOperationException

When node has no graph.

Properties

| Improve this Doc View Source

BaseUri

Gets the URI used to resolve relative predicate references.

Declaration
public Uri BaseUri { get; }
Property Value
Type Description
System.Uri
| Improve this Doc View Source

Count

Gets the number of distinct outgoing predicates from this node.

Declaration
public int Count { get; }
Property Value
Type Description
int
| Improve this Doc View Source

Graph

Get the graph context for this dynamic node.

Declaration
public IGraph Graph { get; }
Property Value
Type Description
IGraph
| Improve this Doc View Source

IsReadOnly

Gets a value indicating whether this node is read only (always false).

Declaration
public bool IsReadOnly { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

this[string]

Gets statement objects with this subject and predicate equivalent to predicate or sets staements with this subject, predicate equivalent to predicate and objects equivalent to value.

Declaration
public object this[string predicate] { get; set; }
Parameters
Type Name Description
string predicate

The predicate to use.

Property Value
Type Description
System.Object

A DynamicObjectCollection with this subject and predicate.

Exceptions
Type Condition
System.ArgumentNullException

When predicate is null.

| Improve this Doc View Source

this[Uri]

Gets statement objects with this subject and predicate equivalent to predicate or sets staements with this subject, predicate equivalent to predicate and objects equivalent to value.

Declaration
public object this[Uri predicate] { get; set; }
Parameters
Type Name Description
System.Uri predicate

The predicate to use.

Property Value
Type Description
System.Object

A DynamicObjectCollection with this subject and predicate.

Exceptions
Type Condition
System.ArgumentNullException

When predicate is null.

| Improve this Doc View Source

this[INode]

Gets statement objects with this subject and predicate or sets staements with this subject, predicate and objects equivalent to value.

Declaration
public object this[INode predicate] { get; set; }
Parameters
Type Name Description
INode predicate

The predicate to use.

Property Value
Type Description
System.Object

A DynamicObjectCollection with this subject and predicate.

Exceptions
Type Condition
System.ArgumentNullException

When predicate is null.

| Improve this Doc View Source

Keys

Gets an System.Collections.Generic.ICollection<T> containing outgoing predicate node names shortened as much as possible.

Declaration
public ICollection<string> Keys { get; }
Property Value
Type Description
System.Collections.Generic.ICollection<T><string>
| Improve this Doc View Source

Values

Gets a collection of dynamic object collections, one per distinct outgoing predicate from this node.

Declaration
public ICollection<object> Values { get; }
Property Value
Type Description
System.Collections.Generic.ICollection<T><System.Object>

Methods

| Improve this Doc View Source

Add(string, object)

Asserts statements with this subject and predicate and objects equivalent to parameters.

Declaration
public void Add(string predicate, object objects)
Parameters
Type Name Description
string predicate

The predicate to assert.

System.Object objects

An object or enumerable representing objects to assert.

Exceptions
Type Condition
System.ArgumentNullException

When predicate is null.

| Improve this Doc View Source

Add(Uri, object)

Asserts statements with this subject and predicate and objects equivalent to parameters.

Declaration
public void Add(Uri predicate, object objects)
Parameters
Type Name Description
System.Uri predicate

The predicate to assert.

System.Object objects

An object or enumerable representing objects to assert.

Exceptions
Type Condition
System.ArgumentNullException

When predicate is null.

| Improve this Doc View Source

Add(INode, object)

Asserts statements with this subject, predicate and equivalent to objects.

Declaration
public void Add(INode predicate, object objects)
Parameters
Type Name Description
INode predicate

The predicate to assert.

System.Object objects

An object or enumerable representing objects to assert.

Exceptions
Type Condition
System.ArgumentNullException

When predicate or objects is null.

| Improve this Doc View Source

Clear()

Retracts statements with this subject.

Declaration
public void Clear()
| Improve this Doc View Source

Contains(string, object)

Checks whether statements exist with this subject, predicate equivalent to predicate and objects equivalent to objects.

Declaration
public bool Contains(string predicate, object objects)
Parameters
Type Name Description
string predicate

The predicate to assert.

System.Object objects

An object or enumerable representing objects to assert.

Returns
Type Description
System.Boolean

Whether statements exist with this subject, predicate equivalent to predicate and objects equivalent to objects.

| Improve this Doc View Source

Contains(Uri, object)

Checks whether statements exist with this subject, predicate equivalent to predicate and objects equivalent to objects.

Declaration
public bool Contains(Uri predicate, object objects)
Parameters
Type Name Description
System.Uri predicate

The predicate to assert.

System.Object objects

An object or enumerable representing objects to assert.

Returns
Type Description
System.Boolean

Whether statements exist with this subject, predicate equivalent to predicate and objects equivalent to objects.

| Improve this Doc View Source

Contains(INode, object)

Checks whether statements exist with this subject, predicate and objects equivalent to objects.

Declaration
public bool Contains(INode predicate, object objects)
Parameters
Type Name Description
INode predicate

The predicate to assert.

System.Object objects

An object or enumerable representing objects to assert.

Returns
Type Description
System.Boolean

Whether statements exist with this subject, predicate and objects equivalent to objects.

| Improve this Doc View Source

ContainsKey(string)

Checks whether this node has an outgoing predicate equivalent to key.

Declaration
public bool ContainsKey(string key)
Parameters
Type Name Description
string key

The node to check.

Returns
Type Description
System.Boolean

Whether this node has an outgoing predicate equivalent to key.

| Improve this Doc View Source

ContainsKey(Uri)

Checks whether this node has an outgoing predicate equivalent to key.

Declaration
public bool ContainsKey(Uri key)
Parameters
Type Name Description
System.Uri key

The node to check.

Returns
Type Description
System.Boolean

Whether this node has an outgoing predicate equivalent to key.

| Improve this Doc View Source

ContainsKey(INode)

Checks whether this node has an outgoing predicate equal to key.

Declaration
public bool ContainsKey(INode key)
Parameters
Type Name Description
INode key

The node to check.

Returns
Type Description
System.Boolean

Whether this node has an outgoing predicate equal to key.

| Improve this Doc View Source

Remove(string, object)

Retracts statements with this subject, predicate equivalent to predicate and objects equivalent to objects.

Declaration
public bool Remove(string predicate, object objects)
Parameters
Type Name Description
string predicate

The predicate to retract.

System.Object objects

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(string)

Retracts statements with this subject and equivalent to predicate.

Declaration
public bool Remove(string predicate)
Parameters
Type Name Description
string predicate

The predicate to retract.

Returns
Type Description
System.Boolean

Whether any statements were retracted.

| Improve this Doc View Source

Remove(Uri, object)

Retracts statements with this subject, predicate equivalent to predicate and objects equivalent to objects.

Declaration
public bool Remove(Uri predicate, object objects)
Parameters
Type Name Description
System.Uri predicate

The predicate to retract.

System.Object objects

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 this subject and equivalent to predicate.

Declaration
public bool Remove(Uri predicate)
Parameters
Type Name Description
System.Uri predicate

The predicate to retract.

Returns
Type Description
System.Boolean

Whether any statements were retracted.

| Improve this Doc View Source

Remove(INode, object)

Retracts statements with this subject, predicate and objects equivalent to objects.

Declaration
public bool Remove(INode predicate, object objects)
Parameters
Type Name Description
INode predicate

The predicate to retract.

System.Object objects

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 this subject and predicate.

Declaration
public bool Remove(INode predicate)
Parameters
Type Name Description
INode predicate

The predicate to retract.

Returns
Type Description
System.Boolean

Whether any statements were retracted.

| Improve this Doc View Source

TryGetValue(string, out object)

Tries to get an object collection.

Declaration
public bool TryGetValue(string predicate, out object value)
Parameters
Type Name Description
string predicate

The predicate to try.

System.Object value

A DynamicObjectCollection.

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 an object collection.

Declaration
public bool TryGetValue(Uri predicate, out object value)
Parameters
Type Name Description
System.Uri predicate

The predicate to try.

System.Object value

A DynamicObjectCollection.

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 an object collection.

Declaration
public bool TryGetValue(INode predicate, out object value)
Parameters
Type Name Description
INode predicate

The predicate to try.

System.Object value

A DynamicObjectCollection.

Returns
Type Description
System.Boolean

A value representing whether a value was set or not.

Implements

ILiteralNode
IUriNode
IBlankNode
IRefNode
INode
System.IComparable<T>
System.IComparable<T>
System.IComparable<T>
System.IComparable<T>
System.IComparable<T>
System.IComparable<T>
System.IComparable<T>
System.IComparable<T>
System.IEquatable<T>
System.IEquatable<T>
System.IEquatable<T>
System.IEquatable<T>
System.IEquatable<T>
System.IEquatable<T>
System.IEquatable<T>
System.IEquatable<T>
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

Extensions.ToSafeString(object)
Extensions.AsEnumerable<T>(T)
DynamicExtensions.AsDynamic(INode, IGraph, Uri)
Extensions.EffectiveBooleanValue(INode)
Extensions.IsListRoot(INode, IGraph)
ValuedNodeExtensions.AsValuedNode(INode)
  • Improve this Doc
  • View Source
In This Article
  • Constructors
    • DynamicNode(INode, IGraph, Uri)
  • Properties
    • BaseUri
    • Count
    • Graph
    • IsReadOnly
    • this[string]
    • this[Uri]
    • this[INode]
    • Keys
    • Values
  • Methods
    • Add(string, object)
    • Add(Uri, object)
    • Add(INode, object)
    • Clear()
    • Contains(string, object)
    • Contains(Uri, object)
    • Contains(INode, object)
    • ContainsKey(string)
    • ContainsKey(Uri)
    • ContainsKey(INode)
    • Remove(string, object)
    • Remove(string)
    • Remove(Uri, object)
    • Remove(Uri)
    • Remove(INode, object)
    • Remove(INode)
    • TryGetValue(string, out object)
    • TryGetValue(Uri, out object)
    • TryGetValue(INode, out object)
  • Implements
  • Extension Methods
Back to top Generated by DocFX