Source Code Cross Referenced for DataColumnToPropertyMapping.java in  » Search-Engine » compass-2.0 » org » compass » gps » device » jdbc » mapping » 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 » compass 2.0 » org.compass.gps.device.jdbc.mapping 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 2004-2006 the original author or authors.
003:         * 
004:         * Licensed under the Apache License, Version 2.0 (the "License");
005:         * you may not use this file except in compliance with the License.
006:         * You may obtain a copy of the License at
007:         * 
008:         *      http://www.apache.org/licenses/LICENSE-2.0
009:         * 
010:         * Unless required by applicable law or agreed to in writing, software
011:         * distributed under the License is distributed on an "AS IS" BASIS,
012:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013:         * See the License for the specific language governing permissions and
014:         * limitations under the License.
015:         */
016:
017:        package org.compass.gps.device.jdbc.mapping;
018:
019:        import org.compass.core.Property;
020:
021:        /**
022:         * Maps a data column to Compass <code>Resource Property</code>.
023:         * <p>
024:         * The <code>PropertyIndex</code> defaults to
025:         * <code>Property.Index.TOKENIZED</code>. the <code>PropertyStore</code>
026:         * defaults to <code>Property.Store.YES</code>, the
027:         * <code>PropertyTermVector</code> defaults to
028:         * <code>Property.TermVector.NO</code> and the <code>Boost</code> defaults
029:         * to <code>1.0f</code>.
030:         * 
031:         * @author kimchy
032:         */
033:        public class DataColumnToPropertyMapping extends
034:                AbstractColumnToPropertyMapping {
035:
036:            private Property.Index propertyIndex = Property.Index.TOKENIZED;
037:
038:            private Property.Store propertyStore = Property.Store.YES;
039:
040:            private Property.TermVector propertyTermVector = Property.TermVector.NO;
041:
042:            private float boost;
043:
044:            /**
045:             * Creates an empty data column to property mapping. Must set at least the
046:             * colum index or colum name, and the property name.
047:             * <p>
048:             * The <code>PropertyIndex</code> defaults to
049:             * <code>Property.Index.TOKENIZED</code>. the <code>PropertyStore</code>
050:             * defaults to <code>Property.Store.YES</code>, the
051:             * <code>PropertyTermVector</code> defaults to
052:             * <code>Property.TermVector.NO</code> and the <code>Boost</code>
053:             * defaults to <code>1.0f</code>.
054:             */
055:            public DataColumnToPropertyMapping() {
056:
057:            }
058:
059:            /**
060:             * Creates a new data column to propery mapping given the column index and
061:             * the property name.
062:             * <p>
063:             * The <code>PropertyIndex</code> defaults to
064:             * <code>Property.Index.TOKENIZED</code>. the <code>PropertyStore</code>
065:             * defaults to <code>Property.Store.YES</code>, the
066:             * <code>PropertyTermVector</code> defaults to
067:             * <code>Property.TermVector.NO</code> and the <code>Boost</code>
068:             * defaults to <code>1.0f</code>.
069:             * 
070:             * @param columnIndex
071:             *            The data column index that will be used to look up the column
072:             *            value.
073:             * @param propertyName
074:             *            The Compass <code>Resource Property</code> name.
075:             */
076:            public DataColumnToPropertyMapping(int columnIndex,
077:                    String propertyName) {
078:                this (columnIndex, propertyName, Property.Index.TOKENIZED,
079:                        Property.Store.YES, Property.TermVector.NO);
080:            }
081:
082:            /**
083:             * Creates a new data column to propery mapping given the column name and
084:             * the property name.
085:             * <p>
086:             * The <code>PropertyIndex</code> defaults to
087:             * <code>Property.Index.TOKENIZED</code>. the <code>PropertyStore</code>
088:             * defaults to <code>Property.Store.YES</code>, the
089:             * <code>PropertyTermVector</code> defaults to
090:             * <code>Property.TermVector.NO</code> and the <code>Boost</code>
091:             * defaults to <code>1.0f</code>.
092:             * 
093:             * @param columnName
094:             *            The data column name that will be used to look up the column
095:             *            value.
096:             * @param propertyName
097:             *            The Compass <code>Resource Property</code> name.
098:             */
099:            public DataColumnToPropertyMapping(String columnName,
100:                    String propertyName) {
101:                this (columnName, propertyName, Property.Index.TOKENIZED,
102:                        Property.Store.YES, Property.TermVector.NO);
103:            }
104:
105:            /**
106:             * Creates a new data column to propery mapping given the column index,
107:             * property name, <code>PropertyIndex</code>, and
108:             * <code>PropertyStore</code>.
109:             * <p>
110:             * The <code>PropertyTermVector</code> defaults to
111:             * <code>Property.TermVector.NO</code> and the <code>Boost</code>
112:             * defaults to <code>1.0f</code>.
113:             * 
114:             * @param columnIndex
115:             *            The data column index that will be used to look up the column
116:             *            value.
117:             * @param propertyName
118:             *            The Compass <code>Resource Property</code> name.
119:             * @param propertyIndex
120:             * @param propertyStore
121:             */
122:            public DataColumnToPropertyMapping(int columnIndex,
123:                    String propertyName, Property.Index propertyIndex,
124:                    Property.Store propertyStore) {
125:                this (columnIndex, propertyName, propertyIndex, propertyStore,
126:                        Property.TermVector.NO);
127:            }
128:
129:            /**
130:             * Creates a new data column to propery mapping given the column name,
131:             * property name, <code>PropertyIndex</code>, and
132:             * <code>PropertyStore</code>.
133:             * <p>
134:             * The <code>PropertyTermVector</code> defaults to
135:             * <code>Property.TermVector.NO</code> and the <code>Boost</code>
136:             * defaults to <code>1.0f</code>.
137:             * 
138:             * @param columnName
139:             *            The data column name that will be used to look up the column
140:             *            value.
141:             * @param propertyName
142:             *            The Compass <code>Resource Property</code> name.
143:             * @param propertyIndex
144:             * @param propertyStore
145:             */
146:            public DataColumnToPropertyMapping(String columnName,
147:                    String propertyName, Property.Index propertyIndex,
148:                    Property.Store propertyStore) {
149:                this (columnName, propertyName, propertyIndex, propertyStore,
150:                        Property.TermVector.NO);
151:            }
152:
153:            /**
154:             * Creates a new data column to propery mapping given the column index,
155:             * property name, <code>PropertyIndex</code>, and
156:             * <code>PropertyStore</code>.
157:             * 
158:             * @param columnIndex
159:             *            The data column index that will be used to look up the column
160:             *            value.
161:             * @param propertyName
162:             *            The Compass <code>Resource Property</code> name.
163:             * @param propertyIndex
164:             * @param propertyStore
165:             * @param propertyTermVector
166:             */
167:            public DataColumnToPropertyMapping(int columnIndex,
168:                    String propertyName, Property.Index propertyIndex,
169:                    Property.Store propertyStore,
170:                    Property.TermVector propertyTermVector) {
171:                super (columnIndex, propertyName);
172:                this .propertyIndex = propertyIndex;
173:                this .propertyStore = propertyStore;
174:                this .propertyTermVector = propertyTermVector;
175:            }
176:
177:            /**
178:             * Creates a new data column to propery mapping given the column name,
179:             * property name, <code>PropertyIndex</code>, and
180:             * <code>PropertyStore</code>.
181:             * 
182:             * @param columnName
183:             *            The data column name that will be used to look up the column
184:             *            value.
185:             * @param propertyName
186:             *            The Compass <code>Resource Property</code> name.
187:             * @param propertyIndex
188:             * @param propertyStore
189:             * @param propertyTermVector
190:             */
191:            public DataColumnToPropertyMapping(String columnName,
192:                    String propertyName, Property.Index propertyIndex,
193:                    Property.Store propertyStore,
194:                    Property.TermVector propertyTermVector) {
195:                super (columnName, propertyName);
196:                this .propertyIndex = propertyIndex;
197:                this .propertyStore = propertyStore;
198:                this .propertyTermVector = propertyTermVector;
199:            }
200:
201:            public Property.Index getPropertyIndex() {
202:                return propertyIndex;
203:            }
204:
205:            public void setPropertyIndex(Property.Index propertyIndex) {
206:                this .propertyIndex = propertyIndex;
207:            }
208:
209:            public void setPropertyIndexString(String propertyIndex) {
210:                this .propertyIndex = Property.Index.fromString(propertyIndex);
211:            }
212:
213:            public Property.Store getPropertyStore() {
214:                return propertyStore;
215:            }
216:
217:            public void setPropertyStore(Property.Store propertyStore) {
218:                this .propertyStore = propertyStore;
219:            }
220:
221:            public void setPropertyStoreString(String propertyStore) {
222:                this .propertyStore = Property.Store.fromString(propertyStore);
223:            }
224:
225:            public Property.TermVector getPropertyTermVector() {
226:                return propertyTermVector;
227:            }
228:
229:            public void setPropertyTermVector(
230:                    Property.TermVector propertyTermVector) {
231:                this .propertyTermVector = propertyTermVector;
232:            }
233:
234:            public void setPropertyTermVectorString(String propertyTermVector) {
235:                this .propertyTermVector = Property.TermVector
236:                        .fromString(propertyTermVector);
237:            }
238:
239:            public float getBoost() {
240:                return boost;
241:            }
242:
243:            public void setBoost(float boost) {
244:                this.boost = boost;
245:            }
246:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.