KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > avalon > excalibur > i18n > FlatXmlBundle


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

8 package org.apache.avalon.excalibur.i18n;
9
10 /**
11  * @author <a HREF="mailto:neeme@apache.org">Neeme Praks</a>
12  * @version $Id: FlatXmlBundle.java,v 1.2 2001/12/11 09:53:35 jefft Exp $
13  */

14 public class FlatXmlBundle extends XmlBundle {
15
16     public static final String JavaDoc PREFIX = "/catalogue/message[@key='";
17     public static final String JavaDoc SUFFIX = "']";
18
19     /**
20      * Convert the &quot;user view&quot; of the lookup key to the
21      * &quot;system view&quot;. Used to hide the implemented storage
22      * mechanism and/or XML file schema.
23      *
24      * @param key user key
25      * @return system key
26      */

27     public String JavaDoc convertKey(String JavaDoc userKey) {
28         return new StringBuffer JavaDoc(PREFIX).append(userKey).append(SUFFIX).toString();
29     }
30
31 }
32
Popular Tags