Java Doc for SearchContext.java in  » Portal » Open-Portal » com » sun » portal » search » providers » 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 » Portal » Open Portal » com.sun.portal.search.providers 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.portal.search.demo.Search
      com.sun.portal.search.providers.SearchContext

SearchContext
public class SearchContext extends Search (Code)
This class provides convenient methods to handle advanced search and also evolved from the frontend application requirements.


See Also:   com.sun.portal.search.demo.Search


Field Summary
final public static  StringALL
    
final public static  StringANY
    
final public static  StringCONTAIN
    
final public static  StringEQUAL
    
final public static  StringEXACT
    
final public static  StringGREATER
    
final public static  StringLESS
    
final public static  StringNOT
    
final public static  StringNOTCONTAIN
    
final public static  StringNOTEQUAL
    
final public static  StringOPERAND
    
final public static  StringOPERATION
    
final public static  StringPASSAGE
    
final public static  StringVALUE
    

Constructor Summary
public  SearchContext()
    

Method Summary
public  voidexecute()
     Executes the query

Calls the parent doQuery() method after doing some preprocessing to the query string.

public  StringgetCategory()
     Gets the value of category

The category value is used to create the scope value in the execute() method. The scope and the category are combined together based on the type of request.

public  intgetPage()
    
public  intgetTotalPages()
     Gets the total pages

Calculated based on the hitCount and viewHits.

public static  StringhtmlEncode(String s)
    
public  voidsetCategory(String bc)
     Sets the category value.
public  voidsetPage(int p)
     Sets the current page value.
public  voidsetScope(ArrayList c)
     Sets the list of criteria for the scope.
public  voidsetSearchAllCategories(boolean all)
     Sets the searchAllCategories property.

Field Detail
ALL
final public static String ALL(Code)
corresponds to <ALL> string operation



ANY
final public static String ANY(Code)
corresponds to <OR> operation



CONTAIN
final public static String CONTAIN(Code)
corresponds to <CONTAINS> operation



EQUAL
final public static String EQUAL(Code)
corresponds to '=' operation used to compare number type



EXACT
final public static String EXACT(Code)
corresponds to <EXACT> string operation



GREATER
final public static String GREATER(Code)
corresponds to '>' operation used to compare number type



LESS
final public static String LESS(Code)
corresponds to '<' operation used to compare number type



NOT
final public static String NOT(Code)
corresponds to <NOT> operation



NOTCONTAIN
final public static String NOTCONTAIN(Code)
corresponds to <NOT> <CONTAINS> operation



NOTEQUAL
final public static String NOTEQUAL(Code)
corresponds to 'not equal to' operation used to compare number type



OPERAND
final public static String OPERAND(Code)



OPERATION
final public static String OPERATION(Code)
The operation in a list element



PASSAGE
final public static String PASSAGE(Code)
corresponds to <PASSAGE> string operation



VALUE
final public static String VALUE(Code)
The right operand in a list element




Constructor Detail
SearchContext
public SearchContext()(Code)
Public Constructor calls super()




Method Detail
execute
public void execute() throws Exception(Code)
Executes the query

Calls the parent doQuery() method after doing some preprocessing to the query string. Merges category, searchAllCategories, scope string into a final scope string.
exception:
  Exception - is thrown if any of the input parameters are not specified or if the resultset is null or if connection to the search server failed




getCategory
public String getCategory()(Code)
Gets the value of category

The category value is used to create the scope value in the execute() method. The scope and the category are combined together based on the type of request. taxonomy-request v/s rd-request The current category value
See Also:   SearchContext.setSearchAllCategories(boolean)




getPage
public int getPage()(Code)
Gets the current page value the current page value



getTotalPages
public int getTotalPages()(Code)
Gets the total pages

Calculated based on the hitCount and viewHits. totalPages has no value if called before calling execute() first total pages




htmlEncode
public static String htmlEncode(String s)(Code)
Encodes > <, ", & characters
Parameters:
  s - string that needs to be html encoded



