Java Doc for SearchableProperty.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 Reference  Class Diagram Java Document (Java Doc) 


org.compass.annotations.SearchableProperty

SearchableProperty
public @interface SearchableProperty(Code)
Specifies a searchable property on property or field of the Searchable class.

The searchable property will automatically create a SearchableMetaData , with its name being the field/property name. It will not be created if the SearchableProperty.name() is not set AND there are either SearchableMetaData or SearchableMetaDatas annotating the class field/property. Most of the attributes that can control the meta-data are provided in the searchable property as well, they are marked in the java doc.

The searchable property/meta-data is meant to handle basic types (which usually translate to a String saved in the search engine). The conversion is done using converters, with Compass providing converters for most basic types. A specialized Converter can be associated with the auto generated meta-data using SearchableProperty.converter() . The specialized converter will implement the org.compass.core.converter.Converter interface, usually extending the org.compass.core.converter.basic.AbstractBasicConverter .

Another way of defining a converter for a class can be done using the SearchableClassConverter to annotate the class that needs conversion, with Compass auto detecting it.

Note, that most of the time, a specialized converter for user classes will not be needed, since the SearchableComponent usually makes more sense to use.

The searchable property can annotate a java.util.Collection type field/property, supporting either java.util.List or java.util.Set . The searchable property will try and automatically identify the element type using generics, but if the collection is not defined with generics, SearchableProperty.type() should be used to hint for the collection element type.

The searchable property can annotate an array as well, with the array element type used for Converter lookups.

Compass might require an internal meta-data to be created, so it can identify the correct value that match the property/field. Controlling the creation and specifics of the intenal meta-data id can be done using SearchableProperty.managedId() and SearchableProperty.managedIdIndex() .
author:
   kimchy



Field Summary
 Stringaccessor
     The property accessor that will be fetch and write the property value.

It is automatically set based on where the annotation is used, but can be explicitly set.

 Stringanalyzer
     The analyzer of the auto generated SearchableMetaData .
 floatboost
     The boost of the auto generated SearchableMetaData .
 Stringconverter
     The converter of the auto generated SearchableMetaData .
 ExcludeFromAllexcludeFromAll
     The exclude from all of the auto generated SearchableMetaData .
 Stringformat
     The format of the auto generated SearchableMetaData .
 Indexindex
     The index of the auto generated SearchableMetaData .
 ManagedIdmanagedId
     Controls if the internal meta-data id creation.
 ManagedIdIndexmanagedIdIndex
     If the internal meta-data id is created, controls it's index parameter.
 Stringname
     The name of the auto generated SearchableMetaData .
 StringnullValue
     A null value to use to store in the index when the property has a null value.
 booleanomitNorms
     The termVector of the auto generated SearchableMetaData .
 booleanoverride
     If there is already an existing id with the same field/property name defined, will override it.
 StringpropertyConverter
     Converter that will apply to the property mapping.
 Reversereverse
     The reverse of the auto generated SearchableMetaData .
 SpellCheckspellCheck
     Should this propety be included in the spell check index.
 Storestore
     The store of the auto generated SearchableMetaData .
 TermVectortermVector
     The termVector of the auto generated SearchableMetaData .
 Classtype
     The class type of the property.



Field Detail
accessor
String accessor(Code)
The property accessor that will be fetch and write the property value.

It is automatically set based on where the annotation is used, but can be explicitly set. Compass also supports custom property accessors, registered under a custom name, which can then be used here as well.




analyzer
String analyzer(Code)
The analyzer of the auto generated SearchableMetaData . Maps to org.compass.annotations.SearchableMetaData.analyzer .

The meta-data will NOT be auto generated if the field/property have SearchableMetaData / SearchableMetaDatas AND the SearchableProperty.name() is not set.




boost
float boost(Code)
The boost of the auto generated SearchableMetaData . Maps to org.compass.annotations.SearchableMetaData.boost .

The meta-data will NOT be auto generated if the field/property have SearchableMetaData / SearchableMetaDatas AND the SearchableProperty.name() is not set.




converter
String converter(Code)
The converter of the auto generated SearchableMetaData . Maps to org.compass.annotations.SearchableMetaData.converter . The meta-data will be auto generated only if the name has a value.

This converter will also be used for an internal meta-data id (if required to be generated).




excludeFromAll
ExcludeFromAll excludeFromAll(Code)
The exclude from all of the auto generated SearchableMetaData . Maps to org.compass.annotations.SearchableMetaData.excludeFromAll .

The meta-data will NOT be auto generated if the field/property have SearchableMetaData / SearchableMetaDatas AND the SearchableProperty.name() is not set.




format
String format(Code)
The format of the auto generated SearchableMetaData . Maps to org.compass.annotations.SearchableMetaData.format . The meta-data will be auto generated only if the name has a value.

This format will also be used for an internal meta-data id (if required to be generated).




index
Index index(Code)
The index of the auto generated SearchableMetaData . Maps to org.compass.annotations.SearchableMetaData.index .

The meta-data will NOT be auto generated if the field/property have SearchableMetaData / SearchableMetaDatas AND the SearchableProperty.name() is not set.




managedId
ManagedId managedId(Code)
Controls if the internal meta-data id creation.



managedIdIndex
ManagedIdIndex managedIdIndex(Code)
If the internal meta-data id is created, controls it's index parameter.



name
String name(Code)
The name of the auto generated SearchableMetaData . Maps to org.compass.annotations.SearchableMetaData.name . If no value is defined, will default to the class field/property name.

The meta-data will NOT be auto generated if the field/property have SearchableMetaData / SearchableMetaDatas AND the SearchableProperty.name() is not set.




nullValue
String nullValue(Code)
A null value to use to store in the index when the property has a null value. Defaults to not storing null values if the globabl setting of compass.mapping.nullvalue is not set. If it set, disabling the null value can be done by setting it to org.compass.core.config.CompassEnvironment.NullValue.DISABLE_NULL_VALUE_FOR_MAPPING value ($disable$).



omitNorms
boolean omitNorms(Code)
The termVector of the auto generated SearchableMetaData . Maps to SearchableMetaData.omitNorms .

The meta-data will NOT be auto generated if the field/property have SearchableMetaData / SearchableMetaDatas AND the SearchableProperty.name() is not set.




override
boolean override(Code)
If there is already an existing id with the same field/property name defined, will override it.



propertyConverter
String propertyConverter(Code)
Converter that will apply to the property mapping. Not the generated meta-data.



reverse
Reverse reverse(Code)
The reverse of the auto generated SearchableMetaData . Maps to org.compass.annotations.SearchableMetaData.reverse .

The meta-data will NOT be auto generated if the field/property have SearchableMetaData / SearchableMetaDatas AND the SearchableProperty.name() is not set.




spellCheck
SpellCheck spellCheck(Code)
Should this propety be included in the spell check index.

Note, most times this is not requried to be configured, since by default, the spell check index uses the "all" property.




store
Store store(Code)
The store of the auto generated SearchableMetaData . Maps to org.compass.annotations.SearchableMetaData.store .

The meta-data will NOT be auto generated if the field/property have SearchableMetaData / SearchableMetaDatas AND the SearchableProperty.name() is not set.




termVector
TermVector termVector(Code)
The termVector of the auto generated SearchableMetaData . Maps to org.compass.annotations.SearchableMetaData.termVector .

The meta-data will NOT be auto generated if the field/property have SearchableMetaData / SearchableMetaDatas AND the SearchableProperty.name() is not set.




type
Class type(Code)
The class type of the property. Mainly used for Collection properties, without specific Generic type parameter.





www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.