Examples of addModel()


Examples of org.apache.tuscany.sca.contribution.resolver.ModelResolver.addModel()

            // Add the deployed artifact model to the resolver
            DeployedArtifact artifact = this.contributionFactory.createDeployedArtifact();
            artifact.setURI(a.toString());
            artifact.setLocation(artifactURL.toString());
            contribution.getArtifacts().add(artifact);
            modelResolver.addModel(artifact);

            // Let the artifact processor read the artifact into a model
            Object model = this.artifactProcessor.read(contributionURL, a, artifactURL);
            if (model != null) {
                artifact.setModel(model);
View Full Code Here

Examples of org.apache.tuscany.sca.contribution.resolver.ModelResolver.addModel()

            Object model = this.artifactProcessor.read(contributionURL, a, artifactURL);
            if (model != null) {
                artifact.setModel(model);

                // Add the loaded model to the model resolver
                modelResolver.addModel(model);
               
                if ( model instanceof SCADefinitions ) {
                    contributionSCADefinitions.add((SCADefinitions)model);
                }
            }
View Full Code Here

Examples of org.apache.tuscany.sca.contribution.resolver.ModelResolver.addModel()

        assertFalse(inited);
        ProcessorContext context = new ProcessorContext(registry);
        ImportSDO importSDO = loader.read(reader, context);
        assertNotNull(importSDO);
        ModelResolver resolver = new TestModelResolver();
        resolver.addModel(new ClassReference(MockFactory.class), context);
        loader.resolve(importSDO, resolver, context);
        assertTrue(inited);
    }

    @BeforeClass
View Full Code Here

Examples of org.apache.tuscany.sca.contribution.resolver.ModelResolver.addModel()

                // Scan the contribution and list the artifacts contained in it
                boolean contributionMetadata = false;
                List<Artifact> artifacts = scanner.scan(contribution);
                for (Artifact artifact : artifacts) {
                    // Add the deployed artifact model to the contribution
                    modelResolver.addModel(artifact, context);

                    monitor.pushContext("Artifact: " + artifact.getURI());

                    Artifact oldArtifact = context.setArtifact(artifact);
                    try {
View Full Code Here

Examples of org.apache.tuscany.sca.contribution.resolver.ModelResolver.addModel()

                                                   context);
                        if (model != null) {
                            artifact.setModel(model);

                            // Add the loaded model to the model resolver
                            modelResolver.addModel(model, context);

                            // Merge contribution metadata into the contribution model
                            if (model instanceof ContributionMetadata) {
                                contributionMetadata = true;
                                ContributionMetadata c = (ContributionMetadata)model;
View Full Code Here

Examples of org.apache.tuscany.sca.contribution.resolver.ModelResolver.addModel()

    public void preResolve(Contribution contribution, ModelResolver resolver, ProcessorContext context)
        throws ContributionResolveException {
        // Resolve the contribution model itself
        ModelResolver contributionResolver = contribution.getModelResolver();
        contribution.setUnresolved(false);
        contributionResolver.addModel(contribution, context);

        // Resolve Exports
        resolveExports(contribution, contributionResolver, context);
        // Resolve Imports
        resolveImports(contribution, contributionResolver, context);
View Full Code Here

Examples of org.apache.tuscany.sca.interfacedef.wsdl.xml.WSDLModelResolver.addModel()

                    wsdlDefinition = wsdlFactory.createWSDLDefinition();
                    wsdlDefinition.setDefinition(readDefinition);
                    wsdlDefinition.setLocation(new URI(xmlString.getBaseURI()));
                   
                    ((WSDLInfo)xmlString).setWsdlDefintion(wsdlDefinition);
                    wsdlResolver.addModel(wsdlDefinition, processorContext);
                   
                } else {
                    InputStream inputStream = new ByteArrayInputStream(xmlString.getXmlString().getBytes());
                    InputSource inputSource = new InputSource(inputStream);
                    inputSource.setSystemId(xmlString.getBaseURI());
View Full Code Here

Examples of org.apache.tuscany.sca.xsd.xml.XSDModelResolver.addModel()

                   
                    XSDefinition xsdDefinition = xsdFactory.createXSDefinition();
                    xsdDefinition.setSchema(schema);
                   
                    ((XSDInfo)xmlString).setXsdDefinition(xsdDefinition);
                    xsdResolver.addModel(xsdDefinition, processorContext);
                }
            }
           
            // resolve
            for (XMLString xmlString : xmlMap.values()){
View Full Code Here

Examples of org.objectstyle.wolips.eogenerator.core.model.EOGeneratorModel.addModel()

    List<EOModel> exceptModels = new LinkedList<EOModel>();
    exceptModels.add(targetModel);
    List<EOModelReference> modelReferences = EOGeneratorModel.createModelReferencesForModelGroup(modelGroup, exceptModels);
    File modelFolder = URLUtils.cheatAndTurnIntoFile(targetModel.getModelURL());
    if (modelFolder != null) {
      eogenModel.addModel(new EOModelReference(new Path(modelFolder.getAbsolutePath())));
    }
    if (includeRefModels) {
      eogenModel.setLoadModelGroup(Boolean.FALSE);
      for (EOModelReference modelReference : modelReferences) {
        eogenModel.addRefModel(modelReference);
View Full Code Here

Examples of org.objectstyle.wolips.eomodeler.core.model.EOModelGroup.addModel()

    EOModel model = new EOModel(_modelName);
    EODatabaseConfig databaseConfig = new EODatabaseConfig("Default");
    databaseConfig.setAdaptorName(_adaptorName);
    model.addDatabaseConfig(databaseConfig);
    modelGroup.addModel(model);
    modelGroup.setEditingModelName(_modelName);

    ProjectFrameworkAdapter frameworkAdapter = (ProjectFrameworkAdapter)_parentResource.getProject().getAdapter(ProjectFrameworkAdapter.class);
    // add adaptor framework
    if (!"None".equals(_adaptorName) && !"".equals(_adaptorName)) {
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.