class Node |
|
\class Node node.h Soprano/Node
A Node represents one RDF resource. Nodes are the cornerstone of RDF data in %Soprano. Four Nodes form one Statement and a Model is essentially a set of Statements. A Node can have one of four types: EmptyNode, ResourceNode, LiteralNode, and BlankNode. Resource nodes are identified through their URI (uri()), literal nodes have a LiteralValue (literal()) and an optional language string (language()), and blank nodes have a string identifier. Empty nodes can be used as wildcards in methods such as Model.listStatements. Be aware that string literals in %Soprano always have type xsd:string. There is no direct support for rdfs:Literal. Backend implementations should honour this restriction.
Author Daniele Galdi |
|
Default costructor.
Creates an empty node.
See also createEmptyNode() |
|
Creates a resource node.
uri - The URI of the node. If empty the type will be ignored and an empty node will be created. See also createResourceNode() |
|
Creates a blank node.
id - An identifier for the blank node. See also createBlankNode() |
|
Creates a literal node.
value - The value of a node. If empty the node will become an empty node. language - The language of the literal value. See also createLiteralNode() |
|
|
Convenience method to create a blank node.
Using this method instead of the constructor
may result in better readable code.
If you need to create a new blank node which is not used in the model yet and, thus, has a unique identifier see Model.createBlankNode(). id - An identifier for the blank node. Returns A blank node or an empty Node if the specified identifier was empty. |
|
Convenience method to create an empty node.
Using this method instead of the default constructor
may result in better readable code.
Returns An empty Node. |
|
Convenience method to create a literal node.
Using this method instead of the constructor
may result in better readable code.
value - The value of a node. If empty the node will become an empty node. language - The language of the literal value. Returns A literal node or an empty node if the specified value was empty. |
|
Convenience method to create a resource node.
Using this method instead of the constructor
may result in better readable code.
uri - The URI of the node. If empty the type will be ignored and an empty node will be created. Returns A resource Node or an empty Node if the specified URI is empty. |
|
Returns The datatype URI of a literal node, i.e. the XML schema type
or an empty value if the node is not a literal.
See also LiteralValue.dataTypeUri |
|
Retrieve a blank node's identifier. Returns The node's identifier if it is a blank node, a null string otherwise. |
|
Returns true if the Node is a Blank node (anonymous). |
|
Returns true if the Node is empty. |
|
Returns true if the Node is a Literal. |
|
Returns true if the Node is a Resource. |
|
Returns true if the Node is a Resource,Literal or Blank. |
|
Each literal value can have an associated language, thus each property
can be stored for different languages. An empty language refers to the
default language.
Returns A string representing the language of the literal value or an empty string if the node is not a literal. |
|
Returns The Literal value if the node is a Literal node. An null QString otherwise. |
|
Match this node against other. The only difference
to operator== is that empty nodes are matched as wildcards,
i.e. they match any other node.
Returns true if this node matches other, false if not. |
|
|
|
|
|
Converts the Node to a string.
Returns A String representation of the Node. See also LiteralValue.toString(), QUrl.toString() |
|
Returns The Node type. |
|
Returns The URI if the node is a Resource node. An null QUrl otherwise. |
EmptyNode | - 0 | - | ||
ResourceNode | - 1 | - | ||
LiteralNode | - 2 | - | ||
BlankNode | - 3 | - |