Package org.codehaus.loom.components.util.info

Examples of org.codehaus.loom.components.util.info.SchemaDescriptor


                                                   dependencies.length ) );
            getLogger().debug( message );
        }

        configuration = info.getChild( "block" );
        final SchemaDescriptor schema = buildConfigurationSchema(
            type.getName(), configuration );

        return new ComponentInfo( type, services, dependencies, schema );
    }
View Full Code Here


        if( "relax-ng".equals( schemaType ) )
        {
             schemaType = "http://relaxng.org/ns/structure/1.0";
        }
        final String location = LegacyUtil.getSchemaLocationFor( classname );
        return new SchemaDescriptor( location, schemaType );
    }
View Full Code Here

        final ServiceDescriptor[] services = buildServices( type );

        final DependencyDescriptor[] dependencies =
            buildDependencies( type );

        final SchemaDescriptor schema = buildConfigurationSchema( type );

        return new ComponentInfo( type,
                                  services,
                                  dependencies,
                                  schema );
View Full Code Here

            {
                return null;
            }
            final String location = attribute.getParameter( "location" );
            final String schemaType = attribute.getParameter( "type" );
            return new SchemaDescriptor( location, schemaType );
        }
        catch( NoSuchMethodException e )
        {
            return null;
        }
View Full Code Here

     * @return the BlockDescriptor
     */
    private static BlockDescriptor toBlockDescriptor(
        final ComponentInfo component )
    {
        final SchemaDescriptor schema = component.getConfigurationSchema();
        String schemaType = null;
        if( null != schema )
        {
            schemaType = schema.getType();
        }

        return new BlockDescriptor( null,
                                    component.getType().getName(),
                                    schemaType,
View Full Code Here

     */
    public boolean isValid( final ComponentProfile component,
                            final ClassLoader classLoader )
        throws ConfigurationException
    {
        final SchemaDescriptor schema = component.getInfo()
          .getConfigurationSchema();
        if( null == schema )
        {
            return true;
        }

        final String classname =
            component.getInfo().getType().getName();
        if( getLogger().isDebugEnabled() )
        {
            final String message =
                "Validating component " +
                component.getTemplate().getName() +
                " of type " +
                classname +
                " with schema " +
                schema.getLocation() +
                " of type " +
                schema.getType();
            getLogger().debug( message );
        }

        //Get the uri of configuration schema type
        try
        {
            final ConfigValidator validator = ComponentConfigUtil
              .getComponentConfigValidator( classname,
                                                          classLoader,
                                                          schema.getLocation(),
                                                          schema.getType() );
            if( null == validator )
            {
                final String message =
                    "Missing schema for component " +
                    component.getTemplate().getName() +
                    " of type " +
                    classname +
                    " with schema " +
                    schema.getLocation() +
                    " of type " +
                    schema.getType();
                getLogger().warn( message );
                return false;
            }
            final Configuration configuration = component.getTemplate()
                .getConfiguration();
View Full Code Here

TOP

Related Classes of org.codehaus.loom.components.util.info.SchemaDescriptor

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.