Source Code Cross Referenced for SearchAnalyzer.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 java.lang.annotation.RetentionPolicy;
022:        import java.lang.annotation.Target;
023:
024:        import org.apache.lucene.analysis.Analyzer;
025:
026:        /**
027:         * Configure {@link Analyzer} to be used within Compass.
028:         * Set on package definition (<code>package-info.java</code>).
029:         * <p/>
030:         * The {@link Analyzer} is registed under a lookup name ({@link #name()}), which can then
031:         * be reference in the different mapping definitions.
032:         * <p/>
033:         * Allows for simple configuration of all analyzers that come with Compass using {@link #type()}.
034:         * If the {@link #type()} is set to {@link AnalyzerType#Snowball}, the {@link #snowballType()}
035:         * can be used to further configure the snowball analyzer. If a custom converter needs to be
036:         * registered with Compass, the {@link AnalyzerType#CustomAnalyzer} needs to be set on {@link #type()},
037:         * and the {@link #analyzerClass()} needs to be configured with the class that implements it.
038:         * <p/>
039:         * A set of stop words can be added/replace the stop words the internal analyzers are configured
040:         * with. The stop words will be added if the {@link #addStopWords()} is set to <code>true</code>.
041:         * <p/>
042:         * Further settings can be set for a specialized analyzer using {@link #settings()}. If the
043:         * specialized {@link Analyzer} requires settings to be injected, it needs to implement the
044:         * {@link org.compass.core.config.CompassConfigurable} interface.
045:         * <p/>
046:         * To replace Compas default analyzer, the {@link #name()} should be set
047:         * {@link org.compass.core.lucene.LuceneEnvironment.Analyzer#DEFAULT_GROUP}.
048:         * <p/>
049:         * To replace Compass search analyzer (which defaults to the default analyzer if not set), the
050:         * {@link #name()} should be set to {@link org.compass.core.lucene.LuceneEnvironment.Analyzer#SEARCH_GROUP}.
051:         * <p/>
052:         * Multiple analyzers can be defined using the {@link SearchAnalyzers} annotation.
053:         * <p/>
054:         * Note, that Analyzers can also be conifugred using Compass configuration mechanism.
055:         *
056:         * @author kimchy
057:         */
058:        @Target(ElementType.PACKAGE)
059:        @Retention(RetentionPolicy.RUNTIME)
060:        public @interface SearchAnalyzer {
061:
062:            /**
063:             * The name the analyzer will be registered under.
064:             */
065:            String name();
066:
067:            /**
068:             * The type of the analyzer. For custom {@link Analyzer} implementation
069:             * the {@link AnalyzerType#CustomAnalyzer} should be set, and the {@link #analyzerClass()}
070:             * should have the custom {@link Analyzer} class set.
071:             */
072:            AnalyzerType type();
073:
074:            /**
075:             * If the {@link #type()} is set to {@link AnalyzerType#Snowball}, controls
076:             * the snowball analyzer type.
077:             */
078:            SnowballType snowballType() default SnowballType.Porter;
079:
080:            /**
081:             * The custom {@link Analyzer} implementation. Used when the {@link #type()}
082:             * is set to {@link AnalyzerType#CustomAnalyzer}.
083:             */
084:            Class<? extends Analyzer> analyzerClass() default Analyzer.class;
085:
086:            /**
087:             * A set of {@link org.compass.core.lucene.engine.analyzer.LuceneAnalyzerTokenFilterProvider}s
088:             * lookup names to be used with the {@link Analyzer}.
089:             * <p/>
090:             * Filters can be configured using {@link SearchAnalyzerFilter} or using Compass configuration.
091:             */
092:            String[] filters() default {};
093:
094:            /**
095:             * A set of stop words that will be added/replace the stop words that comes with Compass intenral
096:             * analyzers.
097:             * <p/>
098:             * Only applies when using one of Compass internal analyzer types, and not the {@link AnalyzerType#CustomAnalyzer}.
099:             */
100:            String[] stopWords() default {};
101:
102:            /**
103:             * Add the set of {@link #stopWords()} to the default set of stop words if set to <code>true</code>.
104:             * Replaces them if set to <code>false</code>.
105:             * <p/>
106:             * Only applies when using one of Compass internal analyzer types, and not the {@link AnalyzerType#CustomAnalyzer}.
107:             */
108:            boolean addStopWords() default true;
109:
110:            /**
111:             * Futher settings for a custom {@link Analyzer} implementation.
112:             */
113:            SearchSetting[] settings() default {};
114:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.