Package org.apache.hivemind.schema

Examples of org.apache.hivemind.schema.Schema


            _assembly.addPostProcessor(new ModuleDependencyChecker(md));

        if (md.getSchemas() != null)
            for (Iterator schemas = md.getSchemas().iterator(); schemas.hasNext();)
            {
                Schema schema = (Schema) schemas.next();

                _schemas.put(IdUtils.qualify(id, schema.getId()), schema);
            }

        _modules.put(id, module);

        _moduleDescriptors.put(id, md);
View Full Code Here


        }
    }

    private void setParametersSchema(ServicePointDescriptor spd, ServicePointImpl point)
    {
        Schema schema = spd.getParametersSchema();

        if (schema != null)
            point.setParametersSchema(schema);
        else if (spd.getParametersSchemaId() != null)
        {
View Full Code Here

    }

    private void setContributionsSchema(ConfigurationPointDescriptor cpd,
            ConfigurationPointImpl point)
    {
        Schema schema = cpd.getContributionsSchema();

        if (schema != null)
            point.setContributionsSchema(schema);
        else if (cpd.getContributionsSchemaId() != null)
        {
View Full Code Here

        }
    }

    private Schema getSchema(String schemaId, String referencingModule, Location reference)
    {
        Schema schema = (Schema) _schemas.get(schemaId);

        if (schema == null)
            _errorHandler
                    .error(_log, ImplMessages.unableToResolveSchema(schemaId), reference, null);
        else if (!schema.visibleToModule(referencingModule))
        {
            _errorHandler.error(
                    _log,
                    ImplMessages.schemaNotVisible(schemaId, referencingModule),
                    reference,
View Full Code Here

        if (_schemas == null)
            _schemas = new HashMap();

        String schemaId = schema.getId();

        Schema existing = getSchema(schemaId);

        if (existing != null)
        {
            _errorHandler.error(LOG, ParseMessages.duplicateSchema(
                    _moduleId + '.' + schemaId,
View Full Code Here

        String schemaId = cpd.getContributionsSchemaId();

        assertEquals("Fool", schemaId);

        Schema schema = md.getSchema(schemaId);

        assertNotNull(schema.getLocation());

        l = schema.getElementModel();
        assertEquals(2, l.size());

        ElementModel em = (ElementModel) l.get(0);

        assertEquals("foo1", em.getElementName());
View Full Code Here

    {
        ModuleDescriptor md = parse("GenericModule.xml");
        List l = md.getConfigurationPoints();
        assertEquals(1, l.size());
        ConfigurationPointDescriptor cpd = (ConfigurationPointDescriptor) l.get(0);
        Schema schema = md.getSchema(cpd.getContributionsSchemaId());

        l = schema.getElementModel();

        ElementModel em = (ElementModel) l.get(0);

        List rl = em.getRules();
View Full Code Here

        assertLoggedMessagePattern("Multiple contributions schemas specified for configuration MyConfiguration. Using locally defined schema \\(at ");

        ConfigurationPointDescriptor cpd = (ConfigurationPointDescriptor) md
                .getConfigurationPoints().get(0);
        Schema nestedSchema = cpd.getContributionsSchema();

        assertNotNull(nestedSchema);

        ElementModel em = (ElementModel) nestedSchema.getElementModel().get(0);

        assertEquals("myParameter", em.getElementName());
    }
View Full Code Here

        ModuleDescriptor md = parse("DuplicateSchemas.xml");

        assertLoggedMessagePattern("Multiple parameters schemas specified for service MyServiceFactory. Using locally defined schema \\(at ");

        ServicePointDescriptor spd = (ServicePointDescriptor) md.getServicePoints().get(0);
        Schema nestedSchema = spd.getParametersSchema();

        assertNotNull(nestedSchema);

        ElementModel em = (ElementModel) nestedSchema.getElementModel().get(0);

        assertEquals("myParameter", em.getElementName());
    }
View Full Code Here

    {
        ModuleDescriptor md = parse("EmbeddedConfigSchema.xml");

        List points = md.getConfigurationPoints();
        ConfigurationPointDescriptor cpd = (ConfigurationPointDescriptor) points.get(0);
        Schema s = cpd.getContributionsSchema();

        List l = s.getElementModel();

        assertEquals(1, l.size());

        ElementModel em = (ElementModel) l.get(0);
View Full Code Here

TOP

Related Classes of org.apache.hivemind.schema.Schema

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.