Show / Hide Table of Contents

Class BaseLiteralNode

Abstract Base Class for Literal Nodes.
Inheritance
System.Object
BaseNode
BaseLiteralNode
LiteralNode
Implements
ILiteralNode
INode
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
System.IEquatable<BaseLiteralNode>
System.IComparable<BaseLiteralNode>
Inherited Members
BaseNode._graph
BaseNode._graphUri
BaseNode._nodetype
BaseNode._hashcode
BaseNode.NodeType
BaseNode.Graph
BaseNode.GraphUri
BaseNode.ToString(INodeFormatter)
BaseNode.ToString(INodeFormatter, TripleSegment)
BaseNode.GetHashCode()
BaseNode.GetSchema()
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: VDS.RDF
Assembly: dotNetRDF.dll
Syntax
[Serializable]
public abstract class BaseLiteralNode : BaseNode, ILiteralNode, 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, IEquatable<BaseLiteralNode>, IComparable<BaseLiteralNode>

Constructors

| Improve this Doc View Source

BaseLiteralNode()

Deserialization Only Constructor.
Declaration
protected BaseLiteralNode()
| Improve this Doc View Source

BaseLiteralNode(SerializationInfo, StreamingContext)

Deserialization Constructor.
Declaration
protected BaseLiteralNode(SerializationInfo info, StreamingContext context)
Parameters
Type Name Description
System.Runtime.Serialization.SerializationInfo info Serialization Information.
System.Runtime.Serialization.StreamingContext context Streaming Context.
| Improve this Doc View Source

BaseLiteralNode(IGraph, String)

Internal Only Constructor for Literal Nodes.
Declaration
protected BaseLiteralNode(IGraph g, string literal)
Parameters
Type Name Description
IGraph g Graph this Node is in.
System.String literal String value of the Literal.
| Improve this Doc View Source

BaseLiteralNode(IGraph, String, Boolean)

Internal Only Constructor for Literal Nodes.
Declaration
protected BaseLiteralNode(IGraph g, string literal, bool normalize)
Parameters
Type Name Description
IGraph g Graph this Node is in.
System.String literal String value of the Literal.
System.Boolean normalize Whether to Normalize the Literal Value.
| Improve this Doc View Source

BaseLiteralNode(IGraph, String, String)

Internal Only Constructor for Literal Nodes.
Declaration
protected BaseLiteralNode(IGraph g, string literal, string langspec)
Parameters
Type Name Description
IGraph g Graph this Node is in.
System.String literal String value of the Literal.
System.String langspec String value for the Language Specifier for the Literal.
| Improve this Doc View Source

BaseLiteralNode(IGraph, String, String, Boolean)

Internal Only Constructor for Literal Nodes.
Declaration
protected BaseLiteralNode(IGraph g, string literal, string langspec, bool normalize)
Parameters
Type Name Description
IGraph g Graph this Node is in.
System.String literal String value of the Literal.
System.String langspec String value for the Language Specifier for the Literal.
System.Boolean normalize Whether to Normalize the Literal Value.
| Improve this Doc View Source

BaseLiteralNode(IGraph, String, Uri)

Internal Only Constructor for Literal Nodes.
Declaration
protected BaseLiteralNode(IGraph g, string literal, Uri datatype)
Parameters
Type Name Description
IGraph g Graph this Node is in.
System.String literal String value of the Literal.
System.Uri datatype Uri for the Literals Data Type.
| Improve this Doc View Source

BaseLiteralNode(IGraph, String, Uri, Boolean)

Internal Only Constructor for Literal Nodes.
Declaration
protected BaseLiteralNode(IGraph g, string literal, Uri datatype, bool normalize)
Parameters
Type Name Description
IGraph g Graph this Node is in.
System.String literal String value of the Literal.
System.Uri datatype Uri for the Literals Data Type.
System.Boolean normalize Whether to Normalize the Literal Value.

Properties

| Improve this Doc View Source

DataType

Gives the Data Type Uri for the Literal (if it exists) or a null.
Declaration
public Uri DataType { get; }
Property Value
Type Description
System.Uri
| Improve this Doc View Source

