Java Doc for SimpleLuceneQueryBean.java in  » Content-Management-System » apache-lenya-2.0 » org » apache » cocoon » bean » query » 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 » Content Management System » apache lenya 2.0 » org.apache.cocoon.bean.query 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.cocoon.bean.query.SimpleLuceneQueryBean

SimpleLuceneQueryBean
public class SimpleLuceneQueryBean implements SimpleLuceneQuery,Cloneable,Serializable(Code)
The query bean.

This object defines a Bean for searching.
The idea is to abstract the process of searching into a Bean to be manipulated by CForms.
This Bean is designed to be persistable.


version:
   CVS $Id: SimpleLuceneQueryBean.java 433543 2006-08-22 06:22:54Z crossley $


Field Summary
public static  LongDEFAULT_PAGE
     The DEFAULT_PAGE of this bean. ie.
public static  LongDEFAULT_PAGE_SIZE
     The DEFAULT_PAGE_SIZE of this bean. ie.
public static  StringINDEX_FIELD
     The INDEX_FIELD of this bean. This is the key of the hit index as output by this Bean in each hit. ie.
public static  StringSCORE_FIELD
     The SCORE_FIELD of this bean. This is the key of the Lucene Score as output by this Bean in each hit. ie.

Constructor Summary
public  SimpleLuceneQueryBean()
     Default constructor.
public  SimpleLuceneQueryBean(String type, String bool, String match, String field, String query)
     Utility constructor.

Method Summary
public  voidaddCriterion(SimpleLuceneCriterionBean criterion)
     Adds a Criterion the Bean.
Parameters:
  criterion - the SimpleLuceneCriterionBean to add to the Bean.
public  Objectclone()
    
public  StringgetBool()
     Gets the Bean's boolean operator. the String boolean of the Bean.
public  ListgetCriteria()
     Gets the Bean's criteria. the List of Bean Query criteria.
public  DategetDate()
     Gets the Bean's inception date. the Date of the Bean.
public  LonggetId()
     Gets the Bean's ID. the Long ID of the Bean.
public  StringgetName()
     Gets the Bean's name. the String name of the Bean.
public  LonggetPage()
     Gets the Bean's page index the Long page index of the Bean.
public  LonggetSize()
     Gets the Bean's page size the Long page size of the Bean.
public  LonggetTotal()
     Gets the Bean's hit count. the Long hit count of the Bean.
public  StringgetType()
     Gets the Bean's type. the String type of the Bean.
public  StringgetUser()
     Gets the Bean's owner. the String owner of the Bean.
public  voidremoveCriterion(SimpleLuceneCriterionBean criterion)
     Removes a Criterion from the Bean.
Parameters:
  criterion - the SimpleLuceneCriterionBean to remove from the Bean.
public  Listsearch(LuceneCocoonSearcher searcher)
     Gets the Bean to perform it's query

The searcher specifies which LuceneCocoonSearcher to use for this search.
It needs to have been initialised properly before use.
Each Map in the List returned by this method contains:

  • Each stored field from the Index
  • SCORE_FIELD the Lucene score
  • INDEX_FIELD the index of the hit


Parameters:
  searcher - The LuceneCocoonSearcher to use for this search a List of Maps, each representing a Hit.
public  voidsetBool(String bool)
     Sets the Bean's boolean operator. ie.
public  voidsetCriteria(List criteria)
     Sets the Bean's criteria.
Parameters:
  criteria - the List of Bean Query criteria.
public  voidsetDate(Date date)
     Sets the Bean's inception date.
Parameters:
  date - the Date inception date of the Bean.
public  voidsetId(Long id)
     Sets the Bean's ID.
Parameters:
  id - the Long ID of the Bean.
public  voidsetName(String name)
     Sets the Bean's Name.
Parameters:
  name - the String name of the Bean.
public  voidsetPage(Long page)
     Sets the Bean's page index. ie.
public  voidsetSize(Long size)
     Sets the Bean's page size. ie.
public  voidsetTotal(Long total)
     Sets the Bean's hit count.
Parameters:
  total - the Long hit count of the Bean.
public  voidsetType(String type)
     Sets the Bean's type.
Parameters:
  type - the String type of the Bean.
public  voidsetUser(String user)
     Sets the Bean's owner.
Parameters:
  user - the String owner of the Bean.

Field Detail
DEFAULT_PAGE
public static Long DEFAULT_PAGE(Code)
The DEFAULT_PAGE of this bean. ie. 0



DEFAULT_PAGE_SIZE
public static Long DEFAULT_PAGE_SIZE(Code)
The DEFAULT_PAGE_SIZE of this bean. ie. 20



