Class BaseVirtualLiteralNode<TNodeID, TGraphID>
Abstract Base implementation of a Virtual Literal Node.
Implements
Inherited Members
Namespace: VDS.RDF.Storage.Virtualisation
Assembly: dotNetRdf.dll
Syntax
public abstract class BaseVirtualLiteralNode<TNodeID, TGraphID> : BaseVirtualNode<TNodeID, TGraphID>, IVirtualNode<TNodeID, TGraphID>, IEquatable<IVirtualNode<TNodeID, TGraphID>>, IComparable<IVirtualNode<TNodeID, TGraphID>>, IVirtualIdComparable, IEquatable<BaseVirtualNode<TNodeID, TGraphID>>, IComparable<BaseVirtualNode<TNodeID, TGraphID>>, ICanCopy, ILiteralNode, IEquatable<BaseVirtualLiteralNode<TNodeID, TGraphID>>, IComparable<BaseVirtualLiteralNode<TNodeID, TGraphID>>, IValuedNode, 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>
Type Parameters
Name | Description |
---|---|
TNodeID | Node ID Type. |
TGraphID | Graph ID Type. |
Constructors
| Edit this page View SourceBaseVirtualLiteralNode(IGraph, TNodeID, IVirtualRdfProvider<TNodeID, TGraphID>)
Creates a new Virtual Literal Node.
Declaration
protected BaseVirtualLiteralNode(IGraph g, TNodeID id, IVirtualRdfProvider<TNodeID, TGraphID> provider)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph the Node belongs to. |
TNodeID | id | Virtual ID. |
IVirtualRdfProvider<TNodeID, TGraphID> | provider | Virtual RDF Provider. |
BaseVirtualLiteralNode(IGraph, TNodeID, IVirtualRdfProvider<TNodeID, TGraphID>, ILiteralNode)
Creates a new Virtual Literal Node.
Declaration
protected BaseVirtualLiteralNode(IGraph g, TNodeID id, IVirtualRdfProvider<TNodeID, TGraphID> provider, ILiteralNode value)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph the Node belongs to. |
TNodeID | id | Virtual ID. |
IVirtualRdfProvider<TNodeID, TGraphID> | provider | Virtual RDF Provider. |
ILiteralNode | value | Materialised Value. |
Properties
| Edit this page View SourceDataType
Gets the Datatype (if any) of the Literal.
Declaration
public Uri DataType { get; }
Property Value
Type | Description |
---|---|
Uri |
EffectiveType
Gets the URI of the datatype this valued node represents as a String.
Declaration
public string EffectiveType { get; }
Property Value
Type | Description |
---|---|
string |
Language
Gets the language specifier (if any) of the Literal.
Declaration
public string Language { get; }
Property Value
Type | Description |
---|---|
string |
NumericType
Gets the numeric type of the node.
Declaration
public SparqlNumericType NumericType { get; }
Property Value
Type | Description |
---|---|
SparqlNumericType |
Value
Gets the lexical value of the Literal.
Declaration
public string Value { get; }
Property Value
Type | Description |
---|---|
string |
Methods
| Edit this page View SourceAsBoolean()
Gets the value as a boolean.
Declaration
public bool AsBoolean()
Returns
Type | Description |
---|---|
bool |
Remarks
Forces a materialisation of the value.
AsDateTime()
Gets the value as a date time.
Declaration
public DateTime AsDateTime()
Returns
Type | Description |
---|---|
DateTime |
Remarks
Forces a materialisation of the value.
AsDateTimeOffset()
Gets the value as a date time.
Declaration
public DateTimeOffset AsDateTimeOffset()
Returns
Type | Description |
---|---|
DateTimeOffset |
Remarks
Forces a materialisation of the value.
AsDecimal()
Gets the value as a decimal.
Declaration
public decimal AsDecimal()
Returns
Type | Description |
---|---|
decimal |
Remarks
Forces a materialisation of the value.
AsDouble()
Gets the value as a double.
Declaration
public double AsDouble()
Returns
Type | Description |
---|---|
double |
Remarks
Forces a materialisation of the value.
AsFloat()
Gets the value as a float.
Declaration
public float AsFloat()
Returns
Type | Description |
---|---|
float |
Remarks
Forces a materialisation of the value.
AsInteger()
Gets the value as an integer.
Declaration
public long AsInteger()
Returns
Type | Description |
---|---|
long |
Remarks
Forces a materialisation of the value.
AsString()
Gets the value as a string.
Declaration
public string AsString()
Returns
Type | Description |
---|---|
string |
Remarks
Forces a materialisation of the value.
AsTimeSpan()
Gets the value as a time span.
Declaration
public TimeSpan AsTimeSpan()
Returns
Type | Description |
---|---|
TimeSpan |
Remarks
Forces a materialisation of the value.
CompareTo(ILiteralNode)
Compares this Node to another Literal Node.
Declaration
public override int CompareTo(ILiteralNode other)
Parameters
Type | Name | Description |
---|---|---|
ILiteralNode | other | Other Literal Node. |
Returns
Type | Description |
---|---|
int |
Overrides
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.
CompareTo(BaseVirtualLiteralNode<TNodeID, TGraphID>)
Compares this Node to another Literal Node.
Declaration
public int CompareTo(BaseVirtualLiteralNode<TNodeID, TGraphID> other)
Parameters
Type | Name | Description |
---|---|---|
BaseVirtualLiteralNode<TNodeID, TGraphID> | other | Other Literal Node. |
Returns
Type | Description |
---|---|
int |
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.
Equals(ILiteralNode)
Checks this Node for equality against another Literal Node.
Declaration
public override bool Equals(ILiteralNode other)
Parameters
Type | Name | Description |
---|---|---|
ILiteralNode | other | Other Literal Node. |
Returns
Type | Description |
---|---|
bool |
Overrides
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.
Equals(BaseVirtualLiteralNode<TNodeID, TGraphID>)
Checks this Node for equality against another Literal Node.
Declaration
public bool Equals(BaseVirtualLiteralNode<TNodeID, TGraphID> other)
Parameters
Type | Name | Description |
---|---|---|
BaseVirtualLiteralNode<TNodeID, TGraphID> | other | Other Literal Node. |
Returns
Type | Description |
---|---|
bool |
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.
OnMaterialise()
Takes post materialisation actions.
Declaration
protected override sealed void OnMaterialise()