Show / Hide Table of Contents

Class BaseVirtualNode<TNodeID, TGraphID>

Abstract Base implementation of a Virtual Node which is a Node that is represented only by some ID until such time as its value actually needs materialising.
Inheritance
System.Object
BaseVirtualNode<TNodeID, TGraphID>
BaseVirtualBlankNode<TNodeID, TGraphID>
BaseVirtualGraphLiteralNode<TNodeID, TGraphID>
BaseVirtualLiteralNode<TNodeID, TGraphID>
BaseVirtualUriNode<TNodeID, TGraphID>
BaseVirtualVariableNode<TNodeID, TGraphID>
Implements
IVirtualNode<TNodeID, TGraphID>
INode
System.IComparable<INode>
System.IComparable<IBlankNode>
System.IComparable<IGraphLiteralNode>
System.IComparable<ILiteralNode>
System.IComparable<IUriNode>
System.IComparable<IVariableNode>
System.IEquatable<INode>
System.IEquatable<IBlankNode>
System.IEquatable<IGraphLiteralNode>
System.IEquatable<ILiteralNode>
System.IEquatable<IUriNode>
System.IEquatable<IVariableNode>
System.Runtime.Serialization.ISerializable
System.Xml.Serialization.IXmlSerializable
System.IEquatable<IVirtualNode<TNodeID, TGraphID>>
System.IComparable<IVirtualNode<TNodeID, TGraphID>>
IVirtualIdComparable
System.IEquatable<BaseVirtualNode<TNodeID, TGraphID>>
System.IComparable<BaseVirtualNode<TNodeID, TGraphID>>
ICanCopy
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: VDS.RDF.Storage.Virtualisation
Assembly: dotNetRDF.dll
Syntax
public abstract class BaseVirtualNode<TNodeID, TGraphID> : IVirtualNode<TNodeID, TGraphID>, INode, IComparable<INode>, IComparable<IBlankNode>, IComparable<IGraphLiteralNode>, IComparable<ILiteralNode>, IComparable<IUriNode>, IComparable<IVariableNode>, IEquatable<INode>, IEquatable<IBlankNode>, IEquatable<IGraphLiteralNode>, IEquatable<ILiteralNode>, IEquatable<IUriNode>, IEquatable<IVariableNode>, ISerializable, IXmlSerializable, IEquatable<IVirtualNode<TNodeID, TGraphID>>, IComparable<IVirtualNode<TNodeID, TGraphID>>, IVirtualIdComparable, IEquatable<BaseVirtualNode<TNodeID, TGraphID>>, IComparable<BaseVirtualNode<TNodeID, TGraphID>>, ICanCopy
Type Parameters
Name Description
TNodeID Node ID Type.
TGraphID Graph ID Type.
Remarks

As far as possible equality checks are carried out using these IDs and limited comparisons may also be done this way. More specific implementations may wish to derive from this class in order to override the default comparison implementation to further reduce the number of places where value materialisation is done.

Note that this class does not implement any of the specialised Node interfaces and instead relies on the casting of its materialised value to an appropriately typed node to provide the true values to code that needs it.

Constructors

| Improve this Doc View Source

BaseVirtualNode(IGraph, NodeType, TNodeID, IVirtualRdfProvider<TNodeID, TGraphID>)

Creates a new Base Virtual Node.
Declaration
public BaseVirtualNode(IGraph g, NodeType type, TNodeID id, IVirtualRdfProvider<TNodeID, TGraphID> provider)
Parameters
Type Name Description
IGraph g Graph the Node belongs to.
NodeType type Type of the node.
TNodeID id Virtual ID.
IVirtualRdfProvider<TNodeID, TGraphID> provider Virtual RDF Provider.
| Improve this Doc View Source

BaseVirtualNode(IGraph, NodeType, TNodeID, IVirtualRdfProvider<TNodeID, TGraphID>, INode)

Creates a new Base Virtual Node.
Declaration
public BaseVirtualNode(IGraph g, NodeType type, TNodeID id, IVirtualRdfProvider<TNodeID, TGraphID> provider, INode value)
Parameters
Type Name Description
IGraph g Graph the Node belongs to.
NodeType type Type of the node.
TNodeID id Virtual ID.
IVirtualRdfProvider<TNodeID, TGraphID> provider Virtual RDF Provider.
INode value Materialised Value.

