34#ifndef DATAQUAY_NODE_H
35#define DATAQUAY_NODE_H
220 QString variantTypeName,
unsigned int qHash(const Dataquay::Node &)
Node represents a single RDF node, with conversions to and from variant types.
bool operator<(const Node &n) const
static Node fromVariant(const QVariant &v)
Convert a QVariant to a Node.
QVariant toVariant() const
Convert a Node to a QVariant.
QVariant toVariant(int metaTypeId) const
Convert a Node to a QVariant, with a nudge for the variant type, used to override the default variant...
static QString getVariantTypeName(Uri datatype)
Retrieve the variant type that has been associated with the given datatype Uri using registerDatatype...
Node(QString v, Uri dt)
Construct a literal node with the given value and datatype.
Node()
Construct a node with no node type (used for example as an undefined node when pattern matching a tri...
static void registerDatatype(Uri datatype, QString variantTypeName, VariantEncoder *encoder=0)
Register an association between a particular datatype URI and a type which can be stored in a QVarian...
static Uri getDatatype(QString variantTypeName)
Retrieve the datatype URI that has been associated with the given variant type using registerDatatype...
Node(Uri u)
Construct a node with a URI node type and the given URI.
Node(QString v)
Construct a literal node with the given value, and with no defined datatype.
Node & operator=(const Node &n)
Uri represents a single URI.
bool operator!=(const Node &a, const Node &b)
QList< Node > Nodes
A list of node types.
QDataStream & operator<<(QDataStream &out, const Node &)
bool operator==(const Node &a, const Node &b)
QDataStream & operator>>(QDataStream &in, Node &)
VariantEncoder is an abstract interface for classes that can convert between QVariant and strings for...
virtual QVariant toVariant(const QString &n)=0
Convert a string to a variant.
virtual ~VariantEncoder()
virtual QString fromVariant(const QVariant &v)=0
Convert a variant to a string.