addStatement: Add a statement

Description Usage Arguments Value Examples

View source: R/statement_funcs.R

Description

Add a triple to the repository. The subj, pred, and obj arguments must be supplied and are used to fill in the subject, predicate and object parts of the triple. The context argument is used to fill in the triple's graph but may be left off. In this case, the triple's graph will be the default graph of the repository.

The subj, pred, obj, and context (if supplied) arguments must all be in URI encoded N-Triples notation.

The service returns the triple-ID of the newly added triple.

Usage

1
2
addStatement(repository, subj = NULL, pred = NULL, obj = NULL,
  context = NULL)

Arguments

repository

Object of type repository specifying server details and repository to work on.

subj

valid url

pred

valid url

obj

valid url

context

context of triple

Value

Return: successful push or not

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
service = createService("localhost","user","password")
rep = repository(catalog(service,"root"),"test")
subj = '<www.test.com/tmp#person>'
pred = '<www.test.com/tmp#hasItem>'
obj= '<www.test.com/tmp#sword>'
addStatement(rep,
subj = subj,pred = pred,obj = obj)

## End(Not run)

baasman/allegRo documentation built on June 4, 2017, 12:11 a.m.