Source Code Cross Referenced for SearchableId.java in  » Search-Engine » compass-2.0 » org » compass » annotations » 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.annotations 
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.annotations;
018:
019:        import java.lang.annotation.ElementType;
020:        import java.lang.annotation.Retention;
021:        import static java.lang.annotation.RetentionPolicy.RUNTIME;
022:        import java.lang.annotation.Target;
023:
024:        /**
025:         * Specifies a searchable id on property or field of the {@link Searchable} class.
026:         * <p/>
027:         * Each searchable class must have at least one id annotation. The type
028:         * of the field/property can be a simple type, or a custom class. In case
029:         * of a custom class, there should be a specialized converter associtaed
030:         * with it, with the preferable way of defining the converter is to use
031:         * the {@link SearchableClassConverter} annotating the custom class.
032:         * <p/>
033:         * A searchable class can have more than one searchable id associated with it.
034:         * <p/>
035:         * For simple usage, the annotation can create a {@link SearchableMetaData} automatically
036:         * (without explicitly defining one on the field/property).
037:         * It will only be created if the {@link #name()} is set to a value. Most of
038:         * the attributes that can control the meta-data are provided in the searchable
039:         * id as well, they are marked in the java doc.
040:         * <p/>
041:         * Note, that if the {@link #name()} is not set, no defined {@link SearchableMetaData}
042:         * will be created, and Compass will end up generating an internal meta-data for it.
043:         * For additional meta-datas, use the {@link SearchableMetaData} or {@link SearchableMetaDatas}.
044:         * <p/>
045:         * Compass might require an internal meta-data to be created, so it can identify the correct
046:         * value that match the property/field. Controlling the creation and specifics of the intenal
047:         * meta-data id can be done using {@link #managedId()} and {@link #managedIdIndex()}.
048:         *
049:         * @author kimchy
050:         * @see Searchable
051:         * @see SearchableClassConverter
052:         * @see SearchableMetaData
053:         * @see SearchableMetaDatas
054:         */
055:        @Target({ElementType.METHOD,ElementType.FIELD})
056:        @Retention(RUNTIME)
057:        public @interface SearchableId {
058:
059:            /**
060:             * Controls if the internal meta-data id creation.
061:             */
062:            ManagedId managedId() default ManagedId.AUTO;
063:
064:            /**
065:             * If the internal meta-data id is created, controls it's
066:             * index parameter.
067:             */
068:            ManagedIdIndex managedIdIndex() default ManagedIdIndex.NA;
069:
070:            /**
071:             * If there is already an existing id with the same field/property name defined,
072:             * will override it.
073:             */
074:            boolean override() default true;
075:
076:            /**
077:             * Converter that will apply to the id mapping
078:             * ({@link org.compass.core.mapping.osem.ClassIdPropertyMapping}).
079:             * Defaults to the {@link org.compass.core.mapping.osem.ClassPropertyMapping}.
080:             */
081:            String idConverter() default "";
082:
083:            /**
084:             * The property accessor that will be fetch and write the property value.
085:             * <p/>
086:             * It is automatically set based on where the annotation is used, but can be
087:             * explicitly set. Compass also supports custom property accessors, registered
088:             * under a custom name, which can then be used here as well.
089:             */
090:            String accessor() default "";
091:
092:            // Generated MetaData definitions
093:
094:            /**
095:             * The name of the auto generated {@link SearchableMetaData}. Maps to
096:             * {@link org.compass.annotations.SearchableMetaData#name()}.
097:             * <p/>
098:             * The meta-data will be auto generated only if the name has a value.
099:             */
100:            String name() default "";
101:
102:            /**
103:             * The boost of the auto generated {@link SearchableMetaData}. Maps to
104:             * {@link org.compass.annotations.SearchableMetaData#boost()}.
105:             * <p/>
106:             * The meta-data will be auto generated only if the name has a value.
107:             */
108:            float boost() default 1.0f;
109:
110:            /**
111:             * The store of the auto generated {@link SearchableMetaData}. Maps to
112:             * {@link org.compass.annotations.SearchableMetaData#store()}.
113:             * <p/>
114:             * The meta-data will be auto generated only if the name has a value.
115:             */
116:            Store store() default Store.YES;
117:
118:            /**
119:             * The index of the auto generated {@link SearchableMetaData}. Maps to
120:             * {@link org.compass.annotations.SearchableMetaData#index()}.
121:             * <p/>
122:             * The meta-data will be auto generated only if the name has a value.
123:             */
124:            Index index() default Index.UN_TOKENIZED;
125:
126:            /**
127:             * The termVector of the auto generated {@link SearchableMetaData}. Maps to
128:             * {@link org.compass.annotations.SearchableMetaData#termVector()}.
129:             *
130:             * <p>The meta-data will be auto generated only if the name has a value.
131:             */
132:            TermVector termVector() default TermVector.NO;
133:
134:            /**
135:             * The termVector of the auto generated {@link SearchableMetaData}. Maps to
136:             * {@link SearchableMetaData#omitNorms()}.
137:             *
138:             * <p>The meta-data will be auto generated only if the name has a value.
139:             */
140:            boolean omitNorms() default true;
141:
142:            /**
143:             * The reverse of the auto generated {@link SearchableMetaData}. Maps to
144:             * {@link org.compass.annotations.SearchableMetaData#reverse()}.
145:             * <p/>
146:             * The meta-data will be auto generated only if the name has a value.
147:             */
148:            Reverse reverse() default Reverse.NO;
149:
150:            /**
151:             * The analyzer of the auto generated {@link SearchableMetaData}. Maps to
152:             * {@link org.compass.annotations.SearchableMetaData#analyzer()}.
153:             * <p/>
154:             * The meta-data will be auto generated only if the name has a value.
155:             */
156:            String analyzer() default "";
157:
158:            /**
159:             * The execlude from all of the auto generated {@link SearchableMetaData}. Maps to
160:             * {@link org.compass.annotations.SearchableMetaData#excludeFromAll()}.
161:             * <p/>
162:             * The meta-data will be auto generated only if the name has a value.
163:             */
164:            ExcludeFromAll excludeFromAll() default ExcludeFromAll.NO;
165:
166:            /**
167:             * The converter of the auto generated {@link SearchableMetaData}. Maps to
168:             * {@link org.compass.annotations.SearchableMetaData#converter()}.
169:             * The meta-data will be auto generated only if the name has a value.
170:             * <p>
171:             * This converter will also be used for an internal meta-data id (if required to be
172:             * generated).
173:             */
174:            String converter() default "";
175:
176:            /**
177:             * The format of the auto generated {@link SearchableMetaData}. Maps to
178:             * {@link org.compass.annotations.SearchableMetaData#format()}.
179:             * The meta-data will be auto generated only if the name has a value.
180:             * <p>
181:             * This format will also be used for an internal meta-data id (if required to be
182:             * generated).
183:             */
184:            String format() default "";
185:
186:            /**
187:             * Should this propety be included in the spell check index.
188:             *
189:             * <p>Note, most times this is not requried to be configured, since by default, the
190:             * spell check index uses the "all" property.
191:             */
192:            SpellCheck spellCheck() default SpellCheck.EXCLUDE;
193:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.