Show / Hide Table of Contents

Class NumericNode

A Valued Node with a numeric value.

Inheritance
System.Object
BaseNode
BaseLiteralNode
LiteralNode
NumericNode
ByteNode
DecimalNode
DoubleNode
FloatNode
LongNode
SignedByteNode
UnsignedLongNode
Implements
ILiteralNode
System.IEquatable<T><BaseLiteralNode>
System.IComparable<T><BaseLiteralNode>
System.IEquatable<T><LiteralNode>
System.IComparable<T><LiteralNode>
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
LiteralNode.CompareTo(LiteralNode)
LiteralNode.Equals(LiteralNode)
BaseLiteralNode.Value
BaseLiteralNode.Language
BaseLiteralNode.DataType
BaseLiteralNode.Equals(object)
BaseLiteralNode.GetHashCode()
BaseLiteralNode.Equals(INode)
BaseLiteralNode.Equals(IRefNode)
BaseLiteralNode.Equals(IBlankNode)
BaseLiteralNode.Equals(IGraphLiteralNode)
BaseLiteralNode.Equals(ILiteralNode)
BaseLiteralNode.Equals(IUriNode)
BaseLiteralNode.Equals(IVariableNode)
BaseLiteralNode.Equals(ITripleNode)
BaseLiteralNode.Equals(BaseLiteralNode)
BaseLiteralNode.ToString()
BaseLiteralNode.CompareTo(INode)
BaseLiteralNode.CompareTo(IRefNode)
BaseLiteralNode.CompareTo(IBlankNode)
BaseLiteralNode.CompareTo(ILiteralNode)
BaseLiteralNode.CompareTo(IGraphLiteralNode)
BaseLiteralNode.CompareTo(IUriNode)
BaseLiteralNode.CompareTo(IVariableNode)
BaseLiteralNode.CompareTo(ITripleNode)
BaseLiteralNode.CompareTo(BaseLiteralNode)
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.Nodes
Assembly: dotNetRdf.dll
Syntax
public abstract class NumericNode : LiteralNode, ILiteralNode, IEquatable<BaseLiteralNode>, IComparable<BaseLiteralNode>, IEquatable<LiteralNode>, IComparable<LiteralNode>, 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

NumericNode(string, Uri, SparqlNumericType, bool)

Creates a new numeric valued node.

Declaration
protected NumericNode(string value, Uri datatype, SparqlNumericType numType, bool normalizeLiteralValue = false)
Parameters
Type Name Description
string value

Lexical Value.

System.Uri datatype

Datatype URI.

SparqlNumericType numType

SPARQL Numeric Type.

System.Boolean normalizeLiteralValue

Whether to perform unicode normalization on value.

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

Methods

| Improve this Doc View Source

AsBoolean()

Gets the boolean value.

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

AsDateTime()

Throws an error as numerics cannot be converted to date times.

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

AsDateTimeOffset()

Throws an error as numerics cannot be converted to date times.

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

AsDecimal()

Gets the decimal value.

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

AsDouble()

Gets the double value.

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

AsFloat()

Gets the float value.

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

AsInteger()

Gets the integer value.

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

AsString()

Gets the string value of the node.

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

AsTimeSpan()

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

Declaration
public TimeSpan AsTimeSpan()
Returns
Type Description
System.TimeSpan

Implements

ILiteralNode
System.IEquatable<T>
System.IComparable<T>
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)
DynamicExtensions.AsDynamic(INode, IGraph, Uri)
Extensions.EffectiveBooleanValue(INode)
Extensions.IsListRoot(INode, IGraph)
ValuedNodeExtensions.AsValuedNode(INode)
ValuedNodeExtensions.AsSafeBoolean(IValuedNode)
Extensions.AsEnumerable<T>(T)
  • Improve this Doc
  • View Source
In This Article
  • Constructors
    • NumericNode(string, Uri, SparqlNumericType, bool)
  • Properties
    • EffectiveType
    • NumericType
  • Methods
    • AsBoolean()
    • AsDateTime()
    • AsDateTimeOffset()
    • AsDecimal()
    • AsDouble()
    • AsFloat()
    • AsInteger()
    • AsString()
    • AsTimeSpan()
  • Implements
  • Extension Methods
Back to top Generated by DocFX