commit acbc9fffa5dbf5eab10ad785c951bf4120099cee
Author: Tomáš Šimandl <tomas.simandl@gmail.com>
Date:   Mon Aug 20 11:17:58 2018 +0200

    Changed format of JSON between frontend and backend.

diff --git a/documents/backend2frontend.json b/documents/backend2frontend.json
new file mode 100644
index 0000000..2f2ea7a
--- /dev/null
+++ b/documents/backend2frontend.json
@@ -0,0 +1,120 @@
+Návrh JSONu
+{
+	"attributeTypes": [
+		{
+			"dataType": <string>,	//datový typ atributu (number, string, enum, ...)
+			"name": <string>,		//název atributu
+			"text": <string>		//může sloužit jako popisek atributu, nemusí být použit
+		},
+		...
+	],
+
+	"edgeArchetypes": [ 		//možné archetypy hran
+		{
+			"name": <string>, 	//název archetypu
+			"text": <string> 	//může sloužit jako popisek archetypu, nemusí být použit
+		},
+		...
+	],
+
+	"vertexArchetypes": [		//možné archetypy vrcholů
+		{
+			"name": <string>,	//název archetypu
+			"text": <string>	//může sloužit jako popisek archetypu, nemusí být použit
+		},
+		...
+	],
+
+	"vertices": [							//vrcholy
+		{
+			"archetype": <int>,				//typ vrcholu (index v poli vertexArchetypes)
+			"attributes": [
+				[
+					<string-key>
+					<string-value>
+				],
+				...
+			],
+			"id": <int>,					//identifikátor vrcholu - použito např. při definici odkud kam vede hrana
+			"originalId": <int>,			//identifikátor vrcholu, který byl použit před zpracováním(filtrací) v backendu
+			"text": <string>,				//text pro případné dodatečné info mimo atributy - nemusí být použito, může sloužit jako popisek vrcholu, např. když si uživatel zobrazí jeho detaily, nejdříve se zobrazí tento popisek a až pak hodnoty atributů, může sloužit i jen jako nosič informace, která nebude uživateli přístupná
+			"title": <string>,				//jméno vrcholu
+		},
+		...
+	],
+
+	"edges": [ 								//hrany
+		{
+			"subedgeInfo": [
+				{
+					"originalId": <int>,	//identifikátor hrany, který byl použit před zpracováním(filtrací) v backendu
+					"archetype": <int>,		//typ hrany (index v poli edgeArchetypes)
+					"attributes": [			//struktura atributu je vzdy klic - hodnota
+						[
+							<string-key>
+							<string-value>
+						],
+						...
+					]
+				},
+				...
+			],
+			"from": <int>,					//orignal id počátečního vrcholu
+			"id": <int>,					//identifikátor hrany
+			"text": <string>,				//podobně jako text u vertices
+			"to": <int>,					//original id koncového vrcholu
+		},
+		...
+	],
+
+	"possibleEnumValues": {
+		<attribute idx>: [
+			<string>,
+			<string>,
+			...
+		],
+		...
+	},
+
+	"archetypeIcons": [						//Definice archetypových ikon
+		{
+			"name": "archetypeName",		//ikony identifikovány pomocí jmén
+			"value": "archetype svg"		//dát pozor na escapování uvozovek
+			
+			//svg musí být pro správnou vizualizaci definován tak, aby obsahoval objekty, které leží uvnitř obdélníka [0; 0] až [12; 15]
+		},
+		...
+	],
+
+	"groups": [											//obsahuje jednotlivé skupiny uzlů
+		{
+			"groupId": <int>,							//identifikátor skupiny
+			"id": <int>,								//identifikátor, který je jedinečný v rámci skupin i všech uzlů
+			"name": <string>,							//název skupiny
+			"verticesId": [<int>, <int>, ...],			//identifikátory uzlů, které jsou ve skupině
+			"verticesEdgeFromId": [<int>, <int>, ...],	//identifikátory uzlů, jejichž odchozí hrany jsou viditelné v grafu
+			"verticesEdgeToId": [<int>, <int>, ...]		//identifikátory uzlů, jejichž příchozí hrany jsou viditelné v grafu
+		},
+		...
+	],
+
+	"positions": [			//obsahuje relativní pozice uzlů a skupin v grafu
+		{
+			"id": <int>,	//identifikátor uzlu nebo skupiny
+			"x": <int>,		//X-ová pozice v grafu
+			"y": <int>		//Y-ová pozice v grafu
+		},
+		...
+	],
+
+	"sideBar": [					//obsahuje seznam uzlů a skupin, které jsou umístěné v postraním panelu
+		{
+			"id": <int>,			//identifikátor uzlu nebo skupiny
+			"isHighlighted": <bool>	//identifikuje, zda budou u sousedů zobrazeny ikony
+		},
+		...
+	],
+
+	"selectedVertex": <int>,		//identifikátor uzlu nebo skupiny, který je zvýrazněn
+	"selectedEdge": <int>			//identifikátor hrany, která je zvýrazněna
+}
\ No newline at end of file
diff --git a/sources/src/cz/zcu/kiv/offscreen/AttributeType.java b/sources/src/cz/zcu/kiv/offscreen/AttributeType.java
deleted file mode 100644
index f1ca20f..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/AttributeType.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package cz.zcu.kiv.offscreen;
-
-import cz.zcu.kiv.offscreen.graph.GraphManager;
-
-public class AttributeType {
-    public String name;
-    public GraphManager.AttributeDataType dataType;
-    public String text;
-
-    public AttributeType(String name, GraphManager.AttributeDataType dataType, String text) {
-        this.name = name;
-        this.dataType = dataType;
-        this.text = text;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public GraphManager.AttributeDataType getDataType() {
-        return dataType;
-    }
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/api/BaseEdge.java b/sources/src/cz/zcu/kiv/offscreen/api/BaseEdge.java
new file mode 100644
index 0000000..5a62f65
--- /dev/null
+++ b/sources/src/cz/zcu/kiv/offscreen/api/BaseEdge.java
@@ -0,0 +1,78 @@
+package cz.zcu.kiv.offscreen.api;
+
+/**
+ * Class represents edge. Class contains attributes which are common for input JSON format and for
+ * output JSON format (JSON between frontend and backend)
+ */
+public class BaseEdge {
+    /** identification number of edge */
+    private int id;
+    /** original ID of vertex from edge leads */
+    private int from;
+    /** original ID of vertex where edge leads */
+    private int to;
+    /** additional info */
+    private String text;
+
+    public BaseEdge(int id, int from, int to, String text) {
+        this.id = id;
+        this.from = from;
+        this.to = to;
+        this.text = text;
+    }
+
+    public int getId() {
+        return id;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    public int getFrom() {
+        return from;
+    }
+
+    public void setFrom(int from) {
+        this.from = from;
+    }
+
+    public int getTo() {
+        return to;
+    }
+
+    public void setTo(int to) {
+        this.to = to;
+    }
+
+    public String getText() {
+        return text;
+    }
+
+    public void setText(String text) {
+        this.text = text;
+    }
+
+    /**
+     * Generate hash code based on attributes {@code from} and {@code to}.
+     * @return generated hash code.
+     */
+    @Override
+    public int hashCode() {
+        return from * 100000 + to;
+    }
+
+    /**
+     * Two edges are equals where their {@code from} and {@code to} are equals.
+     *
+     * @param edge which will be compared with this instance
+     * @return tru if edges are equal, false otherwise
+     */
+    @Override
+    public boolean equals(Object edge) {
+        if (!(edge instanceof BaseEdge)) return false;
+
+        BaseEdge cmpEdge = (BaseEdge) edge;
+        return from == cmpEdge.from && to == cmpEdge.to;
+    }
+}
diff --git a/sources/src/cz/zcu/kiv/offscreen/api/BaseVertex.java b/sources/src/cz/zcu/kiv/offscreen/api/BaseVertex.java
new file mode 100644
index 0000000..2fad2f0
--- /dev/null
+++ b/sources/src/cz/zcu/kiv/offscreen/api/BaseVertex.java
@@ -0,0 +1,87 @@
+package cz.zcu.kiv.offscreen.api;
+
+/**
+ * Class represents vertex. Class contains attributes which are common for input JSON format and for
+ * output JSON format (JSON between frontend and backend)
+ */
+public class BaseVertex {
+
+    /** New generated identification number. */
+    private int id;
+    /** Identification number which is in input file. */
+    private int originalId;
+    /** Title of vertex. */
+    private String title;
+    /** Index of vertex archetype. */
+    private int archetypeIndex;
+    /** Additional info. */
+    private String text;
+
+    public BaseVertex(int id, int originalId, String title, int archetypeIndex, String text) {
+        this.id = id;
+        this.originalId = originalId;
+        this.title = title;
+        this.archetypeIndex = archetypeIndex;
+        this.text = text;
+    }
+
+    public int getId() {
+        return id;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    public int getOriginalId() {
+        return originalId;
+    }
+
+    public void setOriginalId(int originalId) {
+        this.originalId = originalId;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public int getArchetype() {
+        return archetypeIndex;
+    }
+
+    public void setArchetype(int archetypeIndex) {
+        this.archetypeIndex = archetypeIndex;
+    }
+
+    public String getText() {
+        return text;
+    }
+
+    public void setText(String text) {
+        this.text = text;
+    }
+
+    /**
+     * Generate hash code which is based on {@code originalId}.
+     * @return generated has code
+     */
+    @Override
+    public int hashCode() {
+        return originalId;
+    }
+
+    /**
+     * Two vertices are equals when their {@code originalId} is equals.
+     * @param edge which will be compared with this instance
+     * @return true if vertices are equal, false otherwise
+     */
+    @Override
+    public boolean equals(Object edge) {
+        if (!(edge instanceof BaseVertex)) return false;
+        return originalId == ((BaseVertex) edge).originalId;
+    }
+}
\ No newline at end of file
diff --git a/sources/src/cz/zcu/kiv/offscreen/api/Edge.java b/sources/src/cz/zcu/kiv/offscreen/api/Edge.java
new file mode 100644
index 0000000..edbeceb
--- /dev/null
+++ b/sources/src/cz/zcu/kiv/offscreen/api/Edge.java
@@ -0,0 +1,36 @@
+package cz.zcu.kiv.offscreen.api;
+
+import java.util.List;
+
+/**
+ * Class represents edge which is used for output JSON format (JSON between frontend and backend).
+ */
+public class Edge extends BaseEdge {
+
+    /**
+     * List of subedgeInfo.
+     * When two input edges are equals, in output their are in one record and their differences are in subedgeInfo.
+     */
+    private List<SubedgeInfo> subedgeInfo;
+
+    /**
+     * Create new edge.
+     * @param id new generated identification number
+     * @param from original ID of vertex from edge leads
+     * @param to original ID of vertex where edge leads
+     * @param text additional info
+     * @param subedgeInfo list which contains differences between equals edges
+     */
+    public Edge(int id, int from, int to, String text, List<SubedgeInfo> subedgeInfo) {
+        super(id, from, to, text);
+        this.subedgeInfo = subedgeInfo;
+    }
+
+    public List<SubedgeInfo> getSubedgeInfo(){
+        return subedgeInfo;
+    }
+
+    public void setSubedgeInfo(List<SubedgeInfo> subedgeInfo) {
+        this.subedgeInfo = subedgeInfo;
+    }
+}
diff --git a/sources/src/cz/zcu/kiv/offscreen/api/EdgeInterface.java b/sources/src/cz/zcu/kiv/offscreen/api/EdgeInterface.java
deleted file mode 100644
index c29862e..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/api/EdgeInterface.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
-package cz.zcu.kiv.offscreen.api;
-
-import cz.zcu.kiv.offscreen.graph.SubedgeInfo;
-
-import java.util.List;
-
-/**
- *
- * @author Jindra Pavlíková <jindra.pav2@seznam.cz>
- */
-public interface EdgeInterface {
-
-    public String getFrom();
-
-    public String getTo();
-
-    public int getId();
-
-    public List<SubedgeInfo> getSubedgeInfo();
-
-    public void setSubedgeInfo(List<SubedgeInfo> subedgeInfo);
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/api/GraphExport.java b/sources/src/cz/zcu/kiv/offscreen/api/GraphExport.java
new file mode 100644
index 0000000..bc5395a
--- /dev/null
+++ b/sources/src/cz/zcu/kiv/offscreen/api/GraphExport.java
@@ -0,0 +1,99 @@
+package cz.zcu.kiv.offscreen.api;
+
+import cz.zcu.kiv.offscreen.graph.EdgeArchetype;
+import cz.zcu.kiv.offscreen.graph.Graph;
+import cz.zcu.kiv.offscreen.graph.VertexArchetype;
+import cz.zcu.kiv.offscreen.graph.AttributeType;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.log4j.Logger;
+
+/**
+ * Class represents graph with all information about graph plus information about state in which used store graph.
+ * Class is used for creating of JSON which is send to frontend.
+ */
+public class GraphExport {
+
+    private List<Vertex> vertices;
+    private List<Edge> edges;
+    private List<VertexArchetype> vertexArchetypes;
+    private List<EdgeArchetype> edgeArchetypes;
+    private List<AttributeType> attributeTypes;
+    private Map<String, List<String>> possibleEnumValues;
+    private Map<String, String> archetypeIcons;
+
+    private List<Group> groups;
+    private List<Position> positions;
+    private List<SideBar> sideBar;
+    private int selectedVertex;
+    private int selectedEdge;
+
+    private Logger logger = Logger.getLogger(GraphExport.class);
+
+    public GraphExport(Graph graph) {
+        logger.trace("ENTRY");
+        this.vertices = new ArrayList<Vertex>(graph.getVertices().values());
+        this.edges = new ArrayList<Edge>(graph.getEdges());
+        this.vertexArchetypes = new ArrayList<VertexArchetype>(graph.getVertexArchetypes());
+        this.edgeArchetypes = new ArrayList<EdgeArchetype>(graph.getEdgeArchetypes());
+        this.attributeTypes = new ArrayList<>(graph.getAttributeTypes());
+        this.possibleEnumValues = graph.getPossibleEnumValues();
+        this.archetypeIcons = graph.getArchetypeIcons();
+        logger.trace("EXIT");
+    }
+
+    public List<Edge> getEdges() {
+        logger.trace("ENTRY");
+        logger.trace("EXIT");
+        return edges;
+    }
+
+    public List<Vertex> getVertices() {
+        logger.trace("ENTRY");
+        logger.trace("EXIT");
+        return vertices;
+    }
+
+    public List<VertexArchetype> getVertexArchetypes() {
+        return vertexArchetypes;
+    }
+
+    public List<EdgeArchetype> getEdgeArchetypes() {
+        return edgeArchetypes;
+    }
+
+    public List<AttributeType> getAttributeTypes() {
+        return attributeTypes;
+    }
+
+    public Map<String, List<String>> getPossibleEnumValues() {
+        return possibleEnumValues;
+    }
+
+    public Map<String, String> getArchetypeIcons() {
+        return archetypeIcons;
+    }
+
+    public List<Group> getGroups() {
+        return groups;
+    }
+
+    public List<Position> getPositions() {
+        return positions;
+    }
+
+    public List<SideBar> getSideBar() {
+        return sideBar;
+    }
+
+    public int getSelectedVertex() {
+        return selectedVertex;
+    }
+
+    public int getSelectedEdge() {
+        return selectedEdge;
+    }
+}
diff --git a/sources/src/cz/zcu/kiv/offscreen/api/GraphInterface.java b/sources/src/cz/zcu/kiv/offscreen/api/GraphInterface.java
deleted file mode 100644
index c00c77d..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/api/GraphInterface.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
-package cz.zcu.kiv.offscreen.api;
-
-import cz.zcu.kiv.offscreen.AttributeType;
-import cz.zcu.kiv.offscreen.graph.EdgeArchetype;
-import cz.zcu.kiv.offscreen.graph.VertexArchetype;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- *
- * @author Jindra Pavlíková <jindra.pav2@seznam.cz>
- */
-public interface GraphInterface {
-    
-    public void addEdge(EdgeInterface edge);
-    public void addVertex(String name, VertexInterface vertex);
-    public Map<String, VertexInterface> getVertices();
-    public List<EdgeInterface> getEdges();
-    public List<VertexArchetype>  getVertexArchetypes();
-    public List<EdgeArchetype> getEdgeArchetypes();
-    public void setVertexArchetypes(List<VertexArchetype> vertexArchetypes);
-    public void setEdgeArchetypes(List<EdgeArchetype> edgeArchetypes);
-    public void setAttributeTypes(List<AttributeType> attributeTypes);
-    public void setPossibleEnumValues(Map<Integer, List<String>> possibleEnumValues);
-    public List<AttributeType> getAttributeTypes();
-    public Map<String, List<String>> getPossibleEnumValues();
-    void setArchetypeIcons(Map<String, String> archetypeIcons);
-    Map<String, String> getArchetypeIcons();
-    List<Integer> getDefaultGroupArchetypes();
-    void setDefaultGroupArchetypes(List<Integer> defaultGroupArchetypes);
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/api/Group.java b/sources/src/cz/zcu/kiv/offscreen/api/Group.java
new file mode 100644
index 0000000..7373270
--- /dev/null
+++ b/sources/src/cz/zcu/kiv/offscreen/api/Group.java
@@ -0,0 +1,79 @@
+package cz.zcu.kiv.offscreen.api;
+
+import java.util.List;
+
+/**
+ * Class represents group of edges and their settings. Used in JSON between frontend and backend.
+ */
+public class Group {
+
+    /** Generated id of group which is unique only in groups. */
+    private int groupId;
+    /** Generated if of group which is unique in groups and vertexes. */
+    private int id;
+    /** Name of group */
+    private String name;
+    /** List of vertices id which belongs to this group */
+    private List<Integer> verticesId;
+    /** List of vertices id whose outgoing edges are visible. */
+    private List<Integer> verticesEdgeFromId;
+    /** List of vertices id whose incoming edges are visible. */
+    private List<Integer> verticesEdgeToId;
+
+    public Group(int groupId, int id, String name, List<Integer> verticesId, List<Integer> verticesEdgeFromId, List<Integer> verticesEdgeToId) {
+        this.groupId = groupId;
+        this.id = id;
+        this.name = name;
+        this.verticesId = verticesId;
+        this.verticesEdgeFromId = verticesEdgeFromId;
+        this.verticesEdgeToId = verticesEdgeToId;
+    }
+
+    public int getGroupId() {
+        return groupId;
+    }
+
+    public void setGroupId(int groupId) {
+        this.groupId = groupId;
+    }
+
+    public int getId() {
+        return id;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public List<Integer> getVerticesId() {
+        return verticesId;
+    }
+
+    public void setVerticesId(List<Integer> verticesId) {
+        this.verticesId = verticesId;
+    }
+
+    public List<Integer> getVerticesEdgeFromId() {
+        return verticesEdgeFromId;
+    }
+
+    public void setVerticesEdgeFromId(List<Integer> verticesEdgeFromId) {
+        this.verticesEdgeFromId = verticesEdgeFromId;
+    }
+
+    public List<Integer> getVerticesEdgeToId() {
+        return verticesEdgeToId;
+    }
+
+    public void setVerticesEdgeToId(List<Integer> verticesEdgeToId) {
+        this.verticesEdgeToId = verticesEdgeToId;
+    }
+}
diff --git a/sources/src/cz/zcu/kiv/offscreen/api/Position.java b/sources/src/cz/zcu/kiv/offscreen/api/Position.java
new file mode 100644
index 0000000..452c16d
--- /dev/null
+++ b/sources/src/cz/zcu/kiv/offscreen/api/Position.java
@@ -0,0 +1,44 @@
+package cz.zcu.kiv.offscreen.api;
+
+/**
+ * Class is used for storing information about vertex/group relative position.
+ */
+public class Position {
+
+    /** Identification number of vertex or group which was generated in application. */
+    private int vertexId;
+    /** Relative X position. */
+    private float x;
+    /** Relative Y position */
+    private float y;
+
+    public Position(int vertexId, float x, float y) {
+        this.vertexId = vertexId;
+        this.x = x;
+        this.y = y;
+    }
+
+    public int getVertexId() {
+        return vertexId;
+    }
+
+    public void setVertexId(int vertexId) {
+        this.vertexId = vertexId;
+    }
+
+    public float getX() {
+        return x;
+    }
+
+    public void setX(float x) {
+        this.x = x;
+    }
+
+    public float getY() {
+        return y;
+    }
+
+    public void setY(float y) {
+        this.y = y;
+    }
+}
diff --git a/sources/src/cz/zcu/kiv/offscreen/api/SideBar.java b/sources/src/cz/zcu/kiv/offscreen/api/SideBar.java
new file mode 100644
index 0000000..df26bd9
--- /dev/null
+++ b/sources/src/cz/zcu/kiv/offscreen/api/SideBar.java
@@ -0,0 +1,33 @@
+package cz.zcu.kiv.offscreen.api;
+
+/**
+ * Class store information about item in side bar.
+ */
+public class SideBar {
+
+    /** Identification number of vertex or group which was generated in application. */
+    private int vertexId;
+    /** Indicates if related vertexes of this item have visible icon which shows relation with this item. */
+    private boolean highlighted;
+
+    public SideBar(int vertexId, boolean highlighted) {
+        this.vertexId = vertexId;
+        this.highlighted = highlighted;
+    }
+
+    public int getVertexId() {
+        return vertexId;
+    }
+
+    public void setVertexId(int vertexId) {
+        this.vertexId = vertexId;
+    }
+
+    public boolean isHighlighted() {
+        return highlighted;
+    }
+
+    public void setHighlighted(boolean highlighted) {
+        this.highlighted = highlighted;
+    }
+}
diff --git a/sources/src/cz/zcu/kiv/offscreen/api/SubedgeInfo.java b/sources/src/cz/zcu/kiv/offscreen/api/SubedgeInfo.java
new file mode 100644
index 0000000..f1fb208
--- /dev/null
+++ b/sources/src/cz/zcu/kiv/offscreen/api/SubedgeInfo.java
@@ -0,0 +1,37 @@
+package cz.zcu.kiv.offscreen.api;
+
+import java.util.List;
+
+public class SubedgeInfo {
+
+    /** Edge archetype index. */
+    private int archetype;
+    /** Original id of edge which is taken from input JSON file. */
+    private int originalId;
+    /** List of all tributes. Every attribute is stored in String array in pair as {attribute name, attribute value}. */
+    private List<String[]> attributes;
+
+    /**
+     * Create new subedgeInfo
+     * @param originalId Original id of edge which is taken from input JSON file.
+     * @param archetype Edge archetype index.
+     * @param attributes  List of all tributes. Every attribute is stored in String array in pair as {attribute name, attribute value}.
+     */
+    public SubedgeInfo(int originalId, int archetype, List<String[]> attributes) {
+        this.originalId = originalId;
+        this.archetype = archetype;
+        this.attributes = attributes;
+    }
+
+    public int getOriginalId() {
+        return originalId;
+    }
+
+    public int getArchetype() {
+        return archetype;
+    }
+
+    public List<String[]> getAttributes() {
+        return attributes;
+    }
+}
diff --git a/sources/src/cz/zcu/kiv/offscreen/api/Vertex.java b/sources/src/cz/zcu/kiv/offscreen/api/Vertex.java
new file mode 100644
index 0000000..7101628
--- /dev/null
+++ b/sources/src/cz/zcu/kiv/offscreen/api/Vertex.java
@@ -0,0 +1,34 @@
+package cz.zcu.kiv.offscreen.api;
+
+import java.util.List;
+
+/**
+ * Class represents vertex which is used for output JSON format (JSON between frontend and backend)
+ */
+public class Vertex extends BaseVertex {
+
+    /** List of all tributes. Every attribute is stored in String array in pair as {attribute name, attribute value}. */
+    private List<String[]> attributes;
+
+    /**
+     * Create new vertex.
+     * @param id new generated identification number.
+     * @param originalId original identification number from input file
+     * @param title title of vertex
+     * @param archetypeIndex index of vertex archetype
+     * @param text additional info
+     * @param attributes List of all attributes. Every attribute is stored in String array in pair as {attribute name, attribute value}.
+     */
+    public Vertex(int id, int originalId, String title, int archetypeIndex, String text, List<String[]> attributes) {
+        super(id, originalId, title, archetypeIndex, text);
+        this.attributes = attributes;
+    }
+
+    public List<String[]> getAttributes() {
+        return attributes;
+    }
+
+    public void setAttributes(List<String[]> attributes) {
+        this.attributes = attributes;
+    }
+}
diff --git a/sources/src/cz/zcu/kiv/offscreen/api/VertexInterface.java b/sources/src/cz/zcu/kiv/offscreen/api/VertexInterface.java
deleted file mode 100644
index 1254e68..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/api/VertexInterface.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
-package cz.zcu.kiv.offscreen.api;
-
-import java.util.List;
-
-/**
- * 
- * @author Jindra Pavlíková <jindra.pav2@seznam.cz>
- */
-public interface VertexInterface {
-
-	public int getId();
-
-	public String getName();
-
-	public String getSymbolicName();
-
-	public List<String> getExportedPackages();
-
-	public List<String> getImportedPackages();
-
-	public void setExportedPackages(List<String> exportedPackages);
-
-	public void setImportedPackages(List<String> importedPackages);
-
-	public int getArchetype();
-
-	public void setArchetype(int archetype);
-
-	public void setAttributes(List<String[]> attributes);
-
-	public List<String[]> getAttributes();
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/Attribute.java b/sources/src/cz/zcu/kiv/offscreen/graph/Attribute.java
index 2a1ddd6..4a7daaa 100644
--- a/sources/src/cz/zcu/kiv/offscreen/graph/Attribute.java
+++ b/sources/src/cz/zcu/kiv/offscreen/graph/Attribute.java
@@ -1,11 +1,32 @@
 package cz.zcu.kiv.offscreen.graph;
 
+/**
+ * This class represents attribute of edge or vertex.
+ */
 public class Attribute {
-    int typeIndex;
-    Object value;
+    /** Index to array of attribute types which is defined in input JSON file */
+    private int typeIndex;
+    /** Value of attribute */
+    private Object value;
 
     public Attribute(int typeIndex, Object value) {
         this.typeIndex = typeIndex;
         this.value = value;
     }
+
+    public int getTypeIndex() {
+        return typeIndex;
+    }
+
+    public void setTypeIndex(int typeIndex) {
+        this.typeIndex = typeIndex;
+    }
+
+    public Object getValue() {
+        return value;
+    }
+
+    public void setValue(Object value) {
+        this.value = value;
+    }
 }
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/AttributeType.java b/sources/src/cz/zcu/kiv/offscreen/graph/AttributeType.java
new file mode 100644
index 0000000..1240c67
--- /dev/null
+++ b/sources/src/cz/zcu/kiv/offscreen/graph/AttributeType.java
@@ -0,0 +1,32 @@
+package cz.zcu.kiv.offscreen.graph;
+
+/**
+ * Class represents one attribute type which is used in input JSON file and in output JSON file (file between frontend
+ * and backend).
+ */
+public class AttributeType {
+    /** name of attribute */
+    public String name;
+    /** data type of attribute */
+    public GraphManager.AttributeDataType dataType;
+    /** additional info */
+    public String text;
+
+    public AttributeType(String name, GraphManager.AttributeDataType dataType, String text) {
+        this.name = name;
+        this.dataType = dataType;
+        this.text = text;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public GraphManager.AttributeDataType getDataType() {
+        return dataType;
+    }
+
+    public String getText() {
+        return text;
+    }
+}
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/EdgeArchetype.java b/sources/src/cz/zcu/kiv/offscreen/graph/EdgeArchetype.java
index 28c8519..71b1995 100644
--- a/sources/src/cz/zcu/kiv/offscreen/graph/EdgeArchetype.java
+++ b/sources/src/cz/zcu/kiv/offscreen/graph/EdgeArchetype.java
@@ -12,4 +12,8 @@ public class EdgeArchetype {
     public String getName() {
         return  name;
     }
+
+    public String getText() {
+        return text;
+    }
 }
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/EdgeData.java b/sources/src/cz/zcu/kiv/offscreen/graph/EdgeData.java
deleted file mode 100644
index 2e229d3..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/graph/EdgeData.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package cz.zcu.kiv.offscreen.graph;
-
-import java.util.*;
-
-public class EdgeData {
-    public int id;
-    public int from;
-    public int to;
-    public String text;
-    public int archetypeIndex;
-    public Map<Integer, Attribute> attributes = new HashMap<>();
-
-    public EdgeData(int id, int from, int to, String text, int archetypeIndex) {
-        this.id = id;
-        this.from = from;
-        this.to = to;
-        this.text = text;
-        this.archetypeIndex = archetypeIndex;
-    }
-
-    public void addAttribute(int attrTypeIndex, Object value) {
-        Attribute attr = new Attribute(attrTypeIndex, value);
-        attributes.put(attrTypeIndex, attr);
-    }
-
-    public void addAttributes(Map<Integer, Attribute> attributes) {
-        this.attributes.putAll(attributes);
-    }
-
-    public Attribute getAttribute(int attrTypeIndex) {
-        return attributes.get(attrTypeIndex);
-    }
-
-    @Override
-    public int hashCode() {
-        return from * 100000 + to;
-    }
-
-    @Override
-    public boolean equals(Object edge) {
-        return from == ((EdgeData) edge).from && to == ((EdgeData) edge).to;
-    }
-
-    public List<Attribute> getSortedAttributes() {
-        List<Attribute> list = new ArrayList<>();
-        ArrayList<Integer> indices = new ArrayList<>(attributes.keySet());
-        //indices.sort(Integer::compareTo);
-        Collections.sort(indices); // TODO check correct order
-        for (int i = 0; i < indices.size(); i++) {
-            list.add(attributes.get(indices.get(i)));
-        }
-        return list;
-    }
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/EdgeEfp.java b/sources/src/cz/zcu/kiv/offscreen/graph/EdgeEfp.java
deleted file mode 100644
index 21b1de8..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/graph/EdgeEfp.java
+++ /dev/null
@@ -1,91 +0,0 @@
-package cz.zcu.kiv.offscreen.graph;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.log4j.Logger;
-
-import cz.zcu.kiv.offscreen.api.EdgeInterface;
-import cz.zcu.kiv.offscreen.graph.efp.EfpFeature;
-
-/**
- * 
- * @author Jiri Loudil
- *
- */
-public class EdgeEfp implements EdgeInterface {
-	private int edgeId;
-	private String from;
-	private String to;
-	
-	private boolean edgeStatusOk;
-	private ArrayList<EfpFeature> features;
-
-	private Logger logger = Logger.getLogger(EdgeEfp.class);
-
-	/**
-	 * Inicialization of edge.
-	 * 
-	 * @param edgeId
-	 *            id of edge
-	 * @param from
-	 *            name of vertex which leads from the edge
-	 * @param to
-	 *            name of vertex which leads to the edge
-	 */
-	public EdgeEfp(int edgeId, String from, String to) {
-		logger.trace("ENTRY");
-		this.edgeId = edgeId;
-		this.from = from;
-		this.to = to;
-		
-		this.edgeStatusOk = true;
-		this.features = new ArrayList<EfpFeature>();
-		logger.trace("EXIT");
-	}
-
-	@Override
-	public String getFrom() {
-		logger.trace("ENTRY");
-		logger.trace("EXIT");
-		return from;
-
-	}
-
-	@Override
-	public String getTo() {
-		logger.trace("ENTRY");
-		logger.trace("EXIT");
-		return to;
-	}
-
-	@Override
-	public int getId() {
-		logger.trace("ENTRY");
-		logger.trace("EXIT");
-		return edgeId;
-	}
-
-	@Override
-	public List<SubedgeInfo> getSubedgeInfo() {
-		return null;
-	}
-
-	@Override
-	public void setSubedgeInfo(List<SubedgeInfo> subedgeInfo) {
-		// TODO 30.7.2018 empty body (copy from CoCaEx ASWI)
-	}
-
-	public ArrayList<EfpFeature> getFeatures() {
-		return features;
-	}
-
-	public boolean isEdgeStatusOk() {
-		return edgeStatusOk;
-	}
-
-	public void setEdgeStatusOk(boolean edgeStatusOk) {
-		this.edgeStatusOk = edgeStatusOk;
-	}
-
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/EdgeImpl.java b/sources/src/cz/zcu/kiv/offscreen/graph/EdgeImpl.java
index 38cadec..a696afe 100644
--- a/sources/src/cz/zcu/kiv/offscreen/graph/EdgeImpl.java
+++ b/sources/src/cz/zcu/kiv/offscreen/graph/EdgeImpl.java
@@ -1,101 +1,85 @@
 package cz.zcu.kiv.offscreen.graph;
 
-import cz.zcu.kiv.offscreen.api.EdgeInterface;
-import java.util.LinkedList;
-import java.util.List;
-import org.apache.log4j.Logger;
+import cz.zcu.kiv.offscreen.api.BaseEdge;
+
+import java.util.*;
 
 /**
- * This class represents edge.
- *
- * @author Jindra Pavlíková
+ * Class represents edge which is used for input JSON format.
  */
-public class EdgeImpl implements EdgeInterface {
+public class EdgeImpl extends BaseEdge {
 
-    private int edgeId;
-    private String from;
-    private String to;
-    private List<String> packageConnections;
-    private boolean isCompatible;
-    private List<SubedgeInfo> subedgeInfo;
-    private String compInfoJSON;
-    private Logger logger = Logger.getLogger(EdgeImpl.class);
+    /** original identification number which is defined in input file */
+    private int originalId;
+    /** index of edge archetype */
+    private int archetypeIndex;
+    /** Map contains attributes stored in key value format. Key is index to array of attribute types defined in input file */
+    private Map<Integer, Attribute> attributesMap;
 
     /**
-     * Inicialization of edge.
-     *
-     * @param edgeId id of edge
-     * @param from name of vertex which leads from the edge
-     * @param to name of vertex which leads to the edge
+     * Create new edge.
+     * @param id new generated identification number
+     * @param from original ID of vertex from edge leads
+     * @param to original ID of vertex where edge leads
+     * @param text additional info
+     * @param originalId original identification number which is defined in input file
+     * @param archetypeIndex index of edge archetype
      */
-    public EdgeImpl(int edgeId, String from, String to, boolean isCompatible, String compInfoJSON) {
-        logger.trace("ENTRY");
-        this.edgeId = edgeId;
-        this.from = from;
-        this.to = to;
-        this.packageConnections = new LinkedList<String>();
-        this.isCompatible = isCompatible;
-        this.compInfoJSON = compInfoJSON;
-        logger.trace("EXIT");
+    public EdgeImpl(int id, int from, int to, String text, int originalId, int archetypeIndex) {
+        super(id, from, to, text);
+        this.originalId = originalId;
+        this.archetypeIndex = archetypeIndex;
+        this.attributesMap = new HashMap<>();
     }
 
-    @Override
-    public String getFrom() {
-        logger.trace("ENTRY");
-        logger.trace("EXIT");
-        return from;
-
+    public Attribute getAttribute(int attrTypeIndex) {
+        return attributesMap.get(attrTypeIndex);
     }
 
-    @Override
-    public String getTo() {
-        logger.trace("ENTRY");
-        logger.trace("EXIT");
-        return to;
+    public Map<Integer, Attribute> getAttributesMap() {
+        return attributesMap;
     }
 
-    @Override
-    public int getId() {
-        logger.trace("ENTRY");
-        logger.trace("EXIT");
-        return edgeId;
-    }
 
-    @Override
-    public List<SubedgeInfo> getSubedgeInfo() {
-        return subedgeInfo;
+    public int getOriginalId() {
+        return originalId;
     }
 
-    @Override
-    public void setSubedgeInfo(List<SubedgeInfo> subedgeInfo) {
-        this.subedgeInfo = subedgeInfo;
+
+    public int getArchetype() {
+        return archetypeIndex;
     }
 
-    @Override
-    public boolean equals(Object edge) {
-        if (!(edge instanceof EdgeImpl)) return false;
-        EdgeImpl cmpEdge = (EdgeImpl) edge;
-        return from.equals(cmpEdge.from) && to.equals(cmpEdge.to);
+
+    public void addAttribute(int attrTypeIndex, Object value) {
+        Attribute attr = new Attribute(attrTypeIndex, value);
+        attributesMap.put(attrTypeIndex, attr);
     }
 
-    public List<String> getPackageConnections() {
-        logger.trace("ENTRY");
-        logger.trace("EXIT");
-        return this.packageConnections;
+    public void addAttributes(Map<Integer, Attribute> attributes) {
+        this.attributesMap.putAll(attributes);
     }
 
-    public void setPackageConnections(List<String> packageConnections) {
-        logger.trace("ENTRY");
-        this.packageConnections = packageConnections;
-        logger.trace("EXIT");
+    public void setOriginalId(int originalId) {
+        this.originalId = originalId;
     }
-    
-    public boolean getIsCompatible() {
-        return isCompatible;
+
+    public void setArchetypeIndex(int archetypeIndex) {
+        this.archetypeIndex = archetypeIndex;
     }
-    
-    public String getCompInfoJSON() {
-        return compInfoJSON;
+
+    /**
+     * Return list of attributes sorted by their key value in {@code attributeMap}
+     * @return sorted list
+     */
+    public List<Attribute> getSortedAttributes() {
+        List<Attribute> list = new ArrayList<>();
+        ArrayList<Integer> indices = new ArrayList<>(attributesMap.keySet());
+        //indices.sort(Integer::compareTo);
+        Collections.sort(indices);
+        for (Integer index : indices) {
+            list.add(attributesMap.get(index));
+        }
+        return list;
     }
-   
 }
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/Graph.java b/sources/src/cz/zcu/kiv/offscreen/graph/Graph.java
new file mode 100644
index 0000000..6dfa501
--- /dev/null
+++ b/sources/src/cz/zcu/kiv/offscreen/graph/Graph.java
@@ -0,0 +1,109 @@
+package cz.zcu.kiv.offscreen.graph;
+
+import cz.zcu.kiv.offscreen.api.Edge;
+import cz.zcu.kiv.offscreen.api.Vertex;
+import org.apache.log4j.Logger;
+
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Class represents graph which is loaded from input JSON file.
+ */
+public class Graph {
+
+    private Map<String, Vertex> vertices;
+    private List<Edge> edges;
+    private List<VertexArchetype> vertexArchetypes;
+    private List<EdgeArchetype> edgeArchetypes;
+    private List<AttributeType> attributeTypes;
+    private Map<String, List<String>> possibleEnumValues;
+    private List<String> defaultGroupArchetypes;
+
+    private Map<String, String> archetypeIcons;
+    private Logger logger = Logger.getLogger(Graph.class);
+
+    public Graph() {
+        logger.trace("ENTRY");
+        this.vertices = new HashMap<String, Vertex>();
+        this.edges = new LinkedList<Edge>();
+        logger.trace("EXIT");
+    }
+
+    public List<Edge> getEdges() {
+        logger.trace("ENTRY");
+        logger.trace("EXIT");
+        return edges;
+    }
+
+    public List<VertexArchetype> getVertexArchetypes() {
+        return vertexArchetypes;
+    }
+
+    public List<EdgeArchetype> getEdgeArchetypes() {
+        return edgeArchetypes;
+    }
+
+    public void setVertexArchetypes(List<VertexArchetype> vertexArchetypes) {
+        this.vertexArchetypes = vertexArchetypes;
+    }
+
+    public  void setEdgeArchetypes(List<EdgeArchetype> edgeArchetypes) {
+        this.edgeArchetypes = edgeArchetypes;
+    }
+
+    public void setAttributeTypes(List<AttributeType> attributeTypes) {
+        this.attributeTypes = attributeTypes;
+    }
+
+    public void setPossibleEnumValues(Map<Integer, List<String>> possibleEnumValues) {
+        this.possibleEnumValues = new HashMap<>();
+        for (Integer index : possibleEnumValues.keySet()) {
+            this.possibleEnumValues.put("" + index, possibleEnumValues.get(index));
+        }
+    }
+
+    public void setArchetypeIcons(Map<String, String> archetypeIcons) {
+        this.archetypeIcons = archetypeIcons;
+    }
+
+    public List<String> getDefaultGroupArchetypes() {
+        return defaultGroupArchetypes;
+    }
+
+    public void setDefaultGroupArchetypes(List<String> defaultGroupArchetypes) {
+        this.defaultGroupArchetypes = defaultGroupArchetypes;
+    }
+
+    public List<AttributeType> getAttributeTypes() {
+        return attributeTypes;
+    }
+
+    public Map<String, List<String>> getPossibleEnumValues() {
+        return possibleEnumValues;
+    }
+
+    public Map<String, String> getArchetypeIcons() {
+        return archetypeIcons;
+    }
+
+    public Map<String, Vertex> getVertices() {
+        logger.trace("ENTRY");
+        logger.trace("EXIT");
+        return vertices;
+    }
+
+    public void addEdge(Edge edge) {
+        logger.trace("ENTRY");
+        this.edges.add(edge);
+        logger.trace("EXIT");
+    }
+
+    public void addVertex(String name, Vertex vertex) {
+        logger.trace("ENTRY");
+        this.vertices.put(name, vertex);
+        logger.trace("EXIT");
+    }
+}
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/GraphExport.java b/sources/src/cz/zcu/kiv/offscreen/graph/GraphExport.java
deleted file mode 100644
index 74aed52..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/graph/GraphExport.java
+++ /dev/null
@@ -1,82 +0,0 @@
-package cz.zcu.kiv.offscreen.graph;
-
-import cz.zcu.kiv.offscreen.AttributeType;
-import cz.zcu.kiv.offscreen.api.EdgeInterface;
-import cz.zcu.kiv.offscreen.api.GraphInterface;
-import cz.zcu.kiv.offscreen.api.VertexInterface;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.log4j.Logger;
-
-/*
- * To change this template, choose Tools | Templates and open the template in
- * the editor.
- */
-/**
- *
- * @author Jindra Pavlíková <jindra.pav2@seznam.cz>
- */
-public class GraphExport {
-
-    private List<VertexInterface> vertices;
-    private List<EdgeInterface> edges;
-    private List<VertexArchetype> vertexArchetypes;
-    private List<EdgeArchetype> edgeArchetypes;
-    private List<AttributeType> attributeTypes;
-    private Map<String, List<String>> possibleEnumValues;
-    private Map<String, String> archetypeIcons;
-    private List<Integer> defaultGroupArchetypes;
-
-    private Logger logger = Logger.getLogger(GraphExport.class);
-
-    public GraphExport(GraphInterface graph) {
-        logger.trace("ENTRY");
-        this.vertices = new ArrayList<VertexInterface>(graph.getVertices().values());
-        this.edges = new ArrayList<EdgeInterface>(graph.getEdges());
-        this.vertexArchetypes = new ArrayList<VertexArchetype>(graph.getVertexArchetypes());
-        this.edgeArchetypes = new ArrayList<EdgeArchetype>(graph.getEdgeArchetypes());
-        this.attributeTypes = new ArrayList<>(graph.getAttributeTypes());
-        this.possibleEnumValues = graph.getPossibleEnumValues();
-        this.archetypeIcons = graph.getArchetypeIcons();
-        this.defaultGroupArchetypes = graph.getDefaultGroupArchetypes();
-        logger.trace("EXIT");
-    }
-
-    public List<EdgeInterface> getEdges() {
-        logger.trace("ENTRY");
-        logger.trace("EXIT");
-        return edges;
-    }
-
-    public List<VertexInterface> getVertices() {
-        logger.trace("ENTRY");
-        logger.trace("EXIT");
-        return vertices;
-    }
-
-    public List<VertexArchetype> getVertexArchetypes() {
-        return vertexArchetypes;
-    }
-
-    public List<EdgeArchetype> getEdgeArchetypes() {
-        return edgeArchetypes;
-    }
-
-    public List<AttributeType> getAttributeTypes() {
-        return attributeTypes;
-    }
-
-    public Map<String, List<String>> getPossibleEnumValues() {
-        return possibleEnumValues;
-    }
-
-    public Map<String, String> getArchetypeIcons() {
-        return archetypeIcons;
-    }
-
-    public List<Integer> getDefaultGroupArchetypes() {
-        return defaultGroupArchetypes;
-    }
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/GraphImpl.java b/sources/src/cz/zcu/kiv/offscreen/graph/GraphImpl.java
deleted file mode 100644
index af60c10..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/graph/GraphImpl.java
+++ /dev/null
@@ -1,126 +0,0 @@
-package cz.zcu.kiv.offscreen.graph;
-
-import cz.zcu.kiv.offscreen.AttributeType;
-import cz.zcu.kiv.offscreen.api.EdgeInterface;
-import cz.zcu.kiv.offscreen.api.GraphInterface;
-import cz.zcu.kiv.offscreen.api.VertexInterface;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import org.apache.log4j.Logger;
-
-/**
- *
- * @author Jindra Pavlíková
- */
-public class GraphImpl implements GraphInterface {
-
-    private Map<String, VertexInterface> vertices;
-    private List<EdgeInterface> edges;
-    private Logger logger = Logger.getLogger(GraphImpl.class);
-    private List<VertexArchetype> vertexArchetypes;
-    private List<EdgeArchetype> edgeArchetypes;
-    private List<AttributeType> attributeTypes;
-    private Map<String, List<String>> possibleEnumValues;
-    private List<Integer> defaultGroupArchetypes;
-
-    private Map<String, String> archetypeIcons;
-
-    public GraphImpl() {
-        logger.trace("ENTRY");
-        this.vertices = new HashMap<String, VertexInterface>();
-        this.edges = new LinkedList<EdgeInterface>();
-        logger.trace("EXIT");
-    }
-
-    @Override
-    public List<EdgeInterface> getEdges() {
-        logger.trace("ENTRY");
-        logger.trace("EXIT");
-        return edges;
-    }
-
-    @Override
-    public List<VertexArchetype> getVertexArchetypes() {
-        return vertexArchetypes;
-    }
-
-    @Override
-    public List<EdgeArchetype> getEdgeArchetypes() {
-        return edgeArchetypes;
-    }
-
-    @Override
-    public void setVertexArchetypes(List<VertexArchetype> vertexArchetypes) {
-        this.vertexArchetypes = vertexArchetypes;
-    }
-
-    @Override
-    public  void setEdgeArchetypes(List<EdgeArchetype> edgeArchetypes) {
-        this.edgeArchetypes = edgeArchetypes;
-    }
-
-    @Override
-    public void setAttributeTypes(List<AttributeType> attributeTypes) {
-        this.attributeTypes = attributeTypes;
-    }
-
-    @Override
-    public void setPossibleEnumValues(Map<Integer, List<String>> possibleEnumValues) {
-        this.possibleEnumValues = new HashMap<>();
-        for (Integer index : possibleEnumValues.keySet()) {
-            this.possibleEnumValues.put("" + index, possibleEnumValues.get(index));
-        }
-    }
-
-    public void setArchetypeIcons(Map<String, String> archetypeIcons) {
-        this.archetypeIcons = archetypeIcons;
-    }
-
-    @Override
-    public List<Integer> getDefaultGroupArchetypes() {
-        return defaultGroupArchetypes;
-    }
-
-    @Override
-    public void setDefaultGroupArchetypes(List<Integer> defaultGroupArchetypes) {
-        this.defaultGroupArchetypes = defaultGroupArchetypes;
-    }
-
-    @Override
-    public List<AttributeType> getAttributeTypes() {
-        return attributeTypes;
-    }
-
-    @Override
-    public Map<String, List<String>> getPossibleEnumValues() {
-        return possibleEnumValues;
-    }
-
-    @Override
-    public Map<String, String> getArchetypeIcons() {
-        return archetypeIcons;
-    }
-
-    @Override
-    public Map<String, VertexInterface> getVertices() {
-        logger.trace("ENTRY");
-        logger.trace("EXIT");
-        return vertices;
-    }
-
-    @Override
-    public void addEdge(EdgeInterface edge) {
-        logger.trace("ENTRY");
-        this.edges.add(edge);
-        logger.trace("EXIT");
-    }
-
-    @Override
-    public void addVertex(String name, VertexInterface vertex) {
-        logger.trace("ENTRY");
-        this.vertices.put(name, vertex);
-        logger.trace("EXIT");
-    }
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/GraphManager.java b/sources/src/cz/zcu/kiv/offscreen/graph/GraphManager.java
index 6a22bb5..a172e78 100644
--- a/sources/src/cz/zcu/kiv/offscreen/graph/GraphManager.java
+++ b/sources/src/cz/zcu/kiv/offscreen/graph/GraphManager.java
@@ -1,8 +1,8 @@
 package cz.zcu.kiv.offscreen.graph;
 
-import cz.zcu.kiv.offscreen.AttributeType;
-import cz.zcu.kiv.offscreen.api.GraphInterface;
-import cz.zcu.kiv.offscreen.api.VertexInterface;
+import cz.zcu.kiv.offscreen.api.Edge;
+import cz.zcu.kiv.offscreen.api.SubedgeInfo;
+import cz.zcu.kiv.offscreen.api.Vertex;
 import cz.zcu.kiv.offscreen.graph.filter.*;
 import cz.zcu.kiv.offscreen.graph.loader.JSONConfigLoader;
 
@@ -49,12 +49,12 @@ public class GraphManager {
     /**
      * key is the archetype index, value is the set of vertices of the given archetype
      */
-    public Map<Integer, HashSet<VertexData>> vertices = new HashMap<>();
+    public Map<Integer, HashSet<VertexImpl>> vertices = new HashMap<>();
 
     /**
      * key is the triplet of archetypes {fromVertex, edge, toVertex}, value is the list of edges for the given archetype triplet
      */
-    public Map<EdgeArchetypeInfo, List<EdgeData>> edges = new HashMap<>();
+    public Map<EdgeArchetypeInfo, List<EdgeImpl>> edges = new HashMap<>();
 
     public void addVertexArchetype(String name, String text) {
         vertexArchetypes.add(new VertexArchetype(name, text));
@@ -64,12 +64,7 @@ public class GraphManager {
         edgeArchetypes.add(new EdgeArchetype(name, text));
     }
 
-    /**
-     *
-     * @param name
-     * @param dataType
-     * @param text
-     */
+
     public void addAttributeType(String name, AttributeDataType dataType, String text) {
         attributeTypes.add(new AttributeType(name, dataType, text));
     }
@@ -153,11 +148,11 @@ public class GraphManager {
      * @param attributes     - Map of attributes associated with the vertex
      */
     public void addVertex(int id, String title, String text, int archetypeIndex, Map<Integer, Attribute> attributes) {
-        VertexData vertexToAdd = new VertexData(id, title, text, archetypeIndex);
+        VertexImpl vertexToAdd = new VertexImpl(id, id, title, archetypeIndex, text);
         if (vertices.containsKey(archetypeIndex)) {
             vertices.get(archetypeIndex).add(vertexToAdd);
         } else {
-            HashSet<VertexData> vertexSet = new HashSet<>();
+            HashSet<VertexImpl> vertexSet = new HashSet<>();
             vertexSet.add(vertexToAdd);
             vertices.put(archetypeIndex, vertexSet);
         }
@@ -177,16 +172,16 @@ public class GraphManager {
      * @param attributes    - Map of attributes associated with the edge
      */
     public void addEdge(int id, int from, int to, String text, EdgeArchetypeInfo archetypeInfo, Map<Integer, Attribute> attributes) {
-        EdgeData edgeToAdd = new EdgeData(id, from, to, text, archetypeInfo.edgeArchetypeIndex);
+        EdgeImpl edgeToAdd = new EdgeImpl(id, from, to, text, id, archetypeInfo.edgeArchetypeIndex);
+        edgeToAdd.addAttributes(attributes);
+
         if (edges.containsKey(archetypeInfo)) {
             edges.get(archetypeInfo).add(edgeToAdd);
         } else {
-            List<EdgeData> edgesList = new ArrayList<>();
+            List<EdgeImpl> edgesList = new ArrayList<>();
             edgesList.add(edgeToAdd);
             edges.put(archetypeInfo, edgesList);
         }
-
-        edgeToAdd.addAttributes(attributes);
     }
 
     /**
@@ -256,12 +251,12 @@ public class GraphManager {
 
     /**
      * Filters the edges and vertices according to the default filter loaded from the configuration file
-     * and constructs the {@code GraphImpl} object.
+     * and constructs the {@code Graph} object.
      * @param configLoader - The object that loads the configuration file.
-     * @return - Constructed {@code GraphImpl} object.
+     * @return - Constructed {@code Graph} object.
      */
-    public GraphInterface createGraph(JSONConfigLoader configLoader) {
-        GraphInterface graph = new GraphImpl();
+    public Graph createGraph(JSONConfigLoader configLoader) {
+        Graph graph = new Graph();
 
         // To use default filter from a configuration file
         GraphFilter filter = configLoader.loadDefaultFilter();
@@ -275,14 +270,17 @@ public class GraphManager {
         Map<String, String> archetypeIcons = configLoader.loadArchetypeIcons();
         graph.setArchetypeIcons(archetypeIcons);
 
-        List<Integer> defaultGroupArchetypes = configLoader.loadGroupArchetypes();
+        List<String> defaultGroupArchetypes = configLoader.loadGroupArchetypesStrings();
         graph.setDefaultGroupArchetypes(defaultGroupArchetypes);
 
-        Set<VertexData> resultVertices = getVerticesByArchetypeFilter(filter);
+
+
+
+        Set<VertexImpl> resultVertices = getVerticesByArchetypeFilter(filter);
 
         resultVertices = getVerticesByAttributeFilter(filter, resultVertices);
 
-        List<EdgeData> resultEdges = getEdgesByArchetypeFilter(filter, resultVertices);
+        List<EdgeImpl> resultEdges = getEdgesByArchetypeFilter(filter, resultVertices);
 
         resultEdges = getEdgesByAttributeFilter(filter, resultEdges);
 
@@ -302,15 +300,15 @@ public class GraphManager {
      * @param vertices - List of vertices for filtration.
      * @return - List of vertices filtered by attribute.
      */
-    private Set<VertexData> getVerticesByAttributeFilter(GraphFilter filter, Set<VertexData> vertices) {
-        Set<VertexData> resultVertices = new HashSet<>();
-        for (VertexData vertex : vertices) {
+    private Set<VertexImpl> getVerticesByAttributeFilter(GraphFilter filter, Set<VertexImpl> vertices) {
+        Set<VertexImpl> resultVertices = new HashSet<>();
+        for (VertexImpl vertex : vertices) {
             boolean filterPassed = true;
-            AttributeFilter attributeFilter = filter.getVertexAttributeFilter(vertex.archetypeIndex);
+            AttributeFilter attributeFilter = filter.getVertexAttributeFilter(vertex.getArchetype());
             if (attributeFilter != null) {
                 // Iterate through all attributes of the vertex
-                for (int attributeIndex : vertex.attributes.keySet()) {
-                    Attribute vertexAttribute = vertex.attributes.get(attributeIndex);
+                for (int attributeIndex : vertex.getAttributesMap().keySet()) {
+                    Attribute vertexAttribute = vertex.getAttributesMap().get(attributeIndex);
 
                     filterPassed = (filterPassed && checkAttributeFiltersPassed(vertexAttribute, attributeFilter, attributeIndex));
                     if (!filterPassed) break;   // filter did not pass
@@ -328,15 +326,15 @@ public class GraphManager {
      * @param edges - List of edges for filtration.
      * @return - List of edges filtered by attribute.
      */
-    private List<EdgeData> getEdgesByAttributeFilter(GraphFilter filter, List<EdgeData> edges) {
-        List<EdgeData> resultEdges = new ArrayList<>();
-        for (EdgeData edge : edges) {
+    private List<EdgeImpl> getEdgesByAttributeFilter(GraphFilter filter, List<EdgeImpl> edges) {
+        List<EdgeImpl> resultEdges = new ArrayList<>();
+        for (EdgeImpl edge : edges) {
             boolean filterPassed = true;
-            AttributeFilter attributeFilter = filter.getEdgeAttributeFilter(edge.archetypeIndex);
+            AttributeFilter attributeFilter = filter.getEdgeAttributeFilter(edge.getArchetype());
             if (attributeFilter != null) {
                 // Iterate through all attributes of the edge
-                for (int attributeIndex : edge.attributes.keySet()) {
-                    Attribute edgeAttribute = edge.attributes.get(attributeIndex);
+                for (int attributeIndex : edge.getAttributesMap().keySet()) {
+                    Attribute edgeAttribute = edge.getAttributesMap().get(attributeIndex);
 
                     filterPassed = (filterPassed && checkAttributeFiltersPassed(edgeAttribute, attributeFilter, attributeIndex));
                     if (!filterPassed) break;   // filter did not pass
@@ -357,7 +355,7 @@ public class GraphManager {
      * @return - true if passed the filter, else false.
      */
     private boolean checkAttributeFiltersPassed(Attribute vertexAttribute, AttributeFilter attributeFilter, int attributeIndex) {
-        AttributeDataType attributeType = attributeTypes.get(vertexAttribute.typeIndex).dataType;
+        AttributeDataType attributeType = attributeTypes.get(vertexAttribute.getTypeIndex()).dataType;
 
         boolean filterPassed;
         ITypeAttributeFilter typeFilter = null;
@@ -379,7 +377,7 @@ public class GraphManager {
             return true;
         }
 
-        filterPassed = typeFilter.filter(vertexAttribute.value);
+        filterPassed = typeFilter.filter(vertexAttribute.getValue());
 
         return filterPassed;
     }
@@ -390,8 +388,8 @@ public class GraphManager {
      * @param filter - Filter to be applied to the vertices.
      * @return A list of vertices filtered by the specified filter object.
      */
-    private HashSet<VertexData> getVerticesByArchetypeFilter(GraphFilter filter) {
-        HashSet<VertexData> resultVertices = new HashSet<>();
+    private HashSet<VertexImpl> getVerticesByArchetypeFilter(GraphFilter filter) {
+        HashSet<VertexImpl> resultVertices = new HashSet<>();
 
         VertexArchetypeFilter vertexArchetypeFilter = filter.getVertexArchetypeFilter();
         List<Integer> archetypesFiltered = vertexArchetypeFilter.archetypeIndeces;
@@ -423,8 +421,8 @@ public class GraphManager {
      * @param resultVertices - List of vertices which should be present in the result graph.
      * @return A list of edges filtered by the specified filter object
      */
-    private List<EdgeData> getEdgesByArchetypeFilter(GraphFilter filter, Set<VertexData> resultVertices) {
-        List<EdgeData> resultEdges = new ArrayList<>();
+    private List<EdgeImpl> getEdgesByArchetypeFilter(GraphFilter filter, Set<VertexImpl> resultVertices) {
+        List<EdgeImpl> resultEdges = new ArrayList<>();
 
         EdgeArchetypeFilter edgeArchetypeFilter = filter.getEdgeArchetypeFilter();
         List<EdgeArchetypeInfo> edgeInfosFiltered = edgeArchetypeFilter.archetypeIndeces;
@@ -445,12 +443,12 @@ public class GraphManager {
                 break;
         }
 
-        Iterator<EdgeData> i = resultEdges.iterator();
+        Iterator<EdgeImpl> i = resultEdges.iterator();
         while (i.hasNext()) {
-            EdgeData edge = i.next();
+            EdgeImpl edge = i.next();
 
-            VertexData toDummy = new VertexData(edge.to, null, null, -1);
-            VertexData fromDummy = new VertexData(edge.from, null, null, -1);
+            VertexImpl toDummy = new VertexImpl(edge.getTo(), edge.getTo(), null, -1,null);
+            VertexImpl fromDummy = new VertexImpl(edge.getFrom(), edge.getFrom(), null, -1, null);
 
             if (!resultVertices.contains(toDummy) || !resultVertices.contains(fromDummy)){
                 i.remove();
@@ -462,37 +460,32 @@ public class GraphManager {
 
     /**
      * Adds edges to graph.
+     *
+     * Edges are equal when their attributes from and to are equal. Equal edges are combined and their differences
+     * are saved in list of SubedgeInfo.
+     *
      * @param graph - graph to which add the edges
      * @param resultEdges - List of edges to add to the graph.
      */
-    private void addEdgesToGraph(GraphInterface graph, List<EdgeData> resultEdges) {
-        HashMap<EdgeData, List<SubedgeInfo>> edgeSet = new HashMap<>();
+    private void addEdgesToGraph(Graph graph, List<EdgeImpl> resultEdges) {
+        HashMap<EdgeImpl, List<SubedgeInfo>> edgeSet = new HashMap<>();
 
-        for (EdgeData edgeData : resultEdges) {
-            ArrayList<String[]> attributes = new ArrayList<>();
-            for (Attribute attr : edgeData.getSortedAttributes()) {
-                String attrName = attributeTypes.get(attr.typeIndex).name;
-                AttributeDataType attrType = attributeTypes.get(attr.typeIndex).dataType;
-
-                StringBuilder attrValue = getAttributeValue(attr, attrType);
-                attributes.add(new String[]{attrName, attrValue.toString()});
-            }
+        for (EdgeImpl edgeImpl : resultEdges) {
+            List<String[]> attributes = getAttributesAsArray(edgeImpl.getSortedAttributes());
+            SubedgeInfo subedgeInfo = new SubedgeInfo(edgeImpl.getOriginalId(), edgeImpl.getArchetype(), attributes);
 
-            SubedgeInfo subedgeInfo = new SubedgeInfo(edgeData.archetypeIndex, attributes);
-            subedgeInfo.id = edgeData.id;
-            if (edgeSet.containsKey(edgeData)) {
-                edgeSet.get(edgeData).add(subedgeInfo);
+            if (edgeSet.containsKey(edgeImpl)) {
+                edgeSet.get(edgeImpl).add(subedgeInfo);
             } else {
                 List<SubedgeInfo> subEdgeInfoList = new ArrayList<>();
                 subEdgeInfoList.add(subedgeInfo);
-                edgeSet.put(new EdgeData(edgeData.id, edgeData.from, edgeData.to, edgeData.text, edgeData.archetypeIndex), subEdgeInfoList);
+                edgeSet.put(edgeImpl, subEdgeInfoList);
             }
         }
 
         int idCounter = 1;
-        for (EdgeData edgeData : edgeSet.keySet()) {
-            EdgeImpl edge = new EdgeImpl(idCounter++, "" + edgeData.from, "" + edgeData.to, true, "[]");
-            edge.setSubedgeInfo(edgeSet.get(edgeData));
+        for (EdgeImpl edgeImpl : edgeSet.keySet()) {
+            Edge edge = new Edge(idCounter++, edgeImpl.getFrom(), edgeImpl.getTo(), edgeImpl.getText(), edgeSet.get(edgeImpl));
             graph.addEdge(edge);
         }
         graph.setVertexArchetypes(vertexArchetypes);
@@ -504,31 +497,31 @@ public class GraphManager {
      * @param graph - Graph to which add the vertices.
      * @param resultVertices - List of vertices to add to the graph.
      */
-    private void addVerticesToGraph(GraphInterface graph, Set<VertexData> resultVertices) {
+    private void addVerticesToGraph(Graph graph, Set<VertexImpl> resultVertices) {
         int idCounter = 1;
-        for (VertexData vertexData : resultVertices) {
-            VertexArchetype archetype = vertexArchetypes.get(vertexData.archetypeIndex);
-            VertexInterface vertex = new VertexImpl(idCounter++, archetype.name + ":" + vertexData.title, "" + vertexData.id);
+        for (VertexImpl vertexImpl : resultVertices) {
 
-            ArrayList<String> attributeStrings = new ArrayList<>();
-            ArrayList<String[]> attributes = new ArrayList<>();
-            for (Attribute attr : vertexData.getSortedAttributes()) {
-                String attrName = attributeTypes.get(attr.typeIndex).name;
-                AttributeDataType attrType = attributeTypes.get(attr.typeIndex).dataType;
+            VertexArchetype archetype = vertexArchetypes.get(vertexImpl.getArchetype());
+            String title = archetype.name + ":" + vertexImpl.getTitle();
+            List<String[]> attributes = getAttributesAsArray(vertexImpl.getSortedAttributes());
 
-                StringBuilder attrValue;
+            Vertex vertex = new Vertex(idCounter++, vertexImpl.getOriginalId(), title, vertexImpl.getArchetype(), vertexImpl.getText(), attributes);
 
-                attrValue = getAttributeValue(attr, attrType);
+            graph.addVertex("" + vertexImpl.getId(), vertex);
+        }
+    }
 
-                attributeStrings.add(attrName + ": " + attrValue);
-                attributes.add(new String[]{attrName, attrValue.toString()});
-            }
+    private List<String[]> getAttributesAsArray(List<Attribute> sortedAttributes) {
+        ArrayList<String[]> attributes = new ArrayList<>();
+
+        for (Attribute attr : sortedAttributes) {
+            String attrName = attributeTypes.get(attr.getTypeIndex()).name;
+            AttributeDataType attrType = attributeTypes.get(attr.getTypeIndex()).dataType;
 
-            vertex.setExportedPackages(attributeStrings);
-            vertex.setArchetype(vertexData.archetypeIndex);
-            vertex.setAttributes(attributes);
-            graph.addVertex("" + vertexData.id, vertex);
+            StringBuilder attrValue = getAttributeValue(attr, attrType);
+            attributes.add(new String[]{attrName, attrValue.toString()});
         }
+        return attributes;
     }
 
     /**
@@ -541,14 +534,14 @@ public class GraphManager {
         StringBuilder attrValue;
         switch (attrType) {
             case NUMBER:
-                attrValue = new StringBuilder(attr.value.toString());
+                attrValue = new StringBuilder(attr.getValue().toString());
                 break;
             case DATE:
-                attrValue = new StringBuilder(attr.value.toString());
+                attrValue = new StringBuilder(attr.getValue().toString());
                 break;
             case ENUM: // Enum attribute type must be a list of integers!
-                List<Integer> valuePositions = (List<Integer>) attr.value;
-                List<String> values = getEnumStringsForAttrIndex(attr.typeIndex, valuePositions);
+                List<Integer> valuePositions = (List<Integer>) attr.getValue();
+                List<String> values = getEnumStringsForAttrIndex(attr.getTypeIndex(), valuePositions);
 
                 attrValue = new StringBuilder();
                 for (int j = 0; j < values.size(); j++) {
@@ -558,7 +551,7 @@ public class GraphManager {
                 }
                 break;
             default:
-                attrValue = new StringBuilder(attr.value.toString());
+                attrValue = new StringBuilder(attr.getValue().toString());
                 break;
         }
         return attrValue;
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/SubedgeInfo.java b/sources/src/cz/zcu/kiv/offscreen/graph/SubedgeInfo.java
deleted file mode 100644
index a0d0f5d..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/graph/SubedgeInfo.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package cz.zcu.kiv.offscreen.graph;
-
-import java.util.List;
-
-public class SubedgeInfo {
-    private int archetype;
-
-    /**
-     * the original id of the edge in the input file, does not need to be set, but can be used for testing
-     */
-    public int id;
-
-    /**
-     * list of attributes, the first value in each array is the attribute's name and the second value is its value
-     */
-    private List<String[]> attributes;
-
-    public SubedgeInfo(int archetype, List<String[]> attributes) {
-        this.archetype = archetype;
-        this.attributes = attributes;
-    }
-
-    public int getArchetype() {
-        return archetype;
-    }
-
-    public List<String[]> getAttributes() {
-        return attributes;
-    }
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/VertexArchetype.java b/sources/src/cz/zcu/kiv/offscreen/graph/VertexArchetype.java
index d64c50a..f29d35c 100644
--- a/sources/src/cz/zcu/kiv/offscreen/graph/VertexArchetype.java
+++ b/sources/src/cz/zcu/kiv/offscreen/graph/VertexArchetype.java
@@ -12,4 +12,8 @@ public class VertexArchetype {
     public String getName() {
         return name;
     }
+
+    public String getText() {
+        return text;
+    }
 }
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/VertexData.java b/sources/src/cz/zcu/kiv/offscreen/graph/VertexData.java
deleted file mode 100644
index d03fee5..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/graph/VertexData.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package cz.zcu.kiv.offscreen.graph;
-
-import java.util.*;
-
-public class VertexData {
-    public int id;
-    public String title;
-    public String text;
-    public int archetypeIndex;
-    public Map<Integer, Attribute> attributes = new HashMap<>();
-
-    public VertexData(int id, String title, String text, int archetypeIndex) {
-        this.id = id;
-        this.title = title;
-        this.text = text;
-        this.archetypeIndex = archetypeIndex;
-    }
-
-    public void addAttribute(int attrTypeIndex, Object value) {
-        Attribute attr = new Attribute(attrTypeIndex, value);
-        attributes.put(attrTypeIndex, attr);
-    }
-
-    public Attribute getAttribute(int attrTypeIndex) {
-        return attributes.get(attrTypeIndex);
-    }
-
-    @Override
-    public int hashCode() {
-        return id;
-    }
-
-    @Override
-    public boolean equals(Object edge) {
-        if (!(edge instanceof VertexData)) return false;
-        return id == ((VertexData) edge).id;
-    }
-
-    public void addAttributes(Map<Integer, Attribute> attributes) {
-        this.attributes.putAll(attributes);
-    }
-
-    public List<Attribute> getSortedAttributes() {
-        List<Attribute> list = new ArrayList<>();
-        ArrayList<Integer> indices = new ArrayList<>(attributes.keySet());
-        //indices.sort(Integer::compareTo);
-        Collections.sort(indices); // TODO check correct order
-        for (int i = 0; i < indices.size(); i++) {
-            list.add(attributes.get(indices.get(i)));
-        }
-        return list;
-    }
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/VertexEfp.java b/sources/src/cz/zcu/kiv/offscreen/graph/VertexEfp.java
deleted file mode 100644
index f17f0d5..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/graph/VertexEfp.java
+++ /dev/null
@@ -1,112 +0,0 @@
-package cz.zcu.kiv.offscreen.graph;
-
-import java.util.LinkedList;
-import java.util.List;
-
-import org.apache.log4j.Logger;
-
-import cz.zcu.kiv.offscreen.api.VertexInterface;
-
-/**
- *
- * @author Jiri Loudil
- *
- */
-public class VertexEfp implements VertexInterface {
-	private int id;
-	private String name;
-	private String symbolicName;
-
-	private List<String> exportedPackages;
-	private List<String> importedPackages;
-
-	private Logger logger = Logger.getLogger(VertexEfp.class);
-
-	/**
-	 *
-	 * @param id
-	 * @param name
-	 * @param symbolicName
-	 */
-	public VertexEfp(int id, String name, String symbolicName) {
-		logger.trace("ENTRY");
-		this.id = id;
-		this.name = name;
-		this.symbolicName = symbolicName;
-
-		this.exportedPackages = new LinkedList<String>();
-		this.importedPackages = new LinkedList<String>();
-
-		logger.trace("EXIT");
-	}
-
-	@Override
-	public int getId() {
-		logger.trace("ENTRY");
-		logger.trace("EXIT");
-		return id;
-	}
-
-	@Override
-	public String getName() {
-		logger.trace("ENTRY");
-		logger.trace("EXIT");
-		return name;
-	}
-
-	@Override
-	public String getSymbolicName() {
-		logger.trace("ENTRY");
-		logger.trace("EXIT");
-		return this.symbolicName;
-	}
-
-	@Override
-	public List<String> getExportedPackages() {
-		logger.trace("ENTRY");
-		logger.trace("EXIT");
-		return this.exportedPackages;
-	}
-
-	@Override
-	public List<String> getImportedPackages() {
-		logger.trace("ENTRY");
-		logger.trace("EXIT");
-		return this.importedPackages;
-	}
-
-	@Override
-	public void setExportedPackages(List<String> exportedPackages) {
-		logger.trace("ENTRY");
-		this.exportedPackages = exportedPackages;
-		logger.trace("EXIT");
-	}
-
-	@Override
-	public void setImportedPackages(List<String> importedPackages) {
-		logger.trace("ENTRY");
-		this.importedPackages = importedPackages;
-		logger.trace("EXIT");
-	}
-
-	@Override
-	public int getArchetype() {
-		return 0;
-	}
-
-	@Override
-	public void setArchetype(int archetype) {
-
-	}
-
-	@Override
-	public void setAttributes(List<String[]> attributes) {
-
-	}
-
-	@Override
-	public List<String[]> getAttributes() {
-		return null;
-	}
-
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/VertexImpl.java b/sources/src/cz/zcu/kiv/offscreen/graph/VertexImpl.java
index 72b8750..4c6a7bb 100644
--- a/sources/src/cz/zcu/kiv/offscreen/graph/VertexImpl.java
+++ b/sources/src/cz/zcu/kiv/offscreen/graph/VertexImpl.java
@@ -1,111 +1,58 @@
 package cz.zcu.kiv.offscreen.graph;
 
-import cz.zcu.kiv.offscreen.api.VertexInterface;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.apache.log4j.Logger;
+import cz.zcu.kiv.offscreen.api.BaseVertex;
+import java.util.*;
 
 /**
- *
- * @author Jindra Pavlíková
+ * Class represents vertex which is used for input JSON format.
  */
-public class VertexImpl implements VertexInterface {
+public class VertexImpl extends BaseVertex {
+
+    /** Map contains attributes stored in key value format. Key is index to array of attribute types defined in input file */
+    private Map<Integer, Attribute> attributesMap;
 
-    private int id;
-    private String name;
-    private String symbolicName;
-    private List<String> exportedPackages;
-    private List<String> importedPackages;
-    private int archetype;
-    private Logger logger = Logger.getLogger(VertexImpl.class);
     /**
-     * list of attributes, the first value in each array is the attribute's name and the second value is its value
+     * Creates new vertex.
+     * @param id new generated identification number.
+     * @param originalId original identification number from input file
+     * @param title title of vertex
+     * @param archetypeIndex index of vertex archetype
+     * @param text additional info
      */
-    private List<String[]> attributes;
-//    private List<EdgeInterface> edges;
-
-    public VertexImpl(int id, String name, String symbolicName) {
-        logger.trace("ENTRY");
-        this.id = id;
-        this.name = name;
-        this.symbolicName = symbolicName;
-        this.exportedPackages = new LinkedList<String>();
-        this.importedPackages = new LinkedList<String>();
-        logger.trace("EXIT");
-//        this.edges = new ArrayList<EdgeInterface>();
-    }
-
-    //    public List<EdgeInterface> getEdges() {
-//        return edges;
-//    }
-    @Override
-    public int getId() {
-        logger.trace("ENTRY");
-        logger.trace("EXIT");
-        return id;
-    }
-
-    @Override
-    public String getName() {
-        logger.trace("ENTRY");
-        logger.trace("EXIT");
-        return name;
-    }
-//    public void addEdge(EdgeInterface edge){
-//        this.edges.add(edge);
-//    }
-
-    @Override
-    public List<String> getExportedPackages() {
-        logger.trace("ENTRY");
-        logger.trace("EXIT");
-        return this.exportedPackages;
+    public VertexImpl(int id, int originalId, String title, int archetypeIndex, String text) {
+        super(id, originalId, title, archetypeIndex, text);
+        this.attributesMap = new HashMap<>();
     }
 
-    @Override
-    public List<String> getImportedPackages() {
-        logger.trace("ENTRY");
-        logger.trace("EXIT");
-        return this.importedPackages;
+    public void addAttribute(int attrTypeIndex, Object value) {
+        Attribute attr = new Attribute(attrTypeIndex, value);
+        attributesMap.put(attrTypeIndex, attr);
     }
 
-    @Override
-    public void setExportedPackages(List<String> exportedPackages) {
-        logger.trace("ENTRY");
-        this.exportedPackages = exportedPackages;
-        logger.trace("EXIT");
+    public void addAttributes(Map<Integer, Attribute> attributes) {
+        this.attributesMap.putAll(attributes);
     }
 
-    @Override
-    public void setImportedPackages(List<String> importedPackages) {
-        logger.trace("ENTRY");
-        this.importedPackages = importedPackages;
-        logger.trace("EXIT");
+    public Attribute getAttribute(int attrTypeIndex) {
+        return attributesMap.get(attrTypeIndex);
     }
 
-    @Override
-    public int getArchetype() {
-        return archetype;
+    public Map<Integer, Attribute> getAttributesMap(){
+        return attributesMap;
     }
 
-    @Override
-    public void setArchetype(int archetype) {
-        this.archetype = archetype;
-    }
-
-    @Override
-    public void setAttributes(List<String[]> attributes) {
-        this.attributes = attributes;
-    }
-
-    @Override
-    public List<String[]> getAttributes() {
-        return attributes;
-    }
-
-    @Override
-    public String getSymbolicName() {
-        return this.symbolicName;
+    /**
+     * Return list of attributes sorted by their key value in {@code attributeMap}
+     * @return sorted list
+     */
+    public List<Attribute> getSortedAttributes() {
+        List<Attribute> list = new ArrayList<>();
+        ArrayList<Integer> indices = new ArrayList<>(attributesMap.keySet());
+        //indices.sort(Integer::compareTo);
+        Collections.sort(indices);
+        for (int index : indices) {
+            list.add(attributesMap.get(index));
+        }
+        return list;
     }
 }
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/creator/GraphGenerator.java b/sources/src/cz/zcu/kiv/offscreen/graph/creator/GraphGenerator.java
index ae0edd3..06b43f6 100644
--- a/sources/src/cz/zcu/kiv/offscreen/graph/creator/GraphGenerator.java
+++ b/sources/src/cz/zcu/kiv/offscreen/graph/creator/GraphGenerator.java
@@ -1,96 +1,96 @@
-package cz.zcu.kiv.offscreen.graph.creator;
-
-import cz.zcu.kiv.offscreen.api.EdgeInterface;
-import cz.zcu.kiv.offscreen.api.GraphInterface;
-import cz.zcu.kiv.offscreen.api.VertexInterface;
-import cz.zcu.kiv.offscreen.graph.EdgeImpl;
-import cz.zcu.kiv.offscreen.graph.GraphImpl;
-import cz.zcu.kiv.offscreen.graph.VertexImpl;
-import java.security.InvalidParameterException;
-import java.util.Random;
-import org.apache.log4j.Logger;
-
-/**
- * @author Jindra Pavlíková <jindra.pav2@seznam.cz>
- */
-public class GraphGenerator {
-
-    private final int COUNT_OF_VERTICES;
-    private final int COUNT_OF_EDGES;
-    private GraphInterface graph;
-    private boolean[][] conectionGraph;
-
-    private Logger logger = Logger.getLogger(GraphGenerator.class);
-    
-    public GraphGenerator(int countOfVertices, int countOfEdges) {
-        logger.trace("ENTRY");
-        if (countOfVertices <= 0 || countOfEdges <= 0
-                || countOfEdges > (countOfVertices * countOfVertices - countOfVertices)) {
-            throw new InvalidParameterException("Count of edges is greater then count of possible edges.");
-        }
-        this.COUNT_OF_VERTICES = countOfVertices;
-        this.COUNT_OF_EDGES = countOfEdges;
-        this.graph = new GraphImpl();
-        this.conectionGraph = new boolean[this.COUNT_OF_VERTICES][this.COUNT_OF_VERTICES];
-        logger.trace("EXIT");
-    }
-
-    /**
-     * This method creates the vertices and adds them to the graph.
-     */
-    private void generateVertices() {
-        logger.trace("ENTRY");
-        VertexInterface vertex;
-        String name;
-
-        for (int i = 0; i < this.COUNT_OF_VERTICES; i++) {
-            name = "vertex " + (i + 1);
-            vertex = new VertexImpl((i + 1), name, name);
-            this.graph.addVertex(name, vertex);
-        }
-        logger.trace("EXIT");
-    }
-
-    /**
-     * Generates edges between randomly selected vertices and adds them to the
-     * graph.
-     */
-    private void generateEdges() {
-        logger.trace("ENTRY");
-        Random rnd = new Random(10);
-        int v1, v2;
-        EdgeInterface edge;
-        VertexImpl vertex1, vertex2;
-        for (int i = 0; i < this.COUNT_OF_EDGES; i++) {
-
-            do {
-                v1 = rnd.nextInt(this.COUNT_OF_VERTICES);
-                v2 = rnd.nextInt(this.COUNT_OF_VERTICES);
-            } while (v1 == v2 || this.conectionGraph[v1][v2] == true);
-
-            this.conectionGraph[v1][v2] = true;
-
-            vertex1 = (VertexImpl) this.graph.getVertices().get("vertex " + (v1 + 1));
-            vertex2 = (VertexImpl) this.graph.getVertices().get("vertex " + (v2 + 1));
-            edge = new EdgeImpl(i + 1, vertex1.getName(), vertex2.getName(), true, "");
-            this.graph.addEdge(edge);
-//            vertex1.addEdge(edge);
-//            vertex2.addEdge(edge);
-
-        }
-        logger.trace("EXIT");
-    }
-
-    /**
-     * Generates the graph with vertices and edges.
-     *
-     * @return graph
-     */
-    public GraphInterface generate() {
-        logger.trace("ENTRY");
-        generateVertices();
-        generateEdges();
-        logger.trace("EXIT");
-        return this.graph;
-    }
-}
+//package cz.zcu.kiv.offscreen.graph.creator;
+//
+//import cz.zcu.kiv.offscreen.api.EdgeInterface;
+//import cz.zcu.kiv.offscreen.api.GraphInterface;
+//import cz.zcu.kiv.offscreen.api.VertexInterface;
+//import cz.zcu.kiv.offscreen.graph.EdgeImpl;
+//import cz.zcu.kiv.offscreen.graph.GraphImpl;
+//import cz.zcu.kiv.offscreen.graph.VertexImpl;
+//import java.security.InvalidParameterException;
+//import java.util.Random;
+//import org.apache.log4j.Logger;
+//
+///**
+// * @author Jindra Pavlíková <jindra.pav2@seznam.cz>
+// */
+//public class GraphGenerator {
+//
+//    private final int COUNT_OF_VERTICES;
+//    private final int COUNT_OF_EDGES;
+//    private GraphInterface graph;
+//    private boolean[][] conectionGraph;
+//
+//    private Logger logger = Logger.getLogger(GraphGenerator.class);
+//
+//    public GraphGenerator(int countOfVertices, int countOfEdges) {
+//        logger.trace("ENTRY");
+//        if (countOfVertices <= 0 || countOfEdges <= 0
+//                || countOfEdges > (countOfVertices * countOfVertices - countOfVertices)) {
+//            throw new InvalidParameterException("Count of edges is greater then count of possible edges.");
+//        }
+//        this.COUNT_OF_VERTICES = countOfVertices;
+//        this.COUNT_OF_EDGES = countOfEdges;
+//        this.graph = new GraphImpl();
+//        this.conectionGraph = new boolean[this.COUNT_OF_VERTICES][this.COUNT_OF_VERTICES];
+//        logger.trace("EXIT");
+//    }
+//
+//    /**
+//     * This method creates the vertices and adds them to the graph.
+//     */
+//    private void generateVertices() {
+//        logger.trace("ENTRY");
+//        VertexInterface vertex;
+//        String name;
+//
+//        for (int i = 0; i < this.COUNT_OF_VERTICES; i++) {
+//            name = "vertex " + (i + 1);
+//            vertex = new VertexImpl((i + 1), name, name);
+//            this.graph.addVertex(name, vertex);
+//        }
+//        logger.trace("EXIT");
+//    }
+//
+//    /**
+//     * Generates edges between randomly selected vertices and adds them to the
+//     * graph.
+//     */
+//    private void generateEdges() {
+//        logger.trace("ENTRY");
+//        Random rnd = new Random(10);
+//        int v1, v2;
+//        EdgeInterface edge;
+//        VertexImpl vertex1, vertex2;
+//        for (int i = 0; i < this.COUNT_OF_EDGES; i++) {
+//
+//            do {
+//                v1 = rnd.nextInt(this.COUNT_OF_VERTICES);
+//                v2 = rnd.nextInt(this.COUNT_OF_VERTICES);
+//            } while (v1 == v2 || this.conectionGraph[v1][v2] == true);
+//
+//            this.conectionGraph[v1][v2] = true;
+//
+//            vertex1 = (VertexImpl) this.graph.getVertices().get("vertex " + (v1 + 1));
+//            vertex2 = (VertexImpl) this.graph.getVertices().get("vertex " + (v2 + 1));
+//            edge = new EdgeImpl(i + 1, vertex1.getName(), vertex2.getName(), true, "");
+//            this.graph.addEdge(edge);
+////            vertex1.addEdge(edge);
+////            vertex2.addEdge(edge);
+//
+//        }
+//        logger.trace("EXIT");
+//    }
+//
+//    /**
+//     * Generates the graph with vertices and edges.
+//     *
+//     * @return graph
+//     */
+//    public GraphInterface generate() {
+//        logger.trace("ENTRY");
+//        generateVertices();
+//        generateEdges();
+//        logger.trace("EXIT");
+//        return this.graph;
+//    }
+//}
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/creator/GraphMaker.java b/sources/src/cz/zcu/kiv/offscreen/graph/creator/GraphMaker.java
index 15017be..f8701e9 100644
--- a/sources/src/cz/zcu/kiv/offscreen/graph/creator/GraphMaker.java
+++ b/sources/src/cz/zcu/kiv/offscreen/graph/creator/GraphMaker.java
@@ -1,439 +1,439 @@
-package cz.zcu.kiv.offscreen.graph.creator;
-
-import cz.zcu.kiv.ccu.ApiCmpStateResult;
-import cz.zcu.kiv.ccu.ApiInterCompatibilityResult;
-import cz.zcu.kiv.jacc.cmp.JComparator;
-import cz.zcu.kiv.jacc.javatypes.*;
-import cz.zcu.kiv.offscreen.api.GraphInterface;
-import cz.zcu.kiv.offscreen.api.VertexInterface;
-import cz.zcu.kiv.offscreen.graph.EdgeImpl;
-import cz.zcu.kiv.offscreen.graph.GraphImpl;
-import cz.zcu.kiv.offscreen.graph.VertexImpl;
-import cz.zcu.kiv.typescmp.CmpResult;
-import cz.zcu.kiv.typescmp.CmpResultNode;
-import cz.zcu.kiv.typescmp.CorrectionStrategy;
-
-import org.apache.log4j.Logger;
-import org.json.JSONArray;
-import org.json.JSONObject;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.*;
-
-/**
- * This class provides creation graph of the loaded bundle.
- *
- * @author Jindra Pavlíková <jindra.pav2@seznam.cz>
- */
-public class GraphMaker {
-
-    private GraphInterface graph;
-    private Logger logger = Logger.getLogger(GraphMaker.class);
-    private Map<String, VertexInterface> vertexMap;
-    private String fileLocation;
-    private int level;
-
-    private ApiInterCompatibilityResult comparisonResult;
-    private File[] uploadedFiles;
-    private Properties jaccMessages;
-
-    private static final String NOT_FOUND = "NOT_FOUND";
-
-    public GraphMaker(String fileLocation, ApiInterCompatibilityResult comparisonResult, File[] uploadedFiles) throws IOException {
-        logger.trace("ENTRY");
-        this.graph = new GraphImpl();
-        this.fileLocation = fileLocation;
-
-        this.uploadedFiles = uploadedFiles;
-        this.comparisonResult = comparisonResult;
-        logger.trace("EXIT");
-
-        jaccMessages = new Properties();
-        InputStream in = null;
-        try {
-            in = JComparator.class.getResourceAsStream("messages.properties");
-            jaccMessages.load(in);
-        } catch (IOException e) {
-            logger.trace(e);
-        } finally {
-            if (in != null) {
-                try {
-                    in.close();
-                } catch (IOException e) {
-                    logger.trace(e);
-                }
-            }
-        }
-    }
-
-    /**
-     * This method creates the vertices and adds them to the graph.
-     */
-    private void generateVertices() {
-        logger.trace("ENTRY");
-
-        VertexImpl vertex;
-        String name;
-        String symbolicName;
-        int id = 0;
-        this.vertexMap = new HashMap<>();
-
-        for (File origin : this.uploadedFiles) {
-            id++;
-            symbolicName = createSymbolicName(origin.toString()); 
-            name = origin.getName();
-            vertex = new VertexImpl(id, name, symbolicName);
-
-            this.vertexMap.put(symbolicName, vertex);
-            this.graph.addVertex(symbolicName, vertex);
-        }
-
-        symbolicName = createSymbolicName(NOT_FOUND);
-        vertex = new VertexImpl(++id, NOT_FOUND, symbolicName);
-
-        this.vertexMap.put(symbolicName, vertex);
-        this.graph.addVertex(symbolicName, vertex);
-
-        logger.trace("EXIT");
-    }
-
-    /**
-     * This method creates the edges and adds them to the graph. Currently, only incompatible edges are created.
-     */
-    private void generateEdges() {
-        logger.trace("ENTRY");
-
-        int id = 0;
-
-        // cyklus pres nekompatibilni komponenty (komponenta = jar soubor)
-        Set<String> components = comparisonResult.getOriginsImportingIncompatibilities();
-        for (String component : components) {
-            String firstOrigin = "";
-            String secondOrigin = "";
-            String firstOriginNF = "";
-            String secondOriginNF = "";
-
-            JSONArray incompatibleInfoJSON = new JSONArray();
-            JSONArray notFoundInfoJSON = new JSONArray();
-
-            // cyklus pres nekompatibilni tridy
-            Set<JClass> incompatibleClasses = comparisonResult.getClassesImportingIncompatibilities(component);
-            for (JClass incompatibleClass : incompatibleClasses) {
-                JSONArray incompatibilitiesJson = new JSONArray();
-                JSONArray missingClassesJson = new JSONArray();
-
-                // cyklus pres samotne nekompatibility
-                Set<ApiCmpStateResult> apiCmpResults = comparisonResult.getIncompatibleResults(incompatibleClass, component);
-                for (ApiCmpStateResult apiCmpResult : apiCmpResults) {
-                    this.level = 0;
-
-                    CmpResult<File> cmpResult = apiCmpResult.getResult();
-
-                    if (cmpResult.getSecondObject() != null) {
-                        List<CmpResultNode> children = cmpResult.getChildren();
-                        for (CmpResultNode child : children) {
-                            incompatibilitiesJson.put(findIncompatibilityCause(child, ""));
-                        }
-
-                        if (firstOrigin.equals("") && secondOrigin.equals("")) {
-                            firstOrigin = cmpResult.getFirstObject().getName();
-                            secondOrigin = cmpResult.getSecondObject().getName();
-                        }
-
-                    } else {
-                        List<CmpResultNode> children = cmpResult.getChildren();
-                        for (CmpResultNode child : children) {
-                            missingClassesJson.put(findIncompatibilityCause(child, ""));
-                        }
-
-                        if (firstOriginNF.equals("") && secondOriginNF.equals("")) {
-                            firstOriginNF = cmpResult.getFirstObject().getName();
-                            secondOriginNF = NOT_FOUND;
-                        }
-                    }
-                }
-
-                // incompatible class
-                JSONObject incompatibleClassJson = new JSONObject();
-                incompatibleClassJson.put("causedBy", incompatibleClass.getName());
-                incompatibleClassJson.put("incomps", incompatibilitiesJson);
-
-                incompatibleInfoJSON.put(incompatibleClassJson);
-
-                // not found class
-                JSONObject notFoundClassJson = new JSONObject();
-                notFoundClassJson.put("causedBy", incompatibleClass.getName());
-                notFoundClassJson.put("incomps", missingClassesJson);
-
-                notFoundInfoJSON.put(notFoundClassJson);
-            }
-
-            if (!firstOrigin.equals("")) {
-                id++;
-                EdgeImpl edge = new EdgeImpl(id, createSymbolicName(firstOrigin), createSymbolicName(secondOrigin), false, incompatibleInfoJSON.toString());
-                this.graph.addEdge(edge);
-            }
-
-            if (!firstOriginNF.equals("")) {
-                id++;
-                EdgeImpl edge = new EdgeImpl(id, createSymbolicName(secondOriginNF), createSymbolicName(firstOriginNF), false, notFoundInfoJSON.toString());
-                this.graph.addEdge(edge);
-            }
-        }
-
-        logger.trace("EXIT");
-    }
-
-    /**
-     * Create symbolic name.
-     *
-     * @param origin
-     * @return Symbolic name.
-     */
-    private String createSymbolicName(String origin) {
-        String location = this.fileLocation.replace("/", File.separator) + File.separator;
-
-        return "vertex_" + origin.replace(location, "");
-    }
-
-    /**
-     * Generates the graph with vertices and edges.
-     *
-     * @return graph
-     */
-    public GraphInterface generate() {
-        logger.trace("ENTRY");
-
-        this.generateVertices();
-        this.generateEdges();
-
-        logger.trace("EXIT");
-
-        return this.graph;
-    }
-
-    /**
-     * Recursive function for traversing tree with incompatibility information. Creates object serializable to JSON.
-     *
-     * @param cmpResultNode
-     * @param corrStrategy
-     */
-    public JSONObject findIncompatibilityCause(CmpResultNode cmpResultNode, String corrStrategy) {
-        Object o = cmpResultNode.getResult().getFirstObject();
-
-        // cause description
-        JSONObject descriptionJson = new JSONObject();
-        descriptionJson.put("level", this.level);
-
-        if (o instanceof JMethod) {
-            descriptionJson.put("name", "M " + getMethodDeclaration(o));
-        } else if (o instanceof JField) {
-            descriptionJson.put("name", "F " + getFieldDeclaration(o));
-        } else if (o instanceof HasName) {
-            descriptionJson.put("name", this.jaccMessages.getProperty(cmpResultNode.getContentCode()) + ": " + ((HasName) o).getName());
-        } else {
-            descriptionJson.put("name", this.jaccMessages.getProperty(cmpResultNode.getContentCode()));
-        }
-
-        descriptionJson.put("contentCode", cmpResultNode.getContentCode());
-        descriptionJson.put("propertyName", this.jaccMessages.getProperty(cmpResultNode.getContentCode()));
-        descriptionJson.put("isIncompCause", cmpResultNode.isIncompatibilityCause());
-
-        if (o instanceof JPackage) {
-            descriptionJson.put("type", "package");
-            descriptionJson.put("details", getPackageDetails((JPackage) o));
-        } else if (o instanceof JClass) {
-            descriptionJson.put("type", "class");
-            descriptionJson.put("details", getClassDetails((JClass) o));
-        } else if (o instanceof JMethod) {
-            descriptionJson.put("type", "method");
-            descriptionJson.put("details", getMethodDetails((JMethod) o));
-        } else if (o instanceof JField) {
-            descriptionJson.put("type", "field");
-            descriptionJson.put("details", getFieldDetails((JField) o));
-        }
-
-        // incompatibility details
-        if (cmpResultNode.isIncompatibilityCause()) {
-            if (!cmpResultNode.getResult().getInherentDiff().name().equals("DEL")) {
-                if (o instanceof HasName) {
-                    descriptionJson.put("objectNameFirst", ((HasName) o).getName());
-                    descriptionJson.put("objectNameSecond", ((HasName) cmpResultNode.getResult().getSecondObject()).getName());
-                } else {
-                    descriptionJson.put("objectNameFirst", o.toString());
-                    descriptionJson.put("objectNameSecond", cmpResultNode.getResult().getSecondObject().toString());
-                }
-            }
-
-            String incompName = this.getIncompatibilityName(cmpResultNode, corrStrategy);
-            if (incompName.equals("")) {
-                descriptionJson.put("incompName", "Incompatible " + this.jaccMessages.getProperty(cmpResultNode.getContentCode()) + " -> " + corrStrategy); //child.getResult().getStrategy().name();
-            } else {
-                descriptionJson.put("incompName", incompName + (cmpResultNode.getResult().getInherentDiff().name().equals("DEL") ? " is missing -> " + cmpResultNode.getResult().getStrategy().name() : ""));
-            }
-
-            descriptionJson.put("strategy", cmpResultNode.getResult().getStrategy().name());
-            descriptionJson.put("difference", cmpResultNode.getResult().getInherentDiff().name());
-        }
-
-        // subtree
-        JSONArray subtreeJson = new JSONArray();
-        if (!cmpResultNode.getResult().childrenCompatible()) {
-            this.level++;
-
-            List<CmpResultNode> children = cmpResultNode.getResult().getChildren();
-            for (CmpResultNode child : children) {
-                CorrectionStrategy strategy = this.level == 1 ? cmpResultNode.getResult().getStrategy() : child.getResult().getStrategy();
-
-                subtreeJson.put(findIncompatibilityCause(child, strategy.name()));
-            }
-
-            this.level--;
-        }
-
-
-        JSONObject causeJson = new JSONObject();
-        causeJson.put("desc", descriptionJson);
-        causeJson.put("subtree", subtreeJson);
-
-        return causeJson;
-    }
-
-    private JSONObject getPackageDetails(JPackage pakkage) {
-        JSONObject detailsJson = new JSONObject();
-        detailsJson.put("name", pakkage.getName());
-
-        return detailsJson;
-    }
-
-    private JSONObject getClassDetails(JClass clazz) {
-        JSONObject detailsJson = new JSONObject();
-
-        detailsJson.put("name", clazz.getShortName());
-        detailsJson.put("package", clazz.getPackage().getName());
-
-        detailsJson.put("enum", clazz.isEnum());
-        detailsJson.put("interface", clazz.isInterface());
-        detailsJson.put("annotation", clazz.isAnnotation());
-
-        detailsJson.put("abstract", clazz.getModifiers().isAbstract());
-        detailsJson.put("final", clazz.getModifiers().isFinal());
-        detailsJson.put("static", clazz.getModifiers().isStatic());
-
-        return detailsJson;
-    }
-
-    private JSONObject getMethodDetails(JMethod method) {
-        JSONObject detailsJson = new JSONObject();
-
-        detailsJson.put("name", method.getName());
-        detailsJson.put("returnType", method.getReturnType().getName());
-        detailsJson.put("constructor", method.isConstructor());
-
-        List<JType> exceptionTypes = method.getExceptionTypes();
-        JSONArray exceptionTypeNames = new JSONArray();
-        for (JType type : exceptionTypes) {
-            exceptionTypeNames.put(type.getName());
-        }
-        detailsJson.put("exceptions", exceptionTypeNames);
-
-        List<JType> parameterTypes = method.getParameterTypes();
-        JSONArray parameterTypeNames = new JSONArray();
-        for (JType type : parameterTypes) {
-            parameterTypeNames.put(type.getName());
-        }
-        detailsJson.put("paramTypes", parameterTypeNames);
-
-        detailsJson.put("abstract", method.getModifiers().isAbstract());
-        detailsJson.put("final", method.getModifiers().isFinal());
-        detailsJson.put("static", method.getModifiers().isStatic());
-        detailsJson.put("synchronized", method.getModifiers().isSynchronized());
-
-        return detailsJson;
-    }
-
-    private JSONObject getFieldDetails(JField field) {
-        JSONObject detailsJson = new JSONObject();
-
-        detailsJson.put("name", field.getName());
-        detailsJson.put("type", field.getType().getName());
-        detailsJson.put("initialValue", field.getInitialValue());
-
-        detailsJson.put("abstract", field.getModifiers().isAbstract());
-        detailsJson.put("final", field.getModifiers().isFinal());
-        detailsJson.put("static", field.getModifiers().isStatic());
-
-        return detailsJson;
-    }
-
-    private String getShortName(String longName) {
-        return longName.substring(longName.lastIndexOf('.') + 1);
-    }
-
-    private String getMethodDeclaration(Object o) {
-        String methodName = "";
-        methodName += getShortName(((JMethod) o).getReturnType().getName());
-        methodName += " " + ((JMethod) o).getName();
-        methodName += "(";
-        for (JType type : ((JMethod) o).getParameterTypes()) {
-            methodName += getShortName(type.getName()) + ", ";
-        }
-        methodName = methodName.replaceAll(", $", "");
-        methodName += ")";
-        return methodName;
-    }
-
-    private String getFieldDeclaration(Object o) {
-        String fieldDeclaration = "";
-        fieldDeclaration += getShortName(((JField) o).getType().getName());
-        fieldDeclaration += " " + ((JField) o).getName();
-        return fieldDeclaration;
-    }
-
-    private String getIncompatibilityName(CmpResultNode child, String corrStrategy) {
-        Object o = child.getResult().getFirstObject();
-
-        String incompName;
-        switch (child.getContentCode()) {
-            case "cmp.child.class":
-                if (o instanceof HasName) {
-                    incompName = "Class " + ((HasName) o).getName();
-                } else {
-                    incompName = "Class " + o.toString();
-                }
-                break;
-            case "cmp.child.method.return.type":
-                incompName = this.jaccMessages.getProperty(child.getContentCode()) + " different -> " + corrStrategy; 
-                break;
-            case "cmp.child.method.param.type":
-                if (o instanceof HasName) {
-                    incompName = "Parameter " + getShortName(((HasName) o).getName()) + " different -> " + corrStrategy; 
-                } else {
-                    incompName = "Parameter " + getShortName(o.toString()) + " different -> " + corrStrategy;
-                }
-                break;
-            case "cmp.child.method.invocation":
-                incompName = "Invoke Virtual" + " -> " + child.getResult().getStrategy().name();
-                break;
-            case "cmp.child.method":
-                incompName = "<span class='entity'>M</span> " + getMethodDeclaration(o);
-                break;
-            case "cmp.child.constructor":
-                incompName = "<span class='entity'>C</span> " + getMethodDeclaration(o);
-                break;
-            case "cmp.child.field":
-                incompName = "<span class='entity'>F</span> " + getFieldDeclaration(o);
-                break;
-            case "cmp.child.modifier":
-                incompName = "<span class='entity'>P</span> " + o.toString() + " -> " + corrStrategy; 
-                break;
-            default:
-                incompName = "";
-                break;
-        }
-        return incompName;
-    }
-
-}
+//package cz.zcu.kiv.offscreen.graph.creator;
+//
+//import cz.zcu.kiv.ccu.ApiCmpStateResult;
+//import cz.zcu.kiv.ccu.ApiInterCompatibilityResult;
+//import cz.zcu.kiv.jacc.cmp.JComparator;
+//import cz.zcu.kiv.jacc.javatypes.*;
+//import cz.zcu.kiv.offscreen.api.GraphInterface;
+//import cz.zcu.kiv.offscreen.api.VertexInterface;
+//import cz.zcu.kiv.offscreen.graph.EdgeImpl;
+//import cz.zcu.kiv.offscreen.graph.GraphImpl;
+//import cz.zcu.kiv.offscreen.graph.VertexImpl;
+//import cz.zcu.kiv.typescmp.CmpResult;
+//import cz.zcu.kiv.typescmp.CmpResultNode;
+//import cz.zcu.kiv.typescmp.CorrectionStrategy;
+//
+//import org.apache.log4j.Logger;
+//import org.json.JSONArray;
+//import org.json.JSONObject;
+//
+//import java.io.File;
+//import java.io.IOException;
+//import java.io.InputStream;
+//import java.util.*;
+//
+///**
+// * This class provides creation graph of the loaded bundle.
+// *
+// * @author Jindra Pavlíková <jindra.pav2@seznam.cz>
+// */
+//public class GraphMaker {
+//
+//    private GraphInterface graph;
+//    private Logger logger = Logger.getLogger(GraphMaker.class);
+//    private Map<String, VertexInterface> vertexMap;
+//    private String fileLocation;
+//    private int level;
+//
+//    private ApiInterCompatibilityResult comparisonResult;
+//    private File[] uploadedFiles;
+//    private Properties jaccMessages;
+//
+//    private static final String NOT_FOUND = "NOT_FOUND";
+//
+//    public GraphMaker(String fileLocation, ApiInterCompatibilityResult comparisonResult, File[] uploadedFiles) throws IOException {
+//        logger.trace("ENTRY");
+//        this.graph = new GraphImpl();
+//        this.fileLocation = fileLocation;
+//
+//        this.uploadedFiles = uploadedFiles;
+//        this.comparisonResult = comparisonResult;
+//        logger.trace("EXIT");
+//
+//        jaccMessages = new Properties();
+//        InputStream in = null;
+//        try {
+//            in = JComparator.class.getResourceAsStream("messages.properties");
+//            jaccMessages.load(in);
+//        } catch (IOException e) {
+//            logger.trace(e);
+//        } finally {
+//            if (in != null) {
+//                try {
+//                    in.close();
+//                } catch (IOException e) {
+//                    logger.trace(e);
+//                }
+//            }
+//        }
+//    }
+//
+//    /**
+//     * This method creates the vertices and adds them to the graph.
+//     */
+//    private void generateVertices() {
+//        logger.trace("ENTRY");
+//
+//        VertexImpl vertex;
+//        String name;
+//        String symbolicName;
+//        int id = 0;
+//        this.vertexMap = new HashMap<>();
+//
+//        for (File origin : this.uploadedFiles) {
+//            id++;
+//            symbolicName = createSymbolicName(origin.toString());
+//            name = origin.getName();
+//            vertex = new VertexImpl(id, name, symbolicName);
+//
+//            this.vertexMap.put(symbolicName, vertex);
+//            this.graph.addVertex(symbolicName, vertex);
+//        }
+//
+//        symbolicName = createSymbolicName(NOT_FOUND);
+//        vertex = new VertexImpl(++id, NOT_FOUND, symbolicName);
+//
+//        this.vertexMap.put(symbolicName, vertex);
+//        this.graph.addVertex(symbolicName, vertex);
+//
+//        logger.trace("EXIT");
+//    }
+//
+//    /**
+//     * This method creates the edges and adds them to the graph. Currently, only incompatible edges are created.
+//     */
+//    private void generateEdges() {
+//        logger.trace("ENTRY");
+//
+//        int id = 0;
+//
+//        // cyklus pres nekompatibilni komponenty (komponenta = jar soubor)
+//        Set<String> components = comparisonResult.getOriginsImportingIncompatibilities();
+//        for (String component : components) {
+//            String firstOrigin = "";
+//            String secondOrigin = "";
+//            String firstOriginNF = "";
+//            String secondOriginNF = "";
+//
+//            JSONArray incompatibleInfoJSON = new JSONArray();
+//            JSONArray notFoundInfoJSON = new JSONArray();
+//
+//            // cyklus pres nekompatibilni tridy
+//            Set<JClass> incompatibleClasses = comparisonResult.getClassesImportingIncompatibilities(component);
+//            for (JClass incompatibleClass : incompatibleClasses) {
+//                JSONArray incompatibilitiesJson = new JSONArray();
+//                JSONArray missingClassesJson = new JSONArray();
+//
+//                // cyklus pres samotne nekompatibility
+//                Set<ApiCmpStateResult> apiCmpResults = comparisonResult.getIncompatibleResults(incompatibleClass, component);
+//                for (ApiCmpStateResult apiCmpResult : apiCmpResults) {
+//                    this.level = 0;
+//
+//                    CmpResult<File> cmpResult = apiCmpResult.getResult();
+//
+//                    if (cmpResult.getSecondObject() != null) {
+//                        List<CmpResultNode> children = cmpResult.getChildren();
+//                        for (CmpResultNode child : children) {
+//                            incompatibilitiesJson.put(findIncompatibilityCause(child, ""));
+//                        }
+//
+//                        if (firstOrigin.equals("") && secondOrigin.equals("")) {
+//                            firstOrigin = cmpResult.getFirstObject().getName();
+//                            secondOrigin = cmpResult.getSecondObject().getName();
+//                        }
+//
+//                    } else {
+//                        List<CmpResultNode> children = cmpResult.getChildren();
+//                        for (CmpResultNode child : children) {
+//                            missingClassesJson.put(findIncompatibilityCause(child, ""));
+//                        }
+//
+//                        if (firstOriginNF.equals("") && secondOriginNF.equals("")) {
+//                            firstOriginNF = cmpResult.getFirstObject().getName();
+//                            secondOriginNF = NOT_FOUND;
+//                        }
+//                    }
+//                }
+//
+//                // incompatible class
+//                JSONObject incompatibleClassJson = new JSONObject();
+//                incompatibleClassJson.put("causedBy", incompatibleClass.getName());
+//                incompatibleClassJson.put("incomps", incompatibilitiesJson);
+//
+//                incompatibleInfoJSON.put(incompatibleClassJson);
+//
+//                // not found class
+//                JSONObject notFoundClassJson = new JSONObject();
+//                notFoundClassJson.put("causedBy", incompatibleClass.getName());
+//                notFoundClassJson.put("incomps", missingClassesJson);
+//
+//                notFoundInfoJSON.put(notFoundClassJson);
+//            }
+//
+//            if (!firstOrigin.equals("")) {
+//                id++;
+//                EdgeImpl edge = new EdgeImpl(id, createSymbolicName(firstOrigin), createSymbolicName(secondOrigin), false, incompatibleInfoJSON.toString());
+//                this.graph.addEdge(edge);
+//            }
+//
+//            if (!firstOriginNF.equals("")) {
+//                id++;
+//                EdgeImpl edge = new EdgeImpl(id, createSymbolicName(secondOriginNF), createSymbolicName(firstOriginNF), false, notFoundInfoJSON.toString());
+//                this.graph.addEdge(edge);
+//            }
+//        }
+//
+//        logger.trace("EXIT");
+//    }
+//
+//    /**
+//     * Create symbolic name.
+//     *
+//     * @param origin
+//     * @return Symbolic name.
+//     */
+//    private String createSymbolicName(String origin) {
+//        String location = this.fileLocation.replace("/", File.separator) + File.separator;
+//
+//        return "vertex_" + origin.replace(location, "");
+//    }
+//
+//    /**
+//     * Generates the graph with vertices and edges.
+//     *
+//     * @return graph
+//     */
+//    public GraphInterface generate() {
+//        logger.trace("ENTRY");
+//
+//        this.generateVertices();
+//        this.generateEdges();
+//
+//        logger.trace("EXIT");
+//
+//        return this.graph;
+//    }
+//
+//    /**
+//     * Recursive function for traversing tree with incompatibility information. Creates object serializable to JSON.
+//     *
+//     * @param cmpResultNode
+//     * @param corrStrategy
+//     */
+//    public JSONObject findIncompatibilityCause(CmpResultNode cmpResultNode, String corrStrategy) {
+//        Object o = cmpResultNode.getResult().getFirstObject();
+//
+//        // cause description
+//        JSONObject descriptionJson = new JSONObject();
+//        descriptionJson.put("level", this.level);
+//
+//        if (o instanceof JMethod) {
+//            descriptionJson.put("name", "M " + getMethodDeclaration(o));
+//        } else if (o instanceof JField) {
+//            descriptionJson.put("name", "F " + getFieldDeclaration(o));
+//        } else if (o instanceof HasName) {
+//            descriptionJson.put("name", this.jaccMessages.getProperty(cmpResultNode.getContentCode()) + ": " + ((HasName) o).getName());
+//        } else {
+//            descriptionJson.put("name", this.jaccMessages.getProperty(cmpResultNode.getContentCode()));
+//        }
+//
+//        descriptionJson.put("contentCode", cmpResultNode.getContentCode());
+//        descriptionJson.put("propertyName", this.jaccMessages.getProperty(cmpResultNode.getContentCode()));
+//        descriptionJson.put("isIncompCause", cmpResultNode.isIncompatibilityCause());
+//
+//        if (o instanceof JPackage) {
+//            descriptionJson.put("type", "package");
+//            descriptionJson.put("details", getPackageDetails((JPackage) o));
+//        } else if (o instanceof JClass) {
+//            descriptionJson.put("type", "class");
+//            descriptionJson.put("details", getClassDetails((JClass) o));
+//        } else if (o instanceof JMethod) {
+//            descriptionJson.put("type", "method");
+//            descriptionJson.put("details", getMethodDetails((JMethod) o));
+//        } else if (o instanceof JField) {
+//            descriptionJson.put("type", "field");
+//            descriptionJson.put("details", getFieldDetails((JField) o));
+//        }
+//
+//        // incompatibility details
+//        if (cmpResultNode.isIncompatibilityCause()) {
+//            if (!cmpResultNode.getResult().getInherentDiff().name().equals("DEL")) {
+//                if (o instanceof HasName) {
+//                    descriptionJson.put("objectNameFirst", ((HasName) o).getName());
+//                    descriptionJson.put("objectNameSecond", ((HasName) cmpResultNode.getResult().getSecondObject()).getName());
+//                } else {
+//                    descriptionJson.put("objectNameFirst", o.toString());
+//                    descriptionJson.put("objectNameSecond", cmpResultNode.getResult().getSecondObject().toString());
+//                }
+//            }
+//
+//            String incompName = this.getIncompatibilityName(cmpResultNode, corrStrategy);
+//            if (incompName.equals("")) {
+//                descriptionJson.put("incompName", "Incompatible " + this.jaccMessages.getProperty(cmpResultNode.getContentCode()) + " -> " + corrStrategy); //child.getResult().getStrategy().name();
+//            } else {
+//                descriptionJson.put("incompName", incompName + (cmpResultNode.getResult().getInherentDiff().name().equals("DEL") ? " is missing -> " + cmpResultNode.getResult().getStrategy().name() : ""));
+//            }
+//
+//            descriptionJson.put("strategy", cmpResultNode.getResult().getStrategy().name());
+//            descriptionJson.put("difference", cmpResultNode.getResult().getInherentDiff().name());
+//        }
+//
+//        // subtree
+//        JSONArray subtreeJson = new JSONArray();
+//        if (!cmpResultNode.getResult().childrenCompatible()) {
+//            this.level++;
+//
+//            List<CmpResultNode> children = cmpResultNode.getResult().getChildren();
+//            for (CmpResultNode child : children) {
+//                CorrectionStrategy strategy = this.level == 1 ? cmpResultNode.getResult().getStrategy() : child.getResult().getStrategy();
+//
+//                subtreeJson.put(findIncompatibilityCause(child, strategy.name()));
+//            }
+//
+//            this.level--;
+//        }
+//
+//
+//        JSONObject causeJson = new JSONObject();
+//        causeJson.put("desc", descriptionJson);
+//        causeJson.put("subtree", subtreeJson);
+//
+//        return causeJson;
+//    }
+//
+//    private JSONObject getPackageDetails(JPackage pakkage) {
+//        JSONObject detailsJson = new JSONObject();
+//        detailsJson.put("name", pakkage.getName());
+//
+//        return detailsJson;
+//    }
+//
+//    private JSONObject getClassDetails(JClass clazz) {
+//        JSONObject detailsJson = new JSONObject();
+//
+//        detailsJson.put("name", clazz.getShortName());
+//        detailsJson.put("package", clazz.getPackage().getName());
+//
+//        detailsJson.put("enum", clazz.isEnum());
+//        detailsJson.put("interface", clazz.isInterface());
+//        detailsJson.put("annotation", clazz.isAnnotation());
+//
+//        detailsJson.put("abstract", clazz.getModifiers().isAbstract());
+//        detailsJson.put("final", clazz.getModifiers().isFinal());
+//        detailsJson.put("static", clazz.getModifiers().isStatic());
+//
+//        return detailsJson;
+//    }
+//
+//    private JSONObject getMethodDetails(JMethod method) {
+//        JSONObject detailsJson = new JSONObject();
+//
+//        detailsJson.put("name", method.getName());
+//        detailsJson.put("returnType", method.getReturnType().getName());
+//        detailsJson.put("constructor", method.isConstructor());
+//
+//        List<JType> exceptionTypes = method.getExceptionTypes();
+//        JSONArray exceptionTypeNames = new JSONArray();
+//        for (JType type : exceptionTypes) {
+//            exceptionTypeNames.put(type.getName());
+//        }
+//        detailsJson.put("exceptions", exceptionTypeNames);
+//
+//        List<JType> parameterTypes = method.getParameterTypes();
+//        JSONArray parameterTypeNames = new JSONArray();
+//        for (JType type : parameterTypes) {
+//            parameterTypeNames.put(type.getName());
+//        }
+//        detailsJson.put("paramTypes", parameterTypeNames);
+//
+//        detailsJson.put("abstract", method.getModifiers().isAbstract());
+//        detailsJson.put("final", method.getModifiers().isFinal());
+//        detailsJson.put("static", method.getModifiers().isStatic());
+//        detailsJson.put("synchronized", method.getModifiers().isSynchronized());
+//
+//        return detailsJson;
+//    }
+//
+//    private JSONObject getFieldDetails(JField field) {
+//        JSONObject detailsJson = new JSONObject();
+//
+//        detailsJson.put("name", field.getName());
+//        detailsJson.put("type", field.getType().getName());
+//        detailsJson.put("initialValue", field.getInitialValue());
+//
+//        detailsJson.put("abstract", field.getModifiers().isAbstract());
+//        detailsJson.put("final", field.getModifiers().isFinal());
+//        detailsJson.put("static", field.getModifiers().isStatic());
+//
+//        return detailsJson;
+//    }
+//
+//    private String getShortName(String longName) {
+//        return longName.substring(longName.lastIndexOf('.') + 1);
+//    }
+//
+//    private String getMethodDeclaration(Object o) {
+//        String methodName = "";
+//        methodName += getShortName(((JMethod) o).getReturnType().getName());
+//        methodName += " " + ((JMethod) o).getName();
+//        methodName += "(";
+//        for (JType type : ((JMethod) o).getParameterTypes()) {
+//            methodName += getShortName(type.getName()) + ", ";
+//        }
+//        methodName = methodName.replaceAll(", $", "");
+//        methodName += ")";
+//        return methodName;
+//    }
+//
+//    private String getFieldDeclaration(Object o) {
+//        String fieldDeclaration = "";
+//        fieldDeclaration += getShortName(((JField) o).getType().getName());
+//        fieldDeclaration += " " + ((JField) o).getName();
+//        return fieldDeclaration;
+//    }
+//
+//    private String getIncompatibilityName(CmpResultNode child, String corrStrategy) {
+//        Object o = child.getResult().getFirstObject();
+//
+//        String incompName;
+//        switch (child.getContentCode()) {
+//            case "cmp.child.class":
+//                if (o instanceof HasName) {
+//                    incompName = "Class " + ((HasName) o).getName();
+//                } else {
+//                    incompName = "Class " + o.toString();
+//                }
+//                break;
+//            case "cmp.child.method.return.type":
+//                incompName = this.jaccMessages.getProperty(child.getContentCode()) + " different -> " + corrStrategy;
+//                break;
+//            case "cmp.child.method.param.type":
+//                if (o instanceof HasName) {
+//                    incompName = "Parameter " + getShortName(((HasName) o).getName()) + " different -> " + corrStrategy;
+//                } else {
+//                    incompName = "Parameter " + getShortName(o.toString()) + " different -> " + corrStrategy;
+//                }
+//                break;
+//            case "cmp.child.method.invocation":
+//                incompName = "Invoke Virtual" + " -> " + child.getResult().getStrategy().name();
+//                break;
+//            case "cmp.child.method":
+//                incompName = "<span class='entity'>M</span> " + getMethodDeclaration(o);
+//                break;
+//            case "cmp.child.constructor":
+//                incompName = "<span class='entity'>C</span> " + getMethodDeclaration(o);
+//                break;
+//            case "cmp.child.field":
+//                incompName = "<span class='entity'>F</span> " + getFieldDeclaration(o);
+//                break;
+//            case "cmp.child.modifier":
+//                incompName = "<span class='entity'>P</span> " + o.toString() + " -> " + corrStrategy;
+//                break;
+//            default:
+//                incompName = "";
+//                break;
+//        }
+//        return incompName;
+//    }
+//
+//}
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/efp/EfpComparison.java b/sources/src/cz/zcu/kiv/offscreen/graph/efp/EfpComparison.java
index 3a2ec04..ac0b58c 100644
--- a/sources/src/cz/zcu/kiv/offscreen/graph/efp/EfpComparison.java
+++ b/sources/src/cz/zcu/kiv/offscreen/graph/efp/EfpComparison.java
@@ -1,88 +1,88 @@
-package cz.zcu.kiv.offscreen.graph.efp;
-
-import org.apache.log4j.Logger;
-
-/**
- * 
- * Holds data of EFP comparison relation.
- * 
- * @author Jiri Loudil
- * 
- */
-public class EfpComparison {
-	
-	/**
-	 * Status of the EFP cmp. OK, MISSING, etc.
-	 */
-	private String comparisonStatus;
-
-	/**
-	 * Name of the EFP cmp.
-	 */
-	private String efpName;
-	
-	/**
-	 * Values of the left and right side of cmp. relation.
-	 */
-	private String leftEfpValue, rightEfpValue;
-	
-	/**
-	 * Name of the type used for the EFP cmp. relation.
-	 */
-	private String typeName;
-
-	/**
-	 * Logging.
-	 */
-	private Logger logger = Logger.getLogger(EfpComparison.class);
-
-	/**
-	 * Construct new relation.
-	 */
-	public EfpComparison() {
-		logger.trace("ENTRY");
-
-		logger.trace("EXIT");
-	}
-
-	public String getComparisonStatus() {
-		return comparisonStatus;
-	}
-
-	public void setComparisonStatus(String comparisonStatus) {
-		this.comparisonStatus = comparisonStatus;
-	}
-
-	public String getTypeName() {
-		return typeName;
-	}
-
-	public void setTypeName(String typeName) {
-		this.typeName = typeName;
-	}
-
-	public String getLeftEfpValue() {
-		return leftEfpValue;
-	}
-
-	public void setLeftEfpValue(String leftEfpValue) {
-		this.leftEfpValue = leftEfpValue;
-	}
-
-	public String getRightEfpValue() {
-		return rightEfpValue;
-	}
-
-	public void setRightEfpValue(String rightEfpValue) {
-		this.rightEfpValue = rightEfpValue;
-	}
-
-	public String getEfpName() {
-		return efpName;
-	}
-
-	public void setEfpName(String efpName) {
-		this.efpName = efpName;
-	}
-
-}
+//package cz.zcu.kiv.offscreen.graph.efp;
+//
+//import org.apache.log4j.Logger;
+//
+///**
+// *
+// * Holds data of EFP comparison relation.
+// *
+// * @author Jiri Loudil
+// *
+// */
+//public class EfpComparison {
+//
+//	/**
+//	 * Status of the EFP cmp. OK, MISSING, etc.
+//	 */
+//	private String comparisonStatus;
+//
+//	/**
+//	 * Name of the EFP cmp.
+//	 */
+//	private String efpName;
+//
+//	/**
+//	 * Values of the left and right side of cmp. relation.
+//	 */
+//	private String leftEfpValue, rightEfpValue;
+//
+//	/**
+//	 * Name of the type used for the EFP cmp. relation.
+//	 */
+//	private String typeName;
+//
+//	/**
+//	 * Logging.
+//	 */
+//	private Logger logger = Logger.getLogger(EfpComparison.class);
+//
+//	/**
+//	 * Construct new relation.
+//	 */
+//	public EfpComparison() {
+//		logger.trace("ENTRY");
+//
+//		logger.trace("EXIT");
+//	}
+//
+//	public String getComparisonStatus() {
+//		return comparisonStatus;
+//	}
+//
+//	public void setComparisonStatus(String comparisonStatus) {
+//		this.comparisonStatus = comparisonStatus;
+//	}
+//
+//	public String getTypeName() {
+//		return typeName;
+//	}
+//
+//	public void setTypeName(String typeName) {
+//		this.typeName = typeName;
+//	}
+//
+//	public String getLeftEfpValue() {
+//		return leftEfpValue;
+//	}
+//
+//	public void setLeftEfpValue(String leftEfpValue) {
+//		this.leftEfpValue = leftEfpValue;
+//	}
+//
+//	public String getRightEfpValue() {
+//		return rightEfpValue;
+//	}
+//
+//	public void setRightEfpValue(String rightEfpValue) {
+//		this.rightEfpValue = rightEfpValue;
+//	}
+//
+//	public String getEfpName() {
+//		return efpName;
+//	}
+//
+//	public void setEfpName(String efpName) {
+//		this.efpName = efpName;
+//	}
+//
+//}
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/efp/EfpFeature.java b/sources/src/cz/zcu/kiv/offscreen/graph/efp/EfpFeature.java
index d91dbdb..0af9b5b 100644
--- a/sources/src/cz/zcu/kiv/offscreen/graph/efp/EfpFeature.java
+++ b/sources/src/cz/zcu/kiv/offscreen/graph/efp/EfpFeature.java
@@ -1,72 +1,72 @@
-package cz.zcu.kiv.offscreen.graph.efp;
-
-import java.util.ArrayList;
-
-import org.apache.log4j.Logger;
-
-/**
- * 
- * Holds data of a feature used in EFP relation.
- * 
- * @author Jiri Loudil
- *
- */
-public class EfpFeature {
-	
-	/**
-	 * Name of the feature.
-	 */
-	private String name = "";
-	
-	/**
-	 * List of EFPs connected to this particular feature.
-	 */
-	private ArrayList<EfpComparison> efps;
-	
-	/**
-	 * Status of the feture. OK, MISSING, etc.
-	 */
-	private String featureStatus = "";
-	
-	/**
-	 * Logging.
-	 */
-	private Logger logger = Logger.getLogger(EfpFeature.class);
-
-	/**
-	 * 
-	 * Construct new named feature.
-	 * 
-	 * @param name New feature name.
-	 */
-	public EfpFeature(String name) {
-		logger.trace("ENTRY");
-		this.name = name;
-		
-		this.efps = new ArrayList<EfpComparison>();
-		this.featureStatus = "";
-		
-		logger.trace("EXIT");
-	}
-
-	public ArrayList<EfpComparison> getEfps() {
-		return efps;
-	}
-
-	public String getFeatureStatus() {
-		return featureStatus;
-	}
-
-	public void setFeatureStatus(String featureStatus) {
-		this.featureStatus = featureStatus;
-	}
-
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-
-}
+//package cz.zcu.kiv.offscreen.graph.efp;
+//
+//import java.util.ArrayList;
+//
+//import org.apache.log4j.Logger;
+//
+///**
+// *
+// * Holds data of a feature used in EFP relation.
+// *
+// * @author Jiri Loudil
+// *
+// */
+//public class EfpFeature {
+//
+//	/**
+//	 * Name of the feature.
+//	 */
+//	private String name = "";
+//
+//	/**
+//	 * List of EFPs connected to this particular feature.
+//	 */
+//	private ArrayList<EfpComparison> efps;
+//
+//	/**
+//	 * Status of the feture. OK, MISSING, etc.
+//	 */
+//	private String featureStatus = "";
+//
+//	/**
+//	 * Logging.
+//	 */
+//	private Logger logger = Logger.getLogger(EfpFeature.class);
+//
+//	/**
+//	 *
+//	 * Construct new named feature.
+//	 *
+//	 * @param name New feature name.
+//	 */
+//	public EfpFeature(String name) {
+//		logger.trace("ENTRY");
+//		this.name = name;
+//
+//		this.efps = new ArrayList<EfpComparison>();
+//		this.featureStatus = "";
+//
+//		logger.trace("EXIT");
+//	}
+//
+//	public ArrayList<EfpComparison> getEfps() {
+//		return efps;
+//	}
+//
+//	public String getFeatureStatus() {
+//		return featureStatus;
+//	}
+//
+//	public void setFeatureStatus(String featureStatus) {
+//		this.featureStatus = featureStatus;
+//	}
+//
+//	public String getName() {
+//		return name;
+//	}
+//
+//	public void setName(String name) {
+//		this.name = name;
+//	}
+//
+//}
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/loader/JSONConfigLoader.java b/sources/src/cz/zcu/kiv/offscreen/graph/loader/JSONConfigLoader.java
index 5a6faa1..cfb0e28 100644
--- a/sources/src/cz/zcu/kiv/offscreen/graph/loader/JSONConfigLoader.java
+++ b/sources/src/cz/zcu/kiv/offscreen/graph/loader/JSONConfigLoader.java
@@ -1,6 +1,6 @@
 package cz.zcu.kiv.offscreen.graph.loader;
 
-import cz.zcu.kiv.offscreen.AttributeType;
+import cz.zcu.kiv.offscreen.graph.AttributeType;
 import cz.zcu.kiv.offscreen.graph.EdgeArchetypeInfo;
 import cz.zcu.kiv.offscreen.graph.GraphManager;
 import cz.zcu.kiv.offscreen.graph.filter.*;
@@ -11,7 +11,6 @@ import org.apache.commons.io.FileUtils;
 import java.io.File;
 import java.io.IOException;
 import java.math.BigDecimal;
-import java.text.ParseException;
 import java.text.ParsePosition;
 import java.text.SimpleDateFormat;
 import java.util.*;
@@ -377,4 +376,18 @@ public class JSONConfigLoader {
 
         return defaultGroupArchetypes;
     }
+
+    /**
+     * Loads default group archetypes and return them in a list.
+     * @return list of archetypes.
+     */
+    public List<String> loadGroupArchetypesStrings(){
+        List<String> groupArchetypes = new ArrayList<>();
+
+        JSONArray defaultGroupArchetypesJson = json.getJSONArray("defaultGroupArchetypes");
+        for (Object jsonItem : defaultGroupArchetypesJson) {
+            groupArchetypes.add(jsonItem.toString());
+        }
+        return groupArchetypes;
+    }
 }
diff --git a/sources/src/cz/zcu/kiv/offscreen/loader/configuration/ConfigurationLoader.java b/sources/src/cz/zcu/kiv/offscreen/loader/configuration/ConfigurationLoader.java
index b785824..3c1ff2d 100644
--- a/sources/src/cz/zcu/kiv/offscreen/loader/configuration/ConfigurationLoader.java
+++ b/sources/src/cz/zcu/kiv/offscreen/loader/configuration/ConfigurationLoader.java
@@ -1,7 +1,5 @@
 package cz.zcu.kiv.offscreen.loader.configuration;
 
-import org.apache.log4j.Logger;
-
 import java.io.IOException;
 import javax.servlet.ServletContext;
 
diff --git a/sources/src/cz/zcu/kiv/offscreen/servlets/LoadGraphData.java b/sources/src/cz/zcu/kiv/offscreen/servlets/LoadGraphData.java
index 076faa4..17526b4 100644
--- a/sources/src/cz/zcu/kiv/offscreen/servlets/LoadGraphData.java
+++ b/sources/src/cz/zcu/kiv/offscreen/servlets/LoadGraphData.java
@@ -1,22 +1,8 @@
 package cz.zcu.kiv.offscreen.servlets;
 
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.PrintWriter;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import cz.zcu.kiv.ccu.ApiCheckersFactory;
-import cz.zcu.kiv.ccu.ApiCheckersSetting;
-import cz.zcu.kiv.ccu.ApiInterCompatibilityChecker;
-import cz.zcu.kiv.ccu.ApiInterCompatibilityResult;
-import cz.zcu.kiv.offscreen.api.GraphInterface;
-import cz.zcu.kiv.offscreen.graph.GraphExport;
+import cz.zcu.kiv.offscreen.graph.Graph;
+import cz.zcu.kiv.offscreen.api.GraphExport;
 import cz.zcu.kiv.offscreen.graph.GraphManager;
-import cz.zcu.kiv.offscreen.graph.creator.GraphMaker;
 import cz.zcu.kiv.offscreen.graph.loader.DemoDiagramLoader;
 import cz.zcu.kiv.offscreen.graph.loader.GraphJSONDataLoader;
 import cz.zcu.kiv.offscreen.graph.loader.JSONConfigLoader;
@@ -25,6 +11,13 @@ import cz.zcu.kiv.offscreen.session.SessionManager;
 import cz.zcu.kiv.offscreen.storage.FileManager;
 import net.sf.json.JSONObject;
 
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+
 /**
  * @author Jindra Pavlíková <jindra.pav2@seznam.cz>
  */
@@ -35,7 +28,7 @@ public class LoadGraphData extends HttpServlet {
      * graph is returned as JSON in response body.
      */
     @Override
-    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
         // initialize file manager
         String workingDirectory;
         if (request.getParameter("diagram_hash") == null) {
@@ -64,7 +57,7 @@ public class LoadGraphData extends HttpServlet {
                 GraphManager graphManager = new GraphJSONDataLoader(fileToDisplay).LoadData();
                 String configLocation = ConfigurationLoader.getConfigLocation(request.getServletContext());
                 JSONConfigLoader configLoader = new JSONConfigLoader(graphManager, configLocation);
-                GraphInterface graph = graphManager.createGraph(configLoader);
+                Graph graph = graphManager.createGraph(configLoader);
                 GraphExport export = new GraphExport(graph);
                 JSONObject json = JSONObject.fromObject(export);
 
