Examples of CompositeModel


Examples of com.volantis.mcs.xml.schema.model.CompositeModel

                            .add(b)
                            .add(choice().add(c).add(d))
                            .add(bounded(e).optional())
                            .add(bounded(f).atLeastOne()));

            CompositeModel MIXED = choice().add(j).add(g).add(PCDATA);
            g.setContentModel(sequence()
                                   .add(bounded(h).optional())
                                   .add(bounded(i))
                                   .add(bounded(MIXED)));
        }
View Full Code Here

Examples of com.volantis.mcs.xml.schema.model.CompositeModel

            // b can contain any amount of a, c or PCDATA.
            b.setContentModel(bounded(choice().add(a).add(b).add(PCDATA)));

            // a can contain any amount of b or PCDATA but excludes itself from
            // all nested elements.
            CompositeModel a_content = choice().add(b).add(PCDATA);
            a_content.exclude(choice().add(a));
            a.setContentModel(bounded(a_content));
        }
View Full Code Here

Examples of com.volantis.mcs.xml.schema.model.CompositeModel

        // Define the form controls content set.
        // See http://www.w3.org/TR/2003/REC-xforms-20031014/slice8.html#id2625797
        FORM_CONTROLS.add(input).add(secret).add(textarea).add(submit)
                .add(select).add(select1);

        CompositeModel UI_COMMON = choice();

        // Add the form controls to the XHTML 2 Structural and Text content
        // sets.
        // See http://www.w3.org/TR/2006/WD-xhtml2-20060726/mod-xforms.html#XForms_Form_Controls
        xhtml2.STRUCTURAL.add(FORM_CONTROLS);
        xhtml2.TEXT.add(FORM_CONTROLS);

        // todo this has been commented out because the code cannot deal with
        // todo this correctly. Once LabelStrategy has been changed to collect
        // todo not just text but an OutputBuffer containing text inline markup
        // todo then the following can be uncommented.
