The cl4store Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The cl4store Reference Manual

This is the cl4store Reference Manual, version 0.0.1, generated automatically by Declt version 2.3 "Robert April" on Tue Feb 20 08:23:01 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

Client library for interacting with the 4store RDF server (http://4store.org/).

Building on work of Equill (https://github.com/equill)


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

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


Previous: , Up: Systems   [Contents][Index]

2.1 cl4store

Maintainer

Mariano Montone

Author

Mariano Montone

License

BSD

Description

4store

Version

0.0.1

Dependencies
Source

cl4store.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Files

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


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 cl4store.asd

Location

cl4store.asd

Systems

cl4store (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.2 cl4store/package.lisp

Parent

cl4store (system)

Location

package.lisp

Packages

4store


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.3 cl4store/util.lisp

Dependency

package.lisp (file)

Parent

cl4store (system)

Location

util.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.4 cl4store/sparql.lisp

Dependency

util.lisp (file)

Parent

cl4store (system)

Location

sparql.lisp

Exported Definitions
Internal Definitions

Previous: , Up: Lisp files   [Contents][Index]

3.1.5 cl4store/cl4store.lisp

Dependency

sparql.lisp (file)

Parent

cl4store (system)

Location

cl4store.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 4store

Source

package.lisp (file)

Use List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

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


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Special variables

Special Variable: *4store-server*

4store host address

Package

4store

Source

cl4store.lisp (file)

Special Variable: *graph*

Knowledge base graph

Package

4store

Source

cl4store.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Macros

Macro: define-uri-prefix URI-PREFIX VALUE &optional DOCUMENTATION
Package

4store

Source

util.lisp (file)

Macro: sparql SPARQL
Package

4store

Source

sparql.lisp (file)

Macro: with-4store-server VALUE &body BODY
Package

4store

Source

cl4store.lisp (file)

Macro: with-graph VALUE &body BODY
Package

4store

Source

cl4store.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.3 Functions

Function: delete-all-triples &optional GRAPH SERVER-URL

Deletes _all_ triples in the specified graph.

Package

4store

Source

cl4store.lisp (file)

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 (file)

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 (file)

Function: get-graphs-list &optional SERVER-URL
Package

4store

Source

cl4store.lisp (file)

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 (file)

Function: get-uri-prefix URI-PREFIX
Package

4store

Source

util.lisp (file)

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 (file)

Function: make-uri PREFIX URI &rest ARGS
Package

4store

Source

util.lisp (file)

Function: parse-literal LITERAL
Package

4store

Source

util.lisp (file)

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 (file)

Function: sparql-compile SPARQL
Package

4store

Source

sparql.lisp (file)

Function: sparql-eval SPARQL
Package

4store

Source

sparql.lisp (file)

Function: sparql-query QUERY &optional SERVER-URL
Package

4store

Source

cl4store.lisp (file)

Function: sparql-query* RETURN-VARS QUERY-PARAMS &optional OPTIONAL-PARAMS GRAPH SERVER-URL

Send a SPARQL query to the server, and return the result in TSV format.
XML and JSON are available as return formats in 4store, but TSV is faster and simpler to parse into lists for further processing.
Arguments:
- server-url (bare string)
- graph ID (string containing the URI serving as the graph ID)
- return-vars: a list of strings naming the return variables. Question-marks are prepended automatically.
- query-params: a list of the triples that comprise the query itself. It’s currently necessary to manually prepend question-marks to the return-var names here.
- optional-params: a list of optional query-triples. If one or more of the return-vars is optional, put the relevant query-triples here. If they can be satisfied, the resulting value will be returned; if not, NIL is returned.

Package

4store

Source

cl4store.lisp (file)

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 (file)

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 (file)

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 (file)


Previous: , Up: Exported definitions   [Contents][Index]

5.1.4 Generic functions

Generic Function: render-literal VALUE
Package

4store

Methods
Method: render-literal (X symbol)
Source

util.lisp (file)

Method: render-literal (X (eql nil))
Source

util.lisp (file)

Method: render-literal (X (eql t))
Source

util.lisp (file)

Method: render-literal (URI uri)
Source

util.lisp (file)

Method: render-literal (VALUE string)
Source

util.lisp (file)

Method: render-literal (VALUE integer)
Source

util.lisp (file)

Method: render-literal VALUE
Source

util.lisp (file)


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Special variables

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

4store

Source

cl4store.lisp (file)

Special Variable: *backend*
Package

4store

Source

cl4store.lisp (file)

Special Variable: *eval*
Package

4store

Source

sparql.lisp (file)

Special Variable: *uri-prefixes*
Package

4store

Source

util.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.2 Macros

Macro: defdynvar NAME &optional VALUE DOC
Package

4store

Source

util.lisp (file)

Macro: with-backend VALUE &body BODY
Package

4store

Source

cl4store.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.3 Functions

Function: 4store-request URI &key METHOD ACCEPT PARAMETERS CONTENT CONTENT-TYPE ADDITIONAL-HEADERS
Package

4store

Source

cl4store.lisp (file)

Function: call-with-4store-server VALUE FUN
Package

4store

Source

cl4store.lisp (file)

Function: call-with-backend VALUE FUN
Package

4store

Source

cl4store.lisp (file)

Function: call-with-graph VALUE FUN
Package

4store

Source

cl4store.lisp (file)

Function: clean-literal LITERAL
Package

4store

Source

util.lisp (file)

Function: display-uri-prefixes ()
Package

4store

Source

util.lisp (file)

Function: expand TERM
Package

4store

Source

sparql.lisp (file)

Function: in-list PARSER
Package

4store

Source

sparql.lisp (file)

Function: make-keyword STRING
Package

4store

Source

util.lisp (file)

Function: parse-boolean-literal LITERAL
Package

4store

Source

util.lisp (file)

Function: parse-result XML-RESULT

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

Package

4store

Source

cl4store.lisp (file)

Function: parse-typed-literal LITERAL
Package

4store

Source

util.lisp (file)

Function: parse-uri URI
Package

4store

Source

util.lisp (file)

Function: reduce-strings LIST

Join adjacent strings in a list, leave other values intact.

Package

4store

Source

sparql.lisp (file)

Function: render-sparql SPARQL
Package

4store

Source

sparql.lisp (file)

Function: sparql-delete-data ()
Package

4store

Source

sparql.lisp (file)

Function: sparql-filter-exists ()
Package

4store

Source

sparql.lisp (file)

Function: sparql-filter-not-exists ()
Package

4store

Source

sparql.lisp (file)

Function: sparql-insert-data ()
Package

4store

Source

sparql.lisp (file)

Function: sparql-limit ()
Package

4store

Source

sparql.lisp (file)

Function: sparql-minus ()
Package

4store

Source

sparql.lisp (file)

Function: sparql-offset ()
Package

4store

Source

sparql.lisp (file)

Function: sparql-optional ()
Package

4store

Source

sparql.lisp (file)

Function: sparql-order-arg ()
Package

4store

Source

sparql.lisp (file)

Function: sparql-order-by ()
Package

4store

Source

sparql.lisp (file)

Function: sparql-order-term ()
Package

4store

Source

sparql.lisp (file)

Function: sparql-parser ()
Package

4store

Source

sparql.lisp (file)

Function: sparql-select ()
Package

4store

Source

sparql.lisp (file)

Function: sparql-subselect ()
Package

4store

Source

sparql.lisp (file)

Function: sparql-triple ()
Package

4store

Source

sparql.lisp (file)

Function: sparql-union ()
Package

4store

Source

sparql.lisp (file)

Function: sparql-var ()

Parser: parse a SPARQL variable.

Package

4store

Source

sparql.lisp (file)

Function: sparql-where ()
Package

4store

Source

sparql.lisp (file)

Function: sparql-where-graph ()
Package

4store

Source

sparql.lisp (file)

Function: strcat ARGS

Concatenate a list of strings into a single one.

Package

4store

Source

sparql.lisp (file)

Function: transform TRANSFORM

Parser: transform and return the result, when the transformation applies (not null)

Package

4store

Source

sparql.lisp (file)

Function: triple-object ()
Package

4store

Source

sparql.lisp (file)

Function: triple-predicate ()
Package

4store

Source

sparql.lisp (file)

Function: triple-subject ()
Package

4store

Source

sparql.lisp (file)

Function: triples-block ()
Package

4store

Source

sparql.lisp (file)

Function: tsv-to-list TSV

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

Package

4store

Source

cl4store.lisp (file)

Function: tsv-to-lists TSV

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

Package

4store

Source

cl4store.lisp (file)

Function: uri-reader STREAM SUB-CHAR NUMARG
Package

4store

Source

util.lisp (file)

Function: where-body ()
Package

4store

Source

sparql.lisp (file)

Function: where-triple ()
Package

4store

Source

sparql.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

5.2.4 Generic functions

Generic Function: expand-term TYPE TERM
Package

4store

Methods
Method: expand-term (TYPE (eql offset)) OFFSET
Source

sparql.lisp (file)

Method: expand-term (TYPE (eql limit)) LIMIT
Source

sparql.lisp (file)

Method: expand-term (TYPE (eql desc)) ASC
Source

sparql.lisp (file)

Method: expand-term (TYPE (eql asc)) ASC
Source

sparql.lisp (file)

Method: expand-term (TYPE (eql order-by)) ORDER-BY
Source

sparql.lisp (file)

Method: expand-term (TYPE (eql options)) OPTIONS
Source

sparql.lisp (file)

Method: expand-term (TYPE (eql minus)) MINUS
Source

sparql.lisp (file)

Method: expand-term (TYPE (eql filter-not-exists)) FILTER-NOT-EXISTS
Source

sparql.lisp (file)

Method: expand-term (TYPE (eql filter-exists)) FILTER-EXISTS
Source

sparql.lisp (file)

Method: expand-term (TYPE (eql optional)) OPTIONAL
Source

sparql.lisp (file)

Method: expand-term (TYPE (eql union)) UNION
Source

sparql.lisp (file)

Method: expand-term (TYPE (eql triple)) TRIPLE
Source

sparql.lisp (file)

Method: expand-term (TYPE (eql graph)) GRAPH
Source

sparql.lisp (file)

Method: expand-term (TYPE (eql where)) WHERE
Source

sparql.lisp (file)

Method: expand-term (TYPE (eql eval)) FORM
Source

sparql.lisp (file)

Method: expand-term (TYPE (eql var)) VAR
Source

sparql.lisp (file)

Method: expand-term (TYPE (eql vars)) VARS
Source

sparql.lisp (file)

Method: expand-term (TYPE (eql subselect)) TERM
Source

sparql.lisp (file)

Method: expand-term (TYPE (eql delete-data)) TERM
Source

sparql.lisp (file)

Method: expand-term (TYPE (eql insert-data)) TERM
Source

sparql.lisp (file)

Method: expand-term (TYPE (eql select)) TERM
Source

sparql.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   C   F   L  
Index Entry  Section

C
cl4store.asd: The cl4store<dot>asd file
cl4store/cl4store.lisp: The cl4store/cl4store<dot>lisp file
cl4store/package.lisp: The cl4store/package<dot>lisp file
cl4store/sparql.lisp: The cl4store/sparql<dot>lisp file
cl4store/util.lisp: The cl4store/util<dot>lisp file

F
File, Lisp, cl4store.asd: The cl4store<dot>asd file
File, Lisp, cl4store/cl4store.lisp: The cl4store/cl4store<dot>lisp file
File, Lisp, cl4store/package.lisp: The cl4store/package<dot>lisp file
File, Lisp, cl4store/sparql.lisp: The cl4store/sparql<dot>lisp file
File, Lisp, cl4store/util.lisp: The cl4store/util<dot>lisp file

L
Lisp File, cl4store.asd: The cl4store<dot>asd file
Lisp File, cl4store/cl4store.lisp: The cl4store/cl4store<dot>lisp file
Lisp File, cl4store/package.lisp: The cl4store/package<dot>lisp file
Lisp File, cl4store/sparql.lisp: The cl4store/sparql<dot>lisp file
Lisp File, cl4store/util.lisp: The cl4store/util<dot>lisp file

Jump to:   C   F   L  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

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

4
4store-request: Internal functions

C
call-with-4store-server: Internal functions
call-with-backend: Internal functions
call-with-graph: Internal functions
clean-literal: Internal functions

D
defdynvar: Internal macros
define-uri-prefix: Exported macros
delete-all-triples: Exported functions
delete-graph: Exported functions
delete-triples: Exported functions
display-uri-prefixes: Internal functions

E
expand: Internal functions
expand-term: Internal generic functions
expand-term: Internal generic functions
expand-term: Internal generic functions
expand-term: Internal generic functions
expand-term: Internal generic functions
expand-term: Internal generic functions
expand-term: Internal generic functions
expand-term: Internal generic functions
expand-term: Internal generic functions
expand-term: Internal generic functions
expand-term: Internal generic functions
expand-term: Internal generic functions
expand-term: Internal generic functions
expand-term: Internal generic functions
expand-term: Internal generic functions
expand-term: Internal generic functions
expand-term: Internal generic functions
expand-term: Internal generic functions
expand-term: Internal generic functions
expand-term: Internal generic functions
expand-term: Internal generic functions
expand-term: Internal generic functions

F
Function, 4store-request: Internal functions
Function, call-with-4store-server: Internal functions
Function, call-with-backend: Internal functions
Function, call-with-graph: Internal functions
Function, clean-literal: Internal functions
Function, delete-all-triples: Exported functions
Function, delete-graph: Exported functions
Function, delete-triples: Exported functions
Function, display-uri-prefixes: Internal functions
Function, expand: Internal functions
Function, get-graphs-list: Exported functions
Function, get-triples-list: Exported functions
Function, get-uri-prefix: Exported functions
Function, in-list: Internal functions
Function, insert-triples: Exported functions
Function, make-keyword: Internal functions
Function, make-uri: Exported functions
Function, parse-boolean-literal: Internal functions
Function, parse-literal: Exported functions
Function, parse-result: Internal functions
Function, parse-typed-literal: Internal functions
Function, parse-uri: Internal functions
Function, reduce-strings: Internal functions
Function, render-sparql: Internal functions
Function, select-rdfs-classes: Exported functions
Function, sparql-compile: Exported functions
Function, sparql-delete-data: Internal functions
Function, sparql-eval: Exported functions
Function, sparql-filter-exists: Internal functions
Function, sparql-filter-not-exists: Internal functions
Function, sparql-insert-data: Internal functions
Function, sparql-limit: Internal functions
Function, sparql-minus: Internal functions
Function, sparql-offset: Internal functions
Function, sparql-optional: Internal functions
Function, sparql-order-arg: Internal functions
Function, sparql-order-by: Internal functions
Function, sparql-order-term: Internal functions
Function, sparql-parser: Internal functions
Function, sparql-query: Exported functions
Function, sparql-query*: Exported functions
Function, sparql-select: Internal functions
Function, sparql-server-put-data-request: Exported functions
Function, sparql-server-status-request: Exported functions
Function, sparql-subselect: Internal functions
Function, sparql-triple: Internal functions
Function, sparql-union: Internal functions
Function, sparql-update: Exported functions
Function, sparql-var: Internal functions
Function, sparql-where: Internal functions
Function, sparql-where-graph: Internal functions
Function, strcat: Internal functions
Function, transform: Internal functions
Function, triple-object: Internal functions
Function, triple-predicate: Internal functions
Function, triple-subject: Internal functions
Function, triples-block: Internal functions
Function, tsv-to-list: Internal functions
Function, tsv-to-lists: Internal functions
Function, uri-reader: Internal functions
Function, where-body: Internal functions
Function, where-triple: Internal functions

G
Generic Function, expand-term: Internal generic functions
Generic Function, render-literal: Exported generic functions
get-graphs-list: Exported functions
get-triples-list: Exported functions
get-uri-prefix: Exported functions

I
in-list: Internal functions
insert-triples: Exported functions

M
Macro, defdynvar: Internal macros
Macro, define-uri-prefix: Exported macros
Macro, sparql: Exported macros
Macro, with-4store-server: Exported macros
Macro, with-backend: Internal macros
Macro, with-graph: Exported macros
make-keyword: Internal functions
make-uri: Exported functions
Method, expand-term: Internal generic functions
Method, expand-term: Internal generic functions
Method, expand-term: Internal generic functions
Method, expand-term: Internal generic functions
Method, expand-term: Internal generic functions
Method, expand-term: Internal generic functions
Method, expand-term: Internal generic functions
Method, expand-term: Internal generic functions
Method, expand-term: Internal generic functions
Method, expand-term: Internal generic functions
Method, expand-term: Internal generic functions
Method, expand-term: Internal generic functions
Method, expand-term: Internal generic functions
Method, expand-term: Internal generic functions
Method, expand-term: Internal generic functions
Method, expand-term: Internal generic functions
Method, expand-term: Internal generic functions
Method, expand-term: Internal generic functions
Method, expand-term: Internal generic functions
Method, expand-term: Internal generic functions
Method, expand-term: Internal generic functions
Method, render-literal: Exported generic functions
Method, render-literal: Exported generic functions
Method, render-literal: Exported generic functions
Method, render-literal: Exported generic functions
Method, render-literal: Exported generic functions
Method, render-literal: Exported generic functions
Method, render-literal: Exported generic functions

P
parse-boolean-literal: Internal functions
parse-literal: Exported functions
parse-result: Internal functions
parse-typed-literal: Internal functions
parse-uri: Internal functions

R
reduce-strings: Internal functions
render-literal: Exported generic functions
render-literal: Exported generic functions
render-literal: Exported generic functions
render-literal: Exported generic functions
render-literal: Exported generic functions
render-literal: Exported generic functions
render-literal: Exported generic functions
render-literal: Exported generic functions
render-sparql: Internal functions

S
select-rdfs-classes: Exported functions
sparql: Exported macros
sparql-compile: Exported functions
sparql-delete-data: Internal functions
sparql-eval: Exported functions
sparql-filter-exists: Internal functions
sparql-filter-not-exists: Internal functions
sparql-insert-data: Internal functions
sparql-limit: Internal functions
sparql-minus: Internal functions
sparql-offset: Internal functions
sparql-optional: Internal functions
sparql-order-arg: Internal functions
sparql-order-by: Internal functions
sparql-order-term: Internal functions
sparql-parser: Internal functions
sparql-query: Exported functions
sparql-query*: Exported functions
sparql-select: Internal functions
sparql-server-put-data-request: Exported functions
sparql-server-status-request: Exported functions
sparql-subselect: Internal functions
sparql-triple: Internal functions
sparql-union: Internal functions
sparql-update: Exported functions
sparql-var: Internal functions
sparql-where: Internal functions
sparql-where-graph: Internal functions
strcat: Internal functions

T
transform: Internal functions
triple-object: Internal functions
triple-predicate: Internal functions
triple-subject: Internal functions
triples-block: Internal functions
tsv-to-list: Internal functions
tsv-to-lists: Internal functions

U
uri-reader: Internal functions

W
where-body: Internal functions
where-triple: Internal functions
with-4store-server: Exported macros
with-backend: Internal macros
with-graph: Exported macros

Jump to:   4  
C   D   E   F   G   I   M   P   R   S   T   U   W  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *  
S  
Index Entry  Section

*
*4store-server*: Exported special variables
*4store-text-content-types*: Internal special variables
*backend*: Internal special variables
*eval*: Internal special variables
*graph*: Exported special variables
*uri-prefixes*: Internal special variables

S
Special Variable, *4store-server*: Exported special variables
Special Variable, *4store-text-content-types*: Internal special variables
Special Variable, *backend*: Internal special variables
Special Variable, *eval*: Internal special variables
Special Variable, *graph*: Exported special variables
Special Variable, *uri-prefixes*: Internal special variables

Jump to:   *  
S  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   4  
C   P   S  
Index Entry  Section

4
4store: The 4store package

C
cl4store: The cl4store system

P
Package, 4store: The 4store package

S
System, cl4store: The cl4store system

Jump to:   4  
C   P   S