API for plaza.rdf.core

by Unknown

Usage:
(ns your-namespace
  (:require plaza.rdf.core))

Overview



Public Variables and Functions



alter-root-model

function
Usage: (alter-root-model new-model)
Alters the root binding for the default model. This function
should only be used when setting up the application, with-model
macro should be used by default


alter-root-rdf-ns

function
Usage: (alter-root-rdf-ns new-rdf-ns)
Alters the root binding for the default model. This function
should only be used when setting up the application, with-rdf-ns
macro should be used by default


build-model

function
Usage: (build-model)
Creates a new model to store triples


d

function
Usage: (d val)
       (d val dt)
shorthand for rdf-typed-literal


date

function
Usage: (date & args)
Shortcut for rdf-date


defmodel

macro
Usage: (defmodel & rest)
Sets up the default model for a set of forms and returns the model


document-to-model

function
Usage: (document-to-model stream format)
Adds a set of triples read from a serialized document into a model


expand-ns

function
Usage: (expand-ns ns local)
Provided a pair [ns local] tries to expand the ns with the information in the rdf-ns registry


find-datatype

function
Usage: (find-datatype literal)
Finds the right datatype object from the string representation


find-ns-registry

function
Usage: (find-ns-registry ns)
Checks if a provided namespace has an associated uri in the registry of namespaces


find-ns-registry-by-uri

function
Usage: (find-ns-registry-by-uri uri)
Checks if a provided namespace has an associated uri in the registry of namespaces


find-resource-uris

function
Usage: (find-resource-uris model-or-triples)
Retrieves the resource uris (collections triples with the same subject) inside a model or triple set


find-resources

function
Usage: (find-resources model-or-triples)
Retrieves the resources (collections triples with the same subject) inside a model or triple set


is-blank-node

function
Usage: (is-blank-node resource)
Checks if a RDF resource


is-model

function
Usage: (is-model obj)
Checks if an object is a model


is-resource

function
Usage: (is-resource atom)
Matches a literal with a certain literal value


l

function
Usage: (l lit)
       (l lit lang)
shorthand for rdf-literal


literal-datatype-uri

function
Usage: (literal-datatype-uri lit)
Returns the datatype URI associated to this literal


literal-language

function
Usage: (literal-language lit)
Returns the language of a literal


literal-lexical-form

function
Usage: (literal-lexical-form lit)
Returns the lexical form associated to this literal


literal-value

function
Usage: (literal-value lit)
Returns the value of a literal


make-triples

function
Usage: (make-triples ts)
Builds a new collection of triples


model-add-triples

function
Usage: (model-add-triples ts)
Adds a collection of triples to a model


model-remove-triples

function
Usage: (model-remove-triples ts)
Removes a collection of triples to a model


model-to-format

function
Usage: (model-to-format)
       (model-to-format format)
       (model-to-format model format)
Writes a model using the chosen format


model-to-triples

function
Usage: (model-to-triples model)
Extracts the triples stored into a model


o

function
Usage: (o t)
Shortcut for object-from-triple


object-from-triple

function
Usage: (object-from-triple [s p o])
Extract the object from a triple


opt

macro
Usage: (opt & args)
A shortcut for optional


optional

function
Usage: (optional & triples)
Marks the provided list of triples as optional triples in a query


p

function
Usage: (p t)
Shortcut for predicate-from-triple


predicate-from-triple

function
Usage: (predicate-from-triple [s p o])
Extract the predicate from a triple


rdf-clone

function
Usage: (rdf-clone rdf-obj)
Clones a triple component


rdf-date

function
Usage: (rdf-date)
       (rdf-date d)
       (rdf-date y m d)
Creates a new RDF date


rdf-literal

function
Usage: (rdf-literal lit)
       (rdf-literal lit lang)
Creates a new rdf literal


rdf-property

function
Usage: (rdf-property ns local)
       (rdf-property uri)
Creates a new rdf property


rdf-resource

function
Usage: (rdf-resource ns local)
       (rdf-resource uri)
Creates a new rdf resource


rdf-triple

function
Usage: (rdf-triple to-parse)
Parses a RDF triple


rdf-typed-literal

function
Usage: (rdf-typed-literal lit)
       (rdf-typed-literal lit type)
Creates a new rdf literal with an associated type


register-rdf-ns

function
Usage: (register-rdf-ns ns uri)
Add a registered namespace to the registry of namespaces


reset-model

function
Usage: (reset-model)
Resets the root model with a fresh model object


resource-qname-local

function
Usage: (resource-qname-local resource)
Returns the local part of the qname of the resource


resource-qname-prefix

function
Usage: (resource-qname-prefix resource)
Returns the prefix part of the qname of the resource


resource-uri

function
Usage: (resource-uri resource)
Returns the URI of a resource (subject, predicate or object)


s

function
Usage: (s t)
Shortcut for subject-from-triple


subject-from-triple

function
Usage: (subject-from-triple [s p o])
Extract the subject from a triple


triple-object

function
Usage: (triple-object literal)
Defines the object of a statement


triple-predicate

function
Usage: (triple-predicate predicate)
Defines the predicate of a statement


triple-subject

function
Usage: (triple-subject subject)
Defines a subject for a statement


triples-abstraction

function
Usage: (triples-abstraction triples matcher-fn abstraction-map)
Transforms a set of triples into a pattern replacing some components with variables


triples-to-format

function
Usage: (triples-to-format triples & args)
Writes a set of triple using the 


with-model

macro
Usage: (with-model model & rest)
Sets up the default model for a set of forms


with-rdf-ns

macro
Usage: (with-rdf-ns ns & rest)
Sets up the default namespace for a set of forms
Logo & site design by Tom Hickey.
Clojure auto-documentation system by Tom Faulhaber.