INDEX_FIELD
public static String INDEX_FIELD(Code)
The INDEX_FIELD of this bean. This is the key of the hit index as output by this Bean in each hit. ie. _lucene-index_



SCORE_FIELD
public static String SCORE_FIELD(Code)
The SCORE_FIELD of this bean. This is the key of the Lucene Score as output by this Bean in each hit. ie. _lucene-score_




Constructor Detail
SimpleLuceneQueryBean
public SimpleLuceneQueryBean()(Code)
Default constructor.



SimpleLuceneQueryBean
public SimpleLuceneQueryBean(String type, String bool, String match, String field, String query)(Code)
Utility constructor.
Parameters:
  type - the type of this query
Parameters:
  bool - the kind of boolean opperation to apply to each of it's Criteria
Parameters:
  match - the kind of match to use for the generated Criterion
Parameters:
  field - the field to search for the generated Criterion
Parameters:
  query - the terms to search for the generated Criterion




Method Detail
addCriterion
public void addCriterion(SimpleLuceneCriterionBean criterion)(Code)
Adds a Criterion the Bean.
Parameters:
  criterion - the SimpleLuceneCriterionBean to add to the Bean.



clone
public Object clone() throws CloneNotSupportedException(Code)



getBool
public String getBool()(Code)
Gets the Bean's boolean operator. the String boolean of the Bean.



getCriteria
public List getCriteria()(Code)
Gets the Bean's criteria. the List of Bean Query criteria.



getDate
public Date getDate()(Code)
Gets the Bean's inception date. the Date of the Bean.



getId
public Long getId()(Code)
Gets the Bean's ID. the Long ID of the Bean.



getName
public String getName()(Code)
Gets the Bean's name. the String name of the Bean.



getPage
public Long getPage()(Code)
Gets the Bean's page index the Long page index of the Bean.



getSize
public Long getSize()(Code)
Gets the Bean's page size the Long page size of the Bean.



getTotal
public Long getTotal()(Code)
Gets the Bean's hit count. the Long hit count of the Bean.



getType
public String getType()(Code)
Gets the Bean's type. the String type of the Bean.



getUser
public String getUser()(Code)
Gets the Bean's owner. the String owner of the Bean.



removeCriterion
public void removeCriterion(SimpleLuceneCriterionBean criterion)(Code)
Removes a Criterion from the Bean.
Parameters:
  criterion - the SimpleLuceneCriterionBean to remove from the Bean.



search
public List search(LuceneCocoonSearcher searcher) throws IOException, ProcessingException(Code)
Gets the Bean to perform it's query

The searcher specifies which LuceneCocoonSearcher to use for this search.
It needs to have been initialised properly before use.
Each Map in the List returned by this method contains:

  • Each stored field from the Index
  • SCORE_FIELD the Lucene score
  • INDEX_FIELD the index of the hit


Parameters:
  searcher - The LuceneCocoonSearcher to use for this search a List of Maps, each representing a Hit.
exception:
  ProcessingException - thrown by the searcher
exception:
  IOException - thrown when the searcher's directory cannot be found



setBool
public void setBool(String bool)(Code)
Sets the Bean's boolean operator. ie. which kind of boolean operation do you want performed on each Criterion.
Parameters:
  bool - the String boolean of the Bean.



setCriteria
public void setCriteria(List criteria)(Code)
Sets the Bean's criteria.
Parameters:
  criteria - the List of Bean Query criteria.



setDate
public void setDate(Date date)(Code)
Sets the Bean's inception date.
Parameters:
  date - the Date inception date of the Bean.



setId
public void setId(Long id)(Code)
Sets the Bean's ID.
Parameters:
  id - the Long ID of the Bean.



setName
public void setName(String name)(Code)
Sets the Bean's Name.
Parameters:
  name - the String name of the Bean.



setPage
public void setPage(Long page)(Code)
Sets the Bean's page index. ie. which page do you want this Bean to show.
Parameters:
  page - the Long page index of the Bean.



setSize
public void setSize(Long size)(Code)
Sets the Bean's page size. ie. how many hits do you want this Bean to show on in page.
Parameters:
  size - the Long page size of the Bean.



setTotal
public void setTotal(Long total)(Code)
Sets the Bean's hit count.
Parameters:
  total - the Long hit count of the Bean.



setType
public void setType(String type)(Code)
Sets the Bean's type.
Parameters:
  type - the String type of the Bean.



setUser
public void setUser(String user)(Code)
Sets the Bean's owner.
Parameters:
  user - the String owner of the Bean.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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