Пример #1
0
        public void accessData(JSONObject obj)
        {
            floors = obj.list[0];                           //this is the root for the floors JSON object
            nodes = obj.list[1];                            //this is the root for the nodes JSON object
            edges = obj.list[2];                            //this is the root for the edges JSON object
            storylines = obj.list[3];                       //this is the root for the storylines JSON object

            floorList = populateFloors();                   //parse the floors
            edgeList = PopulateEdges();                     //parse the edges
            storylineList = PopulateStorylines();           //parse the storylines
            nodeList = populateNodes();                     //parse the nodes

            initializePoiAndStorypointLists();      //populate the list that contains the points of interest and the other that contains storypoints

            createStartAndEndNode(); //transform the id's of the nodes in the edges into Node objects

            setAdjacencies();              //add all the adjacencies to all the nodes

            map = new Map();
            //map.setPoiList(poiList);
            //map.setStorypointList(storypointList);
            map.setFloorplanList(floorList);
            map.setStorylineList(storylineList);
            map.initializeGraph(poiList);
        }