Examples of SchemaImpl


Examples of org.apache.hivemind.schema.impl.SchemaImpl

        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

Examples of org.apache.hivemind.schema.impl.SchemaImpl

     */
    private void addSchemas(XmlModuleDefinitionImpl module, ModuleDescriptor md)
    {
        for (Iterator schemas = md.getSchemas().iterator(); schemas.hasNext();)
        {
            SchemaImpl schema = (SchemaImpl) schemas.next();

            module.addSchema(schema.getId(), schema);
        }
    }
View Full Code Here

Examples of org.apache.hivemind.schema.impl.SchemaImpl

     * Tests if a schema referenced by id from a configuration point is resolved correctly, if it is
     * defined in another module.
     */
    public void testSchemaResolving()
    {
        SchemaImpl schema = new SchemaImpl("module");
        schema.setId("Baz");

        DefaultErrorHandler errorHandler = new DefaultErrorHandler();
        RegistryDefinition definition = new RegistryDefinitionImpl();

        ModuleDescriptor fooBar = new ModuleDescriptor(null, errorHandler);
View Full Code Here

Examples of org.apache.hivemind.schema.impl.SchemaImpl

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

        Log log = LogFactory.getLog(XmlExtensionResolver.class);

        SchemaImpl schema = new SchemaImpl("foo.bar");
        schema.setId("Baz");
        schema.setVisibility(Visibility.PRIVATE);

        RegistryDefinition definition = new RegistryDefinitionImpl();

        Location l = newLocation();
View Full Code Here

Examples of org.apache.hivemind.schema.impl.SchemaImpl

    private void beginSchema(String elementName)
    {
        if (elementName.equals("element"))
        {
            SchemaImpl schema = (SchemaImpl) peekObject();

            schema.addElementModel(enterElement(elementName));
            return;
        }

        unexpectedElement(elementName);
    }
View Full Code Here

Examples of org.apache.hivemind.schema.impl.SchemaImpl

        pop();
    }

    private void endSchema()
    {
        SchemaImpl schema = (SchemaImpl) peekObject();

        schema.setAnnotation(peekContent());
       
        try
        {
            schema.validateKeyAttributes();
        }
        catch (ApplicationRuntimeException e)
        {
            _errorHandler.error(LOG, ParseMessages.invalidElementKeyAttribute(schema.getId(), e), e
                    .getLocation(), e);
        }

    }
View Full Code Here

Examples of org.apache.hivemind.schema.impl.SchemaImpl

    private void enterEmbeddedConfigurationPointSchema(String elementName)
    {
        ConfigurationPointDescriptor cpd = (ConfigurationPointDescriptor) peekObject();

        SchemaImpl schema = new SchemaImpl(_moduleDescriptor.getModuleId());

        processRootElementClassName(schema);

        push(elementName, schema, STATE_SCHEMA);

        if (cpd.getContributionsSchemaId() != null)
        {
            cpd.setContributionsSchemaId(null);
            cpd.setContributionsSchema(schema);
            _errorHandler.error(LOG, ParseMessages.multipleContributionsSchemas(cpd.getId(), schema
                    .getLocation()), schema.getLocation(), null);
        }
        else
            cpd.setContributionsSchema(schema);

        checkAttributes("schema{embedded}");
View Full Code Here

Examples of org.apache.hivemind.schema.impl.SchemaImpl

    }

    private void enterParametersSchema(String elementName)
    {
        ServicePointDescriptor spd = (ServicePointDescriptor) peekObject();
        SchemaImpl schema = new SchemaImpl(_moduleDescriptor.getModuleId());
       
        processRootElementClassName(schema);

        push(elementName, schema, STATE_SCHEMA);

        checkAttributes();

        if (spd.getParametersSchemaId() != null)
        {
            spd.setParametersSchemaId(null);
            spd.setParametersSchema(schema);
            _errorHandler.error(LOG, ParseMessages.multipleParametersSchemas(spd.getId(), schema
                    .getLocation()), schema.getLocation(), null);
        }
        else
            spd.setParametersSchema(schema);
    }
View Full Code Here

Examples of org.apache.hivemind.schema.impl.SchemaImpl

    }

    private void enterSchema(String elementName)
    {
        SchemaImpl schema = new SchemaImpl(_moduleDescriptor.getModuleId());

        push(elementName, schema, STATE_SCHEMA);

        checkAttributes();

        String id = getValidatedAttribute("id", ID_PATTERN, "id-format");

        schema.setId(id);

        Visibility visibility = (Visibility) getEnumAttribute("visibility", VISIBILITY_MAP);

        if (visibility != null)
            schema.setVisibility(visibility);
       
        processRootElementClassName(schema);

        _moduleDescriptor.addSchema(schema);
    }
View Full Code Here

Examples of org.apache.hivemind.schema.impl.SchemaImpl

        em.addRule(rule);

        em.addRule(new InvokeParentRule("addElement"));

        SchemaImpl schema = new SchemaImpl();
        schema.addElementModel(em);
        schema.setModule(m);

        SchemaProcessorImpl p = new SchemaProcessorImpl(null, schema);

        ElementImpl element = new ElementImpl();
        element.setElementName("fred");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.