Package org.apache.hivemind.schema

Examples of org.apache.hivemind.schema.Schema


            _referenceLocation = referenceLocation;
        }

        public void run()
        {
            Schema s = _registryAssembly.getSchema(_schemaId);

            if (s == null)
                _errorHandler.error(
                    LOG,
                    ParseMessages.unableToResolveSchema(_schemaId),
View Full Code Here


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

            Schema schema = factoryPoint.getParametersSchema();

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

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

        Occurances count = (Occurances) getEnumAttribute("parameters-occurs", OCCURS_MAP);
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

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

            Schema schema = factoryPoint.getParametersSchema();

            // Note: it's kind of a toss up whether logging should occur using the
            // id of the service being constructed, or of the factory being invoked.
            // Here, we're using the constructed service ... with the intent being that
            // users will enable debugging for the service (or search the logs for the service)
View Full Code Here

            _referenceLocation = referenceLocation;
        }

        public void run()
        {
            Schema s = _registryAssembly.getSchema(_schemaId);

            if (s == null)
                _errorHandler.error(
                    LOG,
                    ParseMessages.unableToResolveSchema(_schemaId),
View Full Code Here

    }

    public void testAddSchema()
    {
        RegistryAssemblyImpl ra = new RegistryAssemblyImpl(new DefaultErrorHandler());
        Schema s = (Schema) newMock(Schema.class);

        replayControls();

        ra.addSchema("foo.manchu", s);
View Full Code Here

    {
        RegistryAssemblyImpl ra = new RegistryAssemblyImpl(new DefaultErrorHandler());
        MockControl c1 = newControl(Schema.class);
        MockControl c2 = newControl(Schema.class);

        Schema s1 = (Schema) c1.getMock();
        Schema s2 = (Schema) c2.getMock();

        Resource r = new ClasspathResource(new DefaultClassResolver(), "/foo/bar");
        Location l1 = new LocationImpl(r, 20);
        Location l2 = new LocationImpl(r, 97);

        interceptLogging(ra.getClass().getName());

        s1.getLocation();
        c1.setReturnValue(l1);

        s2.getLocation();
        c2.setReturnValue(l2);

        replayControls();

        ra.addSchema("foo.bar", s1);
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.