Package org.apache.hivemind.parse

Examples of org.apache.hivemind.parse.XmlResourceProcessor


    public void testPrivateSchema() throws Exception
    {
        Resource location = getResource("PrivateSchema.xml");
        DefaultErrorHandler eh = new DefaultErrorHandler();

        XmlResourceProcessor p = new XmlResourceProcessor(_resolver, eh);

        ModuleDescriptor md = p.processResource(location);

        SchemaImpl s = (SchemaImpl) md.getSchema("PrivateSchema");

        assertEquals(Visibility.PRIVATE, s.getVisibility());
    }
View Full Code Here


    {
        _registryDefinition = registryDefinition;
        _classResolver = classResolver;
        _errorHandler = errorHandler;
        _processor = new XmlModuleDescriptorProcessor(_registryDefinition, _errorHandler);
        _parser = new XmlResourceProcessor(_classResolver, _errorHandler);
    }
View Full Code Here

        throws Exception
    {
        Resource location = getResource(file);
        DefaultErrorHandler eh = new DefaultErrorHandler();

        XmlResourceProcessor p = new XmlResourceProcessor(_resolver, eh);

        ModuleDescriptor result = p.processResource(location);

        return result;
    }
View Full Code Here

        }
    }

    protected XmlResourceProcessor getResourceProcessor(ClassResolver resolver, ErrorHandler handler)
    {
        return new XmlResourceProcessor(resolver, handler);
    }
View Full Code Here

        MockControl ehc = newControl(ErrorHandler.class);
        ErrorHandler errorHandler = (ErrorHandler) ehc.getMock();

        RegistryAssemblyImpl assembly = new RegistryAssemblyImpl();

        XmlResourceProcessor parser = new XmlResourceProcessor(getClassResolver(), errorHandler);

        RegistryInfrastructureConstructor cons = new RegistryInfrastructureConstructor(
                errorHandler, LOG, assembly);

        ModuleDescriptor md = parser.processResource(getResource("Privates.xml"));

        cons.addModuleDescriptor(md);

        md = parser.processResource(getResource("ContributePrivate.xml"));

        ContributionDescriptor cd = (ContributionDescriptor) md.getContributions().get(0);

        ImplementationDescriptor id = (ImplementationDescriptor) md.getImplementations().get(0);
View Full Code Here

    public void testPrivateSchema() throws Exception
    {
        Resource location = getResource("PrivateSchema.xml");
        DefaultErrorHandler eh = new DefaultErrorHandler();

        XmlResourceProcessor p = new XmlResourceProcessor(_resolver, eh);

        ModuleDescriptor md = p.processResource(location);

        SchemaImpl s = (SchemaImpl) md.getSchema("PrivateSchema");

        assertEquals(Visibility.PRIVATE, s.getVisibility());
    }
View Full Code Here

    public void testPrivateSchema() throws Exception
    {
        Resource location = getResource("PrivateSchema.xml");
        DefaultErrorHandler eh = new DefaultErrorHandler();

        XmlResourceProcessor p = new XmlResourceProcessor(_resolver, eh);

        ModuleDescriptor md = p.processResource(location);

        SchemaImpl s = (SchemaImpl) md.getSchema("PrivateSchema");

        assertEquals(Visibility.PRIVATE, s.getVisibility());
    }
View Full Code Here

    protected ModuleDescriptor parse(String file) throws Exception
    {
        Resource location = getResource(file);
        DefaultErrorHandler eh = new DefaultErrorHandler();

        XmlResourceProcessor p = new XmlResourceProcessor(_resolver, eh);

        ModuleDescriptor result = p.processResource(location);

        return result;
    }
View Full Code Here

        RegistryAssemblyImpl assembly = new RegistryAssemblyImpl();

        ClassResolver resolver = new DefaultClassResolver();

        XmlResourceProcessor parser = new XmlResourceProcessor(resolver, errorHandler);

        RegistryInfrastructureConstructor cons = new RegistryInfrastructureConstructor(
                errorHandler, LOG, assembly);

        ModuleDescriptor md = parser.processResource(getResource("Privates.xml"));

        cons.addModuleDescriptor(md);

        md = parser.processResource(getResource("ContributePrivate.xml"));

        ContributionDescriptor cd = (ContributionDescriptor) md.getContributions().get(0);

        ImplementationDescriptor id = (ImplementationDescriptor) md.getImplementations().get(0);
View Full Code Here

    public void testPrivateSchema() throws Exception
    {
        Resource location = getResource("PrivateSchema.xml");
        DefaultErrorHandler eh = new DefaultErrorHandler();

        XmlResourceProcessor p = new XmlResourceProcessor(_resolver, eh);

        ModuleDescriptor md = p.processResource(location);

        SchemaImpl s = (SchemaImpl) md.getSchema("PrivateSchema");

        assertEquals(Visibility.PRIVATE, s.getVisibility());
    }
View Full Code Here

TOP

Related Classes of org.apache.hivemind.parse.XmlResourceProcessor

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.