KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > batik > Version


1 /*
2
3    Copyright 2003 The Apache Software Foundation
4
5    Licensed under the Apache License, Version 2.0 (the "License");
6    you may not use this file except in compliance with the License.
7    You may obtain a copy of the License at
8
9        http://www.apache.org/licenses/LICENSE-2.0
10
11    Unless required by applicable law or agreed to in writing, software
12    distributed under the License is distributed on an "AS IS" BASIS,
13    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14    See the License for the specific language governing permissions and
15    limitations under the License.
16
17  */

18
19 package org.apache.batik;
20
21 /**
22  * This class defines the Batik version number.
23  *
24  * @author <a HREF="mailto:vincent.hardy@sun.com">Vincent Hardy</a>
25  * @version $Id: Version.java,v 1.3 2004/09/24 10:56:36 deweese Exp $
26  */

27 public final class Version {
28     public static final String JavaDoc LABEL_DEVELOPMENT_BUILD
29         = "development.build";
30     
31     /**
32      * @return the Batik version. This is based on the CVS tag.
33      * If this Version is not part of a tagged release, then
34      * the returned value is a constant reflecting a development
35      * build.
36      */

37     public static String JavaDoc getVersion() {
38         String JavaDoc tagName = "$Name: batik-1_6 $";
39         if (tagName.startsWith("$Name:")) {
40             tagName = tagName.substring(6, tagName.length()-1);
41         } else {
42             tagName = "";
43         }
44         
45         if(tagName.trim().intern().equals("")){
46             tagName = LABEL_DEVELOPMENT_BUILD;
47         }
48
49         return tagName;
50     }
51 }
52
Popular Tags