Source Code Cross Referenced for SearchConfig.java in  » Portal » Open-Portal » com » sun » portal » search » util » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Portal » Open Portal » com.sun.portal.search.util 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 2001 Sun Microsystems, Inc.  All rights reserved.
003:         * PROPRIETARY/CONFIDENTIAL.  Use of this product is subject to license terms.
004:         */
005:
006:        package com.sun.portal.search.util;
007:
008:        import java.util.*;
009:        import java.io.*;
010:
011:        /**
012:         * General purpose configuration parameters
013:         */
014:        public class SearchConfig {
015:
016:            // XXX Should rename this and merge with RDMConfig
017:
018:            // File defaults
019:            public static final String CONFDIR = "config";
020:            public static final String SEARCH_CONF = "search.conf";
021:
022:            // Database configuration
023:            public static final String DBDIR = "database-directory";
024:            public static final String DBNAME = "database-name";
025:            public static final String DBPARTS = "database-partitions";
026:            public static final String DBLODGIR = "database-logdir";
027:            public static final String DBMAX = "database-max-concurrent";
028:            public static final String DBCLASS = "database-class";
029:            public static final String DB_CACHE_SIZE = "database-cache-size-kb";
030:            public static final String TAX_DBNAME = "taxonomy-database-name";
031:
032:            // security
033:            public static final String SECMODE = "security-mode";
034:            public static final String SECMGR = "security-manager";
035:            public static final String SEC_MAX_ROLESEARCH = "security-max-rolesearch";
036:            public static final String SECDSAME = "security-dsame-group";
037:            public static final String SECSUPERADMIN = "security-superadmin";
038:            public static final String SECDSAME_USE_FILTERED_ROLES = "security-dsame-use-filtered-roles";
039:
040:            // RDM configuration
041:            public static final String SCHEMA = "schema-description";
042:            public static final String SERVER = "server-description";
043:            public static final String TAX = "taxonomy-description";
044:            public static final String TAX_REFRESH = "taxonomy-description-refresh-rate";
045:            public static final String QLFLUFF = "query-language-translation";
046:            public static final String MVCLASS = "multiple-classifications";
047:
048:            // Search configuration
049:            public static final String PLATFORM = "search-platform";
050:            public static final String MAX_INDEX_BATCH = "search-max-index-batch";
051:            public static final String FIELD_MULTIPLIERS = "search-field-multipliers";
052:            public static final String QUERY_THREADS = "search-query-threads";
053:            public static final String INDEX_THREADS = "search-index-threads";
054:            public static final String INDEX_TYPE = "search-index-type";
055:            public static final String INDEX_PARTSIZE = "search-index-partition-size";
056:            public static final String INDEX_MERGERATE = "search-index-merge-rate";
057:            public static final String INDEX_MAXMERGEPARTS = "search-index-max-merge-partitions";
058:            public static final String DICTIONARY_TYPE = "search-dictionary-type";
059:            public static final String LOOKUP_LIMIT = "search-lookup-limit";
060:            public static final String HIGHLIGHTS = "search-highlights";
061:            public static final String HIGHLIGHT_TAGS = "search-highlight-tags";
062:            public static final String MAX_PASSAGES = "search-max-passages";
063:            public static final String PASSAGE_CONTEXT = "search-passage-context";
064:            public static final String PASSAGE_SIZE = "search-passage-size";
065:            public static final String HIGHLIGHT_TAGS_FIELD = "search-highlight-tags-field";
066:            public static final String MAX_PASSAGES_FIELD = "search-max-passages-field";
067:            public static final String PASSAGE_CONTEXT_FIELD = "search-passage-context-field";
068:            public static final String PASSAGE_SIZE_FIELD = "search-passage-size-field";
069:            public static final String SUMMARY_FROM_BODY = "search-summary-from-body";
070:
071:            // Misc
072:            public static final String INSTANCE_NAME = "instance-name";
073:            public static final String CSID = "csid";
074:            public static final String SERVER_ROOT = "server-root";
075:            public static final String SERVER_HOSTNAME = "server-hostname";
076:            public static final String SERVER_PORT = "server-port";
077:            public static final String LOGDIR = "logdir";
078:            public static final String TMPDIR = "tmpdir";
079:            public static final String BINDIR = "bindir";
080:            public static final String LIBDIR = "libdir";
081:            public static final String LIBPATH = "libpath";
082:            public static final String SENGINE_LOGFN = "search-logfile";
083:            public static final String EXCLUDE_GV = "reports-exclude-gv-queries";
084:
085:            // Admin look and feel
086:            public static final String CATEGORY_ELEMENTS_PER_PAGE = "admin-category_editor_nodes_per_page";
087:            public static final String CATEGORY_MAX_COMBO_ELEMENT = "admin-category_editor_max_combo_element";
088:            public static final String CATEGORY_EDITOR_LAYOUT = "admin-category_editor_layout";
089:            public static final String CHECK_DNS = "filters-check-dns";
090:            public static final String CHECK_302 = "filters-check-redirect";
091:            public static final String CHECK_VIRTUAL = "filters-check-virtual";
092:            public static final String ROBOT_REFRESH = "robot-refresh";
093:            public static final String ROBOT_LOGS = "rlog-max-logs";
094:
095:            // additional
096:            public static final String SEARCH_CONF_HEADER = "#\n#  search.conf - Search configuration\n#\n";
097:
098:            static Map map = new HashMap();
099:            static String default_csid;
100:            static SearchConfig searchcf; // singleton
101:
102:            // Logger Names, debug is prepended for logging purposes to maintain
103:            // consistency across Portal Server.
104:            public static String RDM_LOGGER = "debug.com.sun.portal.search.rdm";
105:            public static String RDMGR_LOGGER = "debug.com.sun.portal.search.rdmgr";
106:            public static String RDMSERVER_LOGGER = "debug.com.sun.portal.search.rdmserver";
107:            public static String SEARCH_LOGGER = "debug.com.sun.portal.search";
108:            public static String AUTOCLASSIFY_LOGGER = "debug.com.sun.portal.search.autoclassify";
109:
110:            // The following, even though referenced within the code are no longer used.
111:            // The logging framework's config properties takes care of the log configuration
112:            public static final String DEBUG_LOGFN = "debug-logfile";
113:            public static final String DEBUG_LOGLV = "debug-loglevel";
114:            public static final String RDM_LOGFN = "logfile";
115:            public static final String RDM_DISABLE_LOG = "disable-rdm-log";
116:            public static final String LOGROTATESIZE = "log-rotation-size";
117:            public static final String RDMGR_LOGFN = "rdmgr-logfile";
118:
119:            /* hidden */
120:            private SearchConfig() {
121:            }
122:
123:            /**
124:             * Load search.conf configuration file
125:             */
126:            static public void init(String filename) throws Exception {
127:                searchcf = new SearchConfig();
128:                PBlock.parsePBlockConfigFile(filename, map);
129:            }
130:
131:            /** @return the search config object */
132:            static public SearchConfig getSearchConfig() {
133:                return searchcf;
134:            }
135:
136:            /** Set the default CSID - XXX not checking valid CSID */
137:            public void setDefault(String csid) {
138:                default_csid = csid;
139:            }
140:
141:            /** Get the default CSID */
142:            public String getDefault() {
143:                return default_csid;
144:            }
145:
146:            /**
147:             *  Find a configuration parameter .
148:             */
149:            static public String getValue(String param) {
150:                return (String) map.get(param);
151:            }
152:
153:            /**
154:             * Sets a config value.
155:             */
156:            static public void setValue(Object key, Object value) {
157:                if (map != null) {
158:                    if (map.containsKey(key)) {
159:                        map.remove(key);
160:                    }
161:                    map.put(key, value);
162:                }
163:            }
164:
165:            /**
166:             * Return the config map
167:             */
168:            static public HashMap getMap() {
169:                return (HashMap) map;
170:            }
171:
172:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.