/*
 * VowlData.java
 *
 */

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

import de.uni_stuttgart.vis.vowl.owl2vowl.model.nodes.AbstractNode;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.nodes.classes.AbstractClass;

import org.semanticweb.owlapi.model.IRI;

import java.util.HashMap;

/**
 * Contains all data WebVOWL needs.
 */
public class VowlData {

	private HashMap<IRI, AbstractClass> classMap = new HashMap<>();

	public void addClass(AbstractClass vowlClass) {
		classMap.put(vowlClass.getIri(), vowlClass);
	}

	public AbstractNode getNodeForIri(IRI iri) {
		if (classMap.containsKey(iri)) {
			return classMap.get(iri);
		} else {
			throw new IllegalStateException("Can't find node for passed iri: " + iri);
		}
	}
}

@@ -217,17 +217,16 @@
 tClass;%0A
-%0A
 import o
@@ -259,16 +259,46 @@
 l.IRI;%0A%0A
+import java.util.Collections;%0A
 import j
@@ -314,16 +314,38 @@
 HashMap;
+%0Aimport java.util.Map;
 %0A%0A/**%0A *
@@ -407,16 +407,16 @@
 Data %7B%0A%0A
-
 %09private
@@ -473,16 +473,116 @@
 p%3C%3E();%0A%0A
+%09public Map%3CIRI, AbstractClass%3E getClassMap() %7B%0A%09%09return Collections.unmodifiableMap(classMap);%0A%09%7D%0A%0A
 %09public 

Add getter for vowl data