Class TimeSpanNode
Valued Node representing a Time Span value.
Implements
System.IEquatable<BaseLiteralNode>
System.IComparable<BaseLiteralNode>
System.IEquatable<LiteralNode>
System.IComparable<LiteralNode>
System.IComparable<INode>
System.IComparable<IBlankNode>
System.IComparable<IGraphLiteralNode>
System.IComparable<ILiteralNode>
System.IComparable<IUriNode>
System.IComparable<IVariableNode>
System.IEquatable<INode>
System.IEquatable<IBlankNode>
System.IEquatable<IGraphLiteralNode>
System.IEquatable<ILiteralNode>
System.IEquatable<IUriNode>
System.IEquatable<IVariableNode>
System.Runtime.Serialization.ISerializable
System.Xml.Serialization.IXmlSerializable
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
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>, IEquatable<INode>, IEquatable<IBlankNode>, IEquatable<IGraphLiteralNode>, IEquatable<ILiteralNode>, IEquatable<IUriNode>, IEquatable<IVariableNode>, ISerializable, IXmlSerializable
Constructors
| Improve this Doc View SourceTimeSpanNode(IGraph, TimeSpan)
Creates a new Time span node.
Declaration
public TimeSpanNode(IGraph g, TimeSpan value)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph. |
System.TimeSpan | value | Time Span. |
TimeSpanNode(IGraph, TimeSpan, String)
Creates a new Time span node.
Declaration
public TimeSpanNode(IGraph g, TimeSpan value, string lexicalValue)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph. |
System.TimeSpan | value | Time Span. |
System.String | lexicalValue | Lexical value. |
TimeSpanNode(IGraph, TimeSpan, String, Uri)
Creates a new Time span node.
Declaration
public TimeSpanNode(IGraph g, TimeSpan value, string lexicalValue, Uri dtUri)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph. |
System.TimeSpan | value | Time Span. |
System.String | lexicalValue | Lexical value. |
System.Uri | dtUri | Data type URI. |
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 |
---|---|
System.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 |
---|---|
System.Decimal |
AsDouble()
Throws an error as date times cannot be converted to doubles.
Declaration
public double AsDouble()
Returns
Type | Description |
---|---|
System.Double |
AsFloat()
Throws an error as date times cannot be converted to floats.
Declaration
public float AsFloat()
Returns
Type | Description |
---|---|
System.Single |
AsInteger()
Throws an error as date times cannot be converted to integers.
Declaration
public long AsInteger()
Returns
Type | Description |
---|---|
System.Int64 |
AsString()
Gets the date time value as a string.
Declaration
public string AsString()
Returns
Type | Description |
---|---|
System.String |
AsTimeSpan()
Gets the time span value of the node.
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.IEquatable<T>
System.IEquatable<T>
System.IEquatable<T>
System.IEquatable<T>
System.IEquatable<T>
System.IEquatable<T>
System.Runtime.Serialization.ISerializable
System.Xml.Serialization.IXmlSerializable