Package org.apache.hivemind.schema

Examples of org.apache.hivemind.schema.Schema


        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

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

        List points = md.getServicePoints();
        ServicePointDescriptor spd = (ServicePointDescriptor) points.get(0);
        Schema s = spd.getParametersSchema();

        List l = s.getElementModel();

        assertEquals(1, l.size());

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

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

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

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

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

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

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

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

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

        Occurances count = (Occurances) getEnumAttribute("occurs", OCCURS_MAP);

        if (count != null)
            cpd.setCount(count);

        Schema s = obtainSchema(getAttribute("schema-id"), cpd, "contributionsSchema");

        cpd.setContributionsSchema(s);

        md.addConfigurationPoint(cpd);
    }
View Full Code Here

        checkAttributes();

        spd.setId(getValidatedAttribute("id", ID_PATTERN, "id-format"));
        spd.setInterfaceClassName(getAttribute("interface"));

        Schema s = obtainSchema(getAttribute("parameters-schema-id"), spd, "parametersSchema");

        spd.setParametersSchema(s);

        md.addServicePoint(spd);
    }
View Full Code Here

    {
        if (schemaId == null)
            return null;

        String fullId = qualify(schemaId);
        Schema reffed = _registryAssembly.getSchema(fullId);

        if (reffed != null)
            return reffed;

        // Not found! We don't know what order modules are parsed in,
View Full Code Here

        }
    }

    public void addSchema(String schemaId, Schema schema)
    {
        Schema existing = getSchema(schemaId);

        if (existing != null)
        {
            _errorHandler.error(
                LOG,
View Full Code Here

            _factory =
                (ServiceInterceptorFactory) factoryPoint.getService(
                    ServiceInterceptorFactory.class);

            Schema schema = factoryPoint.getParametersSchema();

            SchemaProcessorImpl processor =
                new SchemaProcessorImpl(_contributingModule.getErrorHandler(), schema);

            processor.process(_parameters, _contributingModule);
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.