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
| Edit this page View SourceTimeSpanNode(TimeSpan)
Creates a new Time span node.
Declaration
public TimeSpanNode(TimeSpan value)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | value | Time Span. |
TimeSpanNode(TimeSpan, string)
Creates a new Time span node.
Declaration
public TimeSpanNode(TimeSpan value, string lexicalValue)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | value | Time Span. |
string | lexicalValue | Lexical value. |
TimeSpanNode(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 |
---|---|---|
TimeSpan | value | Time Span. |
string | lexicalValue | Lexical value. |
Uri | dtUri | Data type URI. |
bool | normalizeLiteralValue | Whether to perform unicode normalization on |
Properties
| Edit this page 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
| Edit this page View SourceAsBoolean()
Throws an error as date times cannot be converted to booleans.
Declaration
public bool AsBoolean()
Returns
Type | Description |
---|---|
bool |
AsDateTime()
Gets the date time value of the node.
Declaration
public DateTime AsDateTime()
Returns
Type | Description |
---|---|
DateTime |
AsDateTimeOffset()
Gets the date time value of the node.
Declaration
public DateTimeOffset AsDateTimeOffset()
Returns
Type | Description |
---|---|
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 |
---|---|
TimeSpan |