Package com.gwcworld.core.bean

Examples of com.gwcworld.core.bean.Shape


     
      AreaJson areaJson = new AreaJson();
      areaJson.setName(area.getName());
      areaJson.setGridsize(area.getGridsize());
      areaJson.setImgBackground(area.getImgBackground());
      Shape shape = area.getShape();
      ShapeJson shapeJson = new ShapeJson();
      shapeJson.setColorRGBA(shape.getColorRGBA());
      shapeJson.setRotate(shape.getRotate());
      shapeJson.setScaleX(shape.getScaleX());
      shapeJson.setScaleY(shape.getScaleY());
      shapeJson.setShapeTypeId(shape.getType().getId());
      shapeJson.setTranslateX(shape.getTranslateX());
      shapeJson.setTranslateY(shape.getTranslateY());
      shapeJson.setValues(shape.getValues());
      areaJson.setShapeJson(shapeJson);
     
      List<Layer> layerList = layerService.getLayerListByArea(area);
      List<LayerJson> layerJsonList = new ArrayList<LayerJson>();
      for (Iterator<Layer> iterator2 = layerList.iterator(); iterator2.hasNext();) {
        Layer layer = iterator2.next();
        LayerJson layerJson = new LayerJson();
        layerJson.setName(layer.getName());
        layerJson.setImgBackground(layer.getImgBackground());
        layerJson.setVisible(layer.isVisible());
        layerJson.setzIndex(layer.getzIndex());
       
        List<AreaElement> areaElementList = areaElementService.getAreaElementListByLayer(layer);
        List<AreaElementJson> areaElementJsonList = new ArrayList<AreaElementJson>();
        for (Iterator<AreaElement> iterator3 = areaElementList.iterator(); iterator3.hasNext();) {
          AreaElement areaElement = iterator3.next();
          AreaElementJson areaElementJson = new AreaElementJson();
         
          areaElementJson.setAreaElementType(areaElement.getType().getId());
          areaElementJson.setRotate(areaElement.getRotate());
          areaElementJson.setScaleX(areaElement.getScaleX());
          areaElementJson.setScaleY(areaElement.getScaleY());
          areaElementJson.setSurfaceTot(areaElement.getSurfaceTot());
          areaElementJson.setTranslateX(areaElement.getTranslateX());
          areaElementJson.setTranslateY(areaElement.getTranslateY());
         
          areaElementJsonList.add(areaElementJson);
        }
        layerJson.setAreaElementList(areaElementJsonList);
       
        List<Shape> shapeList = layer.getShapes();
        List<ShapeJson> shapeJsonList = new ArrayList<ShapeJson>();
        for (Iterator<Shape> iterator4 = shapeList.iterator(); iterator4.hasNext();) {
          Shape layerShape = iterator4.next();
          ShapeJson layerShapeJson = new ShapeJson();
         
          layerShapeJson.setColorRGBA(layerShape.getColorRGBA());
          layerShapeJson.setRotate(layerShape.getRotate());
          layerShapeJson.setScaleX(layerShape.getScaleX());
          layerShapeJson.setScaleY(layerShape.getScaleY());
          layerShapeJson.setShapeTypeId(layerShape.getType().getId());
          layerShapeJson.setTranslateX(layerShape.getTranslateX());
          layerShapeJson.setTranslateY(layerShape.getTranslateY());
          layerShapeJson.setValues(layerShape.getValues());
         
          shapeJsonList.add(layerShapeJson);
        }
        layerJson.setShapeList(shapeJsonList);
       
        List<Stand> standList = standService.getStandListByLayer(layer);
        List<StandJson> standJsonList = new ArrayList<StandJson>();
        for (Iterator<Stand> iterator3 = standList.iterator(); iterator3.hasNext();) {
          Stand stand = iterator3.next();
          StandJson standJson = new StandJson();
          standJson.setId(stand.getId());
          standJson.setCode(stand.getCode());
          standJson.setDescription(stand.getDescription());
          if(stand.getExhibitor()!=null)
            standJson.setExhibitorId(stand.getExhibitor().getId());
          standJson.setLogo(stand.getLogo());
          standJson.setName(stand.getName());
          standJson.setOpenSides(stand.getOpenSides());
          Shape standShape = stand.getShape();
          ShapeJson standShapeJson = new ShapeJson();
          standShapeJson.setColorRGBA(standShape.getColorRGBA());
          standShapeJson.setRotate(standShape.getRotate());
          standShapeJson.setScaleX(standShape.getScaleX());
          standShapeJson.setScaleY(standShape.getScaleY());
          standShapeJson.setShapeTypeId(standShape.getType().getId());
          standShapeJson.setTranslateX(standShape.getTranslateX());
          standShapeJson.setTranslateY(standShape.getTranslateY());
          standShapeJson.setValues(standShape.getValues());
          standJson.setShape(standShapeJson);
          standJson.setStandStatusId(stand.getStatus().getId());
          standJson.setSurfaceEffective(stand.getSurfaceEffective());
          standJson.setSurfaceTot(stand.getSurfaceTot());
          standJson.setOrientation(stand.getOrientation());
View Full Code Here


          area.setName(areaJson.getName());
          area.setGridsize(areaJson.getGridsize());
          area.setImgBackground(areaJson.getImgBackground());
         
          ShapeJson shapeJson = areaJson.getShapeJson();
          Shape shape = new Shape();
          shape.setColorRGBA(shapeJson.getColorRGBA());
          shape.setRotate(shapeJson.getRotate());
          shape.setScaleX(shapeJson.getScaleX());
          shape.setScaleY(shapeJson.getScaleY());
          ShapeType shapeType = shapeTypeService.getById(shapeJson.getShapeTypeId());
          shape.setType(shapeType);
          shape.setTranslateX(shapeJson.getTranslateX());
          shape.setTranslateY(shapeJson.getTranslateY());
          shape.setValues(shapeJson.getValues());
          //shapeService.save(shape);
         
          area.setShape(shape);
         
          List<LayerJson> layerJsonList = areaJson.getLayerList();
          List<Layer> layerList = new ArrayList<Layer>();
          for (Iterator<LayerJson> iterator2 = layerJsonList.iterator(); iterator2.hasNext();) {
            LayerJson layerJson = iterator2.next();
           
            Layer layer = new Layer();
            layer.setName(layerJson.getName());
            layer.setImgBackground(layerJson.getImgBackground());
            layer.setVisible(layerJson.isVisible());
            layer.setzIndex(layerJson.getzIndex());
           
            List<AreaElementJson> areaElementJsonList = layerJson.getAreaElementList();
            List<AreaElement> areaElementList = new ArrayList<AreaElement>();
            for (Iterator<AreaElementJson> iterator3 = areaElementJsonList.iterator(); iterator3.hasNext();) {
              AreaElementJson areaElementJson = iterator3.next();
             
              AreaElement areaElement = new AreaElement();
              AreaElementType areaElementType = areaElementTypeService.getById(areaElementJson.getAreaElementType());
              areaElement.setType(areaElementType);
              areaElement.setRotate(areaElementJson.getRotate());
              areaElement.setScaleX(areaElementJson.getScaleX());
              areaElement.setScaleY(areaElementJson.getScaleY());
              areaElement.setSurfaceTot(areaElementJson.getSurfaceTot());
              areaElement.setTranslateX(areaElementJson.getTranslateX());
              areaElement.setTranslateY(areaElementJson.getTranslateY());
              areaElement.setLayer(layer);
             
              areaElementList.add(areaElement);
            }
            layer.setAreaElements(areaElementList);
           
            List<ShapeJson> shapeJsonList = layerJson.getShapeList();
            List<Shape> shapeList = new ArrayList<Shape>();
            for (Iterator<ShapeJson> iterator4 = shapeJsonList.iterator(); iterator4.hasNext();) {
              ShapeJson layerShapeJson = iterator4.next();
             
              Shape layerShape = new Shape();
              layerShape.setColorRGBA(layerShapeJson.getColorRGBA());
              layerShape.setRotate(layerShapeJson.getRotate());
              layerShape.setScaleX(layerShapeJson.getScaleX());
              layerShape.setScaleY(layerShapeJson.getScaleY());
              ShapeType layerShapeType = shapeTypeService.getById(layerShapeJson.getShapeTypeId());
              layerShape.setType(layerShapeType);
              layerShape.setTranslateX(layerShapeJson.getTranslateX());
              layerShape.setTranslateY(layerShapeJson.getTranslateY());
              layerShape.setValues(layerShapeJson.getValues());
             
              shapeList.add(layerShape);
            }
            layer.setShapes(shapeList);
           
            List<StandJson> standJsonList = layerJson.getStandList();
            List<Stand> standList = new ArrayList<Stand>();
            for (Iterator<StandJson> iterator3 = standJsonList.iterator(); iterator3.hasNext();) {
              StandJson standJson = iterator3.next();
             
              Stand stand = new Stand();
              stand.setCode(standJson.getCode());
              stand.setDescription(standJson.getDescription());
              if(standJson.getExhibitorId()!=0){
                Exhibitor exhibitor = exhibitorService.getById(standJson.getExhibitorId());
                stand.setExhibitor(exhibitor);
              }
              stand.setLogo(standJson.getLogo());
              stand.setName(standJson.getName());
              stand.setOpenSides(standJson.getOpenSides());
             
              ShapeJson standShapeJson = standJson.getShape();
              Shape standShape = new Shape();
              standShape.setColorRGBA(standShapeJson.getColorRGBA());
              standShape.setRotate(standShapeJson.getRotate());
              standShape.setScaleX(standShapeJson.getScaleX());
              standShape.setScaleY(standShapeJson.getScaleY());
              ShapeType standShapeType = shapeTypeService.getById(standShapeJson.getShapeTypeId());
              standShape.setType(standShapeType);
              standShape.setTranslateX(standShapeJson.getTranslateX());
              standShape.setTranslateY(standShapeJson.getTranslateY());
              standShape.setValues(standShapeJson.getValues());
              stand.setShape(standShape);
              com.gwcworld.core.bean.StandStatus standStatus = standStatusService.getById(standJson.getStandStatusId());
              stand.setStatus(standStatus);
              stand.setSurfaceEffective(standJson.getSurfaceEffective());
              stand.setSurfaceTot(standJson.getSurfaceTot());
View Full Code Here

TOP

Related Classes of com.gwcworld.core.bean.Shape

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.