Examples of FeatureModel


Examples of de.FeatureModellingTool.FeatureModel

         FeatureEditor fe = de.FeatureModellingTool.FeatureModel.Manager.getFeatureEditor(fm);
         FeatureModelPropertyEditor fmpe = de.FeatureModellingTool.FeatureModel.Manager.getFeatureModelPropertyEditor(fm);
         **/

        //new way
        FeatureModel fm = (FeatureModel) fcomponent.getInterface(de.FeatureModellingTool.FeatureModel.Manager.FEATURE_MODEL_INTERFACE);
        FeatureModelEditor fme = (FeatureModelEditor) fcomponent.getInterface(de.FeatureModellingTool.FeatureModel.Manager.FEATURE_MODEL_EDITOR_INTERFACE);
        FeatureEditor fe = (FeatureEditor) fcomponent.getInterface(de.FeatureModellingTool.FeatureModel.Manager.FEATURE_EDITOR_INTERFACE);
        FeatureModelPropertyEditor fmpe = (FeatureModelPropertyEditor) fcomponent.getInterface(de.FeatureModellingTool.FeatureModel.Manager.FEATURE_MODEL_PROPERTY_EDITOR_INTERFACE);
        //

View Full Code Here

Examples of de.FeatureModellingTool.FeatureModel

        fmt.output(doc, outStream);
    }

    public void openCmdl(InputStream inputstream, FComponent featureModel) throws IOException, JDOMException {

        FeatureModel fm = (FeatureModel) featureModel.getInterface(de.FeatureModellingTool.FeatureModel.Manager.FEATURE_MODEL_INTERFACE);
        ConstraintModel cm = (ConstraintModel) featureModel.getInterface(de.FeatureModellingTool.FeatureModel.Manager.CONSTRAINT_MODEL_INTERFACE);
        ConstraintModelEditor cme = (ConstraintModelEditor) featureModel.getInterface(de.FeatureModellingTool.FeatureModel.Manager.CONSTRAINT_MODEL_EDITOR_INTERFACE);
        CompositeConstraintEditor plce = (CompositeConstraintEditor) featureModel.getInterface(de.FeatureModellingTool.FeatureModel.Manager.PL_CONSTRAINT_EDITOR_INTERFACE);
        GroupConstraintEditor gce = (GroupConstraintEditor) featureModel.getInterface(de.FeatureModellingTool.FeatureModel.Manager.GROUP_CONSTRAINT_EDITOR_INTERFACE);
        VPConstraintEditor vpce = (VPConstraintEditor) featureModel.getInterface(de.FeatureModellingTool.FeatureModel.Manager.VP_CONSTRAINT_EDITOR_INTERFACE);

        //

        Namespace cmd = Namespace.getNamespace("cmd", "http://sei.pku.edu.cn/DomainEngineering/constraintmodel");

        SAXBuilder saxBuilder = new SAXBuilder(false);
        Document doc = saxBuilder.build(inputstream);

        Element root = doc.getRootElement();

        //��ȡԼ����Ϣ
        Element constraintList = root.getChild("constraintList", cmd);
        Iterator constraintIterator = constraintList.getChildren("constraint", cmd).iterator();

        while (constraintIterator.hasNext()) {
            Element constraintElement = (Element) constraintIterator.next();

            String id = constraintElement.getAttributeValue("id");
            CompositeConstraint constraint = cme.addCompositeConstraint(id);

            plce.setPLType(constraint, CompositeConstraintType.getInstance(constraintElement.getChild("plType").getTextNormalize()));
            plce.setSourceType(constraint, CompositeConstraintPortType.getInstance(constraintElement.getChild("sourceType").getTextNormalize()));
            plce.setSinkType(constraint, CompositeConstraintPortType.getInstance(constraintElement.getChild("sinkType").getTextNormalize()));
        }

        Element compositeConstraintList = constraintList.getChild("compositeConstraintList", cmd);

        if (compositeConstraintList != null) {
            Iterator compositeConstraintIterator = compositeConstraintList.getChildren("compositeConstraint", cmd).iterator();

            while (compositeConstraintIterator.hasNext()) {
                Element constraintElement = (Element) compositeConstraintIterator.next();

                String id = constraintElement.getAttributeValue("id");
                CompositeConstraint constraint = cme.addCompositeConstraint(id);

                plce.setPLType(constraint, CompositeConstraintType.getInstance(constraintElement.getChild("plType").getTextNormalize()));
                plce.setSourceType(constraint, CompositeConstraintPortType.getInstance(constraintElement.getChild("sourceType").getTextNormalize()));
                plce.setSinkType(constraint, CompositeConstraintPortType.getInstance(constraintElement.getChild("sinkType").getTextNormalize()));

            }
        }

        Element groupConstraintList = constraintList.getChild("groupConstraintList", cmd);

        if (groupConstraintList != null) {
            Iterator groupConstraintIterator = groupConstraintList.getChildren("groupConstraint", cmd).iterator();

            while (groupConstraintIterator.hasNext()) {
                Element constraintElement = (Element) groupConstraintIterator.next();

                String id = constraintElement.getAttributeValue("id");
                GroupConstraint constraint = cme.addGroupConstraint(id);

                gce.setType(constraint, GroupConstraintType.getInstance(constraintElement.getChild("groupType").getTextNormalize()));
            }
        }

        Element vpConstraintList = constraintList.getChild("vpConstraintList", cmd);

        if (vpConstraintList != null) {
            Iterator vpConstraintIterator = vpConstraintList.getChildren("vpConstraint", cmd).iterator();

            while (vpConstraintIterator.hasNext()) {
                Element constraintElement = (Element) vpConstraintIterator.next();

                String id = constraintElement.getAttributeValue("id");
                VPConstraint constraint = cme.addVPConstraint(id);

                vpce.setType(constraint, VPConstraintType.getInstance(constraintElement.getChild("vpType").getTextNormalize()));
            }
        }

        //��ȡ��ϵ��Ϣ
        Element relationList = root.getChild("relationList", cmd);
        Iterator plRelationIterator = relationList.getChildren("plRelation", cmd).iterator();

        while (plRelationIterator.hasNext()) {
            Element plRelationElement = (Element) plRelationIterator.next();

            String id = plRelationElement.getAttributeValue("id");
            String constraintID = plRelationElement.getChild("constraintID").getTextNormalize();
            String featureID = plRelationElement.getChild("featureID").getTextNormalize();
            String isSource = plRelationElement.getChild("isSource").getTextNormalize();

            Element element = plRelationElement.getChild("modifier");
            String modifier = null;
            if (element != null) {
                modifier = element.getTextNormalize();
            } else {
                modifier = CFRModifier.Affirmation.getName();
            }

            CFRelation plRelation = cme.addCFRelation(id, fm.getFeature(featureID), cm.getConstraint(constraintID), Boolean.valueOf(isSource).booleanValue(), CFRModifier.getInstance(modifier));
        }
    }
