Did you know ... | Search Documentation: |
Packs (add-ons) for SWI-Prolog |
Title: | OWL utility predicates over rdf library |
---|---|
Rating: | Not rated. Create the first rating! |
Latest version: | 0.1.0 |
SHA1 sum: | a8e3605c9b2a9232155e9c6aa68efdf51c02fcb0 |
Author: | Milan Unger <nilan.unger@siemens-healthineers.com> |
Home page: | https://github.com/milung/pl_owl |
No reviews. Create the first review!.
Version | SHA1 | #Downloads | URL |
---|---|---|---|
0.1.0 | a8e3605c9b2a9232155e9c6aa68efdf51c02fcb0 | 11 | https://github.com/milung/pl_owl.git |
Prolog module pl_owl
. Predicates for querieng RDF graphs using OWL Semantics.
Use module pl_owl
in your code.
Example:
:- use_module(library(`pl_owl`)). hallo :- owl_assert_individual(my_ns:my_individual, my_ns:'my-class', 'Some Individual', catalog_graph).
Few utilities predicate to create and remove owl individuals and resolve the owl relations with respect to the OWL semantics.
owl_assert_individual(+Subject:iri, +Class:iri, +Label:rdf_literal, +Graph) is det
Asserts the named individual of Class with the SubjectIri IRI and % assigns it label Label. The individual is asserted into the graph Graph
owl_date_time(+TimeStamp:float, -DateTime:compound, +TimeZone:atom) is det
Unifies the Timestamp with the DateTime compound coresponding to the lexical form of RDF. TimeStamp can be atom now
to get compound for the current timestamp.
owl_format_date_time(+DateTime:compound, -Text:atom) is det
Unifies Text with the xsd representation of the date_time/7 compound.
owl_object_atom(+Object:atom, -Atom:atom) is det
Unifies Atom with the atomic representation of the Object, which is either atomic representation of literal or a label of the resource represented by the Object.
owl_reachable(+Subject, +Property, -Object) is nondet
Succeeds if Subject is reachable to Object with respect to OWL semantics. It uses the semantics of rdf_reachable/3 but Resource is not considered to be reachable to itself unless:
subpropertyOf
, inverseOf
, transient
, reflexive
, and irreflexive
properties of the `Property.owl_remove_individual(+Individual:iri, +Graph) is det
Removes all rdf entries from the Graph where Individual is either in the subject or object role.
The script run-tests.ps1
executes the tests
To debug the module, load the debug.pl
file into prolog top.
Pack contains 8 files holding a total of 24.3K bytes.