Package org.apache.avalon.framework

Examples of org.apache.avalon.framework.Version


        {
            return null;
        }

        final String name = getName( tag );
        final Version version = getVersion( tag );
        final String lifestyle = getLifestyle( tag );
        final String type = getJavaClass().getFullyQualifiedName();
        final Properties properties = new AttributeTag( getJavaClass() ).getProperties();
        final String schema = new SchemaTag( getJavaClass() ).getConfigurationSchema();
        final InfoDescriptor info = new InfoDescriptor( name, type, version, lifestyle, schema, properties );
View Full Code Here


        if( type.indexOf( ":" ) > -1 )
        {
            return createReference( type );
        }
        final String versionString = service.getAttribute( "version", "1.0" );
        final Version version = buildVersion( versionString );
        return new ReferenceDescriptor( type, version );
    }
View Full Code Here

      final String classname, final Configuration info )
      throws BuildException
    {
        final String name =
          info.getChild( "name" ).getValue( null );
        final Version version =
          buildVersion( info.getChild( "version" ).getValue( "1.0" ) );
        final String schema =
          info.getChild( "schema" ).getValue( null );
        final Properties attributes =
            buildAttributes( info.getChild( "attributes" ) );
View Full Code Here

    */
    public ReferenceDescriptor createReference( String path )
      throws BuildException
    {
        final String type;
        final Version version;
        int index = path.indexOf(":");
        if( index > -1 )
        {
            type = path.substring( 0, index );
            version = buildVersion( path.substring( index + 1 ) );
View Full Code Here

        final Properties attributes =
            buildAttributes( info.getChild( "attributes" ) );
        final EntryDescriptor[] entries =
            buildEntries( info.getChild( "entries" ).getChildren("entry") );
        final String versionString = info.getChild( "version" ).getValue( "1.0" );
        final Version version = buildVersion( versionString );

        return new Service( new ReferenceDescriptor( classname, version ), entries, attributes );
    }
View Full Code Here

    }

    public void testCompliance()
    {
        ReferenceDescriptor ref = new ReferenceDescriptor( m_classname, m_version );
        ReferenceDescriptor any = new ReferenceDescriptor( m_classname, new Version( -1, 0, 0 ) );

        assertTrue( "anything matches explicit", any.matches( ref ) );
        assertFalse( "explicit does not match anything", ref.matches( any ) );
    }
View Full Code Here

    private ServiceDescriptor getService( DocletTag tag )
    {
        final String value = getNamedParameter( tag, TYPE_PARAM );
        final String type = resolveType( value );
        final String versionString = getNamedParameter( tag, VERSION_PARAM, null );
        final Version version = resolveVersion( versionString, value );
        final ReferenceDescriptor ref = new ReferenceDescriptor( type, version );
        return new ServiceDescriptor( ref, null );
    }
View Full Code Here

    private ServiceDescriptor buildService( final Configuration service )
        throws ConfigurationException
    {
        final String name = service.getAttribute( "name" );
        final String versionString = service.getAttribute( "version", "1.0" );
        final Version version = buildVersion( versionString );
        return new ServiceDescriptor( name, version );
    }
View Full Code Here

            System.err.println( message );
            return null;
        }

        final String name = block.getChild( "name" ).getValue( null );
        final Version version = buildVersion( block.getChild( "version" ).getValue() );
        final String schemaType = block.getChild( "schema-type" ).getValue( null );

        return new BlockDescriptor( name, classname, schemaType, version );
    }
View Full Code Here

TOP

Related Classes of org.apache.avalon.framework.Version

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.