Package de.FeatureModellingTool.Customize

Examples of de.FeatureModellingTool.Customize.CustomizationModel


        classes.put(INTERACTION_EDITOR_INTERFACE, InteractionEditor.class);
        classes.put(RESOURCE_COMPONENT_EDITOR_INTERFACE, ResourceComponentEditor.class);
        classes.put(INTERACTION_MODEL_EDITOR_INTERFACE, InteractionModelEditor.class);
       
        //gh start
        CustomizationModel CustomizationModel = getCustomizationModel(featureModel);
        interfaces.put(CUSTOMIZATION_MODEL_INTERFACE, CustomizationModel);
        classes.put(CUSTOMIZATION_MODEL_INTERFACE, CustomizationModel.class);
        //gh end

        ManagerInterface mi = component.Manager.getInstance();
View Full Code Here


        ConstraintModel cm = (ConstraintModel) featureModelNGObject
            .getInterface(de.FeatureModellingTool.FeatureModel.Manager.CONSTRAINT_MODEL_INTERFACE);
        InteractionModel im = (InteractionModel) featureModelNGObject
            .getInterface(de.FeatureModellingTool.FeatureModel.Manager.INTERACTION_MODEL_INTERFACE);
        // gh start
        CustomizationModel customizationModel = (CustomizationModel) featureModelNGObject
            .getInterface(de.FeatureModellingTool.FeatureModel.Manager.CUSTOMIZATION_MODEL_INTERFACE);
        // gh end
        String index = fm.getName();
        index += " " + drawingViews.length;
        for (int i = 0; i < drawingViews.length; i++) {
View Full Code Here

        ConstraintModel cm = (ConstraintModel) featureModelNGObject
            .getInterface(de.FeatureModellingTool.FeatureModel.Manager.CONSTRAINT_MODEL_INTERFACE);
        InteractionModel im = (InteractionModel) featureModelNGObject
            .getInterface(de.FeatureModellingTool.FeatureModel.Manager.INTERACTION_MODEL_INTERFACE);
        // gh start
        CustomizationModel customizationModel = (CustomizationModel) featureModelNGObject
            .getInterface(de.FeatureModellingTool.FeatureModel.Manager.CUSTOMIZATION_MODEL_INTERFACE);
        // gh end

        // begin д����Ŀ�����ļ�
        StorableOutput textOutput = new StorableOutput(bufferStream);

        textOutput.writeString(fm.getName());
        textOutput.writeInt(drawingViews.length);
        for (int i = 0; i < drawingViews.length; i++) {
          textOutput.writeString(drawingViews[i].getDrawing()
              .getTitle());
        }
        textOutput.close();

        ZipEntry indexZipEntry = new ZipEntry("index.txt");
        zipOutStream.putNextEntry(indexZipEntry);
        bufferStream.writeTo(zipOutStream);
        zipOutStream.closeEntry();
        // end д����Ŀ�����ļ�

        bufferStream.reset();

        // begin д������ģ�������ļ�
        FmdlParser parser = new FmdlParserPrototype();
        parser.saveFmdl(bufferStream, fm);
        ZipEntry fmZipEntry = new ZipEntry(fm.getName() + ".fm");
        zipOutStream.putNextEntry(fmZipEntry);
        bufferStream.writeTo(zipOutStream);
        zipOutStream.closeEntry();
        // end д������ģ�������ļ�

        bufferStream.reset();

        // begin д��Լ��ģ�������ļ�
        parser.saveCmdl(bufferStream, cm, fm);
        ZipEntry cmZipEntry = new ZipEntry(fm.getName() + ".cm");
        zipOutStream.putNextEntry(cmZipEntry);
        bufferStream.writeTo(zipOutStream);
        zipOutStream.closeEntry();
        // end д��Լ��ģ�������ļ�

        bufferStream.reset();

        // begin д�뽻��ģ�������ļ�
        parser.saveImdl(bufferStream, im, fm);
        ZipEntry imZipEntry = new ZipEntry(fm.getName() + ".im");
        zipOutStream.putNextEntry(imZipEntry);
        bufferStream.writeTo(zipOutStream);
        zipOutStream.closeEntry();
        // end д�뽻��ģ�������ļ�

        bufferStream.reset();

        // begin д����Ŀ��ͼ�ļ�
        AdaptedStandardStorageFormat store = new AdaptedStandardStorageFormat();
        for (int i = 0; i < drawingViews.length; i++) {
          store.store(bufferStream, drawingViews[i].getDrawing());
          ZipEntry viewZipEntry = new ZipEntry(
              (String) drawingViews[i].getDrawing().getTitle()
                  + ".draw");
          zipOutStream.putNextEntry(viewZipEntry);
          bufferStream.writeTo(zipOutStream);
          zipOutStream.closeEntry();

          bufferStream.reset();
        }
        // end д����Ŀ��ͼ�ļ�

        bufferStream.reset();

        // begin д��������Ϣ
        GroupMap informationMap = (GroupMap) ProjectManagerImplementation.this
            .getContext()
            .getValue(
                de.FeatureModellingTool.ProjectManager.ConstantDefinition.INFOMATION_MAP);

        Iterator iterator = informationMap.keySet().iterator();
        while (iterator.hasNext()) {
          String id = (String) iterator.next();
          Set set = informationMap.get(id);

          if (set != null) {
            Iterator valueIterator = set.iterator();
            while (valueIterator.hasNext()) {
              Drawing drawing = (Drawing) valueIterator.next();
              store.store(bufferStream, drawing);
              ZipEntry drawingEntry = new ZipEntry(id + "\\"
                  + drawing.getTitle() + ".draw");
              zipOutStream.putNextEntry(drawingEntry);
              bufferStream.writeTo(zipOutStream);
              zipOutStream.closeEntry();

              bufferStream.reset();
            }
          }
        }
        // end д��������Ϣ

        // begin д�붨����Ϣ
        // gh start
        CmdlParser cParser = new CmdlParserPrototype();

        cParser
            .saveCustomizationModel(bufferStream,
                customizationModel);
        ZipEntry customizationZipEntry = new ZipEntry(
            "customization_index.txt");
        zipOutStream.putNextEntry(customizationZipEntry);
        bufferStream.writeTo(zipOutStream);
        zipOutStream.closeEntry();
        bufferStream.reset();

        for (Iterator<String> itCVId = customizationModel
            .getCustomizationVersionIds().iterator(); itCVId
            .hasNext();) {
          String cvId = itCVId.next();

          cParser.saveCustomizationVersion(bufferStream,
              customizationModel.getCustomizationVersion(cvId));
          ZipEntry cvZipEntry = new ZipEntry(cParser
              .getCustomizationVersionFileName(cvId));
          zipOutStream.putNextEntry(cvZipEntry);
          bufferStream.writeTo(zipOutStream);
          zipOutStream.closeEntry();
View Full Code Here

      }
      FeatureModel fm = (FeatureModel) featureModelNGObject.getInterface(de.FeatureModellingTool.FeatureModel.Manager.FEATURE_MODEL_INTERFACE);
            ConstraintModel cm = (ConstraintModel) featureModelNGObject.getInterface(de.FeatureModellingTool.FeatureModel.Manager.CONSTRAINT_MODEL_INTERFACE);
            InteractionModel im = (InteractionModel) featureModelNGObject.getInterface(de.FeatureModellingTool.FeatureModel.Manager.INTERACTION_MODEL_INTERFACE);
            //gh start
            CustomizationModel customizationModel = (CustomizationModel) featureModelNGObject.getInterface(de.FeatureModellingTool.FeatureModel.Manager.CUSTOMIZATION_MODEL_INTERFACE);
            //gh end
            String index =  fm.getName();
            index += " "+drawingViews.length;
            for(int i = 0 ;i<drawingViews.length ;i++){
              index += " " + drawingViews[i].getDrawing().getTitle();
View Full Code Here

                FeatureModel fm = (FeatureModel) featureModelNGObject.getInterface(de.FeatureModellingTool.FeatureModel.Manager.FEATURE_MODEL_INTERFACE);
                ConstraintModel cm = (ConstraintModel) featureModelNGObject.getInterface(de.FeatureModellingTool.FeatureModel.Manager.CONSTRAINT_MODEL_INTERFACE);
                InteractionModel im = (InteractionModel) featureModelNGObject.getInterface(de.FeatureModellingTool.FeatureModel.Manager.INTERACTION_MODEL_INTERFACE);
                //gh start
                CustomizationModel customizationModel = (CustomizationModel) featureModelNGObject.getInterface(de.FeatureModellingTool.FeatureModel.Manager.CUSTOMIZATION_MODEL_INTERFACE);
                //gh end

                //begin д����Ŀ�����ļ�
                StorableOutput textOutput = new StorableOutput(bufferStream);

                textOutput.writeString(fm.getName());
                textOutput.writeInt(drawingViews.length);
                for (int i = 0; i < drawingViews.length; i++) {
                    textOutput.writeString(drawingViews[i].getDrawing().getTitle());
                }
                textOutput.close();

                ZipEntry indexZipEntry = new ZipEntry("index.txt");
                zipOutStream.putNextEntry(indexZipEntry);
                bufferStream.writeTo(zipOutStream);
                zipOutStream.closeEntry();
                //end д����Ŀ�����ļ�

                bufferStream.reset();


                //begin д������ģ�������ļ�
                FmdlParser parser = new FmdlParserPrototype();
                parser.saveFmdl(bufferStream, fm);
                ZipEntry fmZipEntry = new ZipEntry(fm.getName() + ".fm");
                zipOutStream.putNextEntry(fmZipEntry);
                bufferStream.writeTo(zipOutStream);
                zipOutStream.closeEntry();
                //end д������ģ�������ļ�

                bufferStream.reset();

                //begin д��Լ��ģ�������ļ�
                parser.saveCmdl(bufferStream, cm, fm);
                ZipEntry cmZipEntry = new ZipEntry(fm.getName() + ".cm");
                zipOutStream.putNextEntry(cmZipEntry);
                bufferStream.writeTo(zipOutStream);
                zipOutStream.closeEntry();
                //end д��Լ��ģ�������ļ�

                bufferStream.reset();

                //begin д�뽻��ģ�������ļ�
                parser.saveImdl(bufferStream, im, fm);
                ZipEntry imZipEntry = new ZipEntry(fm.getName() + ".im");
                zipOutStream.putNextEntry(imZipEntry);
                bufferStream.writeTo(zipOutStream);
                zipOutStream.closeEntry();
                //end д�뽻��ģ�������ļ�

                bufferStream.reset();

                //begin д����Ŀ��ͼ�ļ�
                AdaptedStandardStorageFormat store = new AdaptedStandardStorageFormat();
                for (int i = 0; i < drawingViews.length; i++) {
                    store.store(bufferStream, drawingViews[i].getDrawing());
                    ZipEntry viewZipEntry = new ZipEntry((String) drawingViews[i].getDrawing().getTitle() + ".draw");
                    zipOutStream.putNextEntry(viewZipEntry);
                    bufferStream.writeTo(zipOutStream);
                    zipOutStream.closeEntry();

                    bufferStream.reset();
                }
                //end д����Ŀ��ͼ�ļ�

                bufferStream.reset();

                //begin д��������Ϣ
                GroupMap informationMap = (GroupMap) ProjectManagerImplementation.this.getContext().getValue(de.FeatureModellingTool.ProjectManager.ConstantDefinition.INFOMATION_MAP);

                Iterator iterator = informationMap.keySet().iterator();
                while (iterator.hasNext()) {
                    String id = (String) iterator.next();
                    Set set = informationMap.get(id);

                    if (set != null) {
                        Iterator valueIterator = set.iterator();
                        while (valueIterator.hasNext()) {
                            Drawing drawing = (Drawing) valueIterator.next();
                            store.store(bufferStream, drawing);
                            ZipEntry drawingEntry = new ZipEntry(id + "\\" + drawing.getTitle() + ".draw");
                            zipOutStream.putNextEntry(drawingEntry);
                            bufferStream.writeTo(zipOutStream);
                            zipOutStream.closeEntry();

                            bufferStream.reset();
                        }
                    }
                }
                //end д��������Ϣ

                //begin д�붨����Ϣ
                //gh start
                CmdlParser cParser = new CmdlParserPrototype();

                cParser.saveCustomizationModel(bufferStream , customizationModel);
                ZipEntry customizationZipEntry = new ZipEntry("customization_index.txt");
                zipOutStream.putNextEntry(customizationZipEntry);
                bufferStream.writeTo(zipOutStream);
                zipOutStream.closeEntry();
                bufferStream.reset();

                for (Iterator<String> itCVId = customizationModel.getCustomizationVersionIds().iterator() ; itCVId.hasNext() ; ) {
                  String cvId = itCVId.next();

                  cParser.saveCustomizationVersion(bufferStream , customizationModel.getCustomizationVersion(cvId));
                  ZipEntry cvZipEntry = new ZipEntry(cParser.getCustomizationVersionFileName(cvId));
                  zipOutStream.putNextEntry(cvZipEntry);
                  bufferStream.writeTo(zipOutStream);
                  zipOutStream.closeEntry();
View Full Code Here

TOP

Related Classes of de.FeatureModellingTool.Customize.CustomizationModel

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.