KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > codehaus > loom > components > util > infobuilder > LegacyUtil


1 /*
2  * Copyright (C) The Loom Group. All rights reserved.
3  *
4  * This software is published under the terms of the Loom
5  * Software License version 1.1, a copy of which has been included
6  * with this distribution in the LICENSE.txt file.
7  */

8 package org.codehaus.loom.components.util.infobuilder;
9
10 /**
11  * This is a set of constants and utility methods to enablesupport of Legacy BlockInfo files.
12  *
13  * @author Peter Donald
14  * @version $Revision: 1.2 $ $Date: 2004/05/01 12:48:34 $
15  */

16 class LegacyUtil
17 {
18     /**
19      * Get the location of the schema. By default it is "Foo-schema.xml" for the com.biz.Foo component.
20      *
21      * @param classname the classname of component
22      *
23      * @return the location of the schema
24      */

25     public static String JavaDoc getSchemaLocationFor( final String JavaDoc classname )
26     {
27         final int index = classname.lastIndexOf( "." );
28         String JavaDoc location = classname;
29         if( -1 != index )
30         {
31             location = classname.substring( index + 1 );
32         }
33         location += "-schema.xml";
34         return location;
35     }
36 }
Popular Tags