diff options
author | Munyoki Kilyungi | 2023-07-17 21:23:29 +0300 |
---|---|---|
committer | Munyoki Kilyungi | 2023-07-21 14:36:38 +0300 |
commit | 04d83a431590b0c7040d16359f12dd21218b380e (patch) | |
tree | d8d63a8559526c5cd96162376fffb724205718fe /dump | |
parent | 8e99d505713a86873cd146d708753d8ea40e3a37 (diff) | |
download | gn-transform-databases-04d83a431590b0c7040d16359f12dd21218b380e.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.scm | 8 |
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)) |