Show / Hide Table of Contents

Class BaseGraphLiteralNode

Abstract Base Class for Graph Literal Nodes.

Inheritance
System.Object
BaseNode
BaseGraphLiteralNode
GraphLiteralNode
Implements
IGraphLiteralNode
System.IEquatable<T><BaseGraphLiteralNode>
System.IComparable<T><BaseGraphLiteralNode>
IValuedNode
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>
Inherited Members
BaseNode._nodeType
BaseNode.NodeType
BaseNode.ToString(INodeFormatter)
BaseNode.ToString(INodeFormatter, TripleSegment)
object.Equals(object, object)
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: VDS.RDF
Assembly: dotNetRdf.dll
Syntax
public abstract class BaseGraphLiteralNode : BaseNode, IGraphLiteralNode, IEquatable<BaseGraphLiteralNode>, IComparable<BaseGraphLiteralNode>, 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>

Constructors

| Improve this Doc View Source

BaseGraphLiteralNode()

Creates a new graph literal node which represents a new empty sub-graph.

Declaration
protected BaseGraphLiteralNode()
| Improve this Doc View Source

BaseGraphLiteralNode(IGraph)

Creates a new Graph Literal Node which represents the given sub-graph.

Declaration
protected BaseGraphLiteralNode(IGraph subGraph)
Parameters
Type Name Description
IGraph subGraph

Sub-graph this node represents.

Properties

| Improve this Doc View Source

EffectiveType

Gets the URI of the datatype this valued node represents as a String.

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

NumericType

Gets the numeric type of the node.

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

SubGraph

Gets the sub-graph that this Node represents.

Declaration
public IGraph SubGraph { get; }
Property Value
Type Description
IGraph

Methods

| Improve this Doc View Source

AsBoolean()

Throws an error as Graph Literals cannot be cast to a boolean.

Declaration
public bool AsBoolean()
Returns
Type Description
System.Boolean
| Improve this Doc View Source

AsDateTime()

Throws an error as Graph Literals cannot be cast to a date time.

Declaration
public DateTime AsDateTime()
Returns
Type Description
System.DateTime
| Improve this Doc View Source

AsDateTimeOffset()

Throws an error as Graph Literals cannot be cast to a date time.

Declaration
public DateTimeOffset AsDateTimeOffset()
Returns
Type Description
System.DateTimeOffset
| Improve this Doc View Source

AsDecimal()

Throws an error as Graph Literals cannot be cast to a decimal.

Declaration
public decimal AsDecimal()
Returns
Type Description
decimal
| Improve this Doc View Source

AsDouble()

Throws an error as Graph Literals cannot be cast to a double.

Declaration
public double AsDouble()
Returns
Type Description
double
| Improve this Doc View Source

AsFloat()

Throws an error as Graph Literals cannot be cast to a float.

Declaration
public float AsFloat()
Returns
Type Description
float
| Improve this Doc View Source

AsInteger()

Throws an error as Graph Literals cannot be cast to an integer.

Declaration
public long AsInteger()
Returns
Type Description
long
| Improve this Doc View Source

AsString()

Throws an error as Graph Literals cannot be cast to a string.

Declaration
public string AsString()
Returns
Type Description
string
| Improve this Doc View Source

AsTimeSpan()

Throws an error as Graph Literals cannot be cast to a time span.

Declaration
public TimeSpan AsTimeSpan()
Returns
Type Description
System.TimeSpan
| Improve this Doc View Source

CompareTo(BaseGraphLiteralNode)

Returns an Integer indicating the Ordering of this Node compared to another Node.

Declaration
public int CompareTo(BaseGraphLiteralNode other)
Parameters
Type Name Description
BaseGraphLiteralNode other

Node to test against.

Returns
Type Description
int
| Improve this Doc View Source

CompareTo(IBlankNode)

Returns an Integer indicating the Ordering of this Node compared to another Node.

Declaration
public override int CompareTo(IBlankNode other)
Parameters
Type Name Description
IBlankNode other

Node to test against.

Returns
Type Description
int
Overrides
BaseNode.CompareTo(IBlankNode)
| Improve this Doc View Source

