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

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


        // Create a new XML input factory
        XMLInputFactory inputFactory = XMLInputFactory.newInstance();

        // 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
View Full Code Here


        reader.parse(new InputSource(url.openStream()));
    }
       
    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");
View Full Code Here

        reader.parse(new InputSource(url.openStream()));
    }
       
    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");
View Full Code Here

        // Create a new XML input factory
        XMLInputFactory inputFactory = XMLInputFactory.newInstance();

        // 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
View Full Code Here

        reader.parse(new InputSource(url.openStream()));
    }
       
    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, null);
       
        URL url = getClass().getResource("JavaScriptReference.composite");
        URI uri = URI.create("JavaScriptReference.composite");
View Full Code Here

        reader.parse(new InputSource(url.openStream()));
    }
       
    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, null);
       
        URL url = getClass().getResource("RMIBindingTest.composite");
        URI uri = URI.create("RMIBindingTest.composite");
View Full Code Here

            return;
        }

        // Enable schema validation only of the logger level is FINE or higher
        if (isSchemaValidationEnabled()) {
            ValidationSchemaExtensionPoint schemas = registry.getExtensionPoint(ValidationSchemaExtensionPoint.class);
            if (schemas != null) {
                schemas.setEnabled(true);
            }
        }

        // Use the runtime-enabled assembly factory
        modelFactories = registry.getExtensionPoint(FactoryExtensionPoint.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 =
View Full Code Here

    @Test
    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

    }
       
    @Test
    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);
        DefaultFactoryExtensionPoint factories = new DefaultFactoryExtensionPoint(new DefaultExtensionPointRegistry());
        factories.addFactory(validatingInputFactory);
       
        CompositeDocumentProcessor compositeDocumentProcessor = new CompositeDocumentProcessor(factories , staxProcessor, null);
View Full Code Here

TOP

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

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.