donaldp     2003/04/06 04:29:43

  Modified:    src/java/org/apache/avalon/phoenix/framework/tools/infobuilder
                        LegacyBlockInfoReader.java LegacyUtil.java
               src/java/org/apache/avalon/phoenix/framework/tools/qdox
                        LegacyInfoBuilder.java
  Log:
  Do not attempt to auto-translate the schema type to URI. Not doing it will mean that 
the user gets a warning everytime they try to deploy the component to phoenix.
  
  Also autodetermine the location of schema to be 'Foo-schema.xml' for component type 
com.biz.Foo
  
  Revision  Changes    Path
  1.9       +3 -11     
avalon-phoenix/src/java/org/apache/avalon/phoenix/framework/tools/infobuilder/LegacyBlockInfoReader.java
  
  Index: LegacyBlockInfoReader.java
  ===================================================================
  RCS file: 
/home/cvs/avalon-phoenix/src/java/org/apache/avalon/phoenix/framework/tools/infobuilder/LegacyBlockInfoReader.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- LegacyBlockInfoReader.java        6 Apr 2003 10:35:23 -0000       1.8
  +++ LegacyBlockInfoReader.java        6 Apr 2003 11:29:43 -0000       1.9
  @@ -184,16 +184,8 @@
           }
           else
           {
  -            final String schemaUri =
  -                LegacyUtil.translateToSchemaUri( schemaType );
  -            final int index = classname.lastIndexOf( "." );
  -            String location = classname;
  -            if( -1 != index )
  -            {
  -                location = classname.substring( index + 1 );
  -            }
  -            location += "-schema.xml";
  -            return new SchemaDescriptor( location, schemaUri, Attribute.EMPTY_SET );
  +            final String location = LegacyUtil.getSchemaLocationFor( classname );
  +            return new SchemaDescriptor( location, schemaType, Attribute.EMPTY_SET 
);
           }
   
       }
  
  
  
  1.5       +20 -1     
avalon-phoenix/src/java/org/apache/avalon/phoenix/framework/tools/infobuilder/LegacyUtil.java
  
  Index: LegacyUtil.java
  ===================================================================
  RCS file: 
/home/cvs/avalon-phoenix/src/java/org/apache/avalon/phoenix/framework/tools/infobuilder/LegacyUtil.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- LegacyUtil.java   5 Apr 2003 04:25:43 -0000       1.4
  +++ LegacyUtil.java   6 Apr 2003 11:29:43 -0000       1.5
  @@ -174,4 +174,23 @@
                                     null,
                                     null );
       }
  +
  +    /**
  +     * Get the location of the schema. By default it is "Foo-schema.xml"
  +     * for the com.biz.Foo component.
  +     *
  +     * @param classname the classname of component
  +     * @return the location of the schema
  +     */
  +    public static String getSchemaLocationFor( final String classname )
  +    {
  +        final int index = classname.lastIndexOf( "." );
  +        String location = classname;
  +        if( -1 != index )
  +        {
  +            location = classname.substring( index + 1 );
  +        }
  +        location += "-schema.xml";
  +        return location;
  +    }
   }
  
  
  
  1.4       +4 -3      
avalon-phoenix/src/java/org/apache/avalon/phoenix/framework/tools/qdox/LegacyInfoBuilder.java
  
  Index: LegacyInfoBuilder.java
  ===================================================================
  RCS file: 
/home/cvs/avalon-phoenix/src/java/org/apache/avalon/phoenix/framework/tools/qdox/LegacyInfoBuilder.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- LegacyInfoBuilder.java    22 Mar 2003 12:07:14 -0000      1.3
  +++ LegacyInfoBuilder.java    6 Apr 2003 11:29:43 -0000       1.4
  @@ -147,8 +147,9 @@
               return null;
           }
           final String type = getNamedParameter( tag, "type", "" );
  -        final String schemaUri = LegacyUtil.translateToSchemaUri( type );
  -        return new SchemaDescriptor( "", schemaUri, Attribute.EMPTY_SET );
  +        final String classname = javaClass.getFullyQualifiedName();
  +        final String location = LegacyUtil.getSchemaLocationFor( classname );
  +        return new SchemaDescriptor( location, type, Attribute.EMPTY_SET );
       }
   
       /**
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to