Show / Hide Table of Contents

Class BaseTripleNode

Base class for triple nodes.

Inheritance
object
BaseNode
BaseTripleNode
TripleNode
Implements
ITripleNode
IRefNode
IEquatable<BaseTripleNode>
IComparable<BaseTripleNode>
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>
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 BaseTripleNode : BaseNode, ITripleNode, IRefNode, IEquatable<BaseTripleNode>, IComparable<BaseTripleNode>, 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

| Edit this page View Source

BaseTripleNode(Triple)

Internal-only constructor for triple nodes.

Declaration
protected BaseTripleNode(Triple triple)
Parameters
Type Name Description
Triple triple

The triple that is the value of this node.

Properties

| Edit this page 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
Remarks

Either String.Empty if no type or the string form of the type URI.

| Edit this page View Source

NumericType

Gets the Numeric Type of the Node.

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

Triple

Get the triple that is the value of this node.

Declaration
public Triple Triple { get; }
Property Value
Type Description
Triple

Methods

| Edit this page View Source

AsBoolean()

Gets the Boolean value of the Node.

Declaration
public bool AsBoolean()
Returns
Type Description
bool
Exceptions
Type Condition
RdfQueryException

Thrown if the Node cannot be converted to a Boolean.

| Edit this page View Source

AsDateTime()

Gets the Date Time value of the Node.

Declaration
public DateTime AsDateTime()
Returns
Type Description
DateTime
Exceptions
Type Condition
RdfQueryException

Thrown if the Node cannot be converted to a Date Time.

| Edit this page View Source

AsDateTimeOffset()

Gets the Date Time Offset value of the Node.

Declaration
public DateTimeOffset AsDateTimeOffset()
Returns
Type Description
DateTimeOffset
Exceptions
Type Condition
RdfQueryException

Thrown if the Node cannot be converted to a Date Time Offset.

| Edit this page View Source

AsDecimal()

Gets the Decimal value of the Node.

Declaration
public decimal AsDecimal()
Returns
Type Description
decimal
Exceptions
Type Condition
RdfQueryException

Thrown if the Node cannot be converted to a Decimal.

| Edit this page View Source

AsDouble()

Gets the Double value of the Node.

Declaration
public double AsDouble()
Returns
Type Description
double
Exceptions
Type Condition
RdfQueryException

Thrown if the Node cannot be converted to a Double.

| Edit this page View Source

AsFloat()

Gets the Float value of the Node.

Declaration
public float AsFloat()
Returns
Type Description
float
Exceptions
Type Condition
RdfQueryException

Thrown if the Node cannot be converted to a Float.

| Edit this page View Source

AsInteger()

Gets the Long value of the Node.

Declaration
public long AsInteger()
Returns
Type Description
long
Exceptions
Type Condition
RdfQueryException

Thrown if the Node cannot be converted to a Long.

| Edit this page View Source

AsString()

Gets the String value of the Node.

Declaration
public string AsString()
Returns
Type Description
string
Remarks

This is distinct from ToString() because that method will typically include additional information like language specifier/datatype as appropriate whereas this method is used to produce a string as would be produced by applying the STR() function from SPARQL.

| Edit this page View Source

AsTimeSpan()

Gets the Time Span value of the Node.

Declaration
public TimeSpan AsTimeSpan()
Returns
Type Description
TimeSpan
| Edit this page View Source

CompareTo(BaseTripleNode)

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

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

Node to test against.

Returns
Type Description
int
| Edit this page 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)
| Edit this page 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)
| Edit this page 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)
| Edit this page View Source

CompareTo(INode)

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

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

Node to test against.

Returns
Type Description
int
Overrides
BaseNode.CompareTo(INode)
| Edit this page 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)
| Edit this page 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)
| Edit this page 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)
| Edit this page 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)
| Edit this page View Source

Equals(object)

Object equality for triple nodes.

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

The object to compare this node with.

Returns
Type Description
bool

True if obj is an Triple node and its triple value compares as equal to this node's triple value.

Overrides
BaseNode.Equals(object)
| Edit this page View Source

Equals(BaseTripleNode)

Determines whether this node is equal to another triple node.

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

The other node to compare with.

Returns
Type Description
bool

True if the Triple property of other compares as equal to the Triple property of this node, false otherwise.

| Edit this page View Source

Equals(IBlankNode)

Determines whether this node is equal to a blank node.

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

The node to compare to.

Returns
Type Description
bool

Always false.

Overrides
BaseNode.Equals(IBlankNode)
| Edit this page 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

The node to compare to.

Returns
Type Description
bool

Always false.

Overrides
BaseNode.Equals(IGraphLiteralNode)
| Edit this page View Source

Equals(ILiteralNode)

Determines whether this node is equal to a literal node.

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

The node to compare to.

Returns
Type Description
bool

Always false.

Overrides
BaseNode.Equals(ILiteralNode)
| Edit this page View Source

Equals(INode)

Determines whether this node is equal to another node.

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

The other node to compare with.

Returns
Type Description
bool

True if other is a triple node whose triple compares as equal to the triple of this node, false otherwise.

Overrides
BaseNode.Equals(INode)
| Edit this page View Source

Equals(IRefNode)

Determines whether this node is equal to another resource reference node.

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

The other node to compare with.

Returns
Type Description
bool
Overrides
BaseNode.Equals(IRefNode)
| Edit this page View Source

Equals(ITripleNode)

Determines whether this node is equal to another triple node.

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

The other node to compare with.

Returns
Type Description
bool

True if the Triple property of other compares as equal to the Triple property of this node, false otherwise.

Overrides
BaseNode.Equals(ITripleNode)
| Edit this page View Source

Equals(IUriNode)

Determines whether this node is equal to a URI node.

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

The node to compare to.

Returns
Type Description
bool

Always false.

Overrides
BaseNode.Equals(IUriNode)
| Edit this page View Source

Equals(IVariableNode)

Determines whether this node is equal to a variable node.

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

The node to compare to.

Returns
Type Description
bool

Always false.

Overrides
BaseNode.Equals(IVariableNode)
| Edit this page 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()
| Edit this page View Source

ToString()

Get a string representation of a triple node.

Declaration
public override string ToString()
Returns
Type Description
string

Gives the string value of Triple enclosed in the RDF-star << >> quotes.

Overrides
BaseNode.ToString()

Implements

ITripleNode
IRefNode
IEquatable<T>
IComparable<T>
IValuedNode
INode
IComparable<T>
IComparable<T>
IComparable<T>
IComparable<T>
IComparable<T>
IComparable<T>
IComparable<T>
IComparable<T>
IEquatable<T>
IEquatable<T>
IEquatable<T>
IEquatable<T>
IEquatable<T>
IEquatable<T>
IEquatable<T>
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)
  • Edit this page
  • View Source
In this article
  • Constructors
    • BaseTripleNode(Triple)
  • Properties
    • EffectiveType
    • NumericType
    • Triple
  • Methods
    • AsBoolean()
    • AsDateTime()
    • AsDateTimeOffset()
    • AsDecimal()
    • AsDouble()
    • AsFloat()
    • AsInteger()
    • AsString()
    • AsTimeSpan()
    • CompareTo(BaseTripleNode)
    • CompareTo(IBlankNode)
    • CompareTo(IGraphLiteralNode)
    • CompareTo(ILiteralNode)
    • CompareTo(INode)
    • CompareTo(IRefNode)
    • CompareTo(ITripleNode)
    • CompareTo(IUriNode)
    • CompareTo(IVariableNode)
    • Equals(object)
    • Equals(BaseTripleNode)
    • 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