This project is intendet to annotate data according to the ALKIS Ontology.
Additionally it is desired for the tool to be generic.
Given that 'ontology.owl' and 'data.xml' directories are known:
- Importing the ontology with a preferred prefix. For alkis it would be alk.
- Importing the data to transform.
- Getting the desired elements from the data.xml.
- Looping through the elements and transforming them.
- Outputting the transformed data to console or file.
Example Code:
a = Annotation() a.importOntology("ontology.owl", "ontologyPrefix") a.importData("data.xml") elements = a.getElementsByTagName("elementName", "parentName") for element in elements: a.annotate(element) a.output()