commit 04643bda46aad8536b3910291103954f1a111022
Author: Martin Matas <nouzovekonto@gmail.com>
Date:   Wed Apr 3 12:57:12 2019 +0200

    Added required fields, changed field name to be valid
    
    - implemented necessary fields that graph must contains otherwise wont be valid
    - archetype index in class BaseVertex had wrong field name and caused that graph was not valid, field was renamed to be valid

diff --git a/sources/imiger-dot-converter/src/main/java/cz/zcu/kiv/imiger/plugin/dot/BaseGraphFactory.java b/sources/imiger-dot-converter/src/main/java/cz/zcu/kiv/imiger/plugin/dot/BaseGraphFactory.java
index 91746c5..fe22aed 100644
--- a/sources/imiger-dot-converter/src/main/java/cz/zcu/kiv/imiger/plugin/dot/BaseGraphFactory.java
+++ b/sources/imiger-dot-converter/src/main/java/cz/zcu/kiv/imiger/plugin/dot/BaseGraphFactory.java
@@ -44,6 +44,31 @@ public abstract class BaseGraphFactory<V extends VertexDTO, E extends EdgeDTO> {
 	 */
 	protected List<EdgeDTO> edges;
 
+    /**
+     * Map of possible enum values that must factory initialize.
+     */
+	protected Map<Integer, List<String>> possibleEnumValues;
+
+    /**
+     * List of groups that must factory initialize.
+     */
+	protected List<Group> groups;
+
+    /**
+     * List of sidebars that must factory initialize.
+     */
+	protected List<SideBar> sideBar;
+
+    /**
+     * Edge that will be highlighted when graph loads. GraphFactory must initialize.
+     */
+	protected String highlightedEdge;
+
+    /**
+     * Vertex that will be highlighted when graph loads. GraphFactory must initialize.
+     */
+	protected String highlightedVertex;
+
 	/**
 	 * Constructor initialize data that can be retrieved from {@link BaseDOTLoader}, the rest of
 	 * necessary attributes for creating graph must be initialized in children of this abstract class.
diff --git a/sources/imiger-dot-converter/src/main/java/cz/zcu/kiv/imiger/plugin/dot/GraphFactory.java b/sources/imiger-dot-converter/src/main/java/cz/zcu/kiv/imiger/plugin/dot/GraphFactory.java
index 332ff72..a852b3a 100644
--- a/sources/imiger-dot-converter/src/main/java/cz/zcu/kiv/imiger/plugin/dot/GraphFactory.java
+++ b/sources/imiger-dot-converter/src/main/java/cz/zcu/kiv/imiger/plugin/dot/GraphFactory.java
@@ -45,6 +45,11 @@ public class GraphFactory extends BaseGraphFactory<VertexDTO, EdgeDTO> {
 		super(dotLoader);
 		prepareEdgeArchetypes();
 		prepareVertexArchetypes();
+		preparePossibleEnumValues();
+		prepareGroups();
+		prepareSideBar();
+		defineHighlightedVertex();
+        defineHighlightedEdge();
 	}
 
 	/**
@@ -84,6 +89,11 @@ public class GraphFactory extends BaseGraphFactory<VertexDTO, EdgeDTO> {
 		graph.setEdgeArchetypes(edgeArchetypes);
 		graph.setVertexArchetypes(vertexArchetypes);
 		graph.setAttributeTypes(attributeTypes);
+		graph.setPossibleEnumValues(possibleEnumValues);
+		graph.setGroups(groups);
+		graph.setSideBar(sideBar);
+		graph.setHighlightedEdge(highlightedEdge);
+		graph.setHighlightedVertex(highlightedVertex);
 		addEdgesToGraph(graph, edges);
 		addVerticesToGraph(graph, vertices);
 
@@ -157,7 +167,7 @@ public class GraphFactory extends BaseGraphFactory<VertexDTO, EdgeDTO> {
 	 * Defines default edge archetype for edges.
 	 */
 	private void prepareEdgeArchetypes() {
-		edgeArchetypes= new ArrayList<>();
+		edgeArchetypes = new ArrayList<>();
 		edgeArchetypes.add(new EdgeArchetype(EDGE_ARCHETYPE_NAME, ARCHETYPE_TEXT));
 	}
 
@@ -169,4 +179,44 @@ public class GraphFactory extends BaseGraphFactory<VertexDTO, EdgeDTO> {
 		vertexArchetypes.add(new VertexArchetype(VERTEX_ARCHETYPE_NAME, ARCHETYPE_TEXT));
 	}
 
+    /**
+     * Defines default map of possible enum values.
+     */
+	private void preparePossibleEnumValues() {
+		possibleEnumValues = new HashMap<>();
+	}
+
+
+    /**
+     * Defines default list fo groups.
+     */
+	private void prepareGroups() {
+		groups = new ArrayList<>();
+	}
+
+
+    /**
+     * Defines default list of sidebars.
+     */
+	private void prepareSideBar() {
+		sideBar = new ArrayList<>();
+	}
+
+
+    /**
+     * Defines default highlighted edge. Empty string means that no edge will be highlighted
+     * when graph loads.
+     */
+	private void defineHighlightedEdge() {
+		highlightedEdge = "";
+	}
+
+    /**
+     * Defines default highlighted vertex. Empty string means that no vertex will be highlighted
+     * when graph loads.
+     */
+	private void defineHighlightedVertex() {
+		highlightedVertex = "";
+	}
+
 }
diff --git a/sources/imiger-module/src/main/java/cz/zcu/kiv/imiger/vo/BaseVertex.java b/sources/imiger-module/src/main/java/cz/zcu/kiv/imiger/vo/BaseVertex.java
index 99c6de5..d3658f1 100644
--- a/sources/imiger-module/src/main/java/cz/zcu/kiv/imiger/vo/BaseVertex.java
+++ b/sources/imiger-module/src/main/java/cz/zcu/kiv/imiger/vo/BaseVertex.java
@@ -11,14 +11,14 @@ public abstract class BaseVertex {
     /** Name of vertex. */
     private String name;
     /** Index of vertex archetype. */
-    private int archetypeIndex;
+    private int archetype;
     /** Additional info. */
     private String text;
 
-    public BaseVertex(int id, String name, int archetypeIndex, String text) {
+    public BaseVertex(int id, String name, int archetype, String text) {
         this.id = id;
         this.name = name;
-        this.archetypeIndex = archetypeIndex;
+        this.archetype = archetype;
         this.text = text;
     }
 
@@ -39,11 +39,11 @@ public abstract class BaseVertex {
     }
 
     public int getArchetype() {
-        return archetypeIndex;
+        return archetype;
     }
 
     public void setArchetype(int archetypeIndex) {
-        this.archetypeIndex = archetypeIndex;
+        this.archetype = archetypeIndex;
     }
 
     public String getText() {
