Interface IValuedNode
Interface for Valued Nodes.
Inherited Members
Namespace: VDS.RDF.Nodes
Assembly: dotNetRdf.dll
Syntax
public interface 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>
Remarks
This interface extends the basic INode interface with methods related to turning the lexical value into a strongly typed .Net value. It is intended primarily for use within SPARQL expression evaluation where we need to do a lot of value conversions and currently waste a lot of effort (and thus performance) doing that.
Properties
| Edit this page View SourceEffectiveType
Gets the URI of the datatype this valued node represents as a String.
Declaration
string EffectiveType { get; }
Property Value
Type | Description |
---|---|
string |
Remarks
Either String.Empty if no type or the string form of the type URI.
NumericType
Gets the Numeric Type of the Node.
Declaration
SparqlNumericType NumericType { get; }
Property Value
Type | Description |
---|---|
SparqlNumericType |
Methods
| Edit this page View SourceAsBoolean()
Gets the Boolean value of the Node.
Declaration
bool AsBoolean()
Returns
Type | Description |
---|---|
bool |
Exceptions
Type | Condition |
---|---|
RdfQueryException | Thrown if the Node cannot be converted to a Boolean. |
AsDateTime()
Gets the Date Time value of the Node.
Declaration
DateTime AsDateTime()
Returns
Type | Description |
---|---|
DateTime |
Exceptions
Type | Condition |
---|---|
RdfQueryException | Thrown if the Node cannot be converted to a Date Time. |
AsDateTimeOffset()
Gets the Date Time Offset value of the Node.
Declaration
DateTimeOffset AsDateTimeOffset()
Returns
Type | Description |
---|---|
DateTimeOffset |
Exceptions
Type | Condition |
---|---|
RdfQueryException | Thrown if the Node cannot be converted to a Date Time Offset. |
AsDecimal()
Gets the Decimal value of the Node.
Declaration
decimal AsDecimal()
Returns
Type | Description |
---|---|
decimal |
Exceptions
Type | Condition |
---|---|
RdfQueryException | Thrown if the Node cannot be converted to a Decimal. |
AsDouble()
Gets the Double value of the Node.
Declaration
double AsDouble()
Returns
Type | Description |
---|---|
double |
Exceptions
Type | Condition |
---|---|
RdfQueryException | Thrown if the Node cannot be converted to a Double. |
AsFloat()
Gets the Float value of the Node.
Declaration
float AsFloat()
Returns
Type | Description |
---|---|
float |
Exceptions
Type | Condition |
---|---|
RdfQueryException | Thrown if the Node cannot be converted to a Float. |
AsInteger()
Gets the Long value of the Node.
Declaration
long AsInteger()
Returns
Type | Description |
---|---|
long |
Exceptions
Type | Condition |
---|---|
RdfQueryException | Thrown if the Node cannot be converted to a Long. |
AsString()
Gets the String value of the Node.
Declaration
string AsString()
Returns
Type | Description |
---|---|
string |
Remarks
This is distinct from ToString() because that method will typically include additional information like language specifier/datatype as appropriate whereas this method is used to produce a string as would be produced by applying the STR() function from SPARQL.
AsTimeSpan()
Gets the Time Span value of the Node.
Declaration
TimeSpan AsTimeSpan()
Returns
Type | Description |
---|---|
TimeSpan |