Package org.apache.tuscany.sca.contribution.processor

Examples of org.apache.tuscany.sca.contribution.processor.DefaultValidatingXMLInputFactory


       
        // Create a validation XML schema extension point
        ValidationSchemaExtensionPoint schemas = new DefaultValidationSchemaExtensionPoint();
              
        // Create a validating XML input factory
        XMLInputFactory validatingInputFactory = new DefaultValidatingXMLInputFactory(inputFactory, schemas, monitor);
        modelFactories.addFactory(validatingInputFactory);
       
        // Create StAX artifact processor extension point
        StAXArtifactProcessorExtensionPoint staxProcessors =
            registry.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class);
View Full Code Here


       
    public void testReadImplementation() throws Exception {
       
        ValidationSchemaExtensionPoint schemas = new DefaultValidationSchemaExtensionPoint();
        schemas.addSchema(getClass().getClassLoader().getResource("tuscany-sca.xsd").toString());
        XMLInputFactory validatingInputFactory = new DefaultValidatingXMLInputFactory(inputFactory, schemas, null);
        CompositeDocumentProcessor compositeDocumentProcessor = new CompositeDocumentProcessor(staxProcessor, validatingInputFactory, null, null);
       
        URL url = getClass().getResource("JavaScriptReference.composite");
        URI uri = URI.create("JavaScriptReference.composite");
        Composite composite = (Composite)compositeDocumentProcessor.read(null, uri, url);
View Full Code Here

       
    public void testReadBinding() throws Exception {
       
        ValidationSchemaExtensionPoint schemas = new DefaultValidationSchemaExtensionPoint();
        schemas.addSchema(getClass().getClassLoader().getResource("tuscany-sca.xsd").toString());
        XMLInputFactory validatingInputFactory = new DefaultValidatingXMLInputFactory(inputFactory, schemas, null);
        CompositeDocumentProcessor compositeDocumentProcessor = new CompositeDocumentProcessor(staxProcessor, validatingInputFactory, null, null);
       
        URL url = getClass().getResource("RMIBindingTest.composite");
        URI uri = URI.create("RMIBindingTest.composite");
        Composite composite = (Composite)compositeDocumentProcessor.read(null, uri, url);
View Full Code Here

        // Create a validation XML schema extension point
        ValidationSchemaExtensionPoint schemas = new DefaultValidationSchemaExtensionPoint();

        // Create a validating XML input factory
        XMLInputFactory validatingInputFactory = new DefaultValidatingXMLInputFactory(inputFactory, schemas, monitor);
        modelFactories.addFactory(validatingInputFactory);

        // Create StAX artifact processor extension point
        StAXArtifactProcessorExtensionPoint staxProcessors =
            registry.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class);
View Full Code Here

        outputFactory = modelFactories.getFactory(XMLOutputFactory.class);
       
        // create the validating input factory out here just so that the
        // monitor can be passed in
        ValidationSchemaExtensionPoint schemas = new DefaultValidationSchemaExtensionPoint();
        XMLInputFactory validatingInputFactory = new DefaultValidatingXMLInputFactory(inputFactory, schemas, monitor);
        modelFactories.addFactory(validatingInputFactory);
       
        // Get contribution workspace and assembly model factories
        workspaceFactory = modelFactories.getFactory(WorkspaceFactory.class);
        assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
View Full Code Here

    @Test
    public void testReadImplementation() throws Exception {
        ExtensionPointRegistry registry = new DefaultExtensionPointRegistry();
        ValidationSchemaExtensionPoint schemas = new DefaultValidationSchemaExtensionPoint(registry, new HashMap<String, String>());
        schemas.addSchema(getClass().getClassLoader().getResource(TUSCANY_11_XSD).toString());
        XMLInputFactory validatingInputFactory = new DefaultValidatingXMLInputFactory(inputFactory, schemas);
        DefaultFactoryExtensionPoint factories = new DefaultFactoryExtensionPoint(registry);
        factories.addFactory(validatingInputFactory);

        CompositeDocumentProcessor compositeDocumentProcessor =
            new CompositeDocumentProcessor(factories, staxProcessor);
View Full Code Here

    public void testReadBinding() throws Exception {

        ExtensionPointRegistry registry = new DefaultExtensionPointRegistry();
        ValidationSchemaExtensionPoint schemas = new DefaultValidationSchemaExtensionPoint(registry, new HashMap<String, String>());
        schemas.addSchema(getClass().getClassLoader().getResource(TUSCANY_11_XSD).toString());
        XMLInputFactory validatingInputFactory = new DefaultValidatingXMLInputFactory(inputFactory, schemas);
        DefaultFactoryExtensionPoint factories = new DefaultFactoryExtensionPoint(registry);
        factories.addFactory(validatingInputFactory);
        CompositeDocumentProcessor compositeDocumentProcessor =
            new CompositeDocumentProcessor(factories, staxProcessor);
View Full Code Here

       
    public void testReadImplementation() throws Exception {
       
        ValidationSchemaExtensionPoint schemas = new DefaultValidationSchemaExtensionPoint();
        schemas.addSchema(getClass().getClassLoader().getResource("tuscany-sca.xsd").toString());
        XMLInputFactory validatingInputFactory = new DefaultValidatingXMLInputFactory(inputFactory, schemas);
        CompositeDocumentProcessor compositeDocumentProcessor = new CompositeDocumentProcessor(staxProcessor, validatingInputFactory);
       
        URL url = getClass().getResource("JavaScriptReference.composite");
        URI uri = URI.create("JavaScriptReference.composite");
        Composite composite = (Composite)compositeDocumentProcessor.read(null, uri, url);
View Full Code Here

       
    public void testReadBinding() throws Exception {
       
        ValidationSchemaExtensionPoint schemas = new DefaultValidationSchemaExtensionPoint();
        schemas.addSchema(getClass().getClassLoader().getResource("tuscany-sca.xsd").toString());
        XMLInputFactory validatingInputFactory = new DefaultValidatingXMLInputFactory(inputFactory, schemas);
        CompositeDocumentProcessor compositeDocumentProcessor = new CompositeDocumentProcessor(staxProcessor, validatingInputFactory);
       
        URL url = getClass().getResource("RMIBindingTest.composite");
        URI uri = URI.create("RMIBindingTest.composite");
        Composite composite = (Composite)compositeDocumentProcessor.read(null, uri, url);
View Full Code Here

        // Create a validation XML schema extension point
        ValidationSchemaExtensionPoint schemas = registry.getExtensionPoint(ValidationSchemaExtensionPoint.class);
        schemas.addSchema(ReallySmallRuntimeBuilder.class.getClassLoader().getResource("tuscany-sca.xsd").toString());
       
        // Create a validating XML input factory
        XMLInputFactory validatingInputFactory = new DefaultValidatingXMLInputFactory(inputFactory, schemas);
       
        // Create STAX artifact processor extension point
        StAXArtifactProcessorExtensionPoint staxProcessors =
            registry.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class);
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.contribution.processor.DefaultValidatingXMLInputFactory

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.