package de.uni_stuttgart.vis.vowl.owl2vowl.model.data;

import de.uni_stuttgart.vis.vowl.owl2vowl.constants.VowlAttribute;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.nodes.classes.VowlClass;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.nodes.classes.VowlThing;
import org.semanticweb.owlapi.model.IRI;

import java.util.Collection;
import java.util.List;

/**
 * @author Eduard
 */
public class VowlGenerator {
	private final VowlData vowlData;

	public VowlGenerator(VowlData vowlData) {
		this.vowlData = vowlData;
	}

	public VowlClass generateIntersection(Collection<IRI> iriList) {
		VowlClass element = new VowlClass(vowlData.getNewIri());
		element.setGenerated(VowlGenerationEnum.MANUALLY);
		iriList.stream().forEach(element::addElementToIntersection);
		element.addAttribute(VowlAttribute.INTERSECTION);
		vowlData.addClass(element);
		return element;
	}

	public VowlClass generateUnion(Collection<IRI> iriList) {
		VowlClass element = new VowlClass(vowlData.getNewIri());
		element.setGenerated(VowlGenerationEnum.MANUALLY);
		iriList.stream().forEach(element::addElementToUnion);
		element.addAttribute(VowlAttribute.UNION);
		vowlData.addClass(element);
		return element;
	}

	public VowlClass generateComplement(IRI iri) {
		VowlClass element = new VowlClass(vowlData.getNewIri());
		element.setGenerated(VowlGenerationEnum.MANUALLY);
		element.setComplement(iri);
		element.addAttribute(VowlAttribute.COMPLEMENT);
		vowlData.addClass(element);
		return element;
	}

	public VowlThing generateThing() {
		VowlThing thing = new VowlThing(vowlData.getNewIri());
		thing.setGenerated(VowlGenerationEnum.MANUALLY);
		vowlData.addClass(thing);
		return thing;
	}
}

@@ -49,16 +49,82 @@
 .data;%0A%0A
+import de.uni_stuttgart.vis.vowl.owl2vowl.constants.PropertyType;%0A
 import d
@@ -328,16 +328,172 @@
 lThing;%0A
+import de.uni_stuttgart.vis.vowl.owl2vowl.model.properties.AbstractProperty;%0Aimport de.uni_stuttgart.vis.vowl.owl2vowl.model.properties.VowlObjectProperty;%0A
 import o
@@ -1895,11 +1895,502 @@
 hing;%0A%09%7D
+%0A%0A%09public AbstractProperty generateDisjointProperty(IRI domain, IRI range) %7B%0A%09%09if (domain == null %7C%7C range == null) %7B%0A%09%09%09throw new IllegalArgumentException(%22Parameters should not be null!%22);%0A%09%09%7D%0A%0A%09%09VowlObjectProperty property = new VowlObjectProperty(vowlData.getNewIri());%0A%09%09property.setGenerated(VowlGenerationEnum.MANUALLY);%0A%09%09property.setDomain(domain);%0A%09%09property.setRange(range);%0A%09%09property.setType(PropertyType.DISJOINT);%0A%09%09vowlData.addObjectProperty(property);%0A%0A%09%09return property;%0A%09%7D
 %0A%7D%0A

Add missing generator constructs