Fields

| Improve this Doc View Source

_value

The materialised value of the Virtual Node.
Declaration
protected INode _value
Field Value
Type Description
INode

Properties

| Improve this Doc View Source

Graph

Gets the Graph the Node belongs to.
Declaration
public IGraph Graph { get; }
Property Value
Type Description
IGraph
| Improve this Doc View Source

GraphUri

Gets/Sets the Graph URI of the Node.
Declaration
public Uri GraphUri { get; set; }
Property Value
Type Description
System.Uri
| Improve this Doc View Source

IsMaterialised

Gets whether the Nodes value has been materialised.
Declaration
public bool IsMaterialised { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

MaterialisedValue

Gets the materialised value of the Node forcing it to be materialised if it hasn't already.
Declaration
public INode MaterialisedValue { get; }
Property Value
Type Description
INode
| Improve this Doc View Source

NodeType

Gets the Type of the Node.
Declaration
public NodeType NodeType { get; }
Property Value
Type Description
NodeType
| Improve this Doc View Source

Provider

Gets the Virtual RDF Provider of the Node.
Declaration
public IVirtualRdfProvider<TNodeID, TGraphID> Provider { get; }
Property Value
Type Description
IVirtualRdfProvider<TNodeID, TGraphID>
| Improve this Doc View Source

VirtualID

Gets the Virtual ID of the Node.
Declaration
public TNodeID VirtualID { get; }
Property Value
Type Description
TNodeID

Methods

| Improve this Doc View Source

CompareTo(IBlankNode)

Compares this Node to another Blank Node.
Declaration
public virtual int CompareTo(IBlankNode other)
Parameters
Type Name Description
IBlankNode other Other Blank Node.
Returns
Type Description
System.Int32
Remarks
Unless Virtual Equality (equality based on the Virtual RDF Provider and Virtual ID) can be determined or the Nodes are of different types then the Nodes value will have to be materialised in order to perform comparison.
| Improve this Doc View Source

CompareTo(IGraphLiteralNode)

Compares this Node to another Graph LiteralNode.
Declaration
public virtual int CompareTo(IGraphLiteralNode other)
Parameters
Type Name Description
IGraphLiteralNode other Other Graph Literal Node.
Returns
Type Description
System.Int32
Remarks
Unless Virtual Equality (equality based on the Virtual RDF Provider and Virtual ID) can be determined or the Nodes are of different types then the Nodes value will have to be materialised in order to perform comparison.
| Improve this Doc View Source

CompareTo(ILiteralNode)

Compares this Node to another Literal Node.
Declaration
public virtual int CompareTo(ILiteralNode other)
Parameters
Type Name Description
ILiteralNode other Other Literal Node.
Returns
Type Description
System.Int32
Remarks
Unless Virtual Equality (equality based on the Virtual RDF Provider and Virtual ID) can be determined or the Nodes are of different types then the Nodes value will have to be materialised in order to perform comparison.
| Improve this Doc View Source

CompareTo(INode)

Compares this Node to another Node.
Declaration
public int CompareTo(INode other)
Parameters
Type Name Description
INode other Other Node.
Returns
Type Description
System.Int32
Remarks
Unless Virtual Equality (equality based on the Virtual RDF Provider and Virtual ID) can be determined or the Nodes are of different types then the Nodes value will have to be materialised in order to perform comparison.
| Improve this Doc View Source

CompareTo(IUriNode)

Compares this Node to another URI Node.
Declaration
public virtual int CompareTo(IUriNode other)
Parameters
Type Name Description
IUriNode other Other URI Node.
Returns
Type Description
System.Int32
Remarks
Unless Virtual Equality (equality based on the Virtual RDF Provider and Virtual ID) can be determined or the Nodes are of different types then the Nodes value will have to be materialised in order to perform comparison.
| Improve this Doc View Source

CompareTo(IVariableNode)

Compares this Node to another Variable Node.
Declaration
public virtual int CompareTo(IVariableNode other)
Parameters
Type Name Description
IVariableNode other Other Variable Node.
Returns
Type Description
System.Int32
Remarks
Unless Virtual Equality (equality based on the Virtual RDF Provider and Virtual ID) can be determined or the Nodes are of different types then the Nodes value will have to be materialised in order to perform comparison.
| Improve this Doc View Source

CompareTo(BaseVirtualNode<TNodeID, TGraphID>)

Compares this Node to another Virtual Node.
Declaration
public int CompareTo(BaseVirtualNode<TNodeID, TGraphID> other)
Parameters
Type Name Description
BaseVirtualNode<TNodeID, TGraphID> other Other Virtual Node.
Returns
Type Description
System.Int32
Remarks
Unless Virtual Equality (equality based on the Virtual RDF Provider and Virtual ID) can be determined or the Nodes are of different types then the Nodes value will have to be materialised in order to perform comparison.
| Improve this Doc View Source

CompareTo(IVirtualNode<TNodeID, TGraphID>)

Compares this Node to another Virtual Node.
Declaration
public int CompareTo(IVirtualNode<TNodeID, TGraphID> other)
Parameters
Type Name Description
IVirtualNode<TNodeID, TGraphID> other Other Virtual Node.
Returns
Type Description
System.Int32
Remarks
Unless Virtual Equality (equality based on the Virtual RDF Provider and Virtual ID) can be determined or the Nodes are of different types then the Nodes value will have to be materialised in order to perform comparison.
| Improve this Doc View Source

CompareVirtualId(TNodeID)

Method to be implemented in derived classes to provide comparison of VirtualId values.
Declaration
public abstract int CompareVirtualId(TNodeID other)
Parameters
Type Name Description
TNodeID other The other virtual ID value to be compared with this node's virtual ID value.
Returns
Type Description
System.Int32 The comparison result.
| Improve this Doc View Source

CopyNode(IGraph)

Copies the Virtual Node into another Graph.
Declaration
public abstract INode CopyNode(IGraph target)
Parameters
Type Name Description
IGraph target Target Graph.
Returns
Type Description
INode
| Improve this Doc View Source

Equals(Object)

Checks this Node for equality against another Object.
Declaration
public sealed override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj Other Object.
Returns
Type Description
System.Boolean
Overrides
System.Object.Equals(System.Object)
Remarks
Unless Virtual Equality (equality based on the Virtual RDF Provider and Virtual ID) can be determined or the Nodes are of different types then the Nodes value will have to be materialised in order to perform the equality check.
| Improve this Doc View Source

Equals(IBlankNode)

Checks this Node for equality against another Blank Node.
Declaration
public virtual bool Equals(IBlankNode other)
Parameters
Type Name Description
IBlankNode other Other Blank Node.
Returns
Type Description
System.Boolean
Remarks
Unless Virtual Equality (equality based on the Virtual RDF Provider and Virtual ID) can be determined or the Nodes are of different types then the Nodes value will have to be materialised in order to perform the equality check.
| Improve this Doc View Source

Equals(IGraphLiteralNode)

Checks this Node for equality against another Graph Literal Node.
Declaration
public virtual bool Equals(IGraphLiteralNode other)
Parameters
Type Name Description
IGraphLiteralNode other Other Graph Literal Node.
Returns
Type Description
System.Boolean
Remarks
Unless Virtual Equality (equality based on the Virtual RDF Provider and Virtual ID) can be determined or the Nodes are of different types then the Nodes value will have to be materialised in order to perform the equality check.
| Improve this Doc View Source

Equals(ILiteralNode)

Checks this Node for equality against another Literal Node.
Declaration
public virtual bool Equals(ILiteralNode other)
Parameters
Type Name Description
ILiteralNode other Other Literal Node.
Returns
Type Description
System.Boolean
Remarks
Unless Virtual Equality (equality based on the Virtual RDF Provider and Virtual ID) can be determined or the Nodes are of different types then the Nodes value will have to be materialised in order to perform the equality check.
| Improve this Doc View Source

Equals(INode)

Checks this Node for equality against another Node.
Declaration
public bool Equals(INode other)
Parameters
Type Name Description
INode other Other Node.
Returns
Type Description
System.Boolean
Remarks
Unless Virtual Equality (equality based on the Virtual RDF Provider and Virtual ID) can be determined or the Nodes are of different types then the Nodes value will have to be materialised in order to perform the equality check.
| Improve this Doc View Source

Equals(IUriNode)

Checks this Node for equality against another URI Node.
Declaration
public virtual bool Equals(IUriNode other)
Parameters
Type Name Description
IUriNode other Other URI Node.
Returns
Type Description
System.Boolean
Remarks
Unless Virtual Equality (equality based on the Virtual RDF Provider and Virtual ID) can be determined or the Nodes are of different types then the Nodes value will have to be materialised in order to perform the equality check.
| Improve this Doc View Source

Equals(IVariableNode)

Checks this Node for equality against another Variable Node.
Declaration
public virtual bool Equals(IVariableNode other)
Parameters
Type Name Description
IVariableNode other Other Variable Node.
Returns
Type Description
System.Boolean
Remarks
Unless Virtual Equality (equality based on the Virtual RDF Provider and Virtual ID) can be determined or the Nodes are of different types then the Nodes value will have to be materialised in order to perform the equality check.
| Improve this Doc View Source

Equals(BaseVirtualNode<TNodeID, TGraphID>)

Checks this Node for equality against another Virtual Node.
Declaration
public bool Equals(BaseVirtualNode<TNodeID, TGraphID> other)
Parameters
Type Name Description
BaseVirtualNode<TNodeID, TGraphID> other Other Virtual Node.
Returns
Type Description
System.Boolean
Remarks
Unless Virtual Equality (equality based on the Virtual RDF Provider and Virtual ID) can be determined or the Nodes are of different types then the Nodes value will have to be materialised in order to perform the equality check.
| Improve this Doc View Source

Equals(IVirtualNode<TNodeID, TGraphID>)

Checks this Node for equality against another Virtual Node.
Declaration
public bool Equals(IVirtualNode<TNodeID, TGraphID> other)
Parameters
Type Name Description
IVirtualNode<TNodeID, TGraphID> other Other Virtual Node.
Returns
Type Description
System.Boolean
Remarks
Unless Virtual Equality (equality based on the Virtual RDF Provider and Virtual ID) can be determined or the Nodes are of different types then the Nodes value will have to be materialised in order to perform the equality check.
| Improve this Doc View Source

GetHashCode()

Gets the Hash Code of the Virtual Node.
Declaration
public sealed override int GetHashCode()
Returns
Type Description
System.Int32
Overrides
System.Object.GetHashCode()
| Improve this Doc View Source

GetObjectData(SerializationInfo, StreamingContext)

Gets the data for serialization.
Declaration
public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type Name Description
System.Runtime.Serialization.SerializationInfo info Serialization Information.
System.Runtime.Serialization.StreamingContext context Streaming Context.
Exceptions
Type Condition
System.NotImplementedException Thrown because serializing a Virtual Node would be lossy.
| Improve this Doc View Source

GetSchema()

Gets the schema for XML serialization.
Declaration
public XmlSchema GetSchema()
Returns
Type Description
System.Xml.Schema.XmlSchema
| Improve this Doc View Source

MaterialiseValue()

Materialises the Value if it is not already materialised.
Declaration
protected void MaterialiseValue()
| Improve this Doc View Source

OnMaterialise()

Called after the value is materialised for the first time.
Declaration
protected virtual void OnMaterialise()
| Improve this Doc View Source

ReadXml(XmlReader)

Reads the data for XML deserialization.
Declaration
public virtual void ReadXml(XmlReader reader)
Parameters
Type Name Description
System.Xml.XmlReader reader XML Reader.
Exceptions
Type Condition
System.NotImplementedException Thrown because serializing a Virtual Node would be lossy.
| Improve this Doc View Source

ToString()

Gets the String representation of the Node.
Declaration
public sealed override string ToString()
Returns
Type Description
System.String
Overrides
System.Object.ToString()
| Improve this Doc View Source

ToString(INodeFormatter)

Gets the String representation of the Node formatted with the given Node formatter.
Declaration
public string ToString(INodeFormatter formatter)
Parameters
Type Name Description
INodeFormatter formatter Formatter.
Returns
Type Description
System.String
| Improve this Doc View Source

ToString(INodeFormatter, TripleSegment)

Gets the String representation of the Node formatted with the given Node formatter.
Declaration
public string ToString(INodeFormatter formatter, TripleSegment segment)
Parameters
Type Name Description
INodeFormatter formatter Formatter.
TripleSegment segment Triple Segment.
Returns
Type Description
System.String
| Improve this Doc View Source

TryCompareVirtualId(INode, out Int32)

Attempt to compare this node with another node.
Declaration
public bool TryCompareVirtualId(INode other, out int comparisonResult)
Parameters
Type Name Description
INode other The node to compare to.
System.Int32 comparisonResult The comparison result.
Returns
Type Description
System.Boolean True if the comparison could be performed, false otherwise.
Remarks
This node can only be compared to other if other is a IVirtualNode<TNodeID, TGraphID> from the same IVirtualRdfProvider<TNodeID, TGraphID> as this node.
| Improve this Doc View Source

TryVirtualEquality(INode, out Boolean)

Tries to check for equality using virtual node IDs.
Declaration
protected bool TryVirtualEquality(INode other, out bool areEqual)
Parameters
Type Name Description
INode other Node to test against.
System.Boolean areEqual Whether the virtual nodes are equal.
Returns
Type Description
System.Boolean Whether the virtual equality test was valid, if false then other means must be used to determine equality.
| Improve this Doc View Source

WriteXml(XmlWriter)

Writes the data for XML deserialization.
Declaration
public virtual void WriteXml(XmlWriter writer)
Parameters
Type Name Description
System.Xml.XmlWriter writer XML Writer.
Exceptions
Type Condition
System.NotImplementedException Thrown because serializing a Virtual Node would be lossy.

Implements

IVirtualNode<TNodeID, TGraphID>
INode
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.Runtime.Serialization.ISerializable
System.Xml.Serialization.IXmlSerializable
System.IEquatable<T>
System.IComparable<T>
IVirtualIdComparable
System.IEquatable<T>
System.IComparable<T>
ICanCopy

Extension Methods

Extensions.AsEnumerable<T>(T)
Extensions.IsListRoot(INode, IGraph)
Extensions.CopyNode(INode, IGraph)
Extensions.CopyNode(INode, IGraph, Boolean)
DynamicExtensions.AsDynamic(INode, Uri)
ValuedNodeExtensions.AsValuedNode(INode)
  • Improve this Doc
  • View Source
In This Article
  • Constructors
    • BaseVirtualNode(IGraph, NodeType, TNodeID, IVirtualRdfProvider<TNodeID, TGraphID>)
    • BaseVirtualNode(IGraph, NodeType, TNodeID, IVirtualRdfProvider<TNodeID, TGraphID>, INode)
  • Fields
    • _value
  • Properties
    • Graph
    • GraphUri
    • IsMaterialised
    • MaterialisedValue
    • NodeType
    • Provider
    • VirtualID
  • Methods
    • CompareTo(IBlankNode)
    • CompareTo(IGraphLiteralNode)
    • CompareTo(ILiteralNode)
    • CompareTo(INode)
    • CompareTo(IUriNode)
    • CompareTo(IVariableNode)
    • CompareTo(BaseVirtualNode<TNodeID, TGraphID>)
    • CompareTo(IVirtualNode<TNodeID, TGraphID>)
    • CompareVirtualId(TNodeID)
    • CopyNode(IGraph)
    • Equals(Object)
    • Equals(IBlankNode)
    • Equals(IGraphLiteralNode)
    • Equals(ILiteralNode)
    • Equals(INode)
    • Equals(IUriNode)
    • Equals(IVariableNode)
    • Equals(BaseVirtualNode<TNodeID, TGraphID>)
    • Equals(IVirtualNode<TNodeID, TGraphID>)
    • GetHashCode()
    • GetObjectData(SerializationInfo, StreamingContext)
    • GetSchema()
    • MaterialiseValue()
    • OnMaterialise()
    • ReadXml(XmlReader)
    • ToString()
    • ToString(INodeFormatter)
    • ToString(INodeFormatter, TripleSegment)
    • TryCompareVirtualId(INode, out Int32)
    • TryVirtualEquality(INode, out Boolean)
    • WriteXml(XmlWriter)
  • Implements
  • Extension Methods
Back to top Generated by DocFX