Skip to content

pmaria/carml-jar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CARML JAR

Simple CLI tool for CARML

Usage:

Option Description
-c,--context JSON-LD Context file containing namespace prefix declarations
-f,--format Mapping file RDF format.
If left empty the format will be determined automatically for each mapping file.
If provided, all mappings will be assumed to have the provided format.

The following formats are supported:
ttl (text/turtle),
nt (application/n-triples),
nq (application/n-quads),
rdf (application/rdf+xml),
jsonld (application/ld+json),
trig (application/trig),
n3 (text/n3),
trix (application/trix),
brf (application/x-binary-rdf),
rj (application/rdf+json)
-fn,--functions Transformation function classes from -j to add to mapper
-i,--input Input file path. For dynamic binding of input source. If provided, will be bound as the rml:source for logical sources. This requires usage of carl:Stream
-j,--jars Jar files containing transformation functions to add to mapper
-m,--mapping Mapping file path(s) and/or mapping file directory path(s)
-o,--output Output file path, if left empty will output to console
-of,--outformat Output RDF format (see -f)
-p,--prefix Select namespaces to prefix from provided namespace JSON-LD context file. (see -c)
If left empty will default to prefix.cc context https://prefix.cc/context for available prefixes
-rsl,--rel-src-loc Specify directory to use to find relative logical source in mapping file
java -jar carml-jar-X.X.X.jar \
  -m some.rml.ttl \
  -rsl /path/to/source/dir \
  -j /path/to/functions/jar/functions.jar \
  -fn com.example.function.RmlFunctions \
  -o /path/to/output.ttl \
  -of ttl \
  -c /path/to/custom/jsonld/namespaces.jsonld \
  -p ex foo bar

namespaces.jsonld

{
    "@context": {
        "ex": "http://example.com/ex#",
        "foo": "http://example.com/foo#",
        "bar": "http://example.com/bar#"
    }
}

Optionally you can enable debug, or trace logging by adding one of the following options respectively

--spring.profiles.active=debug
--spring.profiles.active=trace

Building a new jar:

mvn clean package