View Full Code Here

Examples of de.FeatureModellingTool.FeatureModel

            CFRelation plRelation = cme.addCFRelation(id, fm.getFeature(featureID), cm.getConstraint(constraintID), Boolean.valueOf(isSource).booleanValue(), CFRModifier.getInstance(modifier));
        }
    }

    public void openImdl(InputStream inputstream, FComponent featureModel) throws IOException, JDOMException {
        FeatureModel fm = (FeatureModel) featureModel.getInterface(de.FeatureModellingTool.FeatureModel.Manager.FEATURE_MODEL_INTERFACE);
        InteractionModel im = (InteractionModel) featureModel.getInterface(de.FeatureModellingTool.FeatureModel.Manager.INTERACTION_MODEL_INTERFACE);
        InteractionModelEditor ime = (InteractionModelEditor) featureModel.getInterface(de.FeatureModellingTool.FeatureModel.Manager.INTERACTION_MODEL_EDITOR_INTERFACE);

        ResourceComponentEditor rce = (ResourceComponentEditor) featureModel.getInterface(de.FeatureModellingTool.FeatureModel.Manager.RESOURCE_COMPONENT_EDITOR_INTERFACE);
View Full Code Here

Examples of de.FeatureModellingTool.FeatureModel

         FeatureEditor fe = de.FeatureModellingTool.FeatureModel.Manager.getFeatureEditor(fm);
         FeatureModelPropertyEditor fmpe = de.FeatureModellingTool.FeatureModel.Manager.getFeatureModelPropertyEditor(fm);
         **/

        //new way
        FeatureModel fm = (FeatureModel) featureModel.getInterface(de.FeatureModellingTool.FeatureModel.Manager.FEATURE_MODEL_INTERFACE);
        FeatureModelEditor fme = (FeatureModelEditor) featureModel.getInterface(de.FeatureModellingTool.FeatureModel.Manager.FEATURE_MODEL_EDITOR_INTERFACE);
        FeatureEditor fe = (FeatureEditor) featureModel.getInterface(de.FeatureModellingTool.FeatureModel.Manager.FEATURE_EDITOR_INTERFACE);
        FeatureModelPropertyEditor fmpe = (FeatureModelPropertyEditor) featureModel.getInterface(de.FeatureModellingTool.FeatureModel.Manager.FEATURE_MODEL_PROPERTY_EDITOR_INTERFACE);
        //

View Full Code Here

Examples of de.FeatureModellingTool.FeatureModel

        fmt.output(doc, outStream);
    }

    public void openCmdl(InputStream inputstream, FComponent featureModel) throws IOException, JDOMException {

        FeatureModel fm = (FeatureModel) featureModel.getInterface(de.FeatureModellingTool.FeatureModel.Manager.FEATURE_MODEL_INTERFACE);
        ConstraintModel cm = (ConstraintModel) featureModel.getInterface(de.FeatureModellingTool.FeatureModel.Manager.CONSTRAINT_MODEL_INTERFACE);
        ConstraintModelEditor cme = (ConstraintModelEditor) featureModel.getInterface(de.FeatureModellingTool.FeatureModel.Manager.CONSTRAINT_MODEL_EDITOR_INTERFACE);
        CompositeConstraintEditor plce = (CompositeConstraintEditor) featureModel.getInterface(de.FeatureModellingTool.FeatureModel.Manager.PL_CONSTRAINT_EDITOR_INTERFACE);
        GroupConstraintEditor gce = (GroupConstraintEditor) featureModel.getInterface(de.FeatureModellingTool.FeatureModel.Manager.GROUP_CONSTRAINT_EDITOR_INTERFACE);
        VPConstraintEditor vpce = (VPConstraintEditor) featureModel.getInterface(de.FeatureModellingTool.FeatureModel.Manager.VP_CONSTRAINT_EDITOR_INTERFACE);

        //

        Namespace cmd = Namespace.getNamespace("cmd", "http://sei.pku.edu.cn/DomainEngineering/constraintmodel");

        SAXBuilder saxBuilder = new SAXBuilder(false);
        Document doc = saxBuilder.build(inputstream);

        Element root = doc.getRootElement();

        //��ȡԼ����Ϣ
        Element constraintList = root.getChild("constraintList", cmd);
        Iterator constraintIterator = constraintList.getChildren("constraint", cmd).iterator();

        while (constraintIterator.hasNext()) {
            Element constraintElement = (Element) constraintIterator.next();

            String id = constraintElement.getAttributeValue("id");
            CompositeConstraint constraint = cme.addCompositeConstraint(id);

            plce.setPLType(constraint, CompositeConstraintType.getInstance(constraintElement.getChild("plType").getTextNormalize()));
            plce.setSourceType(constraint, CompositeConstraintPortType.getInstance(constraintElement.getChild("sourceType").getTextNormalize()));
            plce.setSinkType(constraint, CompositeConstraintPortType.getInstance(constraintElement.getChild("sinkType").getTextNormalize()));
        }

        Element compositeConstraintList = constraintList.getChild("compositeConstraintList", cmd);

        if (compositeConstraintList != null) {
            Iterator compositeConstraintIterator = compositeConstraintList.getChildren("compositeConstraint", cmd).iterator();

            while (compositeConstraintIterator.hasNext()) {
                Element constraintElement = (Element) compositeConstraintIterator.next();

                String id = constraintElement.getAttributeValue("id");
                CompositeConstraint constraint = cme.addCompositeConstraint(id);

                plce.setPLType(constraint, CompositeConstraintType.getInstance(constraintElement.getChild("plType").getTextNormalize()));
                plce.setSourceType(constraint, CompositeConstraintPortType.getInstance(constraintElement.getChild("sourceType").getTextNormalize()));
                plce.setSinkType(constraint, CompositeConstraintPortType.getInstance(constraintElement.getChild("sinkType").getTextNormalize()));

            }
        }

        Element groupConstraintList = constraintList.getChild("groupConstraintList", cmd);

        if (groupConstraintList != null) {
            Iterator groupConstraintIterator = groupConstraintList.getChildren("groupConstraint", cmd).iterator();

            while (groupConstraintIterator.hasNext()) {
                Element constraintElement = (Element) groupConstraintIterator.next();

                String id = constraintElement.getAttributeValue("id");
                GroupConstraint constraint = cme.addGroupConstraint(id);

                gce.setType(constraint, GroupConstraintType.getInstance(constraintElement.getChild("groupType").getTextNormalize()));
            }
        }

        Element vpConstraintList = constraintList.getChild("vpConstraintList", cmd);

        if (vpConstraintList != null) {
            Iterator vpConstraintIterator = vpConstraintList.getChildren("vpConstraint", cmd).iterator();

            while (vpConstraintIterator.hasNext()) {
                Element constraintElement = (Element) vpConstraintIterator.next();

                String id = constraintElement.getAttributeValue("id");
                VPConstraint constraint = cme.addVPConstraint(id);

                vpce.setType(constraint, VPConstraintType.getInstance(constraintElement.getChild("vpType").getTextNormalize()));
            }
        }

        //��ȡ��ϵ��Ϣ
        Element relationList = root.getChild("relationList", cmd);
        Iterator plRelationIterator = relationList.getChildren("plRelation", cmd).iterator();

        while (plRelationIterator.hasNext()) {
            Element plRelationElement = (Element) plRelationIterator.next();

            String id = plRelationElement.getAttributeValue("id");
            String constraintID = plRelationElement.getChild("constraintID").getTextNormalize();
            String featureID = plRelationElement.getChild("featureID").getTextNormalize();
            String isSource = plRelationElement.getChild("isSource").getTextNormalize();

            Element element = plRelationElement.getChild("modifier");
            String modifier = null;
            if (element != null) {
                modifier = element.getTextNormalize();
            } else {
                modifier = CFRModifier.Affirmation.getName();
            }

            CFRelation plRelation = cme.addCFRelation(id, fm.getFeature(featureID), cm.getConstraint(constraintID), Boolean.valueOf(isSource).booleanValue(), CFRModifier.getInstance(modifier));
        }
    }
