avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/info/src/java/org/apache/avalon/framework/tools/infobuilder LegacyBlockInfoCreator.java XMLInfoCreator.java
Date Sun, 29 Sep 2002 04:13:48 GMT
donaldp     2002/09/28 21:13:47

  Modified:    info/src/java/org/apache/avalon/framework/info
                        ComponentDescriptor.java ContextDescriptor.java
                        DependencyDescriptor.java EntryDescriptor.java
                        FeatureDescriptor.java LoggerDescriptor.java
                        ServiceDescriptor.java package.html
               info/src/java/org/apache/avalon/framework/tools/infobuilder
                        LegacyBlockInfoCreator.java XMLInfoCreator.java
  Added:       info/src/java/org/apache/avalon/framework/info
                        Attribute.java
  Removed:     info/src/java/org/apache/avalon/framework/info Tag.java
  Log:
  Tag --> Attribute
  
  Revision  Changes    Path
  1.7       +8 -8      jakarta-avalon-excalibur/info/src/java/org/apache/avalon/framework/info/ComponentDescriptor.java
  
  Index: ComponentDescriptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/info/src/java/org/apache/avalon/framework/info/ComponentDescriptor.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ComponentDescriptor.java	13 Sep 2002 15:54:08 -0000	1.6
  +++ ComponentDescriptor.java	29 Sep 2002 04:13:47 -0000	1.7
  @@ -18,9 +18,9 @@
    * </ul>
    *
    * <p>The ComponentDescriptor also includes an arbitrary set
  - * of tags about the component. Usually these are container
  - * specific tags that store information relevent to a particular
  - * requirement. The tag names should be stored with keys based
  + * of Attribute about the component. Usually these are container
  + * specific Attributes that store information relevent to a particular
  + * requirement. The Attribute names should be stored with keys based
    * on package name of container. ie You could use the following</p>
    *
    * <pre>
  @@ -39,8 +39,8 @@
    * ...
    *
    * ComponentDescriptor cd = ...;
  - * Tag lifestyle = cd.getTag( LIFESTYLE );
  - * Tag scope = cd.getTag( SCOPE );
  + * Attribute lifestyle = cd.getAttribute( LIFESTYLE );
  + * Attribute scope = cd.getAttribute( SCOPE );
    * </pre>
    *
    * @author <a href="mailto:peter at apache.org">Peter Donald</a>
  @@ -63,9 +63,9 @@
   
       public ComponentDescriptor( final String name,
                                   final String implementationKey,
  -                                final Tag[] tags )
  +                                final Attribute[] attribute )
       {
  -        super( tags );
  +        super( attribute );
           if( null == name )
           {
               throw new NullPointerException( "name" );
  
  
  
  1.10      +4 -4      jakarta-avalon-excalibur/info/src/java/org/apache/avalon/framework/info/ContextDescriptor.java
  
  Index: ContextDescriptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/info/src/java/org/apache/avalon/framework/info/ContextDescriptor.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ContextDescriptor.java	14 Sep 2002 08:03:42 -0000	1.9
  +++ ContextDescriptor.java	29 Sep 2002 04:13:47 -0000	1.10
  @@ -20,7 +20,7 @@
    * </ul>
    *
    * <p>Associated with each Context is a set of arbitrary
  - * tags that can be used to store extra information
  + * Attributes that can be used to store extra information
    * about Context requirements.</p>
    *
    * @author <a href="mailto:peter at apache.org">Peter Donald</a>
  @@ -49,9 +49,9 @@
        */
       public ContextDescriptor( final String type,
                                 final EntryDescriptor[] entrys,
  -                              final Tag[] tags )
  +                              final Attribute[] attribute )
       {
  -        super( tags );
  +        super( attribute );
   
           if( null == type )
           {
  
  
  
  1.8       +6 -6      jakarta-avalon-excalibur/info/src/java/org/apache/avalon/framework/info/DependencyDescriptor.java
  
  Index: DependencyDescriptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/info/src/java/org/apache/avalon/framework/info/DependencyDescriptor.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- DependencyDescriptor.java	13 Sep 2002 15:54:08 -0000	1.7
  +++ DependencyDescriptor.java	29 Sep 2002 04:13:47 -0000	1.8
  @@ -17,11 +17,11 @@
    * </ul>
    *
    * <p>Also associated with each dependency is a set of arbitrary
  - * tags that can be used to store extra information
  + * Attributes that can be used to store extra information
    * about dependency. See {@link ComponentDescriptor} for example
  - * of how to declare the container specific tags.</p>
  + * of how to declare the container specific Attributes.</p>
    *
  - * <p>Possible uses for the tags are to declare container
  + * <p>Possible uses for the Attributes are to declare container
    * specific constraints of component. For example a dependency on
    * a Corba ORB may also require that the Corba ORB contain the
    * TimeServer and PersistenceStateService at initialization. Or it
  @@ -56,9 +56,9 @@
       public DependencyDescriptor( final String key,
                                    final String service,
                                    final boolean optional,
  -                                 final Tag[] tags )
  +                                 final Attribute[] attributes )
       {
  -        super( tags );
  +        super( attributes );
   
           if( null == key )
           {
  
  
  
  1.7       +5 -5      jakarta-avalon-excalibur/info/src/java/org/apache/avalon/framework/info/EntryDescriptor.java
  
  Index: EntryDescriptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/info/src/java/org/apache/avalon/framework/info/EntryDescriptor.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- EntryDescriptor.java	14 Sep 2002 08:04:20 -0000	1.6
  +++ EntryDescriptor.java	29 Sep 2002 04:13:47 -0000	1.7
  @@ -23,9 +23,9 @@
    * naming scheme for other entrys.</p>
    *
    * <p>Also associated with each entry is a set of arbitrary
  - * tags that can be used to store extra information
  + * Attributes that can be used to store extra information
    * about entry. See {@link ComponentDescriptor} for example
  - * of how to declare the container specific tags.</p>
  + * of how to declare the container specific Attributes.</p>
    *
    * @author <a href="mailto:peter at apache.org">Peter Donald</a>
    * @version $Revision$ $Date$
  @@ -55,9 +55,9 @@
       public EntryDescriptor( final String key,
                               final String type,
                               final boolean optional,
  -                            final Tag[] tags )
  +                            final Attribute[] attribute )
       {
  -        super( tags );
  +        super( attribute );
   
           if( null == key )
           {
  
  
  
  1.5       +23 -23    jakarta-avalon-excalibur/info/src/java/org/apache/avalon/framework/info/FeatureDescriptor.java
  
  Index: FeatureDescriptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/info/src/java/org/apache/avalon/framework/info/FeatureDescriptor.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- FeatureDescriptor.java	13 Sep 2002 15:54:08 -0000	1.4
  +++ FeatureDescriptor.java	29 Sep 2002 04:13:47 -0000	1.5
  @@ -11,9 +11,9 @@
   
   /**
    * This is the Abstract class for all feature descriptors.
  - * Every descriptor has the capability of adding Tags
  - * of some kind. These Tags can then be interpreted by
  - * the container. The meaning of the specific tags will
  + * Every descriptor has the capability of adding Attributes
  + * of some kind. These Attributes can then be interpreted by
  + * the container. The meaning of the specific Attributes will
    * be defined by future specification documents.
    *
    * @author <a href="mailto:peter at apache.org">Peter Donald</a>
  @@ -23,48 +23,48 @@
       implements Serializable
   {
       /**
  -     * The arbitrary set of tags associated with Component.
  +     * The arbitrary set of Attributes associated with Component.
        */
  -    private final Tag[] m_tags;
  +    private final Attribute[] m_attributes;
   
       /**
  -     * Create a FeatureDescriptor with specific set of tags.
  +     * Create a FeatureDescriptor with specific set of attributes.
        *
  -     * @param tags the tags
  +     * @param attributes the attributes
        */
  -    protected FeatureDescriptor( final Tag[] tags )
  +    protected FeatureDescriptor( final Attribute[] attributes )
       {
  -        if( null == tags )
  +        if( null == attributes )
           {
  -            throw new NullPointerException( "tags" );
  +            throw new NullPointerException( "attributes" );
           }
   
  -        m_tags = tags;
  +        m_attributes = attributes;
       }
   
       /**
  -     * Return the tags associated with descriptor.
  +     * Return the attributes associated with descriptor.
        *
  -     * @return the tags associated with descriptor.
  +     * @return the attributes associated with descriptor.
        */
  -    public Tag[] getTags()
  +    public Attribute[] getAttributes()
       {
  -        return m_tags;
  +        return m_attributes;
       }
   
       /**
  -     * Return the tag with specified name.
  +     * Return the attribute with specified name.
        *
  -     * @return the tag with specified name.
  +     * @return the attribute with specified name.
        */
  -    public Tag getTag( final String name )
  +    public Attribute getAttribute( final String name )
       {
  -        for( int i = 0; i < m_tags.length; i++ )
  +        for( int i = 0; i < m_attributes.length; i++ )
           {
  -            final Tag tag = m_tags[ i ];
  -            if( tag.getName().equals( name ) )
  +            final Attribute attribute = m_attributes[ i ];
  +            if( attribute.getName().equals( name ) )
               {
  -                return tag;
  +                return attribute;
               }
           }
           return null;
  
  
  
  1.6       +4 -4      jakarta-avalon-excalibur/info/src/java/org/apache/avalon/framework/info/LoggerDescriptor.java
  
  Index: LoggerDescriptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/info/src/java/org/apache/avalon/framework/info/LoggerDescriptor.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- LoggerDescriptor.java	13 Sep 2002 15:54:08 -0000	1.5
  +++ LoggerDescriptor.java	29 Sep 2002 04:13:47 -0000	1.6
  @@ -14,7 +14,7 @@
    * The name "", designates the root logger.
    *
    * <p>Associated with each Logger is a set of arbitrary
  - * tags that can be used to store extra information
  + * Attributes that can be used to store extra information
    * about Logger requirements.</p>
    *
    * @author <a href="mailto:peter at apache.org">Peter Donald</a>
  @@ -31,9 +31,9 @@
        * @exception NullPointerException if name argument is null
        */
       public LoggerDescriptor( final String name,
  -                             final Tag[] tags )
  +                             final Attribute[] attribute )
       {
  -        super( tags );
  +        super( attribute );
           if( null == name )
           {
               throw new NullPointerException( "name" );
  
  
  
  1.7       +10 -10    jakarta-avalon-excalibur/info/src/java/org/apache/avalon/framework/info/ServiceDescriptor.java
  
  Index: ServiceDescriptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/info/src/java/org/apache/avalon/framework/info/ServiceDescriptor.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ServiceDescriptor.java	13 Sep 2002 15:54:08 -0000	1.6
  +++ ServiceDescriptor.java	29 Sep 2002 04:13:47 -0000	1.7
  @@ -13,14 +13,14 @@
    * class/interface implemented by component.
    *
    * <p>Also associated with each service is a set of arbitrary
  - * tags that can be used to store extra information
  + * Attributes that can be used to store extra information
    * about service. See {@link ComponentDescriptor} for example
  - * of how to declare the container specific tags.</p>
  + * of how to declare the container specific Attributes.</p>
    *
  - * <p>Possible uses for the tags are to declare a service
  + * <p>Possible uses for the Attributes are to declare a service
    * as "stateless", "pass-by-value", "remotable" or even to attach
  - * tags such as security or transaction constraints. These
  - * tags are container specific and should not be relied
  + * Attributes such as security or transaction constraints. These
  + * Attributes are container specific and should not be relied
    * upon to work in all containers.</p>
    *
    * @author <a href="mailto:peter at apache.org">Peter Donald</a>
  @@ -37,15 +37,15 @@
       private final String m_implementationKey;
   
       /**
  -     * Construct a service with specified name and tags.
  +     * Construct a service with specified name and Attributes.
        *
        * @param implementationKey the implementationKey of Service
  -     * @param tags the tags of service
  +     * @param attributes the attributes of service
        */
       public ServiceDescriptor( final String implementationKey,
  -                              final Tag[] tags )
  +                              final Attribute[] attributes )
       {
  -        super( tags );
  +        super( attributes );
   
           if( null == implementationKey )
           {
  
  
  
  1.3       +19 -19    jakarta-avalon-excalibur/info/src/java/org/apache/avalon/framework/info/package.html
  
  Index: package.html
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/info/src/java/org/apache/avalon/framework/info/package.html,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- package.html	13 Sep 2002 15:42:12 -0000	1.2
  +++ package.html	29 Sep 2002 04:13:47 -0000	1.3
  @@ -16,45 +16,45 @@
   <p><img src=doc-files/uml.gif border=0></p>
   
   <p>The info package allows many of the descriptors to contain
  -extra tags. These tags offer mechanisms via which
  +extra attributes. These attributes offer mechanisms via which
   the container can determine extra information about a
   component. This information may or may not determine the behaviour
   of the container towards the component.</p>
   
  -<p>For example a component that declared a tag "avalon.mx enabled=true"
  +<p>For example a component that declared a attribute "avalon.mx enabled=true"
   on a service it provided would indicate to the container that the service
   is part of the management interface of the component. However it is up to
  -the container to recognize the significance of the tag and if supported
  -the tag should be acted.</p>
  +the container to recognize the significance of the attribute and if supported
  +the attribute should be acted.</p>
   
   <p>To ease the development of containers and components this document will
  -document a set of common tags that are common across containers.
  +document a set of common attributes that are common across containers.
   However it should be noted that any container provider is allowed to create
  -a set of new tags that the particular container is capable of handling.
  -It should be noted that these tags will usually be in a container
  +a set of new attributes that the particular container is capable of handling.
  +It should be noted that these attributes will usually be in a container
   specific namespace.</p>
   
  -<p>The name of each tag is made up of two components, the namespace
  -and the local name of the tags. The namespace is separated from the
  -local name by either a ";" character or a "." character. So the tags
  +<p>The name of each attribute is made up of two components, the namespace
  +and the local name of the attributes. The namespace is separated from the
  +local name by either a ";" character or a "." character. So the attributes
   name "avalon:mx" is equivelent to "avalon.mx" as far as the container is
   concerned.</p>
   
   <p>Any container is welcome to create their own namespace in which they can
  -define any tags they see fit. The namespace should be equal to the
  +define any attributes they see fit. The namespace should be equal to the
   shortname of the container. For example if the
   <a href="http://jakarta.apache.org/avalon/phoenix">Phoenix</a> container wanted
  -to add extra tags it would use a namespace "phoenix" while the Fortress
  +to add extra attributes it would use a namespace "phoenix" while the Fortress
   container would use the "fortress" namespace.</p>
   
  -<p>Besides the namespace separator the tags name may only be made up of
  +<p>Besides the namespace separator the attributes name may only be made up of
   alphanumeric values, '_' and '-'. Neither the local name or the namespace may
   being with a numeric value.</p>
   
  -<p>The following is a table of standard tags. It is not necessary that
  -a container support all these tags (or any of them) however if the
  +<p>The following is a table of standard attributes. It is not necessary that
  +a container support all these attributes (or any of them) however if the
   container does support such notions it is recomended that they use the
  -following tags to enable interoperability between containers.</p>
  +following attributes to enable interoperability between containers.</p>
   
   <h3>Avalon namespace</h3>
   
  @@ -81,7 +81,7 @@
   <td>true or false</td>
   <td>false</td>
   <td>
  -  This tags can be applied at either the service or the component level.
  +  This attributes can be applied at either the service or the component level.
     It indicated that the particular artefact is stateless. This means that the
     order of the method calls will not have an effect on the results of call.
     If applied at the component level it indicates that all services are
  @@ -94,7 +94,7 @@
     <td>true or false</td>
     <td>false</td>
     <td>
  -  This tags can be applied at the service level. If true, it indicates
  +  This attributes can be applied at the service level. If true, it indicates
     that the parameters passed to methods of service are not modified by the
     service.
     </td>
  @@ -105,7 +105,7 @@
     <td>comma separated list of features</td>
     <td>false</td>
     <td>
  -  This tags can be applied at the service level. If true, it indicates
  +  This attributes can be applied at the service level. If true, it indicates
     that the parameters passed to methods of service are not modified by the
     service.
     </td>
  
  
  
  1.1                  jakarta-avalon-excalibur/info/src/java/org/apache/avalon/framework/info/Attribute.java
  
  Index: Attribute.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included with this distribution in
   * the LICENSE.txt file.
   */
  package org.apache.avalon.framework.info;
  
  import java.io.Serializable;
  import java.util.Properties;
  
  /**
   * Attributes are the mechanism via which the Avalon Component model
   * is extended. Each Attribute is made up of
   * <ul>
   *   <li>name: the name of the Attribute</li>
   *   <li>parameters: a set of key-value pairs specifying parameters for Attribute</li>
   * </ul>
   *
   * @author <a href="mailto:peter at apache.org">Peter Donald</a>
   * @version $Revision: 1.1 $ $Date: 2002/09/29 04:13:47 $
   */
  public final class Attribute
      implements Serializable
  {
      private static final String[] EMPTY_SET = new String[ 0 ];
  
      /**
       * The name of the Attribute.
       */
      private final String m_name;
  
      /**
       * The arbitrary set of parameters associated with the Attribute.
       */
      private final Properties m_parameters;
  
      /**
       * Create a Attribute with specified name and parameters.
       *
       * @param name the Attribute name
       * @param parameters the Attribute parameters
       */
      public Attribute( final String name,
                            final Properties parameters )
      {
          if( null == name )
          {
              throw new NullPointerException( "name" );
          }
          if( null == parameters )
          {
              throw new NullPointerException( "parameters" );
          }
  
          m_name = name;
          m_parameters = parameters;
      }
  
      /**
       * Return the name of the Attribute.
       *
       * @return the name of the Attribute.
       */
      public String getName()
      {
          return m_name;
      }
  
      /**
       * Return the parameter for specified key.
       *
       * @return the parameter for specified key.
       */
      public String getParameter( final String key )
      {
          if( null == m_parameters )
          {
              return null;
          }
          else
          {
              return m_parameters.getProperty( key );
          }
      }
  
      /**
       * Return the parameter for specified key, or defaultValue if unspecified.
       *
       * @return the parameter for specified key, or defaultValue if unspecified.
       */
      public String getParameter( final String key,
                                  final String defaultValue )
      {
          if( null == m_parameters )
          {
              return defaultValue;
          }
          else
          {
              return m_parameters.getProperty( key, defaultValue );
          }
      }
  
      /**
       * Returns an array of parameter names available under this Attribute.
       *
       * @return an array of parameter names available under this Attribute.
       */
      public String[] getParameterNames()
      {
          if( null == m_parameters )
          {
              return EMPTY_SET;
          }
          else
          {
              return (String[])m_parameters.keySet().toArray( EMPTY_SET );
          }
      }
  }
  
  
  
  1.2       +12 -12    jakarta-avalon-excalibur/info/src/java/org/apache/avalon/framework/tools/infobuilder/LegacyBlockInfoCreator.java
  
  Index: LegacyBlockInfoCreator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/info/src/java/org/apache/avalon/framework/tools/infobuilder/LegacyBlockInfoCreator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- LegacyBlockInfoCreator.java	14 Sep 2002 04:22:25 -0000	1.1
  +++ LegacyBlockInfoCreator.java	29 Sep 2002 04:13:47 -0000	1.2
  @@ -21,7 +21,7 @@
   import org.apache.avalon.framework.info.EntryDescriptor;
   import org.apache.avalon.framework.info.LoggerDescriptor;
   import org.apache.avalon.framework.info.ServiceDescriptor;
  -import org.apache.avalon.framework.info.Tag;
  +import org.apache.avalon.framework.info.Attribute;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
   import org.xml.sax.InputSource;
   
  @@ -131,7 +131,7 @@
       {
           return new ContextDescriptor( "org.apache.avalon.phoenix.BlockContext",
                                         new EntryDescriptor[ 0 ],
  -                                      new Tag[ 0 ] );
  +                                      new Attribute[ 0 ] );
       }
   
       /**
  @@ -199,7 +199,7 @@
           return new DependencyDescriptor( key,
                                            implementationKey,
                                            false,
  -                                         new Tag[ 0 ] );
  +                                         new Attribute[ 0 ] );
       }
   
       /**
  @@ -248,16 +248,16 @@
           final String version = service.getAttribute( "version", "1.0.0" );
   
           final ArrayList tagSet = new ArrayList();
  -        final Tag tag = createSimpleTag( "avalon", "version", version );
  +        final Attribute tag = createSimpleTag( "avalon", "version", version );
           tagSet.add( tag );
           if( isManagement )
           {
  -            final Tag mxTag =
  +            final Attribute mxTag =
                   createSimpleTag( "phoenix", "mx", "true" );
               tagSet.add( mxTag );
           }
   
  -        final Tag[] tags = (Tag[])tagSet.toArray( new Tag[ tagSet.size() ] );
  +        final Attribute[] tags = (Attribute[])tagSet.toArray( new Attribute[ tagSet.size()
] );
           return new ServiceDescriptor( implementationKey, tags );
       }
   
  @@ -278,16 +278,16 @@
           final String schemaType = config.getChild( "schema-type" ).getValue();
   
           final ArrayList tagSet = new ArrayList();
  -        final Tag tag = createSimpleTag( "avalon", "version", version );
  +        final Attribute tag = createSimpleTag( "avalon", "version", version );
           tagSet.add( tag );
           if( null != schemaType )
           {
  -            final Tag schemaTag =
  +            final Attribute schemaTag =
                   createSimpleTag( "phoenix", "schema-type", schemaType );
               tagSet.add( schemaTag );
           }
   
  -        final Tag[] tags = (Tag[])tagSet.toArray( new Tag[ tagSet.size() ] );
  +        final Attribute[] tags = (Attribute[])tagSet.toArray( new Attribute[ tagSet.size()
] );
           return new ComponentDescriptor( name, classname, tags );
       }
   
  @@ -299,12 +299,12 @@
        * @param tagName the name of the tag
        * @return
        */
  -    private Tag createSimpleTag( final String tagName,
  +    private Attribute createSimpleTag( final String tagName,
                                    final String name,
                                    final String value )
       {
           final Properties parameters = new Properties();
           parameters.setProperty( name, value );
  -        return new Tag( tagName, parameters );
  +        return new Attribute( tagName, parameters );
       }
   }
  
  
  
  1.10      +14 -14    jakarta-avalon-excalibur/info/src/java/org/apache/avalon/framework/tools/infobuilder/XMLInfoCreator.java
  
  Index: XMLInfoCreator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/info/src/java/org/apache/avalon/framework/tools/infobuilder/XMLInfoCreator.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- XMLInfoCreator.java	13 Sep 2002 15:54:09 -0000	1.9
  +++ XMLInfoCreator.java	29 Sep 2002 04:13:47 -0000	1.10
  @@ -22,7 +22,7 @@
   import org.apache.avalon.framework.info.EntryDescriptor;
   import org.apache.avalon.framework.info.LoggerDescriptor;
   import org.apache.avalon.framework.info.ServiceDescriptor;
  -import org.apache.avalon.framework.info.Tag;
  +import org.apache.avalon.framework.info.Attribute;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
   import org.xml.sax.InputSource;
   
  @@ -158,7 +158,7 @@
           throws ConfigurationException
       {
           final String name = logger.getAttribute( "name", "" );
  -        final Tag[] tags = buildTags( logger );
  +        final Attribute[] tags = buildTags( logger );
           return new LoggerDescriptor( name, tags );
       }
   
  @@ -206,7 +206,7 @@
           final boolean optional =
               dependency.getAttributeAsBoolean( "optional", false );
   
  -        final Tag[] tags = buildTags( dependency );
  +        final Attribute[] tags = buildTags( dependency );
   
           String key = dependency.getAttribute( "key", null );
   
  @@ -246,7 +246,7 @@
           final EntryDescriptor[] entrys =
               buildEntrys( context.getChildren( "entry" ) );
   
  -        final Tag[] tags = buildTags( context );
  +        final Attribute[] tags = buildTags( context );
   
           final String type =
               context.getAttribute( "type",
  @@ -291,7 +291,7 @@
           final String type = config.getAttribute( "type" );
           final boolean optional =
               config.getAttributeAsBoolean( "optional", false );
  -        final Tag[] tags = buildTags( config );
  +        final Attribute[] tags = buildTags( config );
   
           return new EntryDescriptor( key, type, optional, tags );
       }
  @@ -331,7 +331,7 @@
           throws ConfigurationException
       {
           final String implementationKey = service.getAttribute( "type" );
  -        final Tag[] tags = buildTags( service );
  +        final Attribute[] tags = buildTags( service );
           return new ServiceDescriptor( implementationKey, tags );
       }
   
  @@ -341,7 +341,7 @@
        * @param config the tags config
        * @return the set of tags
        */
  -    private Tag[] buildTags( final Configuration config )
  +    private Attribute[] buildTags( final Configuration config )
           throws ConfigurationException
       {
           final ArrayList tags = new ArrayList();
  @@ -350,26 +350,26 @@
           for( int i = 0; i < tagConfigs.length; i++ )
           {
               final Configuration tagConfig = tagConfigs[ i ];
  -            final Tag tag = buildTag( tagConfig );
  +            final Attribute tag = buildTag( tagConfig );
               tags.add( tag );
           }
   
  -        return (Tag[])tags.toArray( new Tag[ tags.size() ] );
  +        return (Attribute[])tags.toArray( new Attribute[ tags.size() ] );
       }
   
       /**
        * Build a tag from a specific configuration.
        *
        * @param config the configuration to build tag from
  -     * @return the new Tag
  +     * @return the new Attribute
        * @throws ConfigurationException if unable to build tag due to malformed xml
        */
  -    private Tag buildTag( Configuration config )
  +    private Attribute buildTag( Configuration config )
           throws ConfigurationException
       {
           final String name = config.getAttribute( "name" );
           final Properties parameters = buildParameters( config );
  -        return new Tag( name, parameters );
  +        return new Attribute( name, parameters );
       }
   
       /**
  @@ -406,7 +406,7 @@
       {
           final String name = config.getAttribute( "name", null );
           final String type = config.getAttribute( "type" );
  -        final Tag[] tags = buildTags( config );
  +        final Attribute[] tags = buildTags( config );
   
           return new ComponentDescriptor( name, type, tags );
       }
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message