aboutsummaryrefslogtreecommitdiff
path: root/dump
diff options
context:
space:
mode:
authorMunyoki Kilyungi2023-07-17 21:23:29 +0300
committerBonfaceKilz2023-07-30 12:29:56 +0300
commit591c09003bc0ccf4e8739ac3e39d60d36132a9be (patch)
treed8d63a8559526c5cd96162376fffb724205718fe /dump
parent0743ac3e7727bd15a925345547c94376b949be18 (diff)
downloadgn-transform-databases-591c09003bc0ccf4e8739ac3e39d60d36132a9be.tar.gz
Make prefix function have an optional ttl?
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'dump')
-rw-r--r--dump/triples.scm8
1 files changed, 6 insertions, 2 deletions
diff --git a/dump/triples.scm b/dump/triples.scm
index 700437a..33b4ae3 100644
--- a/dump/triples.scm
+++ b/dump/triples.scm
@@ -35,8 +35,12 @@ characters with an underscore and prefixing with gn:PREFIX."
(string-downcase
(string-trim-right str #\.)))))))
-(define (prefix prefix iri)
- (format #t "@prefix ~a ~a .~%" prefix iri))
+(define* (prefix prefix iri #:optional (ttl? #t))
+ (format #t
+ (if ttl?
+ "@prefix ~a ~a .~%"
+ "PREFIX ~a ~a ~%")
+ prefix iri))
(define (ontology prefix value)
(if (and (string? value) (string-null? value))