package de.linkvt.bachelor.features.properties;

import de.linkvt.bachelor.features.Feature;
import de.linkvt.bachelor.generator.FeaturePool;

import org.semanticweb.owlapi.model.OWLAnnotation;
import org.semanticweb.owlapi.model.OWLAnnotationProperty;
import org.semanticweb.owlapi.model.OWLAxiom;
import org.semanticweb.owlapi.model.OWLClass;
import org.semanticweb.owlapi.model.OWLDataFactory;
import org.semanticweb.owlapi.model.OWLFunctionalObjectPropertyAxiom;
import org.semanticweb.owlapi.model.OWLObjectProperty;
import org.semanticweb.owlapi.model.OWLOntology;

import java.util.Collections;

/**
 * An owl equivalent property.
 */
public class OwlEquivalentPropertyFeature extends Feature {
  @Override
  protected void addTo(OWLOntology ontology, OWLDataFactory factory, FeaturePool featurePool) {
    OWLObjectProperty property = featurePool.getReusableProperty();
    featurePool.removePropertyFromPool(property);
    OWLObjectProperty equivalentProperty = featurePool.getExclusiveProperty("EquivalentProperty");

    OWLAxiom equivalentAxiom = factory.getOWLEquivalentObjectPropertiesAxiom(property, equivalentProperty);

    OWLClass equivalentDomain = featurePool.getReusableClass();
    OWLClass equivalentRange = featurePool.getExclusiveClass("EquivalentPropertyTest");
    OWLAxiom domainAxiom = factory.getOWLObjectPropertyDomainAxiom(equivalentProperty, equivalentDomain);
    OWLAxiom rangeAxiom = factory.getOWLObjectPropertyRangeAxiom(equivalentProperty, equivalentRange);

    addToOntology(ontology, equivalentAxiom);
    addToOntology(ontology, domainAxiom);
    addToOntology(ontology, rangeAxiom);
  }
}

@@ -140,118 +140,8 @@
 l;%0A%0A
-import org.semanticweb.owlapi.model.OWLAnnotation;%0Aimport org.semanticweb.owlapi.model.OWLAnnotationProperty;%0A
 impo
@@ -284,78 +284,8 @@
 ry;%0A
-import org.semanticweb.owlapi.model.OWLFunctionalObjectPropertyAxiom;%0A
 impo
@@ -389,39 +389,8 @@
 y;%0A%0A
-import java.util.Collections;%0A%0A
 /**%0A
@@ -644,24 +644,45 @@
 .get
-Reusable
+ExclusiveProperty(%22Equivalent
 Property
 ();%0A
@@ -681,59 +681,114 @@
 erty
-(
+Base%22
 );%0A    
-featurePool.removePropertyFromPool(p
+OWLObjectProperty equivalentProperty1 = featurePool.getExclusiveProperty(%22EquivalentP
 roperty
+1%22
 );%0A 
@@ -822,24 +822,25 @@
 lentProperty
+2
  = featurePo
@@ -882,16 +882,17 @@
 Property
+2
 %22);%0A%0A   
@@ -907,24 +907,25 @@
 m equivalent
+1
 Axiom = fact
@@ -994,16 +994,127 @@
 Property
+1);%0A    OWLAxiom equivalent2Axiom = factory.getOWLEquivalentObjectPropertiesAxiom(property, equivalentProperty2
 );%0A%0A    
@@ -1324,35 +1324,25 @@
 DomainAxiom(
-equivalentP
+p
 roperty, equ
@@ -1422,27 +1422,17 @@
 geAxiom(
-equivalentP
+p
 roperty,
@@ -1489,16 +1489,64 @@
 uivalent
+1Axiom);%0A    addToOntology(ontology, equivalent2
 Axiom);%0A

Give equivalent property two equivalents