This library provides a number of functions on top of the rdf_db module:
- Broadcast modifications
- Provide undo/redo
- See also
- - rdf_persistency.pl provides reliable persistency, but without
changes boardcasting and undo/redo.
- To be done
- - This library must be rewritten using rdf_monitor/3. This allows
using edit layer without having to choose between rdf_ and rdfe_
- rdfe_update(+Subject, +Predicate, +Object, +Action)
- Update an existing triple. Possible actions are:
- Delete a subject and all we know about it. This is a bit tricky.
If we are involved in transitive relations, should we re-joint
these in this module?
- rdfe_load(+File) is det
- rdfe_load(+File, +Options) is det
- Load an RDF file and record this action including version information
to facilitate reliable reload.
- Enumerate the MD5 snapshot files required to restore the current
journal file. Using this call we can write a routine that
packages the journal file with all required snapshots to restore
the journal on another computer.
- rdfe_register_ns(Id, URI)
- Encapsulation of
- Run Goal, recording all modifications as a single transaction.
If Goal raises an exception or fails, all changes are
- Undo a (toplevel) transaction. More calls do further undo. The
`Undone' actions are re-added to the undo log, so the user can
redo them. Fails if there are no more undo/redo transactions.
- Start a redo-session
- rdfe_can_redo(-TID) is semidet
- rdfe_can_undo(-TID) is semidet
- Check if we can undo and if so return the id of the transaction
that will be un/re-done. A subsequent call to rdfe_transaction_name
can be used to give a hint in the UI.
- rdfe_transaction_name(+TID, -Name)
- Return name if the transaction is named.
- Set name of the current transaction
- rdfe_transaction_member(+TID, -Action)
- Query actions inside a transaction to allow for quick update
- rdfe_set_file_property(+File, +Options)
- Set properties on the file. Options is one of
- rdfe_get_file_property(+FileOrURL, ?Option)
- rdfe_get_file_property(-URL, ?Option)
- Fetch file properties set with rdfe_set_file_property/2.
- True if facts have been added, deleted or updated that have
Source as `payload'.
- rdfe_clear_modified(+Graph) is det
- Consider the current state of Graph as unmodified.
- Create a watermark for undo and replay journal upto this point.
The rest of the logic needs to be written later.
- Clear database, undo, namespaces and journalling info.
- rdfe_open_journal(+File, +Mode) is det
- Open a journal writing to File in Mode. Mode is one of
- Open and replay the journal
- Delete current journal and create a fresh one
- Read and replay the existing journal and append new
modifications to the File.
- Close the journal. Automatically called from at program
termination from at_halt/1.
- Query the currently open journal
- Replay a journal file. For now this is our cheap way to deal
with save/load. Future versions may be more clever when dealing
with the version information stored in the journal.
The following predicates are exported, but not or incorrectly documented.
- rdfe_assert(Arg1, Arg2, Arg3)
- rdfe_retractall(Arg1, Arg2, Arg3, Arg4)
- rdfe_retractall(Arg1, Arg2, Arg3)
- rdfe_unregister_ns(Arg1, Arg2)
- rdfe_assert(Arg1, Arg2, Arg3, Arg4)
- rdfe_transaction(Arg1, Arg2)
- rdfe_update(Arg1, Arg2, Arg3, Arg4, Arg5)