package de.linkvt.bachelor.features.annotations.ontology.owl;

import de.linkvt.bachelor.features.Feature;
import de.linkvt.bachelor.features.FeatureCategory;
import de.linkvt.bachelor.features.annotations.ontology.OntologyConstants;

import org.semanticweb.owlapi.model.IRI;
import org.semanticweb.owlapi.model.OWLAnnotationProperty;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class OwlAnnotationPropertyFeature extends Feature {

  @Autowired
  OntologyConstants ontologyConstants;

  @Override
  public void addToOntology() {
    OWLAnnotationProperty annotationProperty = factory.getOWLAnnotationProperty(IRI.create("customAnnotationProperty"));
    addAxiomToOntology(factory.getOWLDeclarationAxiom(annotationProperty));


  }

  @Override
  public String getName() {
    return "owl:AnnotationProperty";
  }

  @Override
  public String getToken() {
    return "annotationproperty";
  }

  @Override
  public FeatureCategory getCategory() {
    return FeatureCategory.ANNOTATIONS;
  }
}

@@ -156,83 +156,49 @@
 ry;%0A
+%0A
 import 
-de.linkvt.bachelor.features.annotations.ontology.OntologyConstants;%0A
+org.semanticweb.owlapi.model.IRI;
 %0Aimp
@@ -222,35 +222,45 @@
 eb.owlapi.model.
-IRI
+OWLAnnotation
 ;%0Aimport org.sem
@@ -320,57 +320,88 @@
 rg.s
-pringframework.beans.factory.annotation.Autowired
+emanticweb.owlapi.model.OWLClass;%0Aimport org.semanticweb.owlapi.model.OWLLiteral
 ;%0Aim
@@ -524,61 +524,8 @@
  %7B%0A%0A
-  @Autowired%0A  OntologyConstants ontologyConstants;%0A%0A
   @O
@@ -762,16 +762,410 @@
 rty));%0A%0A
+    OWLLiteral annotationValue = factory.getOWLLiteral(%22Custom Annotation Value%22);%0A    OWLAnnotation annotation = factory.getOWLAnnotation(annotationProperty, annotationValue);%0A%0A    OWLClass owlClass = featurePool.getReusableClass();%0A    addAxiomToOntology(factory.getOWLDeclarationAxiom(owlClass));%0A    addAxiomToOntology(factory.getOWLAnnotationAssertionAxiom(owlClass.getIRI(), annotation));
 %0A  %7D%0A%0A  

Improve owl annotation property