01: package com.sun.portal.search.autoclassify;
02:
03: import java.util.*;
04: import java.text.*;
05:
06: /** <p>Title: Autoclassify Config</p>
07: * <p>Description: Define attributes name in search.conf</p>
08: * <p>Copyright: Copyright (c) 2002</p>
09: * <p>Company: Sun Microsystems</p>
10: * @author Allen Chiang
11: * @version 1.0
12: */
13:
14: public abstract class AutoclassifyConfig {
15:
16: /** Attribute name in search.conf defined for internal classification field name. */
17: public static final String NAME_CLASSIFIED = "RD-Classified";
18: /** Attribute name in search.conf defined for lockfile path. */
19: public static final String NAME_LOCKFILE = "autoclass-lockfilepath";
20: /** Attribute name in search.conf defined for log file path. */
21: public static final String NAME_LOGFILE = "autoclass-logfilepath";
22: public static final String DEFAULT_LOGFILE_NAME = "autoclassify.log";
23: /** Attribute name in search.conf defined for database file path. */
24: public static final String NAME_DBFILE = "autoclass-dbfilepath";
25: public static final String DEFAULT_DBFILE_NAME = "RDStore.db";
26: /** Attribute name in search.conf defined for memory hashtable size. */
27: public static final String NAME_HASHTABLE_SIZE = "autoclass-rdsinmemory";
28: public static final int DEFAULT_HASHTABLE_SIZE = 10000;
29:
30: /**
31: * A date formatter for search server query with US locale
32: * the pattern is the first entry in DateParser.java used in search server.
33: */
34: public static SimpleDateFormat formatter = new SimpleDateFormat(
35: "E, d MMM y h:m:s a z", Locale.US);
36: /** Resource bundle name for Autoclassify */
37: public static final String RESOURCE_BUNDLE_FILE = "autoclassify";
38: static ResourceBundle rb = null;
39:
40: /** The resource bundle for system log. It used default locale which might be
41: * different to UI locale
42: * @throws Exception
43: * @return A resource bundle for system log
44: */
45: public static ResourceBundle getResourceBundle() throws Exception {
46: if (rb == null) {
47: rb = ResourceBundle.getBundle(RESOURCE_BUNDLE_FILE);
48: }
49: return rb;
50: }
51:
52: private AutoclassifyConfig() {
53: }
54:
55: }
|