//        // Add the XHTML 2 Text content set to UI_INLINE.
//        // See http://www.w3.org/TR/2006/WD-xhtml2-20060726/mod-xforms.html#XForms_Form_Controls
//         UI_INLINE.add(xhtml2.TEXT);
//
//        // Exclude any form controls from appearing within other form elements
//        // that can contain text.
//         UI_INLINE.exclude(FORM_CONTROLS);

        // (PCDATA|UI_INLINE)*
        ContentModel MIXED_UI_INLINE = bounded(
                choice().add(PCDATA).add(UI_INLINE));

        label.setContentModel(MIXED_UI_INLINE);

        // label, (UI_COMMON)*
        CompositeModel CONTROL_MODEL =
                sequence().add(label).add(bounded(UI_COMMON));

        INPUT_CONTENT.add(UI_COMMON);

        input.setContentModel(sequence().add(label).add(bounded(INPUT_CONTENT)));
        secret.setContentModel(CONTROL_MODEL);
        CompositeModel SUBMIT_CONTENT = choice().add(setvalue).add(UI_COMMON);
        submit.setContentModel(sequence().add(label).add(bounded(SUBMIT_CONTENT)));
        textarea.setContentModel(CONTROL_MODEL);

        // (PCDATA)
        value.setContentModel(PCDATA);
        setvalue.setContentModel(PCDATA);

        // label, value, (UI_COMMON)*
        item.setContentModel(
                sequence()
                        .add(label)
                        .add(value)
                        .add(bounded(UI_COMMON)));

        CompositeModel LIST_UI_COMMON = choice().add(item);

        // label, (LIST_UI_COMMON)+, (UI_COMMON)*
        CompositeModel SELECT_MODEL =
                sequence()
                        .add(label)
                        .add(bounded(LIST_UI_COMMON).atLeastOne())
                        .add(bounded(UI_COMMON));
        select.setContentModel(SELECT_MODEL);
        select1.setContentModel(SELECT_MODEL);

        // ====================================================================
        //             Group Module
        // ====================================================================

        // (FORM_CONTROLS|group|UI_COMMON)
        CompositeModel GROUP_CHOICE =
                choice().add(FORM_CONTROLS).add(group).add(UI_COMMON);
        group.setContentModel(
                sequence()
                        // label?,
                        .add(bounded(label).optional())
View Full Code Here

Examples of diva.graph.modular.CompositeModel

     *  by an entity.  Otherwise return null.
     *  @param composite A composite object.
     *  @return A model of a composite node.
     */
    public CompositeModel getCompositeModel(Object composite) {
        CompositeModel result = super.getCompositeModel(composite);

        if ((result == null) && composite instanceof Locatable
                && ((Locatable) composite).getContainer() instanceof Entity) {
            return _iconModel;
        }
View Full Code Here

Examples of org.apache.tuscany.sca.domain.model.CompositeModel

       
        return returnContributionModel;
    }
   
    private CompositeModel findComposite(QName compositeQName){
        CompositeModel returnCompositeModel = null;
       
        for(ContributionModel contributionModel : domainModel.getContributions().values()){
            returnCompositeModel = contributionModel.getComposites().get(compositeQName);
           
            if (returnCompositeModel != null){
View Full Code Here

Examples of org.apache.tuscany.sca.domain.model.CompositeModel

           
            // add the composites into the domain model
            for (Artifact artifact : contribution.getArtifacts()) {
                if (artifact.getModel() instanceof Composite) {
                    Composite composite = (Composite)artifact.getModel();
                    CompositeModel compositeModel = domainModelFactory.createComposite();
                    compositeModel.setCompositeQName(composite.getName());
                    compositeModel.setComposite(composite);
                    contributionModel.getComposites().put(compositeModel.getCompositeQName(), compositeModel);     
                }
            }                       
           
            // add the deployable composite info to the domain model
            for (Composite composite : contribution.getDeployables()) {
                CompositeModel compositeModel = contributionModel.getComposites().get(composite.getName());
               
                if (compositeModel != null){
                    contributionModel.getDeployableComposites().put(compositeModel.getCompositeQName(), compositeModel);
                } else {
                    throw new DomainException("Deployable composite name " +
                                              composite.getName() +
                                              " doesn't match a composite in the contribution " +
                                              contributionURI );
View Full Code Here

Examples of org.apache.tuscany.sca.domain.model.CompositeModel

    public DomainModel getDomainModel(){       
        return domainModel;
    }
   
    public String getComposite(QName compositeQName){
        CompositeModel compositeModel = domainModel.getDeployedComposites().get(compositeQName);
        Composite composite = compositeModel.getComposite();
       
        ExtensionPointRegistry registry = domainManagementRuntime.getExtensionPointRegistry();
       
        StAXArtifactProcessorExtensionPoint staxProcessors =
            registry.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class);
View Full Code Here

Examples of org.apache.tuscany.sca.domain.model.CompositeModel

                if (node != null) {
                    if (node.getLifecycleState() != LifecyleState.AVAILABLE){
                        throw new DomainException("Node " + nodeURI + " is already marked as active");
                    } else {
                        for (ContributionModel contributionModel : node.getContributions().values()){
                            CompositeModel compositeModel = contributionModel.getComposites().get(compositeQName);
                           
                            if (compositeModel != null){
                                contributionModel.getDeployedComposites().put(compositeQName, compositeModel);
                                node.getDeployedComposites().put(compositeQName, compositeModel);
                                domainModel.getDeployedComposites().put(compositeQName, compositeModel);
                                domainManagementRuntime.getCompositeBuilder().build(compositeModel.getComposite());
                                domainModel.getDomainLevelComposite().getIncludes().add(compositeModel.getComposite());
                               

                            }
                        }
                    }
View Full Code Here

Examples of org.apache.tuscany.sca.domain.model.CompositeModel

           
            // add the deployed composites back into the domain if they still exist
            // if they don't then the user will have to add and start any new composites manually
            for (QName compositeQName : deployedCompositeNames) {
                // make sure the composite still exists
                CompositeModel compositeModel = findComposite(compositeQName);
          
                if (compositeModel != null){
                    addToDomainLevelComposite(compositeModel.getCompositeQName());
                } else {
                    // the composite has been removed from the contribution
                    // by the update
                }
            }
View Full Code Here

Examples of org.apache.tuscany.sca.domain.model.CompositeModel

            if (contributionModel == null){
                throw new DomainException("Can't find contribution for composite " + compositeQName.toString());
            }
           
            // find the composite object from the contribution
            CompositeModel compositeModel = contributionModel.getComposites().get(compositeQName);
           
            if (compositeModel == null){
                throw new DomainException("Can't find composite model " + compositeQName.toString() +
                                          " in contribution " + contributionModel.getContributionURI());
           
           
            // build the contribution to create the services and references
            domainModel.getDeployedComposites().put(compositeQName, compositeModel);
            domainManagementRuntime.getCompositeBuilder().build(compositeModel.getComposite());               
            domainModel.getDomainLevelComposite().getIncludes().add(compositeModel.getComposite());
           
            NodeModel node = null;
           
            // find the node for the composite to run on
            if (nodeURI != null) {
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.