DeterminationToRDF Tool

From Filtered Push Wiki
Jump to: navigation, search


First run the build-ontologies.xml ant build script (default target schemagen) to generate Jena OntologyModel representations of the ontologies used in ApplePie. See the following link for documentation on the Jena schemagen tool used: The build script is configured to output Java classes into the org.filteredpush.vocabulary.applepie package.

DeterminationToRDF tool

This tool can be run from the command line using something like the following:

 lowery@cobalt:~/workspace/FilteredPush/bin$ java -cp ".:/home/lowery/workspace/FilteredPush/lib/*:
 /home/lowery/workspace/FilteredPush/lib/jena/*" org.filteredpush.client.util.DeterminationToRDF
 -u root -d specifyfp_sample -n 10 -o /home/lowery/rdf --insert-determination

You will need the libraries on the class path. If you supply no arguments you will get the usage text which summarizes what is written below (if you need a reminder).

The tool takes the following options in no specific order. All are required unless they have been specified as optional below. If you omit the password, the tool will prompt you for one and the text is masked. If the port is omitted, the default is used (3306).

  • -u [user] - the database user
  • -p [password] - the database password (optional)
  • -d [dbname] - the name of the database with specify data
  • -P [port] - the port number (optional)
  • -n [number] - number of determinations to output as rdf documents.
  • -o [path] - the directory to output to, must already exist.
  • --insert-determination - output examples as insert determination documents.
  • --update-determination - output examples as update determination documents.