Class BaseUriNode
Abstract Base Class for URI Nodes.
Implements
Inherited Members
Namespace: VDS.RDF
Assembly: dotNetRdf.dll
Syntax
public abstract class BaseUriNode : BaseNode, IUriNode, IRefNode, IEquatable<BaseUriNode>, IComparable<BaseUriNode>, 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 SourceBaseUriNode(Uri)
Internal Only Constructor for URI Nodes.
Declaration
protected BaseUriNode(Uri uri)
Parameters
Type | Name | Description |
---|---|---|
Uri | uri | URI. |
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 expression.
Declaration
public SparqlNumericType NumericType { get; }
Property Value
Type | Description |
---|---|
SparqlNumericType |
Uri
Gets the Uri for this Node.
Declaration
public virtual Uri Uri { get; }
Property Value
Type | Description |
---|---|
Uri |
Methods
| Edit this page View SourceAsBoolean()
Throws an error as URIs cannot be cast to a boolean.
Declaration
public bool AsBoolean()
Returns
Type | Description |
---|---|
bool |
AsDateTime()
Throws an error as URIs cannot be cast to a date time.
Declaration
public DateTime AsDateTime()
Returns
Type | Description |
---|---|
DateTime |
AsDateTimeOffset()
Throws an error as URIs cannot be cast to a date time.
Declaration
public DateTimeOffset AsDateTimeOffset()
Returns
Type | Description |
---|---|
DateTimeOffset |
AsDecimal()
Throws an error as URIs cannot be cast to numerics.
Declaration
public decimal AsDecimal()
Returns
Type | Description |
---|---|
decimal |
AsDouble()
Throws an error as URIs cannot be cast to numerics.
Declaration
public double AsDouble()
Returns
Type | Description |
---|---|
double |
AsFloat()
Throws an error as URIs cannot be cast to numerics.
Declaration
public float AsFloat()
Returns
Type | Description |
---|---|
float |
AsInteger()
Throws an error as URIs cannot be cast to numerics.
Declaration
public long AsInteger()
Returns
Type | Description |
---|---|
long |
AsString()
Gets the value of the node as a string.
Declaration
public string AsString()
Returns
Type | Description |
---|---|
string |
AsTimeSpan()
Throws an error as URIs cannot be cast to a time span.
Declaration
public TimeSpan AsTimeSpan()
Returns
Type | Description |
---|---|
TimeSpan |
CompareTo(BaseUriNode)
Returns an Integer indicating the Ordering of this Node compared to another Node.
Declaration
public int CompareTo(BaseUriNode other)
Parameters
Type | Name | Description |
---|---|---|
BaseUriNode | other | Node to test against. |
Returns
Type | Description |
---|---|
int |
CompareTo(IBlankNode)
Returns an Integer indicating the Ordering of this Node compared to another Node.
Declaration
public override int CompareTo(IBlankNode other)
Parameters
Type | Name | Description |
---|---|---|
IBlankNode | other | Node to test against. |
Returns
Type | Description |
---|---|
int |
Overrides
| Edit this page View SourceCompareTo(IGraphLiteralNode)
Returns an Integer indicating the Ordering of this Node compared to another Node.
Declaration
public override int CompareTo(IGraphLiteralNode other)
Parameters
Type | Name | Description |
---|---|---|
IGraphLiteralNode | other | Node to test against. |
Returns
Type | Description |
---|---|
int |
Overrides
| Edit this page View SourceCompareTo(ILiteralNode)
Returns an Integer indicating the Ordering of this Node compared to another Node.
Declaration
public override int CompareTo(ILiteralNode other)
Parameters
Type | Name | Description |
---|---|---|
ILiteralNode | other | Node to test against. |
Returns
Type | Description |
---|---|
int |
Overrides
| Edit this page View SourceCompareTo(INode)
Implementation of Compare To for Uri Nodes.
Declaration
public override int CompareTo(INode other)
Parameters
Type | Name | Description |
---|---|---|
INode | other | Node to Compare To. |
Returns
Type | Description |
---|---|
int |
Overrides
Remarks
Uri Nodes are greater than Blank Nodes and Nulls, they are less than Literal Nodes and Graph Literal Nodes.
Uri Nodes are ordered based upon lexical ordering of the string value of their URIs.
CompareTo(IRefNode)
Returns an Integer indicating the Ordering of this Node compared to another Node.
Declaration
public override int CompareTo(IRefNode other)
Parameters
Type | Name | Description |
---|---|---|
IRefNode | other | Node to test against. |
Returns
Type | Description |
---|---|
int |
Overrides
| Edit this page View SourceCompareTo(ITripleNode)
Returns an Integer indicating the Ordering of this Node compared to another Node.
Declaration
public override int CompareTo(ITripleNode other)
Parameters
Type | Name | Description |
---|---|---|
ITripleNode | other | Node to test against. |
Returns
Type | Description |
---|---|
int |
Overrides
| Edit this page View SourceCompareTo(IUriNode)
Returns an Integer indicating the Ordering of this Node compared to another Node.
Declaration
public override int CompareTo(IUriNode other)
Parameters
Type | Name | Description |
---|---|---|
IUriNode | other | Node to test against. |
Returns
Type | Description |
---|---|
int |
Overrides
| Edit this page View SourceCompareTo(IVariableNode)
Returns an Integer indicating the Ordering of this Node compared to another Node.
Declaration
public override int CompareTo(IVariableNode other)
Parameters
Type | Name | Description |
---|---|---|
IVariableNode | other | Node to test against. |
Returns
Type | Description |
---|---|
int |
Overrides
| Edit this page View SourceEquals(object)
Implementation of Equality for Uri Nodes.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | Object to compare with. |
Returns
Type | Description |
---|---|
bool |
Overrides
Remarks
URI Nodes are considered equal if the string form of their URIs match using Ordinal string comparison.
Equals(BaseUriNode)
Determines whether this Node is equal to a URI Node.
Declaration
public bool Equals(BaseUriNode other)
Parameters
Type | Name | Description |
---|---|---|
BaseUriNode | other | URI Node. |
Returns
Type | Description |
---|---|
bool |
Equals(IBlankNode)
Determines whether this Node is equal to a Blank Node (should always be false).
Declaration
public override bool Equals(IBlankNode other)
Parameters
Type | Name | Description |
---|---|---|
IBlankNode | other | Blank Node. |
Returns
Type | Description |
---|---|
bool |
Overrides
| Edit this page View SourceEquals(IGraphLiteralNode)
Determines whether this Node is equal to a Graph Literal Node (should always be false).
Declaration
public override bool Equals(IGraphLiteralNode other)
Parameters
Type | Name | Description |
---|---|---|
IGraphLiteralNode | other | Graph Literal Node. |
Returns
Type | Description |
---|---|
bool |
Overrides
| Edit this page View SourceEquals(ILiteralNode)
Determines whether this Node is equal to a Literal Node (should always be false).
Declaration
public override bool Equals(ILiteralNode other)
Parameters
Type | Name | Description |
---|---|---|
ILiteralNode | other | Literal Node. |
Returns
Type | Description |
---|---|
bool |
Overrides
| Edit this page View SourceEquals(INode)
Implementation of Equality for Uri Nodes.
Declaration
public override bool Equals(INode other)
Parameters
Type | Name | Description |
---|---|---|
INode | other | Object to compare with. |
Returns
Type | Description |
---|---|
bool |
Overrides
Remarks
URI Nodes are considered equal if the string form of their URIs match using Ordinal string comparison.
Equals(IRefNode)
Determines whether this Node is equal to a Blank Node (should always be false).
Declaration
public override bool Equals(IRefNode other)
Parameters
Type | Name | Description |
---|---|---|
IRefNode | other | Blank Node. |
Returns
Type | Description |
---|---|
bool |
Overrides
| Edit this page View SourceEquals(ITripleNode)
Determines whether this Node is equal to a Triple Node (should always be false).
Declaration
public override bool Equals(ITripleNode other)
Parameters
Type | Name | Description |
---|---|---|
ITripleNode | other | Triple Node. |
Returns
Type | Description |
---|---|
bool |
Overrides
| Edit this page View SourceEquals(IUriNode)
Determines whether this Node is equal to a URI Node.
Declaration
public override bool Equals(IUriNode other)
Parameters
Type | Name | Description |
---|---|---|
IUriNode | other | URI Node. |
Returns
Type | Description |
---|---|
bool |
Overrides
| Edit this page View SourceEquals(IVariableNode)
Determines whether this Node is equal to a Variable Node (should always be false).
Declaration
public override bool Equals(IVariableNode other)
Parameters
Type | Name | Description |
---|---|---|
IVariableNode | other | Variable Node. |
Returns
Type | Description |
---|---|
bool |
Overrides
| Edit this page View SourceGetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code for the current object. |
Overrides
| Edit this page View SourceToString()
Gets a String representation of a Uri as a plain text Uri.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string |