Liking cljdoc? Tell your friends :D

grafter.rdf.protocols

Grafter protocols and types for RDF processing

Grafter protocols and types for RDF processing
raw docstring

IDatatypeURIcljprotocol

datatype-uriclj

(datatype-uri this)

Returns the RDF literals datatype URI as a java.net.URI.

Returns the RDF literals datatype URI as a java.net.URI.

IRawValuecljprotocol

raw-valueclj

(raw-value this)

Returns the naked value of a literal. For native primitive values e.g. a java.lang.Integer, this will return the supplied value (like identity). However for more complex types such as LangString's it will coerce the value into a more natural primitive type.

Returns the naked value of a literal.  For native primitive
values e.g. a java.lang.Integer, this will return the supplied
value (like identity).  However for more complex types such as
LangString's it will coerce the value into a more natural
primitive type.

IRDFStringcljprotocol

langclj

(lang this)

Return the strings language tag (as a clojure Keyword)

Return the strings language tag (as a clojure Keyword)

ISPARQLablecljprotocol

NOTE this protocol is intended for low-level access. End users should use query instead.

Run an arbitrary SPARQL query. Works with ASK, DESCRIBE, CONSTRUCT and SELECT queries.

You can call this on a Repository however if you do you may in some cases cause a resource leak, for example if the sequence of results isn't fully consumed.

To use this without leaking resources it is recommended that you call ->connection on your repository, inside a with-open; and then consume all your results inside of a nested doseq/dorun/etc...

e.g.

(with-open [conn (->connection repo)]
   (doseq [res (query conn "SELECT * WHERE { ?s ?p ?o .}")]
      (println res)))
NOTE this protocol is intended for low-level access.  End users
should use query instead.

Run an arbitrary SPARQL query.  Works with `ASK`, `DESCRIBE`,
`CONSTRUCT` and `SELECT` queries.

You can call this on a Repository however if you do you may in some
cases cause a resource leak, for example if the sequence of results
isn't fully consumed.

To use this without leaking resources it is recommended that you
call `->connection` on your repository, inside a `with-open`; and
then consume all your results inside of a nested `doseq`/`dorun`/etc...

e.g.

````
(with-open [conn (->connection repo)]
   (doseq [res (query conn "SELECT * WHERE { ?s ?p ?o .}")]
      (println res)))
````

query-datasetclj

(query-dataset this sparql-string model)
raw docstring

ISPARQLUpdateablecljprotocol

update!clj

(update! this sparql-string)

Issue a SPARQL Update statement against the repository

Issue a SPARQL Update statement against the repository

IStatementcljprotocol

An RDF triple or quad

An RDF triple or quad

contextclj

(context statement)

objectclj

(object statement)

predicateclj

(predicate statement)

subjectclj

(subject statement)
raw docstring

ITransactablecljprotocol

Low level protocol for transactions support. Most users probably want to use grafter.rdf.sesame/with-transaction

Low level protocol for transactions support.  Most users probably
want to use grafter.rdf.sesame/with-transaction

beginclj

(begin repo)

Start a transaction

Start a transaction

commitclj

(commit repo)

Commit a transaction

Commit a transaction

rollbackclj

(rollback repo)

Rollback a transaction

Rollback a transaction
raw docstring

ITripleDeleteablecljprotocol

This protocol can be implemented by anything which you can delete statements from. For example a SPARQL Update Endpoint.

This protocol can be implemented by anything which you can delete
statements from.  For example a SPARQL Update Endpoint.

deleteclj

(delete this quads)
(delete this graph triples)

Delete the supplied triples or quads from the destination.

Delete the supplied triples or quads from the destination.

delete-statementclj

(delete-statement this statement)
(delete-statement this graph statement)
raw docstring

ITripleReadablecljprotocol

Use the higher level wrapper function statements if you just wish to read in some RDF.

This protocol exists for implementers to hook in additional sources of statements.

Takes a source of statements or triples and converts it into a seq of triples.

A hash of options is passed to each implementation, they may be ignored or handled depending on the circumstance.

Use the higher level wrapper function statements if you just wish to read in some RDF.

This protocol exists for implementers to hook in additional sources of statements.

Takes a source of statements or triples and converts it into a seq
of triples.

A hash of options is passed to each implementation, they may be
ignored or handled depending on the circumstance.

to-statementsclj

(to-statements this options)
raw docstring

ITripleWriteablecljprotocol

This protocol is implemented by anything which you can put statements into.

This protocol is implemented by anything which you can put
statements into.

addclj

(add this quads)
(add this graph triples)
(add this graph format triple-stream)
(add this graph base-uri format triple-stream)

Add a seq of triples or quads to a destination. Works with a sequence of IStatements an InputStream, File or Reader

Add a seq of triples or quads to a destination.  Works with a
sequence of IStatements an InputStream, File or Reader

add-statementclj

(add-statement this statement)
(add-statement this graph statement)
raw docstring

rdf:langStringclj


triple?clj

(triple? t)

Predicate function to test if object is a valid RDF triple.

Predicate function to test if object is a valid RDF triple.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close