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

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


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


    }

    @Test
    public void testReadImplementation() throws Exception {

        ValidationSchemaExtensionPoint schemas = new DefaultValidationSchemaExtensionPoint();
        schemas.addSchema(getClass().getClassLoader().getResource(TUSCANY_10_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

    }

    @Test
    public void testReadBinding() throws Exception {

        ValidationSchemaExtensionPoint schemas = new DefaultValidationSchemaExtensionPoint();
        schemas.addSchema(getClass().getClassLoader().getResource(TUSCANY_10_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

        // Register the ExtensionPointRegistry as an OSGi service
        Dictionary<Object, Object> props = new Hashtable<Object, Object>();
        registration = bundleContext.registerService(ExtensionPointRegistry.class.getName(), extensionPoints, props);

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

        // Use the runtime-enabled assembly factory
        modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
        assemblyFactory = new RuntimeAssemblyFactory();
View Full Code Here

    }

    @Test
    public void testReadImplementation() throws Exception {

        ValidationSchemaExtensionPoint schemas = new DefaultValidationSchemaExtensionPoint();
        schemas.addSchema(getClass().getClassLoader().getResource(TUSCANY_11_XSD).toString());
        XMLInputFactory validatingInputFactory = new DefaultValidatingXMLInputFactory(inputFactory, schemas, null);
        DefaultFactoryExtensionPoint factories = new DefaultFactoryExtensionPoint(new DefaultExtensionPointRegistry());
        factories.addFactory(validatingInputFactory);

        CompositeDocumentProcessor compositeDocumentProcessor =
View Full Code Here

    }

    @Test
    public void testReadBinding() throws Exception {

        ValidationSchemaExtensionPoint schemas = new DefaultValidationSchemaExtensionPoint();
        schemas.addSchema(getClass().getClassLoader().getResource(TUSCANY_11_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

            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

        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

        // Create a new XML input factory
        XMLInputFactory inputFactory = modelFactories.getFactory(XMLInputFactory.class);

        // Create a validation XML schema extension point
        ValidationSchemaExtensionPoint schemas = registry.getExtensionPoint(ValidationSchemaExtensionPoint.class);

        // Create a validating XML input factory
        XMLInputFactory validatingInputFactory = new DefaultValidatingXMLInputFactory(inputFactory, schemas, monitor);
        modelFactories.addFactory(validatingInputFactory);
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.