Source Code Cross Referenced for FieldSelectorResult.java in  » Net » lucene-connector » org » apache » lucene » document » 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 » Net » lucene connector » org.apache.lucene.document 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package org.apache.lucene.document;
002:
003:        import java.io.Serializable;
004:
005:        /**
006:         * Copyright 2004 The Apache Software Foundation
007:         *
008:         * Licensed under the Apache License, Version 2.0 (the "License");
009:         * you may not use this file except in compliance with the License.
010:         * You may obtain a copy of the License at
011:         *
012:         *     http://www.apache.org/licenses/LICENSE-2.0
013:         *
014:         * Unless required by applicable law or agreed to in writing, software
015:         * distributed under the License is distributed on an "AS IS" BASIS,
016:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
017:         * See the License for the specific language governing permissions and
018:         * limitations under the License.
019:         */
020:
021:        /**
022:         *  Provides information about what should be done with this Field 
023:         *
024:         **/
025:        //Replace with an enumerated type in 1.5
026:        public final class FieldSelectorResult implements  Serializable {
027:
028:            /**
029:             * Load this {@link Field} every time the {@link Document} is loaded, reading in the data as it is encounterd.
030:             *  {@link Document#getField(String)} and {@link Document#getFieldable(String)} should not return null.
031:             *<p/>
032:             * {@link Document#add(Fieldable)} should be called by the Reader.
033:             */
034:            public transient static final FieldSelectorResult LOAD = new FieldSelectorResult(
035:                    0);
036:            /**
037:             * Lazily load this {@link Field}.  This means the {@link Field} is valid, but it may not actually contain its data until
038:             * invoked.  {@link Document#getField(String)} SHOULD NOT BE USED.  {@link Document#getFieldable(String)} is safe to use and should
039:             * return a valid instance of a {@link Fieldable}.
040:             *<p/>
041:             * {@link Document#add(Fieldable)} should be called by the Reader.
042:             */
043:            public transient static final FieldSelectorResult LAZY_LOAD = new FieldSelectorResult(
044:                    1);
045:            /**
046:             * Do not load the {@link Field}.  {@link Document#getField(String)} and {@link Document#getFieldable(String)} should return null.
047:             * {@link Document#add(Fieldable)} is not called.
048:             * <p/>
049:             * {@link Document#add(Fieldable)} should not be called by the Reader.
050:             */
051:            public transient static final FieldSelectorResult NO_LOAD = new FieldSelectorResult(
052:                    2);
053:            /**
054:             * Load this field as in the {@link #LOAD} case, but immediately return from {@link Field} loading for the {@link Document}.  Thus, the
055:             * Document may not have its complete set of Fields.  {@link Document#getField(String)} and {@link Document#getFieldable(String)} should
056:             * both be valid for this {@link Field}
057:             * <p/>
058:             * {@link Document#add(Fieldable)} should be called by the Reader.
059:             */
060:            public transient static final FieldSelectorResult LOAD_AND_BREAK = new FieldSelectorResult(
061:                    3);
062:            /**
063:             * Behaves much like {@link #LOAD} but does not uncompress any compressed data.  This is used for internal purposes.
064:             * {@link Document#getField(String)} and {@link Document#getFieldable(String)} should not return null.
065:             * <p/>
066:             * {@link Document#add(Fieldable)} should be called by the Reader.
067:             */
068:            public transient static final FieldSelectorResult LOAD_FOR_MERGE = new FieldSelectorResult(
069:                    4);
070:
071:            /** Expert:  Load the size of this {@link Field} rather than its value.
072:             * Size is measured as number of bytes required to store the field == bytes for a binary or any compressed value, and 2*chars for a String value.
073:             * The size is stored as a binary value, represented as an int in a byte[], with the higher order byte first in [0]
074:             */
075:            public transient static final FieldSelectorResult SIZE = new FieldSelectorResult(
076:                    5);
077:
078:            /** Expert: Like {@link #SIZE} but immediately break from the field loading loop, i.e., stop loading further fields, after the size is loaded */
079:            public transient static final FieldSelectorResult SIZE_AND_BREAK = new FieldSelectorResult(
080:                    6);
081:
082:            private int id;
083:
084:            private FieldSelectorResult(int id) {
085:                this .id = id;
086:            }
087:
088:            public boolean equals(Object o) {
089:                if (this  == o)
090:                    return true;
091:                if (o == null || getClass() != o.getClass())
092:                    return false;
093:
094:                final FieldSelectorResult that = (FieldSelectorResult) o;
095:
096:                if (id != that.id)
097:                    return false;
098:
099:                return true;
100:            }
101:
102:            public int hashCode() {
103:                return id;
104:            }
105:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.