CompareTo(IGraphLiteralNode)

Returns an Integer indicating the Ordering of this Node compared to another Node.

Declaration
public override int CompareTo(IGraphLiteralNode other)
Parameters
Type Name Description
IGraphLiteralNode other

Node to test against.

Returns
Type Description
int
Overrides
BaseNode.CompareTo(IGraphLiteralNode)
| Improve this Doc View Source

CompareTo(ILiteralNode)

Returns an Integer indicating the Ordering of this Node compared to another Node.

Declaration
public override int CompareTo(ILiteralNode other)
Parameters
Type Name Description
ILiteralNode other

Node to test against.

Returns
Type Description
int
Overrides
BaseNode.CompareTo(ILiteralNode)
| Improve this Doc View Source

CompareTo(INode)

Implementation of CompareTo for Graph Literals.

Declaration
public override int CompareTo(INode other)
Parameters
Type Name Description
INode other

Node to compare to.

Returns
Type Description
int
Overrides
BaseNode.CompareTo(INode)
Remarks

Graph Literal Nodes are greater than Blank Nodes, Uri Nodes, Literal Nodes and Nulls.

| Improve this Doc View Source

CompareTo(IRefNode)

Returns an Integer indicating the Ordering of this Node compared to another Node.

Declaration
public override int CompareTo(IRefNode other)
Parameters
Type Name Description
IRefNode other

Node to test against.

Returns
Type Description
int
Overrides
BaseNode.CompareTo(IRefNode)
| Improve this Doc View Source

CompareTo(ITripleNode)

Returns an Integer indicating the Ordering of this Node compared to another Node.

Declaration
public override int CompareTo(ITripleNode other)
Parameters
Type Name Description
ITripleNode other

Node to test against.

Returns
Type Description
int
Overrides
BaseNode.CompareTo(ITripleNode)
| Improve this Doc View Source

CompareTo(IUriNode)

Returns an Integer indicating the Ordering of this Node compared to another Node.

Declaration
public override int CompareTo(IUriNode other)
Parameters
Type Name Description
IUriNode other

Node to test against.

Returns
Type Description
int
Overrides
BaseNode.CompareTo(IUriNode)
| Improve this Doc View Source

CompareTo(IVariableNode)

Returns an Integer indicating the Ordering of this Node compared to another Node.

Declaration
public override int CompareTo(IVariableNode other)
Parameters
Type Name Description
IVariableNode other

Node to test against.

Returns
Type Description
int
Overrides
BaseNode.CompareTo(IVariableNode)
| Improve this Doc View Source

Equals(object)

Implementation of the Equals method for Graph Literal Nodes. Graph Literals are considered Equal if their respective sub-graphs are equal.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj

Object to compare the Node with.

Returns
Type Description
System.Boolean
Overrides
BaseNode.Equals(object)
| Improve this Doc View Source

Equals(BaseGraphLiteralNode)

Determines whether this Node is equal to a Graph Literal Node.

Declaration
public bool Equals(BaseGraphLiteralNode other)
Parameters
Type Name Description
BaseGraphLiteralNode other

Graph Literal Node.

Returns
Type Description
System.Boolean
| Improve this Doc View Source

Equals(IBlankNode)

Determines whether this Node is equal to a Blank Node (should always be false).

Declaration
public override bool Equals(IBlankNode other)
Parameters
Type Name Description
IBlankNode other

Blank Node.

Returns
Type Description
System.Boolean
Overrides
BaseNode.Equals(IBlankNode)
| Improve this Doc View Source

Equals(IGraphLiteralNode)

Determines whether this Node is equal to a Graph Literal Node.

Declaration
public override bool Equals(IGraphLiteralNode other)
Parameters
Type Name Description
IGraphLiteralNode other

Graph Literal Node.

Returns
Type Description
System.Boolean
Overrides
BaseNode.Equals(IGraphLiteralNode)
| Improve this Doc View Source

Equals(ILiteralNode)

Determines whether this Node is equal to a Literal Node (should always be false).

Declaration
public override bool Equals(ILiteralNode other)
Parameters
Type Name Description
ILiteralNode other

Literal Node.

