Source Code Cross Referenced for DefaultIndexConfig.java in  » Search-Engine » Jofti » com » jofti » config » 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 » Search Engine » Jofti » com.jofti.config 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Created on 08-Apr-2005
003:         *
004:         */
005:        package com.jofti.config;
006:
007:        import java.util.List;
008:        import java.util.Map;
009:        import java.util.Properties;
010:
011:        import edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap;
012:
013:        /**
014:        
015:         * 
016:         * A convenience class for use in the addIndex method. The default config already has the default entries 
017:         * in each of the configuration properties. The only thing not present are any class mappings - so 
018:         * no changes to this object will result in only the built-in types being indexed.<p>
019:         * 
020:         The settings are:
021:         <ul>
022:         <li>name: default
023:         <li>adapter: com.jofti.cache.adapter.MapAdapter
024:         <li>parserType: com.jofti.introspect.JavaBeanClassIntrospector
025:         <li>indexType: com.jofti.tree.TreeIndex
026:         <li>ClassMappings: [ ]
027:         <li>queryMappings: [ ]
028:         <li>adapterProperties: [ ]
029:         </ul> 
030:         *
031:         *
032:         *
033:         * @author Steve Woodcock (steve@jofti.com)<p>
034:         * @version 1.0
035:         */
036:        public class DefaultIndexConfig implements  IndexConfig {
037:
038:            //set up the default values
039:
040:            private String name = "default";
041:
042:            private String cacheAdapter = "com.jofti.cache.adapter.MapAdapter";
043:
044:            private String indexType = "com.jofti.tree.TreeIndex";
045:
046:            private String parserType = "com.jofti.introspect.JavaBeanClassIntrospector";
047:
048:            private Map classMappings = new ConcurrentHashMap();
049:
050:            private Map queryMappings = new ConcurrentHashMap();
051:
052:            private boolean lazyLoaded = false;
053:
054:            private Properties adapterProperties;
055:
056:            private Properties indexProperties = new Properties();
057:
058:            public DefaultIndexConfig() {
059:
060:            }
061:
062:            /* (non-Javadoc)
063:             * @see com.jofti.config.IndexConfig#getName()
064:             */
065:            public String getName() {
066:                return name;
067:            }
068:
069:            /* (non-Javadoc)
070:             * @see com.jofti.conf.CacheConfig#getCacheAdapter()
071:             */
072:            public String getCacheAdapter() {
073:                return cacheAdapter;
074:            }
075:
076:            /* (non-Javadoc)
077:             * @see com.jofti.conf.CacheConfig#getIndexMappings()
078:             */
079:            public Map getIndexMappings() {
080:                return classMappings;
081:            }
082:
083:            /* (non-Javadoc)
084:             * @see com.jofti.config.IndexConfig#addMapping(java.lang.String, java.util.List)
085:             */
086:            public void addMapping(String clazz, List propertyList) {
087:
088:                classMappings.put(clazz, propertyList);
089:            }
090:
091:            /* (non-Javadoc)
092:             * @see com.jofti.config.IndexConfig#addQuery(java.lang.String, java.lang.String)
093:             */
094:            public void addQuery(String name, String query) {
095:
096:                queryMappings.put(name, query);
097:            }
098:
099:            /**
100:             * @param cacheAdapter The cacheAdapter to set.
101:             */
102:            public void setCacheAdapter(String cacheAdapter) {
103:                this .cacheAdapter = cacheAdapter;
104:            }
105:
106:            /**
107:             * @param indexType The indexType to set.
108:             */
109:            public void setIndexType(String indexType) {
110:                this .indexType = indexType;
111:            }
112:
113:            /**
114:             * @param name The name to set.
115:             */
116:            public void setName(String name) {
117:                this .name = name;
118:            }
119:
120:            /**
121:             * @return Returns the classMappings.
122:             */
123:            public Map getClassMappings() {
124:                return classMappings;
125:            }
126:
127:            /**
128:             * @return Returns the queryMappings.
129:             */
130:            public Map getQueryMappings() {
131:                return queryMappings;
132:            }
133:
134:            /**
135:             * @return Returns the indexType.
136:             */
137:            public String getIndexType() {
138:                return indexType;
139:            }
140:
141:            /**
142:             * @return Returns the lazyLoaded.
143:             */
144:            public boolean isLazyLoaded() {
145:                return lazyLoaded;
146:            }
147:
148:            /**
149:             * @param lazyLoaded The lazyLoaded to set.
150:             */
151:            public void setLazyLoaded(boolean lazyLoaded) {
152:                this .lazyLoaded = lazyLoaded;
153:            }
154:
155:            /**
156:             * @return Returns the adapterProperties.
157:             */
158:            public Properties getAdapterProperties() {
159:                return adapterProperties;
160:            }
161:
162:            /**
163:             * @param adapterProperties The adapterProperties to set.
164:             */
165:            public void setAdapterProperties(Properties adapterProperties) {
166:                this .adapterProperties = adapterProperties;
167:            }
168:
169:            /* (non-Javadoc)
170:             * @see com.jofti.config.IndexConfig#getParserType()
171:             */
172:            public String getParserType() {
173:                return parserType;
174:            }
175:
176:            /**
177:             * @param parserType The parserType to set.
178:             */
179:            public void setParserType(String parserType) {
180:                this .parserType = parserType;
181:            }
182:
183:            /* (non-Javadoc)
184:             * @see com.jofti.config.IndexConfig#getPersistenceProperties()
185:             */
186:            public Properties getIndexProperties() {
187:
188:                return indexProperties;
189:            }
190:
191:            public synchronized void setIndexProperties(
192:                    Properties indexProperties) {
193:                this.indexProperties = indexProperties;
194:            }
195:
196:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.