/**
         * Returns the conditions of the element reference.
         *
         * @return Conditions of the element reference
         */
        public ConditionsController getConditions()
        {
            Dictionary <string, ConditionsController.ConditionContextProperty> context1 = new Dictionary <string, ConditionsController.ConditionContextProperty>();

            ConditionsController.ConditionOwner parent = new ConditionsController.ConditionOwner(Controller.SCENE, sceneDataControl.getId());
            ConditionsController.ConditionOwner owner  = new ConditionsController.ConditionOwner(Controller.ACTIVE_AREA, activeArea.getId(), parent);

            context1.Add(ConditionsController.CONDITION_OWNER, owner);
            conditionsController = new ConditionsController(activeArea.getConditions(), context1);

            return(conditionsController);
        }
        /**
         * Returns the conditions of the element reference.
         *
         * @return Conditions of the element reference
         */
        public ConditionsController getConditions()
        {
            Dictionary <string, ConditionsController.ConditionContextProperty> context1 = new Dictionary <string, ConditionsController.ConditionContextProperty>();

            ConditionsController.ConditionOwner parent = new ConditionsController.ConditionOwner(Controller.SCENE, sceneDataControl.getId());
            ConditionsController.ConditionOwner owner  = new ConditionsController.ConditionOwner(Controller.EXIT, exit.getNextSceneId(), parent);
            context1.Add(ConditionsController.CONDITION_OWNER, owner);

            conditionsController = new ConditionsController(exit.getConditions(), context1);

            return(conditionsController);
        }
        /**
         * Contructor.
         *
         * @param sceneDataControl
         *            Parent scene controller
         * @param elementReference
         *            Element reference of the data control structure
         */
        public ElementReferenceDataControl(SceneDataControl sceneDataControl, ElementReference elementReference, int type, int referenceNumber)
        {
            this.sceneDataControl = sceneDataControl;
            this.elementReference = elementReference;
            this.type             = type;
            this.visible          = true;
            if (type == Controller.ITEM_REFERENCE || type == Controller.NPC_REFERENCE)
            {
                this.influenceAreaDataControl = new InfluenceAreaDataControl(sceneDataControl, elementReference.getInfluenceArea(), this);
            }

            // Create subcontrollers
            Dictionary <string, ConditionsController.ConditionContextProperty> context1 = new Dictionary <string, ConditionsController.ConditionContextProperty>();

            ConditionsController.ConditionOwner parent = new ConditionsController.ConditionOwner(Controller.SCENE, sceneDataControl.getId());
            ConditionsController.ConditionOwner owner  = new ConditionsController.ConditionOwner(type, elementReference.getTargetId(), parent);
            context1.Add(ConditionsController.CONDITION_OWNER, owner);

            conditionsController = new ConditionsController(elementReference.getConditions(), context1);
        }
        /**
         * Constructor.
         *
         * @param sceneDataControl
         *            Parent scene controller
         * @param activeArea
         *            Exit of the data control structure
         */
        public BarrierDataControl(SceneDataControl sceneDataControl, Barrier barrier)
        {
            this.sceneDataControl = sceneDataControl;
            this.barrier          = barrier;

            // Create subcontrollers
            Dictionary <string, ConditionsController.ConditionContextProperty> context1 = new Dictionary <string, ConditionsController.ConditionContextProperty>();

            ConditionsController.ConditionOwner parent = new ConditionsController.ConditionOwner(Controller.SCENE, sceneDataControl.getId());
            ConditionsController.ConditionOwner owner  = new ConditionsController.ConditionOwner(Controller.BARRIER, barrier.getId(), parent);

            context1.Add(ConditionsController.CONDITION_OWNER, owner);

            conditionsController = new ConditionsController(barrier.getConditions(), context1);

            descriptionController = new DescriptionsController(barrier.getDescriptions());

            //Barriers can only have name, and only one description, so we set selectedDEscription to 0
            descriptionController.setSelectedDescription(0);
        }