Examples of SCADefinitionsDocumentProcessor


Examples of org.apache.tuscany.sca.definitions.xml.SCADefinitionsDocumentProcessor

        // Create document processors
        XMLInputFactory inputFactory = XMLInputFactory.newInstance();
        documentProcessors.addArtifactProcessor(new CompositeDocumentProcessor(staxProcessor, inputFactory));
        documentProcessors.addArtifactProcessor(new ComponentTypeDocumentProcessor(staxProcessor, inputFactory));
        documentProcessors.addArtifactProcessor(new ConstrainingTypeDocumentProcessor(staxProcessor, inputFactory));
        scaDefnDocProcessor = new SCADefinitionsDocumentProcessor(staxProcessors, staxProcessor, inputFactory, policyFactory);
        documentProcessors.addArtifactProcessor(scaDefnDocProcessor);
    }
View Full Code Here

Examples of org.apache.tuscany.sca.definitions.xml.SCADefinitionsDocumentProcessor

       
        // Create document processors
        documentProcessors.addArtifactProcessor(new CompositeDocumentProcessor(staxProcessor, inputFactory));
        documentProcessors.addArtifactProcessor(new ComponentTypeDocumentProcessor(staxProcessor, inputFactory));
        documentProcessors.addArtifactProcessor(new ConstrainingTypeDocumentProcessor(staxProcessor, inputFactory));
        scaDefnDocProcessor = new SCADefinitionsDocumentProcessor(staxProcessors, staxProcessor, inputFactory, policyFactory);
        documentProcessors.addArtifactProcessor(scaDefnDocProcessor);
       
        URL url = getClass().getResource("CalculatorComponent.constrainingType");
        URI uri = URI.create("CalculatorComponent.constrainingType");
        ConstrainingType constrainingType = (ConstrainingType)documentProcessor.read(null, uri, url);
View Full Code Here

Examples of org.apache.tuscany.sca.definitions.xml.SCADefinitionsDocumentProcessor

        // Create document processors
        XMLInputFactory inputFactory = XMLInputFactory.newInstance();
        documentProcessors.addArtifactProcessor(new CompositeDocumentProcessor(staxProcessor, inputFactory));
        documentProcessors.addArtifactProcessor(new ComponentTypeDocumentProcessor(staxProcessor, inputFactory));
        documentProcessors.addArtifactProcessor(new ConstrainingTypeDocumentProcessor(staxProcessor, inputFactory));
        scaDefnDocProcessor = new SCADefinitionsDocumentProcessor(staxProcessors, staxProcessor, inputFactory, policyFactory);
        documentProcessors.addArtifactProcessor(scaDefnDocProcessor);
    }
View Full Code Here

Examples of org.apache.tuscany.sca.definitions.xml.SCADefinitionsDocumentProcessor

       
        // Create document processors
        documentProcessors.addArtifactProcessor(new CompositeDocumentProcessor(staxProcessor, inputFactory));
        documentProcessors.addArtifactProcessor(new ComponentTypeDocumentProcessor(staxProcessor, inputFactory));
        documentProcessors.addArtifactProcessor(new ConstrainingTypeDocumentProcessor(staxProcessor, inputFactory));
        scaDefnDocProcessor = new SCADefinitionsDocumentProcessor(staxProcessors, staxProcessor, inputFactory, policyFactory);
        documentProcessors.addArtifactProcessor(scaDefnDocProcessor);
       
        URL url = getClass().getResource("CalculatorComponent.constrainingType");
        URI uri = URI.create("CalculatorComponent.constrainingType");
        ConstrainingType constrainingType = (ConstrainingType)documentProcessor.read(null, uri, url);
View Full Code Here

Examples of org.apache.tuscany.sca.definitions.xml.SCADefinitionsDocumentProcessor

        // Create Stax processors
        DefaultStAXArtifactProcessorExtensionPoint staxProcessors = new DefaultStAXArtifactProcessorExtensionPoint(new DefaultModelFactoryExtensionPoint());
        ExtensibleStAXArtifactProcessor staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, XMLInputFactory.newInstance(), XMLOutputFactory.newInstance());
        staxProcessors.addArtifactProcessor(new MockPolicyProcessor());
       
        scaDefnDocProcessor = new SCADefinitionsDocumentProcessor(staxProcessors,
                                                                  staxProcessor,
                                                                  inputFactory,
                                                                  policyFactory);
       
        URL url = getClass().getResource("test_definitions.xml");