View Full Code Here

Examples of de.FeatureModellingTool.FeatureModel

            CFRelation plRelation = cme.addCFRelation(id, fm.getFeature(featureID), cm.getConstraint(constraintID), Boolean.valueOf(isSource).booleanValue(), CFRModifier.getInstance(modifier));
        }
    }

    public void openImdl(InputStream inputstream, FComponent featureModel) throws IOException, JDOMException {
        FeatureModel fm = (FeatureModel) featureModel.getInterface(de.FeatureModellingTool.FeatureModel.Manager.FEATURE_MODEL_INTERFACE);
        InteractionModel im = (InteractionModel) featureModel.getInterface(de.FeatureModellingTool.FeatureModel.Manager.INTERACTION_MODEL_INTERFACE);
        InteractionModelEditor ime = (InteractionModelEditor) featureModel.getInterface(de.FeatureModellingTool.FeatureModel.Manager.INTERACTION_MODEL_EDITOR_INTERFACE);

        ResourceComponentEditor rce = (ResourceComponentEditor) featureModel.getInterface(de.FeatureModellingTool.FeatureModel.Manager.RESOURCE_COMPONENT_EDITOR_INTERFACE);
View Full Code Here

Examples of de.FeatureModellingTool.FeatureModel.FeatureModel

        if (drawingViewContainer != null) {
          drawingViews = drawingViewContainer.getAllDrawingViews();
        } else {
          drawingViews = new DrawingView[0];
        }
        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();
        }
        if (fileModel == null) {
View Full Code Here

Examples of de.FeatureModellingTool.FeatureModel.FeatureModel

            CustomizationVersionTreeNode cvtn = (CustomizationVersionTreeNode) getContext().getValue(INNER_SELECTEDNODE);
            if (cvtn == null || cvtn.getChildCount() > 0) {
                return;
            }

            FeatureModel fm = (FeatureModel) getContext().getValue("fm");
            FeatureEditor featureEditor = (FeatureEditor) getContext().getValue("fe");
            FeatureModelEditor fme = (FeatureModelEditor) getContext().getValue("fme");
            ConstraintModel cm = (ConstraintModel) getContext().getValue("cm");
            ConstraintModelEditor cme = (ConstraintModelEditor) getContext().getValue("cme");
            CompositeConstraintEditor cce = (CompositeConstraintEditor) getContext().getValue("cce");
View Full Code Here

Examples of de.FeatureModellingTool.FeatureModel.FeatureModel

        else
          drawingViews = new DrawingView[0];

        ByteArrayOutputStream bufferStream = new ByteArrayOutputStream();

        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 д�뽻��ģ�������ļ�
View Full Code Here

Examples of de.FeatureModellingTool.FeatureModel.FeatureModel

    @Override
    public String toString() {
  if (isVirtualRoot){
            String name = "";
           
            FeatureModel fm = getFeatureModel();
            if(fm != null){
                name = fm.getName();
            }
           
      return "FeatureModel: " + name;
        }
  else if (nodeType.equals(FeatureNode.NODE_TYPE_NORMAL))
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.