Show / Hide Table of Contents

Interface IValuedNode

Interface for Valued Nodes.

Inherited Members
INode.NodeType
INode.ToString()
INode.ToString(INodeFormatter)
INode.ToString(INodeFormatter, TripleSegment)
IComparable<INode>.CompareTo(INode)
IComparable<IBlankNode>.CompareTo(IBlankNode)
IComparable<IGraphLiteralNode>.CompareTo(IGraphLiteralNode)
IComparable<ILiteralNode>.CompareTo(ILiteralNode)
IComparable<IUriNode>.CompareTo(IUriNode)
IComparable<IVariableNode>.CompareTo(IVariableNode)
IComparable<IRefNode>.CompareTo(IRefNode)
IComparable<ITripleNode>.CompareTo(ITripleNode)
IEquatable<INode>.Equals(INode)
IEquatable<IBlankNode>.Equals(IBlankNode)
IEquatable<IGraphLiteralNode>.Equals(IGraphLiteralNode)
IEquatable<ILiteralNode>.Equals(ILiteralNode)
IEquatable<IUriNode>.Equals(IUriNode)
IEquatable<IVariableNode>.Equals(IVariableNode)
IEquatable<IRefNode>.Equals(IRefNode)
IEquatable<ITripleNode>.Equals(ITripleNode)
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 Source

EffectiveType

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.

| Edit this page View Source

NumericType

Gets the Numeric Type of the Node.

Declaration
SparqlNumericType NumericType { get; }
Property Value
Type Description
SparqlNumericType

Methods

| Edit this page View Source

AsBoolean()

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.

| Edit this page View Source

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.

| Edit this page View Source

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.

| Edit this page View Source

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.

| Edit this page View Source

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.

| Edit this page View Source

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.

| Edit this page View Source

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.

| Edit this page View Source

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.

| Edit this page View Source

AsTimeSpan()

Gets the Time Span value of the Node.

Declaration
TimeSpan AsTimeSpan()
Returns
Type Description
TimeSpan

Extension Methods

Extensions.ToSafeString(object)
DynamicExtensions.AsDynamic(INode, IGraph, Uri)
Extensions.EffectiveBooleanValue(INode)
Extensions.IsListRoot(INode, IGraph)
ValuedNodeExtensions.AsValuedNode(INode)
Extensions.AsEnumerable<T>(T)
ValuedNodeExtensions.AsSafeBoolean(IValuedNode)
  • Edit this page
  • View Source
In this article
  • Properties
    • EffectiveType
    • NumericType
  • Methods
    • AsBoolean()
    • AsDateTime()
    • AsDateTimeOffset()
    • AsDecimal()
    • AsDouble()
    • AsFloat()
    • AsInteger()
    • AsString()
    • AsTimeSpan()
  • Extension Methods
Back to top Generated by DocFX