diff options
author | Munyoki Kilyungi | 2023-03-14 11:18:04 +0300 |
---|---|---|
committer | BonfaceKilz | 2023-04-05 16:17:11 +0300 |
commit | 1981d1e517b5f2b0d3a6caa4ffd8505833ae17c5 (patch) | |
tree | f4dad3525be9add0ad9292d07877e3688110236d /dump/triples.scm | |
parent | 77ef1e2f4733ff64cddf3b8cdf955cf4a21691f4 (diff) | |
download | gn-transform-databases-1981d1e517b5f2b0d3a6caa4ffd8505833ae17c5.tar.gz |
Create a method to define ontologies as symbols
* dump/triples.scm: Export ontology.
(ontology): New function.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'dump/triples.scm')
-rw-r--r-- | dump/triples.scm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/dump/triples.scm b/dump/triples.scm index bb2acdc..1509ded 100644 --- a/dump/triples.scm +++ b/dump/triples.scm @@ -1,7 +1,8 @@ (define-module (dump triples) #:use-module (ice-9 match) #:use-module (dump utils) - #:export (string->identifier + #:export (ontology + string->identifier prefix triple scm->triples)) @@ -21,6 +22,10 @@ characters with an underscore and prefixing with gn:PREFIX." (define (prefix prefix iri) (format #t "@prefix ~a ~a .~%" prefix iri)) +(define (ontology prefix value) + (string->symbol + `,(format #f "~a~a" prefix value))) + (define (triple subject predicate object) (unless (or (string? subject) (symbol? subject)) |