Language

Gives the Language Specifier for the Literal (if it exists) or the Empty String.
Declaration
public string Language { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Value

Gives the String Value of the Literal.
Declaration
public string Value { get; }
Property Value
Type Description
System.String

Methods

| Improve this Doc View Source

CompareTo(BaseLiteralNode)

Returns an Integer indicating the Ordering of this Node compared to another Node.
Declaration
public int CompareTo(BaseLiteralNode other)
Parameters
Type Name Description
BaseLiteralNode other Node to test against.
Returns
Type Description
System.Int32
| Improve this Doc View Source

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
System.Int32
Overrides
BaseNode.CompareTo(IBlankNode)
| Improve this Doc View Source

CompareTo(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
System.Int32
Overrides
BaseNode.CompareTo(IGraphLiteralNode)
| Improve this Doc View Source

CompareTo(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
System.Int32
Overrides
BaseNode.CompareTo(ILiteralNode)
| Improve this Doc View Source

CompareTo(INode)

Implementation of CompareTo for Literal Nodes.
Declaration
public override int CompareTo(INode other)
Parameters
Type Name Description
INode other Node to Compare To.
Returns
Type Description
System.Int32
Overrides
BaseNode.CompareTo(INode)
Remarks
Literal Nodes are greater than Blank Nodes, Uri Nodes and Nulls, they are less than Graph Literal Nodes.

Two Literal Nodes are initially compared based upon Data Type, untyped literals are less than typed literals. Two untyped literals are compared purely on lexical value, Language Specifier has no effect on the ordering. This means Literal Nodes are only partially ordered, for example "hello"@en and "hello"@en-us are considered to be the same for ordering purposes though they are different for equality purposes. Datatyped Literals can only be properly ordered if they are one of a small subset of types (Integers, Booleans, Date Times, Strings and URIs). If the datatypes for two Literals are non-matching they are ordered on Datatype Uri, this ensures that each range of Literal Nodes is sorted to some degree. Again this also means that Literals are partially ordered since unknown datatypes will only be sorted based on lexical value and not on actual value.
| Improve this Doc View Source

CompareTo(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
System.Int32
Overrides
BaseNode.CompareTo(IUriNode)
| Improve this Doc View Source

CompareTo(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
System.Int32
Overrides
BaseNode.CompareTo(IVariableNode)
| Improve this Doc View Source

Equals(Object)

Implementation of the Equals method for Literal Nodes.
Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj Object to compare the Node with.
Returns
Type Description
System.Boolean
Overrides
BaseNode.Equals(Object)
Remarks
The default behaviour is for Literal Nodes to be considered equal IFF
  1. Their Language Specifiers are identical (or neither has a Language Specifier)
  2. Their Data Types are identical (or neither has a Data Type)
  3. Their String values are identical
This behaviour can be overridden to use value equality by setting the LiteralEqualityMode option to be Loose if this is more suited to your application.
| Improve this Doc View Source

Equals(BaseLiteralNode)

Determines whether this Node is equal to a Literal Node.
Declaration
public bool Equals(BaseLiteralNode other)
Parameters
Type Name Description
BaseLiteralNode other Literal Node.
Returns
Type Description
System.Boolean
| Improve this Doc View Source

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
System.Boolean
Overrides
BaseNode.Equals(IBlankNode)
| Improve this Doc View Source

Equals(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
System.Boolean
Overrides
BaseNode.Equals(IGraphLiteralNode)
| Improve this Doc View Source

Equals(ILiteralNode)

Determines whether this Node is equal to a Literal Node.
Declaration
public override bool Equals(ILiteralNode other)
Parameters
Type Name Description
ILiteralNode other Literal Node.
Returns
Type Description
System.Boolean
Overrides
BaseNode.Equals(ILiteralNode)
| Improve this Doc View Source

Equals(INode)

Implementation of the Equals method for Literal Nodes.
Declaration
public override bool Equals(INode other)
Parameters
Type Name Description
INode other Object to compare the Node with.
Returns
Type Description
System.Boolean
Overrides
BaseNode.Equals(INode)
Remarks
The default behaviour is for Literal Nodes to be considered equal IFF
  1. Their Language Specifiers are identical (or neither has a Language Specifier)
  2. Their Data Types are identical (or neither has a Data Type)
  3. Their String values are identical
This behaviour can be overridden to use value equality by setting the LiteralEqualityMode option to be Loose if this is more suited to your application.
| Improve this Doc View Source

Equals(IUriNode)

Determines whether this Node is equal to a URI Node (should always be false).
Declaration
public override bool Equals(IUriNode other)
Parameters
Type Name Description
IUriNode other URI Node.
Returns
Type Description
System.Boolean
Overrides
BaseNode.Equals(IUriNode)
| Improve this Doc View Source

Equals(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
System.Boolean
Overrides
BaseNode.Equals(IVariableNode)
| Improve this Doc View Source

GetObjectData(SerializationInfo, StreamingContext)

Gets the serialization information.
Declaration
public sealed override void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type Name Description
System.Runtime.Serialization.SerializationInfo info Serialization Information.
System.Runtime.Serialization.StreamingContext context Streaming Context.
Overrides
BaseNode.GetObjectData(SerializationInfo, StreamingContext)
| Improve this Doc View Source

ReadXml(XmlReader)

Reads the data for XML deserialization.
Declaration
public sealed override void ReadXml(XmlReader reader)
Parameters
Type Name Description
System.Xml.XmlReader reader XML Reader.
Overrides
BaseNode.ReadXml(XmlReader)
| Improve this Doc View Source

ToString()

Gets a String representation of a Literal Node.
Declaration
public override string ToString()
Returns
Type Description
System.String
Overrides
BaseNode.ToString()
Remarks
Gives a value without quotes (as some syntaxes use) with the Data Type/Language Specifier appended using Notation 3 syntax.
| Improve this Doc View Source

WriteXml(XmlWriter)

Writes the data for XML serialization.
Declaration
public sealed override void WriteXml(XmlWriter writer)
Parameters
Type Name Description
System.Xml.XmlWriter writer XML Writer.
Overrides
BaseNode.WriteXml(XmlWriter)

Implements

ILiteralNode
INode
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
System.IEquatable<T>
System.IComparable<T>

Extension Methods

Extensions.AsEnumerable<T>(T)
Extensions.IsListRoot(INode, IGraph)
Extensions.CopyNode(INode, IGraph)
Extensions.CopyNode(INode, IGraph, Boolean)
DynamicExtensions.AsDynamic(INode, Uri)
ValuedNodeExtensions.AsValuedNode(INode)
  • Improve this Doc
  • View Source
In This Article
  • Constructors
    • BaseLiteralNode()
    • BaseLiteralNode(SerializationInfo, StreamingContext)
    • BaseLiteralNode(IGraph, String)
    • BaseLiteralNode(IGraph, String, Boolean)
    • BaseLiteralNode(IGraph, String, String)
    • BaseLiteralNode(IGraph, String, String, Boolean)
    • BaseLiteralNode(IGraph, String, Uri)
    • BaseLiteralNode(IGraph, String, Uri, Boolean)
  • Properties
    • DataType
    • Language
    • Value
  • Methods
    • CompareTo(BaseLiteralNode)
    • CompareTo(IBlankNode)
    • CompareTo(IGraphLiteralNode)
    • CompareTo(ILiteralNode)
    • CompareTo(INode)
    • CompareTo(IUriNode)
    • CompareTo(IVariableNode)
    • Equals(Object)
    • Equals(BaseLiteralNode)
    • Equals(IBlankNode)
    • Equals(IGraphLiteralNode)
    • Equals(ILiteralNode)
    • Equals(INode)
    • Equals(IUriNode)
    • Equals(IVariableNode)
    • GetObjectData(SerializationInfo, StreamingContext)
    • ReadXml(XmlReader)
    • ToString()
    • WriteXml(XmlWriter)
  • Implements
  • Extension Methods
Back to top Generated by DocFX