Optional
store: StoreThe quadstore to store data and metadata. Created if not passed.
Object of namespaces
Index of objects for coordinating incoming and outgoing patches
Tests whether a file is editable. If the file has a specific annotation that it is machine written, for safety, it is editable (this doesn't actually check for write access) If the file has wac-allow and accept patch headers, those are respected. and local write access is determined by those headers. This async version not only looks at past HTTP requests, it also makes new ones if necessary.
Optional
kb: StoreThe method string N3PATCH or SPARQL or DAV or LOCALFILE or false if known, undefined if not known.
Tests whether a file is editable. If the file has a specific annotation that it is machine written, for safety, it is editable (this doesn't actually check for write access) If the file has wac-allow and accept patch headers, those are respected. and local write access is determined by those headers. This synchronous version only looks at past HTTP requests, does not make new ones.
Optional
kb: StoreThe method string SPARQL or DAV or LOCALFILE or false if known, undefined if not known.
Remove from the store HTTP authorization metadata The editable function below relies on copies we have in the store of the results of previous HTTP transactions. However, when the user logs in, then that data misrepresents what would happen if the user tried again.
Optional
kb: StoreThis is suitable for an initial creation of a document.
Optional
errorMessage: stringOptional
response: unknownReloads a document.
Fast and cheap, no metadata. Measure times for the document. Load it provisionally. Don't delete the statements before the load, or it will leave a broken document in the meantime.
{RDFlibNamedNode}
Optional
message: stringOptional
response: Error | ResponseRequests a now or future action to refresh changes coming downstream This is designed to allow the system to re-request the server version, when a websocket has pinged to say there are changes. If the websocket, by contrast, has sent a patch, then this may not be necessary.
Sets up websocket to listen on
There is coordination between upstream changes and downstream ones so that a reload is not done in the middle of an upstream patch. If you use this API then you get called when a change happens, and you have to reload the file yourself, and then refresh the UI. Alternative is addDownstreamChangeListener(), where you do not have to do the reload yourself. Do mot mix them.
kb contains the HTTP metadata from previous operations
This high-level function updates the local store if the web is changed successfully.
Deletions, insertions may be undefined or single statements or lists or formulae (may contain bnodes which can be indirectly identified by a where clause).
The why
property of each statement must be the same and give the web document to be updated.
Statement or statements to be deleted.
Statement or statements to be inserted.
Optional
callback: ((uri, success, errorBody?, response?) => void)called as callbackFunction(uri, success, errorbody) OR returns a promise
Optional
errorBody: stringOptional
response: Error | ResponseOptional
secondTry: booleanOptions for the fetch call
Likely deprecated, since this lib no longer deals with browser extension
This high-level function updates the local store iff the web is changed successfully.
Deletions, insertions may be undefined or single statements or lists or formulae (may contain bnodes which can be indirectly identified by a where clause).
The why
property of each statement must be the give the web document to be updated.
The statements to be deleted and inserted may span more than one web document.
a promise
return a statemnet updating function
This does NOT update the statement. It returns an object which includes function which can be used to change the object of the statement.
The UpdateManager is a helper object for a store. Just as a Fetcher provides the store with the ability to read and write, the Update Manager provides functionality for making small patches in real time, and also looking out for concurrent updates from other agents