lilv.node

class Node Nodes

Types 2

classNode

Typed value (URI, string, int, float, bool, blank node, etc.).

Fields
private LilvNode * _cPtr
private bool _owned
private World _world
Methods
LilvNode * handle() @property @nogc nothrowThe underlying C pointer (for passing back into lilv functions).
World world() @property @nogc nothrow
bool opEquals(Object o) const @nogc nothrowWhether two nodes are equivalent.
Node dup()Duplicate this node
string turtleToken()Get Turtle/SPARQL token Returns: The token string
bool isUri() @property @nogc nothrow
bool isBlank() @property @nogc nothrow
bool isLiteral() @property @nogc nothrow
bool isString() @property @nogc nothrow
bool isFloat() @property @nogc nothrow
bool isInt() @property @nogc nothrow
bool isBool() @property @nogc nothrow
string asUri() @propertyURI string (only valid if isUri).
string asBlank() @propertyBlank-node identifier (only valid if isBlank).
string asString() @propertyString value (works for many literal types).
float asFloat() @property @nogc nothrow
int asInt() @property @nogc nothrow
bool asBool() @property @nogc nothrow
string getPath(out string hostname)Path of a file URI node. Params: hostname = Output hostname of URI Returns: The URI path or null if not a file URI.
string getPath()Path of a file URI node. Returns: The URI path or null if not a file URI.
string fileUriParse(string uri, out string hostname) staticParse a file URI string Params: uri = URI string hostname = Output hostname string Returns: File name portion of the URI
Constructors
this(LilvNode * p, Flag!"Owned" owned, World world)Wrap a lilv node. Params: p = C pointer owned = Yes.Owned if D object should take ownership of C pointer (free it on destruction) world = The D World object the node is being created in
this(const(LilvNode) * p, World world)Wrap a const lilv node (not owned). Params: p = C pointer world = The D World object the node is being created in
Destructors
classNodes

A collection of Node values.

Methods
bool contains(Node value) @nogc nothrow
Nodes merge(Nodes a, Nodes b) staticMerge two collections. Params: a = First collection b = Second collection (must be part of the same World as `a`) Returns: New merged collection