A Javascript library for creating and managing files and folders in Solid data stores
minimal class to query, edit and write rdf files content in N3 store using solid-namespace to access namedNode, literal
Kind: global class
Object.<string, N3.N3Store>
string
Array.<N3.Quad>
Array.<N3.Quad>
cache.url.<N3.store>
cache.url.<N3.store>
document.<string>
document.<string>
object
string
Object.<string, N3.N3Store>
cache of N3.store : cache[url] is the store of url example :
Kind: instance property of solidAPI.rdf
Kind: instance method of solidAPI.rdf
Param | Type |
---|---|
prefix | string |
url | string |
string
Kind: instance method of solidAPI.rdf
Returns: string
- url
Param | Type |
---|---|
prefix | string |
Array.<N3.Quad>
loads a Turtle file, parses it, returns an array of quads expects URL of a source file, if empty, uses previously loaded file expects Turtle strings for subject, predicate, object, & optional graph supports this non-standard syntax for Turtle strings -
Kind: instance method of solidAPI.rdf
Param | Type | Description |
---|---|---|
source | string |
url to the turtle file |
s | null | string | object |
subject |
p | null | string | object |
predicate |
o | null | string | object |
object |
g | null | string | object |
graph |
Array.<N3.Quad>
Kind: instance method of solidAPI.rdf
Param | Type | Description |
---|---|---|
url | string |
of cache[url] |
turtle | string |
|
s | null | string | object |
subject |
p | null | string | object |
predicate |
o | null | string | object |
object |
g | null | string | object |
graph |
cache.url.<N3.store>
fetch url, parse and create cache[url]=N3.store
Kind: instance method of solidAPI.rdf
Returns: cache.url.<N3.store>
- store=cache[url]
Param | Type |
---|---|
url | string |
cache.url.<N3.store>
parse RDF and create cache[url]=N3.store
Kind: instance method of solidAPI.rdf
Returns: cache.url.<N3.store>
- store=cache[url]
Param | Type | Description |
---|---|---|
url | string |
|
turtle | string |
|
[options] | object |
for N3.parser |
Properties
Name | Type | Description |
---|---|---|
document | options.baseIRI |
url |
allowed | options.format |
RDF format |
add quad to cache[url] store with special solid syntax
Kind: instance method of solidAPI.rdf
Param | Type | Description |
---|---|---|
url | string |
of cache[url] |
s | null | string | object |
subject |
p | null | string | object |
predicate |
o | null | string | object |
object |
g | null | string | object |
graph |
remove matching quads from cache[url] store using special solid syntax
Kind: instance method of solidAPI.rdf
Param | Type | Description |
---|---|---|
url | string |
of cache[url] |
s | null | string | object |
subject |
p | null | string | object |
predicate |
o | null | string | object |
object |
g | null | string | object |
graph |
document.<string>
Write RDF content from cache[url] store with N3.writer using relative notation to baseIRI
Kind: instance method of solidAPI.rdf
Returns: document.<string>
- RDF document
Param | Type | Description |
---|---|---|
url | string |
: to access cache[url] |
[options] | object |
Properties
Name | Type | Description |
---|---|---|
N3.witer | options.format.<string> |
allowed rdf contentType default ‘text/turtle’ |
N3.writer | options.prefixes.<object> |
prefixes |
one | options.prefix.<string> |
of termType used to build automatic prefixes default ‘predicate’ |
document | options.baseIRI.<string> |
baseIRI to use relative notation with ‘text/turtle’ |
document.<string>
Write RDF content from regular array of quads
Kind: instance method of solidAPI.rdf
Returns: document.<string>
- RDF document
Param | Type | Description |
---|---|---|
quadsArray | array |
|
options | object |
for N3.Writer |
Properties
Type |
---|
options.format |
options.prefixes |
object
get the list of NamedNode prefixes using solidNames for an url or cache[url] store example : list of NamedNode predicates
Kind: instance method of solidAPI.rdf
Returns: object
- prefixes
Param | Type |
---|---|
url | string |
options | object |
Properties
Name | Type | Description | ||
---|---|---|---|---|
‘subject’ | ‘predicate’ | ‘object’ | options.prefix |
|
excludes | options.baseIRI |
baseIRI from prefixes to allow make relative in write |
List of ‘namedNode’ values for a type of termType
Kind: instance method of solidAPI.rdf
Param | Type |
---|---|
type | "subject" | "predicate" | "object" |
quadsArray | array |
string
Make turtle content relative to an url resource
Kind: instance method of solidAPI.rdf
Returns: string
- turtle
Param | Type | Description |
---|---|---|
turtle | string |
|
url | string |
resource url |