1 /*
2 * Created on Aug 14, 2003
3 */
4 package com.askren.genealogy.parser;
5
6 import java.util.MissingResourceException;
7 import java.util.ResourceBundle;
8
9 /***
10 * This class makes it easy to get names out of a properties file.
11 * The properties file holds constants that I use in parsing the gedcom file.
12 * @author Jay Askren
13 */
14 public class Messages {
15
16 private static final String BUNDLE_NAME = "com.askren.genealogy.parser.GedComParser";
17
18 private static final ResourceBundle RESOURCE_BUNDLE =
19 ResourceBundle.getBundle(BUNDLE_NAME);
20
21 /***
22 * @param key the key in the properties file
23 * @return the associated sting in the properties file
24 */
25 public static String getString(String key) {
26 try {
27 return RESOURCE_BUNDLE.getString(key);
28 } catch (MissingResourceException e) {
29 return "";
30 }
31 }
32 }
This page was automatically generated by Maven