Class NumericNode
A Valued Node with a numeric value.
Inheritance
System.Object
NumericNode
Implements
System.IEquatable<T><BaseLiteralNode>
System.IComparable<T><BaseLiteralNode>
System.IEquatable<T><LiteralNode>
System.IComparable<T><LiteralNode>
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
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 SourceNumericNode(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 |
Properties
| Improve this Doc View SourceEffectiveType
Gets the URI of the datatype this valued node represents as a String.
Declaration
public string EffectiveType { get; }
Property Value
Type | Description |
---|---|
string |
NumericType
Gets the numeric type of the node.
Declaration
public SparqlNumericType NumericType { get; }
Property Value
Type | Description |
---|---|
SparqlNumericType |
Methods
| Improve this Doc View SourceAsBoolean()
Gets the boolean value.
Declaration
public bool AsBoolean()
Returns
Type | Description |
---|---|
System.Boolean |
AsDateTime()
Throws an error as numerics cannot be converted to date times.
Declaration
public DateTime AsDateTime()
Returns
Type | Description |
---|---|
System.DateTime |
AsDateTimeOffset()
Throws an error as numerics cannot be converted to date times.
Declaration
public DateTimeOffset AsDateTimeOffset()
Returns
Type | Description |
---|---|
System.DateTimeOffset |
AsDecimal()
Gets the decimal value.
Declaration
public abstract decimal AsDecimal()
Returns
Type | Description |
---|---|
decimal |
AsDouble()
Gets the double value.
Declaration
public abstract double AsDouble()
Returns
Type | Description |
---|---|
double |
AsFloat()
Gets the float value.
Declaration
public abstract float AsFloat()
Returns
Type | Description |
---|---|
float |
AsInteger()
Gets the integer value.
Declaration
public abstract long AsInteger()
Returns
Type | Description |
---|---|
long |
AsString()
Gets the string value of the node.
Declaration
public string AsString()
Returns
Type | Description |
---|---|
string |
AsTimeSpan()
Throws an error as numerics cannot be cast to a time span.
Declaration
public TimeSpan AsTimeSpan()
Returns
Type | Description |
---|---|
System.TimeSpan |
Implements
System.IEquatable<T>
System.IComparable<T>
System.IEquatable<T>
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.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>