setCategory
public void setCategory(String bc)(Code)
Sets the category value.

category setting is mainly required if category search is needed.
Parameters:
  bc - is the current category level, If the category is not set then the category is set to the root of the taxonomy tree and the searchis executed for all categories.
See Also:   SearchContext.getCategory()
See Also:   SearchContext.setSearchAllCategories(boolean)




setPage
public void setPage(int p)(Code)
Sets the current page value.

firstHit for searches is calculated based on the current page and viewHits.
Parameters:
  page - is the current page value




setScope
public void setScope(ArrayList c)(Code)
Sets the list of criteria for the scope.

Advanced search related methods.The list should have specific operands, operations and values. The list is then internally converted to a String query as per the search engine query language.
Parameters:
  c - criteria list for the search query




setSearchAllCategories
public void setSearchAllCategories(boolean all)(Code)
Sets the searchAllCategories property.

This property value is used in the execute() to create the scope
Parameters:
  all - true implies that search should be in all the cateogories and false means that search should be within a specific category




Fields inherited from com.sun.portal.search.demo.Search
protected String RDMServer(Code)(Java Doc)
protected String RDMType(Code)(Java Doc)
protected String SSOToken(Code)(Java Doc)
protected String database(Code)(Java Doc)
protected int firstHit(Code)(Java Doc)
public String proxyDN(Code)(Java Doc)
protected String query(Code)(Java Doc)
protected String queryLanguage(Code)(Java Doc)
protected String scope(Code)(Java Doc)
protected String viewAttributes(Code)(Java Doc)
protected int viewHits(Code)(Java Doc)
protected String viewOrder(Code)(Java Doc)

Methods inherited from com.sun.portal.search.demo.Search
public void doQuery()(Code)(Java Doc)
public void doQuery(boolean catchException) throws Exception(Code)(Java Doc)
public void doQuery(int firstHit, int viewHits)(Code)(Java Doc)
public String getDatabase()(Code)(Java Doc)
public int getDocumentCount()(Code)(Java Doc)
public int getFirstHit()(Code)(Java Doc)
public int getHitCount()(Code)(Java Doc)
public String getProxyDN()(Code)(Java Doc)
public String getQuery()(Code)(Java Doc)
public String getQueryLanguage()(Code)(Java Doc)
public SOIF getRDMHeaderSOIF()(Code)(Java Doc)
public String getRDMServer()(Code)(Java Doc)
public String getRDMType()(Code)(Java Doc)
public int getResultCount()(Code)(Java Doc)
public SOIFInputStream getResultStream()(Code)(Java Doc)
public String getScope()(Code)(Java Doc)
public String getSessionID()(Code)(Java Doc)
public int getToHit()(Code)(Java Doc)
public String getViewAttributes()(Code)(Java Doc)
public int getViewHits()(Code)(Java Doc)
public String getViewOrder()(Code)(Java Doc)
public boolean noHits()(Code)(Java Doc)
public void setDatabase(String database)(Code)(Java Doc)
public void setFirstHit(int firstHit)(Code)(Java Doc)
public void setProxyDN(String proxyDN)(Code)(Java Doc)
public void setQueryLanguage(String queryLanguage)(Code)(Java Doc)
public void setRDMServer(String RDMServer)(Code)(Java Doc)
public void setRDMType(String RDMType)(Code)(Java Doc)
public void setSOIFParse(boolean b)(Code)(Java Doc)
public void setScope(String scope)(Code)(Java Doc)
public void setSessionID(String sessID)(Code)(Java Doc)
public void setStreamMode(boolean m)(Code)(Java Doc)
public void setViewAttributes(String viewAttributes)(Code)(Java Doc)
public void setViewHits(int viewHits)(Code)(Java Doc)
public void setViewOrder(String viewOrder)(Code)(Java Doc)
public String toString()(Code)(Java Doc)

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.