ui.controller

## Class LoadController

- java.lang.Object
- - ui.controller.LoadController

-     public class LoadController
      extends java.lang.Object

  Controller for the Loading.
  Author:
    Gruppe14

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `LoadController.Mode` enum Mode.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LoadController(Model model, CategoryController cg, CanvasController cvs, ObjectController obj, MultiPurposeController mp)` Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `convert(int x)` converting saved Integers into Booleans.
    `void` | `dispatch(java.util.ArrayList<java.lang.String> input, org.json.simple.JSONObject json)` dispatch the Keys into the right processing.
    `java.lang.String` | `next(java.util.Iterator<java.lang.Object> i)` Get the Next Element from an Iterator.
    `void` | `readCanvasObject(org.json.simple.JSONArray arr)` Read all Objects in Canvas from JSON File.
    `void` | `readCategory(org.json.simple.JSONArray arr)` Read all Categories from the JSON file.
    `void` | `readCategoryObject(org.json.simple.JSONArray arr)` Read all Objects in Category from the JSON File.
    `void` | `readEdge(org.json.simple.JSONArray arr)` Read.
    `void` | `readElement(org.json.simple.JSONArray arr)` Read all Elements in Category and Canvas from JSON File.
    `void` | `readElementGraph(org.json.simple.JSONArray arr)` Read the Element Graph.
    `void` | `readJson(java.lang.String path)` Reads the the JSON File and load the state into the Model.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### LoadController

          public LoadController(Model model,
                                CategoryController cg,
                                CanvasController cvs,
                                ObjectController obj,
                                MultiPurposeController mp)

      Constructor.
      Parameters:
        `model` - Model
        `cg` - CategoryController
        `cvs` - CanvasController
        `obj` - ObjectController
        `mp` - MultiPurposeController

  - ### Method Detail

    - #### readJson

          public void readJson(java.lang.String path)
                        throws java.io.IOException

      Reads the the JSON File and load the state into the Model.
      Parameters:
        `path` - the Path
      Throws:
        `java.io.IOException` - exception

    - #### dispatch

          public void dispatch(java.util.ArrayList<java.lang.String> input,
                               org.json.simple.JSONObject json)

      dispatch the Keys into the right processing.
      Parameters:
        `input` - input
        `json` - Json

    - #### readCategory

          public void readCategory(org.json.simple.JSONArray arr)

      Read all Categories from the JSON file.
      Parameters:
        `arr` - JSONArray

    - #### readCategoryObject

          public void readCategoryObject(org.json.simple.JSONArray arr)

      Read all Objects in Category from the JSON File.
      Parameters:
        `arr` - JSON Array

    - #### readCanvasObject

          public void readCanvasObject(org.json.simple.JSONArray arr)

      Read all Objects in Canvas from JSON File.
      Parameters:
        `arr` - JSON Array

    - #### readElement

          public void readElement(org.json.simple.JSONArray arr)

      Read all Elements in Category and Canvas from JSON File.
      Parameters:
        `arr` - JSON Array

    - #### readEdge

          public void readEdge(org.json.simple.JSONArray arr)

      Read.
      Parameters:
        `arr` - JSON Array

    - #### readElementGraph

          public void readElementGraph(org.json.simple.JSONArray arr)

      Read the Element Graph.
      Parameters:
        `arr` - JSON Array

    - #### next

          public java.lang.String next(java.util.Iterator<java.lang.Object> i)

      Get the Next Element from an Iterator.
      Parameters:
        `i` - Iterator
      Returns:
        next Element from the Iterator

    - #### convert

          public boolean convert(int x)

      converting saved Integers into Booleans.
      Parameters:
        `x` - integer
      Returns:
        boolean