/*
 * VowlData.java
 *
 */

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

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

import java.util.HashSet;
import java.util.Set;

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

	private Set<AbstractClass> classes = new HashSet<>();

	public void addClass(AbstractClass vowlClass) {
		classes.add(vowlClass);
	}

}

@@ -130,58 +130,142 @@
 des.
-classes.AbstractClass;%0A%0Aimport java.util.HashSet
+AbstractNode;%0Aimport de.uni_stuttgart.vis.vowl.owl2vowl.model.nodes.classes.AbstractClass;%0A%0Aimport org.semanticweb.owlapi.model.IRI
 ;%0A
+%0A
 impo
@@ -277,19 +277,23 @@
 va.util.
-Set
+HashMap
 ;%0A%0A/**%0A 
@@ -365,20 +365,29 @@
 private 
-Set%3C
+HashMap%3CIRI, 
 Abstract
@@ -398,18 +398,19 @@
 s%3E class
-es
+Map
  = new H
@@ -416,11 +416,11 @@
 Hash
-Set
+Map
 %3C%3E()
@@ -482,29 +482,256 @@
 lass
-es.add(vowlClass
+Map.put(vowlClass.getIri(), vowlClass);%0A%09%7D%0A%0A%09public AbstractNode getNodeForIri(IRI iri) %7B%0A%09%09if (classMap.containsKey(iri)) %7B%0A%09%09%09return classMap.get(iri);%0A%09%09%7D else %7B%0A%09%09%09throw new IllegalStateException(%22Can't find node for passed iri: %22 + iri
 );%0A
+%09
 %09%7D%0A
+%09%7D
 %0A%7D%0A

Add method for requesting nodes by iri