Returns
Type Description
System.Boolean
Overrides
BaseNode.Equals(ILiteralNode)
| Improve this Doc View Source

Equals(INode)

Implementation of the Equals method for Graph Literal Nodes. Graph Literals are considered Equal if their respective sub-graphs are equal.

Declaration
public override bool Equals(INode other)
Parameters
Type Name Description
INode other

Object to compare the Node with.

Returns
Type Description
System.Boolean
Overrides
BaseNode.Equals(INode)
| Improve this Doc View Source

Equals(IRefNode)

Determines whether this Node is equal to a RefNode (should always be false).

Declaration
public override bool Equals(IRefNode other)
Parameters
Type Name Description
IRefNode other

Ref Node (a blank node or URI node).

Returns
Type Description
System.Boolean
Overrides
BaseNode.Equals(IRefNode)
| Improve this Doc View Source

Equals(ITripleNode)

Determines whether this Node is equal to a Triple Node (should always be false).

Declaration
public override bool Equals(ITripleNode other)
Parameters
Type Name Description
ITripleNode other

Triple Node.

Returns
Type Description
System.Boolean
Overrides
BaseNode.Equals(ITripleNode)
| Improve this Doc View Source

Equals(IUriNode)

Determines whether this Node is equal to a URI Node (should always be false).

Declaration
public override bool Equals(IUriNode other)
Parameters
Type Name Description
IUriNode other

URI Node.

Returns
Type Description
System.Boolean
Overrides
BaseNode.Equals(IUriNode)
| Improve this Doc View Source

Equals(IVariableNode)

Determines whether this Node is equal to a Variable Node (should always be false).

Declaration
public override bool Equals(IVariableNode other)
Parameters
Type Name Description
IVariableNode other

Variable Node.

Returns
Type Description
System.Boolean
Overrides
BaseNode.Equals(IVariableNode)
| Improve this Doc View Source

GetHashCode()

Serves as the default hash function.

Declaration
public override int GetHashCode()
Returns
Type Description
int

A hash code for the current object.

Overrides
BaseNode.GetHashCode()
| Improve this Doc View Source

ToString()

Implementation of ToString for Graph Literals which produces a String representation of the sub-graph in N3 style syntax.

Declaration
public override string ToString()
Returns
Type Description
string
Overrides
BaseNode.ToString()

Implements

IGraphLiteralNode
System.IEquatable<T>
System.IComparable<T>
IValuedNode
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>

Extension Methods

Extensions.ToSafeString(object)
Extensions.AsEnumerable<T>(T)
DynamicExtensions.AsDynamic(INode, IGraph, Uri)
Extensions.EffectiveBooleanValue(INode)
Extensions.IsListRoot(INode, IGraph)
ValuedNodeExtensions.AsValuedNode(INode)
ValuedNodeExtensions.AsSafeBoolean(IValuedNode)
  • Improve this Doc
  • View Source
In This Article
  • Constructors
    • BaseGraphLiteralNode()
    • BaseGraphLiteralNode(IGraph)
  • Properties
    • EffectiveType
    • NumericType
    • SubGraph
  • Methods
    • AsBoolean()
    • AsDateTime()
    • AsDateTimeOffset()
    • AsDecimal()
    • AsDouble()
    • AsFloat()
    • AsInteger()
    • AsString()
    • AsTimeSpan()
    • CompareTo(BaseGraphLiteralNode)
    • CompareTo(IBlankNode)
    • CompareTo(IGraphLiteralNode)
    • CompareTo(ILiteralNode)
    • CompareTo(INode)
    • CompareTo(IRefNode)
    • CompareTo(ITripleNode)
    • CompareTo(IUriNode)
    • CompareTo(IVariableNode)
    • Equals(object)
    • Equals(BaseGraphLiteralNode)
    • Equals(IBlankNode)
    • Equals(IGraphLiteralNode)
    • Equals(ILiteralNode)
    • Equals(INode)
    • Equals(IRefNode)
    • Equals(ITripleNode)
    • Equals(IUriNode)
    • Equals(IVariableNode)
    • GetHashCode()
    • ToString()
  • Implements
  • Extension Methods
Back to top Generated by DocFX