Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic Code generation of ontologies #43

Open
amedranogil opened this issue Oct 23, 2017 · 0 comments
Open

Automatic Code generation of ontologies #43

amedranogil opened this issue Oct 23, 2017 · 0 comments
Assignees

Comments

@amedranogil
Copy link
Member

Enhance the Protege Code Generation plugin to create output based on the Apache Velocity Engine.

  • Create templates for classes, factories, ontologies, and all the other nedded files.
  • Templates will use the OWLAPI ontology or ontology class instances, along other custom properties
  • An XML schema defining the custom properties and variables, as well as coordinating which templates are runned against what, defining output schemes too. initially 2 modes:
    • Once per ontology, ontology class as input (e.g., Ontology Velocity Macro is runned using the ontology instance to create Ontology.java )
    • Once per ontology class, using ontology class instance (e.g.2, Class Velocity Macro is runned for each ontology class outputed as <ClassName>.java)
  • Templates and XML are bundled into _Template System_s, providing an easy mechanism to switch output (this will allow for generating OWLAPI java code, c code, SQL, or universAAL ontology code using the same implementation, only the template system changes)

universaal cgtool example1

universaal cgtool example2

universaal cgtool example3

Enhance the Maven plugin so it can be configured for:

  • generating output for all owl files found in {$project.build.sourceDirectory}/main/owl
  • generating output for a single owl file through URI (used for generating dependencies from web)
  • triggering transitive generation, previous options will only generate the given ontology, this option will allow to generate all the imported ontologies recurvively as well.
  • goal attached to the process-resources phase so the (Java) output is generated in {$project.build.outputDirectory} in, this will cause the output source to be interpreted as the code it self for compilation.
  • If the output code needs to be customized, it can be generated in {$project.build.sourceDirectory}/main/java through another goal.

This way we can import standard ontologies directly as universAAL code. As well as creating and maintaining our ontologies only in turtle serialization in the version control, using protege or other ontology tools. Legacy implementation will still be supported (but only for ontologies with custom non-OWL code).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant