TechnionTDK / jbs-json23plet

A command-line tool for generating RDF triplets from Json input
1 stars 0 forks source link

Define and implement a mechanism for generating meta-data triplets #4

Closed omishali closed 7 years ago

omishali commented 7 years ago
omishali commented 7 years ago

Before you start the implementation, send Oren a brief example of the two options:

  1. Json input that defines the ontology
  2. Fluent API.
yontyon commented 7 years ago

Examples for the above requirement:

Json input that defines the ontology: see almost complete example at master/input/ontologies/jbsOntology/jbsOntology.json. the user can create an ontology ttl file in few simple steps:

  1. define the ontology json
  2. add to the master/src/generators/config.json the ontology.json file path (under the ontologyGenerator)
  3. run
  4. the output file will be created at output directory. NOTE: our tool already supports this flow.

FluentAPI: basically there are two options:

  1. using the same triplet API but also create a namespace for the ontology. sample of code will look like that: Triplet.addNSprefix("jbo", "http://jbs.technion.ac.il/ontology/"); String classes[] = {"Sefer", "Perek", "Pasuk", "Perush", "Mishnaya", "Halacha", "Mitzva", "Seder", "DafGmara", "Masechet"}; for (String strVal : classes) { Triplet .triplet() .subject(strVal) .predicate(RDF_P_TYPE) .object(OWL_C_CLASS); Triplet .triplet() .subject(strVal) .predicate(RDFS_P_LABEL) .object(strVal); } currently we support that API too.

  2. create a spacial API for ontology: a sample of code will look like this: String classes[] = {"Sefer", "Perek", "Pasuk", "Perush", "Mishnaya", "Halacha", "Mitzva", "Seder", "DafGmara", "Masechet"}; for (String strVal : classes) { OntAPI .ontology() .class(strVal) .label(strVal) .subClassOf(OWL_THING) }

omishali commented 7 years ago

Good job. We will discuss it during the meeting.