View Full Code Here

Examples of org.apache.tuscany.sca.definitions.xml.SCADefinitionsDocumentProcessor

        // Start the runtime modules
        startModules(registry, modules);

        // Load the definitions.xml
        URLArtifactProcessorExtensionPoint documentProcessors = registry.getExtensionPoint(URLArtifactProcessorExtensionPoint.class);
        SCADefinitionsDocumentProcessor definitionsProcessor = (SCADefinitionsDocumentProcessor)documentProcessors.getProcessor(SCADefinitions.class);
        SCADefinitions definitions = loadDomainDefinitions(definitionsProcessor);
        List<PolicySet> domainPolicySets;
        if ( definitions != null ) {
            domainPolicySets = definitions.getPolicySets();
        } else {
View Full Code Here

Examples of org.apache.tuscany.sca.definitions.xml.SCADefinitionsDocumentProcessor

        documentProcessors.addArtifactProcessor(new ConstrainingTypeDocumentProcessor(staxProcessor, validatingInputFactory));

        // Create and register document processor for definitions.xml
        //TODO No XMLSchema validation for definitions.xml for now
        // as the XSD for it is not quite right yet
        SCADefinitionsDocumentProcessor definitionsDocumentProcessor =
            new SCADefinitionsDocumentProcessor(staxProcessors, staxProcessor, inputFactory, policyFactory);
        documentProcessors.addArtifactProcessor(definitionsDocumentProcessor);
        ModelResolver domainModelResolver = definitionsDocumentProcessor.getDomainModelResolver();

        // Create Model Resolver extension point
        ModelResolverExtensionPoint modelResolvers = registry.getExtensionPoint(ModelResolverExtensionPoint.class);

        // Create contribution package processor extension point
View Full Code Here

Examples of org.apache.tuscany.sca.definitions.xml.SCADefinitionsDocumentProcessor

        staxProcessors.addArtifactProcessor(compositeProcessor);

        JavaImplementationProcessor javaProcessor = new JavaImplementationProcessor(modelFactories);
        staxProcessors.addArtifactProcessor(javaProcessor)
       
        scaDefnDocProcessor = new SCADefinitionsDocumentProcessor(staxProcessors, staxProcessor, inputFactory, policyFactory);
    }
View Full Code Here

Examples of org.apache.tuscany.sca.policy.xml.SCADefinitionsDocumentProcessor

        factories.addFactory(policyFactory);
        SCABindingFactory scaBindingFactory = factories.getFactory(SCABindingFactory.class);
        factories.addFactory(scaBindingFactory);
        ContributionFactory contributionFactory = factories.getFactory(ContributionFactory.class);
       
        SCADefinitionsDocumentProcessor scaDocDefnProcessor =
            ReallySmallRuntimeBuilder.createSCADefinitionsDocProcessor(registry, policyFactory);
       
        // Create a contribution service
        contributionService = ReallySmallRuntimeBuilder.createContributionService(classLoader,
                                                                                  registry,
                                                                                  contributionFactory,
                                                                                  assemblyFactory,
                                                                                  policyFactory,
                                                                                  mapper,
                                                                                  scaDocDefnProcessor.getDomainModelResolver());

        // Create the ScopeRegistry
        scopeRegistry = ReallySmallRuntimeBuilder.createScopeRegistry(registry);
       
        // Create a composite builder
View Full Code Here

Examples of org.apache.tuscany.sca.policy.xml.SCADefinitionsDocumentProcessor

                                                                                   PolicyFactory policyFactory) {
        XMLInputFactory xmlFactory = registry.getExtensionPoint(XMLInputFactory.class);
        StAXArtifactProcessorExtensionPoint staxProcessors = registry.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class);
        ExtensibleStAXArtifactProcessor staxProcessor =
            new ExtensibleStAXArtifactProcessor(staxProcessors, xmlFactory, XMLOutputFactory.newInstance());
        SCADefinitionsDocumentProcessor scaDocDefnProcessor = new SCADefinitionsDocumentProcessor(staxProcessors,
                                                                                                  staxProcessor,
                                                                                                  xmlFactory,
                                                                                                  policyFactory);

        return scaDocDefnProcessor;
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.