The cl4store Reference Manual

This is the cl4store Reference Manual, version 0.0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 08 17:34:08 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 cl4store

4store

Maintainer

Mariano Montone

Author

Mariano Montone

License

BSD

Version

0.0.1

Dependencies
  • drakma (system).
  • cl-rdfxml (system).
  • log5 (system).
  • cl-sparql (system).
Source

cl4store.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 cl4store/cl4store.asd

Source

cl4store.asd.

Parent Component

cl4store (system).

ASDF Systems

cl4store.


3.1.2 cl4store/package.lisp

Source

cl4store.asd.

Parent Component

cl4store (system).

Packages

4store.


3.1.3 cl4store/util.lisp

Dependency

package.lisp (file).

Source

cl4store.asd.

Parent Component

cl4store (system).

Internals

3.1.4 cl4store/cl4store.lisp

Dependency

util.lisp (file).

Source

cl4store.asd.

Parent Component

cl4store (system).

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 4store

Source

package.lisp.

Use List
  • common-lisp.
  • drakma.
  • parser-combinators.
  • sparql.
Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Special variables

Special Variable: *4store-server*

4store host address

Package

4store.

Source

cl4store.lisp.

Special Variable: *graph*

Knowledge base graph

Package

4store.

Source

cl4store.lisp.


5.1.2 Macros

Macro: with-4store-server (value &body body)
Package

4store.

Source

cl4store.lisp.

Macro: with-graph (value &body body)
Package

4store.

Source

cl4store.lisp.


5.1.3 Ordinary functions

Function: delete-all-triples (&optional graph server-url)

Deletes _all_ triples in the specified graph.

Package

4store.

Source

cl4store.lisp.

Function: delete-graph (&optional graph-name server-url)

Deletes the identified graph.
Currently known not to work; despite being semantically correct and receiving a success code from the server.

Package

4store.

Source

cl4store.lisp.

Function: delete-triples (triples &optional graph server-url)

Remove the supplied set of triples from the graph.
Expects the ’triples argument to be a list of three-element lists. If the Object is plain text, it’s expected to already be quoted.

Package

4store.

Source

cl4store.lisp.

Function: get-graphs-list (&optional server-url)
Package

4store.

Source

cl4store.lisp.

Function: get-triples-list (&optional graph server-url)

Retrieves all triples in the store.
Useful for smoke-testing; use with caution in large stores, because it returns _everything_.

Package

4store.

Source

cl4store.lisp.

Function: insert-triples (triples &optional graph server-url)

Inserts a list of triples into the store.
The ’triples argument is expected to be a list of proper lists, each containing subject, predicate and object.

Package

4store.

Source

cl4store.lisp.

Function: select-rdfs-classes (&optional server-url)

Select all the RDFS classses in the knowledgebase. Return the multiple values from the query POSTed to the knowledgebase’s sparql http end-point. The first value is the body of the response in the sparql query results XML format.

Package

4store.

Source

cl4store.lisp.

Function: sparql-server-put-data-request (filepath &optional graphname server-url)

Perform an HTTP put request with the data contained in a file. Arguments:
- the base url pathname of the SPARQL server
- relative URL component (i.e, the graph name)
- the path to the file
Assumes that the input file is valid RDF/XML

Package

4store.

Source

cl4store.lisp.

Function: sparql-server-status-request (&optional server-url)

Returns the numeric HTTP status code from the server. If all is well, the return code will be 200 (for OK).

Package

4store.

Source

cl4store.lisp.

Function: sparql-update (data &optional method server-url)

Send a SPARQL update request to the server, and return the result. Expects a valid SPARQL query for its second argument, in a text string. Uses POST by default, but the :method keyword argument can be used to force POST, PUT, DELETE or whatever other method tickles your fancy.

Package

4store.

Source

cl4store.lisp.


5.2 Internals


5.2.1 Special variables

Special Variable: *4store-text-content-types*
Package

4store.

Source

cl4store.lisp.

Special Variable: *backend*
Package

4store.

Source

cl4store.lisp.


5.2.2 Macros

Macro: defdynvar (name &optional value doc)
Package

4store.

Source

util.lisp.

Macro: with-backend (value &body body)
Package

4store.

Source

cl4store.lisp.


5.2.3 Ordinary functions

Function: 4store-request (uri &key method accept parameters content content-type additional-headers)
Package

4store.

Source

cl4store.lisp.

Function: call-with-4store-server (value fun)
Package

4store.

Source

cl4store.lisp.

Function: call-with-backend (value fun)
Package

4store.

Source

cl4store.lisp.

Function: call-with-graph (value fun)
Package

4store.

Source

cl4store.lisp.

Function: make-keyword (string)
Package

4store.

Source

util.lisp.

Function: parse-result (xml-result)

Use cxml to parse a sparql result XML formatted string into a list structure.

Package

4store.

Source

cl4store.lisp.

Function: tsv-to-list (tsv)

Convert a 4store TSV result string to a list of lisp lists

Package

4store.

Source

cl4store.lisp.

Function: tsv-to-lists (tsv)

Convert a 4store TSV result string to a list of lisp lists

Package

4store.

Source

cl4store.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   4  
C   D   F   G   I   M   P   S   T   W  
Index Entry  Section

4
4store-request: Private ordinary functions

C
call-with-4store-server: Private ordinary functions
call-with-backend: Private ordinary functions
call-with-graph: Private ordinary functions

D
defdynvar: Private macros
delete-all-triples: Public ordinary functions
delete-graph: Public ordinary functions
delete-triples: Public ordinary functions

F
Function, 4store-request: Private ordinary functions
Function, call-with-4store-server: Private ordinary functions
Function, call-with-backend: Private ordinary functions
Function, call-with-graph: Private ordinary functions
Function, delete-all-triples: Public ordinary functions
Function, delete-graph: Public ordinary functions
Function, delete-triples: Public ordinary functions
Function, get-graphs-list: Public ordinary functions
Function, get-triples-list: Public ordinary functions
Function, insert-triples: Public ordinary functions
Function, make-keyword: Private ordinary functions
Function, parse-result: Private ordinary functions
Function, select-rdfs-classes: Public ordinary functions
Function, sparql-server-put-data-request: Public ordinary functions
Function, sparql-server-status-request: Public ordinary functions
Function, sparql-update: Public ordinary functions
Function, tsv-to-list: Private ordinary functions
Function, tsv-to-lists: Private ordinary functions

G
get-graphs-list: Public ordinary functions
get-triples-list: Public ordinary functions

I
insert-triples: Public ordinary functions

M
Macro, defdynvar: Private macros
Macro, with-4store-server: Public macros
Macro, with-backend: Private macros
Macro, with-graph: Public macros
make-keyword: Private ordinary functions

P
parse-result: Private ordinary functions

S
select-rdfs-classes: Public ordinary functions
sparql-server-put-data-request: Public ordinary functions
sparql-server-status-request: Public ordinary functions
sparql-update: Public ordinary functions

T
tsv-to-list: Private ordinary functions
tsv-to-lists: Private ordinary functions

W
with-4store-server: Public macros
with-backend: Private macros
with-graph: Public macros