.. -*- mode: rst -*- ========== RDFClose ========== The shell script :download:`rdfclose <../assignment2/rdfclose>` and the accompanying jar file :download:`rdfclose.jar <../assignment2/rdfclose.jar>` have been developed as an addition to the Jena command-line tools. You can place them in any convenient directory in your file space, but they do need to be in the same directory as each other. After downloading ``rdfclose`` and saving it somewhere convenient, make sure that the file is executable:: dice:~> chmod 755 rdfclose The usage of ``rdfclose`` is as follows:: rdfclose --data= --schema= --input= --output= --data You must indicate at least one dataset. --schema You must indicate at least one schema file. --input You must indicate the format of the dataset and the schema file. (Predefined values for this form at are "RDF/XML", "N-TRIPLE", "TURTLE" (or "TTL") and "N3". null represents the default language, "RDF/XML". "RDF/XML-ABBREV" is a synonym for "RDF/XML". ) --output The output format is N3 by default but you can still choose your favorite. As an example, let's suppose that you have the files :download:`cafes.n3 <../rdf/cafes.n3>` and :download:`cafeSchema.n3 <../rdf/cafeSchema.n3>` in the same directory as ``rdfclose`` and ``rdfclose.jar``. To derive RDFS entailments from these two files, you execute the following command:: dice:~> ./rdfclose --data=cafes.n3 --schema=cafeSchema.n3 --input=N3 This will produce a lot of output in your terminal window. To save the output, say in a file called :file:`cafeClosure.n3`, use the following instead:: dice:~> ./rdfclose --data=cafes.n3 --schema=cafeSchema.n3 --input=N3 > cafeClosure.n3 This new file :file:`cafeClosure.n3` will contain all the triples that are asserted in :file:`cafes.n3` and :file:`cafeSchema.n3`, plus all the inferred triples produced by RDFS-entailment.