Class TimeSpanNode
Valued Node representing a Time Span value.
Implements
Inherited Members
Namespace: VDS.RDF.Nodes
Assembly: dotNetRdf.dll
Syntax
public class TimeSpanNode : 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 SourceTimeSpanNode(TimeSpan, string, Uri, bool)
Creates a new Time span node.
Declaration
public TimeSpanNode(TimeSpan value, string lexicalValue, Uri dtUri, bool normalizeLiteralValue = false)
Parameters
Type | Name | Description |
---|---|---|
System.TimeSpan | value | Time Span. |
string | lexicalValue | Lexical value. |
System.Uri | dtUri | Data type URI. |
System.Boolean | normalizeLiteralValue | Whether to perform unicode normalization on |
TimeSpanNode(TimeSpan, string)
Creates a new Time span node.
Declaration
public TimeSpanNode(TimeSpan value, string lexicalValue)
Parameters
Type | Name | Description |
---|---|---|
System.TimeSpan | value | Time Span. |
string | lexicalValue | Lexical value. |
TimeSpanNode(TimeSpan)
Creates a new Time span node.
Declaration
public TimeSpanNode(TimeSpan value)
Parameters
Type | Name | Description |
---|---|---|
System.TimeSpan | value | Time Span. |
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()
Throws an error as date times cannot be converted to booleans.
Declaration
public bool AsBoolean()
Returns
Type | Description |
---|---|
System.Boolean |
AsDateTime()
Gets the date time value of the node.
Declaration
public DateTime AsDateTime()
Returns
Type | Description |
---|---|
System.DateTime |
AsDateTimeOffset()
Gets the date time value of the node.
Declaration
public DateTimeOffset AsDateTimeOffset()
Returns
Type | Description |
---|---|
System.DateTimeOffset |
AsDecimal()
Throws an error as date times cannot be converted to decimals.
Declaration
public decimal AsDecimal()
Returns
Type | Description |
---|---|
decimal |
AsDouble()
Throws an error as date times cannot be converted to doubles.
Declaration
public double AsDouble()
Returns
Type | Description |
---|---|
double |
AsFloat()
Throws an error as date times cannot be converted to floats.
Declaration
public float AsFloat()
Returns
Type | Description |
---|---|
float |
AsInteger()
Throws an error as date times cannot be converted to integers.
Declaration
public long AsInteger()
Returns
Type | Description |
---|---|
long |
AsString()
Gets the date time value as a string.
Declaration
public string AsString()
Returns
Type | Description |
---|---|
string |
AsTimeSpan()
Gets the time span value of the node.
Declaration
public TimeSpan AsTimeSpan()
Returns
Type | Description |
---|---|
System.TimeSpan |