Java Doc for Search.java in  » Content-Management-System » harmonise » org » openharmonise » rm » search » 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 » harmonise » org.openharmonise.rm.search 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.openharmonise.rm.search.Search

Search
public class Search implements Publishable(Code)

Provides an interface to construct and run searches over resources within the repository, allowing metadata conditions to be specified using implementations of AbstractPropertyInstance core data conditions to be specified using ColumnRef. The class also implements Publishable in order that a search can be specified in HaRP and the results can be published as XML.


author:
   Michael Bell
version:
   $Revision: 1.10 $


Field Summary
final public static  StringATTRIB_INCLUSIVE
    
final public static  StringATTRIB_MAXRESULTS
    
final public static  StringATTRIB_OBJECT_TYPE
    
final public static  StringATTRIB_ORDERBY
    
final public static  StringATTRIB_ORDER_DIRECTION
    
final public static  StringATTRIB_SELECTED
    
final public static  StringATTRIB_STRICT_TYPING
    
final public static  StringATTRIB_SUB
    
final public static  StringTAG_AND
    
final public static  StringTAG_COMMENT
    
final public static  StringTAG_CONDITIONS
    
final public static  StringTAG_DISPLAY
    
final public static  StringTAG_FILTERCONDITIONS
    
final public static  StringTAG_FILTERSOURCE
    
final public static  StringTAG_FURTHERLINKS
    
final public static  StringTAG_LIST
    
final public static  StringTAG_NUMBER
    
final public static  StringTAG_OR
    
final public static  StringTAG_POSITION
    
final public static  StringTAG_SEARCH
    
final public static  StringTAG_SEARCHCONDITIONS
    
final public static  StringTAG_SEARCHTEXT
    
final public static  StringTAG_SEARCH_OBJECT
    
final public static  StringTAG_SUBMIT
    
final public static  StringTAG_TOTAL
    
protected  Listm_ConditionColumns
     Vector of WhereCondition objects, all of the columns that an object manages itself.
protected  Listm_ConditionGroups
    
protected  Stringm_ConditionOperator
    
protected  Listm_ConditionProfile
    
protected  Listm_SearchColumns
    
protected  Listm_SearchProfile
    
protected  booleanm_bApprovedSearch
    
protected  booleanm_bFilterCondsInclusive
    
protected  booleanm_bFilterCondsNotFound
    
protected  booleanm_bIndexableSearch
    
protected  booleanm_bStrictType
    
protected  CachedResultSetm_cached_rs
    
protected  AbstractDataStoreInterfacem_dsi
    
protected  Vectorm_filterProps
    
protected  intm_nLimit
    
protected  intm_nPosition
    
protected  intm_nResultTotal
    
protected  Mapm_orderByColMap
    
protected  Mapm_orderByPropMap
    
protected  Stringm_sFilterObjectClassname
    
protected  Stringm_sId
    
protected  Stringm_sName
    
protected  Stringm_sOrderDirection
    
protected  Stringm_sSearchText
    
protected  Stringm_sSearchType
    
protected  DataStoreObjectm_searchObject
    
protected  Profilem_searchObjectProfile
    

Constructor Summary
public  Search()
    
public  Search(AbstractDataStoreInterface dbinterf)
     Standard constructor with interface to the DB.

Method Summary
public  voidaddConditionColumn(ColumnRef colref, String sOperator, Vector values)
     Adds a condition to the search.
public  voidaddConditionGroup(AbstractParentObject grpObj)
     Adds a relationship condition to the search such that results will be children of the given AbstractParentObject.
public  voidaddConditionProfile(Profile prof)
     Adds conditions to the search defined by the given Profile, i.e.
public  voidaddConditionProperty(AbstractPropertyInstance propInst)
     Adds a condition to this search which is defined by the given AbstractPropertyInstance.
protected  voidaddFilterSourceConditions(Element xmlElement, State state)
     Adds conditions to the search based on the filter source found in the State.
public  voidaddSelectColumn(ColumnRef colref)
     Adds a select column to be returned in the search.
public  voidaddSelectProperty(AbstractPropertyInstance propInst)
     Adds a select column to be returned in the search which corresponds to the given property instance.
public  voidaddSubGroupsAsConditions(AbstractParentObject grpObj)
     Adds the sub groups of the given AbstractParentObject as conditions of this search.
public  voidcacheResults(boolean bCache)
     Switch caching of results on or off.
public  ListexecuteSearch()
     Executed the search and returns a vector of objects representing the results of the search.
public  SelectStatementgenerateSelectStatement()
    
public  ListgetConditionGroups()
    
public  ListgetConditionProfile()
    
public  SetgetOrderByColumns()
     Returns a Set of ColumnRefs which represents the column by which the results will be ordered.
public  StringgetOrderDirection(ColumnRef colref)
     Returns the direction the results will be ordered in for the specified column reference.
public  ListgetSearchColumns()
    
protected  StringgetSearchText()
    
public  DataStoreObjectgetSearchType()
     Returns an object of the type that the search will be conducted on.
public  StringgetTagName()
    
public  booleanisApprovedSearch()
    
protected  Elementlist(Element list, HarmoniseOutput output, State state)
     Publishes the 'List' element.
public  voidpopulate(Element xmlElement, State state)
    
protected  voidprocessFilterConditions(Element xmlElement)
     Populates the search with filter conditions found in xmlElement.
protected  voidprocessSearchConditions(Element xmlElement, State state)
     Processes a 'Conditions' element to extract the conditions to be used in the search.
public  org.w3c.dom.Elementpublish(Template template, HarmoniseOutput xmlDoc, State state)
    
public  org.w3c.dom.Elementpublish(Element topEl, HarmoniseOutput xmlDoc, State state)
    
protected  voidpublishResults(Element list, HarmoniseOutput output, State state, Template template, List results, int nPageId)
     Publishes the results contained in results using the given Template under the Element list.
protected  Elementsearch(Element search, HarmoniseOutput output, State state)
     Publishes the 'Search' element, at most fills in available values for property instances.
public  voidsetApproved(boolean bApproved)
    
public  voidsetOrderBy(ColumnRef colref, String sOrderDirection)
     Sets the column which will be used for ordering the results as well as the direction of the ordering.
public  voidsetOrderBy(AbstractPropertyInstance propInst, String sOrderDirection)
     Sets the property instance which should be used to order the search results as well as the direction of the ordering.
public  voidsetResultSize(int nNum)
     Sets the maximum size of the list of results.
protected  voidsetSearchText(String sSearchText)
     Sets the text associated with this search.
public  voidsetSearchType(DataStoreObject dobj)
     Sets the object type that the search will be conducted on.
public  voidsetStringingOperator(String sOp)
     Sets the logical stringing operator to use between conditions.

Field Detail
ATTRIB_INCLUSIVE
final public static String ATTRIB_INCLUSIVE(Code)



ATTRIB_MAXRESULTS
final public static String ATTRIB_MAXRESULTS(Code)



ATTRIB_OBJECT_TYPE
final public static String ATTRIB_OBJECT_TYPE(Code)



ATTRIB_ORDERBY
final public static String ATTRIB_ORDERBY(Code)



ATTRIB_ORDER_DIRECTION
final public static String ATTRIB_ORDER_DIRECTION(Code)



ATTRIB_SELECTED
final public static String ATTRIB_SELECTED(Code)



ATTRIB_STRICT_TYPING
final public static String ATTRIB_STRICT_TYPING(Code)



ATTRIB_SUB
final public static String ATTRIB_SUB(Code)



TAG_AND
final public static String TAG_AND(Code)



TAG_COMMENT
final public static String TAG_COMMENT(Code)



TAG_CONDITIONS
final public static String TAG_CONDITIONS(Code)



TAG_DISPLAY
final public static String TAG_DISPLAY(Code)



TAG_FILTERCONDITIONS
final public static String TAG_FILTERCONDITIONS(Code)



TAG_FILTERSOURCE
final public static String TAG_FILTERSOURCE(Code)



TAG_FURTHERLINKS
final public static String TAG_FURTHERLINKS(Code)



TAG_LIST
final public static String TAG_LIST(Code)



TAG_NUMBER
final public static String TAG_NUMBER(Code)



TAG_OR
final public static String TAG_OR(Code)



TAG_POSITION
final public static String TAG_POSITION(Code)



TAG_SEARCH
final public static String TAG_SEARCH(Code)



TAG_SEARCHCONDITIONS
final public static String TAG_SEARCHCONDITIONS(Code)



TAG_SEARCHTEXT
final public static String TAG_SEARCHTEXT(Code)



TAG_SEARCH_OBJECT
final public static String TAG_SEARCH_OBJECT(Code)



TAG_SUBMIT
final public static String TAG_SUBMIT(Code)



TAG_TOTAL
final public static String TAG_TOTAL(Code)



m_ConditionColumns
protected List m_ConditionColumns(Code)
Vector of WhereCondition objects, all of the columns that an object manages itself.



m_ConditionGroups
protected List m_ConditionGroups(Code)
Vector of GroupObjects identifying which groups should be in the search



m_ConditionOperator
protected String m_ConditionOperator(Code)
String operator to link the condition profile properties



m_ConditionProfile
protected List m_ConditionProfile(Code)
the properties to be used in the search



m_SearchColumns
protected List m_SearchColumns(Code)
Vector of ColumnRefs, identifies which columns should be returned



m_SearchProfile
protected List m_SearchProfile(Code)
Vector of Properties, identifies which Properties should be returned



m_bApprovedSearch
protected boolean m_bApprovedSearch(Code)



m_bFilterCondsInclusive
protected boolean m_bFilterCondsInclusive(Code)



m_bFilterCondsNotFound
protected boolean m_bFilterCondsNotFound(Code)



m_bIndexableSearch
protected boolean m_bIndexableSearch(Code)



m_bStrictType
protected boolean m_bStrictType(Code)



m_cached_rs
protected CachedResultSet m_cached_rs(Code)



m_dsi
protected AbstractDataStoreInterface m_dsi(Code)



m_filterProps
protected Vector m_filterProps(Code)



m_nLimit
protected int m_nLimit(Code)



m_nPosition
protected int m_nPosition(Code)



m_nResultTotal
protected int m_nResultTotal(Code)



m_orderByColMap
protected Map m_orderByColMap(Code)



m_orderByPropMap
protected Map m_orderByPropMap(Code)



m_sFilterObjectClassname
protected String m_sFilterObjectClassname(Code)



m_sId
protected String m_sId(Code)



m_sName
protected String m_sName(Code)



m_sOrderDirection
protected String m_sOrderDirection(Code)



m_sSearchText
protected String m_sSearchText(Code)



m_sSearchType
protected String m_sSearchType(Code)



m_searchObject
protected DataStoreObject m_searchObject(Code)



m_searchObjectProfile
protected Profile m_searchObjectProfile(Code)




Constructor Detail
Search
public Search()(Code)
Basic constructor



Search
public Search(AbstractDataStoreInterface dbinterf)(Code)
Standard constructor with interface to the DB.
Parameters:
  dbinterf -




Method Detail
addConditionColumn
public void addConditionColumn(ColumnRef colref, String sOperator, Vector values) throws DataStoreException(Code)
Adds a condition to the search. Defined by column, operator and value.
Parameters:
  colref -
Parameters:
  sOperator -
Parameters:
  values -
throws:
  DataStoreException -



addConditionGroup
public void addConditionGroup(AbstractParentObject grpObj)(Code)
Adds a relationship condition to the search such that results will be children of the given AbstractParentObject.
Parameters:
  grpObj -



addConditionProfile
public void addConditionProfile(Profile prof) throws DataAccessException(Code)
Adds conditions to the search defined by the given Profile, i.e. the conditions will be specified by the property instances the profile contains.
Parameters:
  prof -
throws:
  DataAccessException -



addConditionProperty
public void addConditionProperty(AbstractPropertyInstance propInst)(Code)
Adds a condition to this search which is defined by the given AbstractPropertyInstance.
Parameters:
  propInst -



addFilterSourceConditions
protected void addFilterSourceConditions(Element xmlElement, State state) throws PublishException(Code)
Adds conditions to the search based on the filter source found in the State. Given a set of property instances specified in xmlElement, the filter source object is located and values for the conditions are taken for the conditions.
Parameters:
  xmlElement -
Parameters:
  state -
throws:
  PublishException -



addSelectColumn
public void addSelectColumn(ColumnRef colref)(Code)
Adds a select column to be returned in the search. Objects which are returned will be populated with this data from the executed search as an optimisation. Note: the column referenced will be associated to the object's core data rather than profile data
Parameters:
  colref -



addSelectProperty
public void addSelectProperty(AbstractPropertyInstance propInst)(Code)
Adds a select column to be returned in the search which corresponds to the given property instance. Objects which are returned will be populated with this data from the executed search as an optimisation.
Parameters:
  propInst -



addSubGroupsAsConditions
public void addSubGroupsAsConditions(AbstractParentObject grpObj) throws DataAccessException(Code)
Adds the sub groups of the given AbstractParentObject as conditions of this search.
Parameters:
  grpObj -
throws:
  DataAccessException -



cacheResults
public void cacheResults(boolean bCache)(Code)
Switch caching of results on or off. Default is on.
Parameters:
  bCache -



executeSearch
public List executeSearch() throws SearchException, HarmoniseIndexerException, DataAccessException, DataStoreException(Code)
Executed the search and returns a vector of objects representing the results of the search. @throwsSearchException
throws:
  HarmoniseIndexerException -
throws:
  DataAccessException -
throws:
  DataStoreException -



generateSelectStatement
public SelectStatement generateSelectStatement() throws SearchException, HarmoniseIndexerException, DataAccessException, DataStoreException(Code)



getConditionGroups
public List getConditionGroups()(Code)
Returns the m_ConditionGroups.



getConditionProfile
public List getConditionProfile()(Code)



getOrderByColumns
public Set getOrderByColumns()(Code)
Returns a Set of ColumnRefs which represents the column by which the results will be ordered. a Set of ColumnRefs



getOrderDirection
public String getOrderDirection(ColumnRef colref)(Code)
Returns the direction the results will be ordered in for the specified column reference. the direction the results will be ordered infor the specified column reference



getSearchColumns
public List getSearchColumns()(Code)
Returns the m_SearchColumns.



getSearchText
protected String getSearchText()(Code)
Returns the text associated with this search



getSearchType
public DataStoreObject getSearchType()(Code)
Returns an object of the type that the search will be conducted on.



getTagName
public String getTagName()(Code)



isApprovedSearch
public boolean isApprovedSearch()(Code)



list
protected Element list(Element list, HarmoniseOutput output, State state) throws PublishException(Code)
Publishes the 'List' element. Executes the search defined by the XML and returns XML which will be a list of results published as specified by the 'Template' child element of 'List'.
Parameters:
  list -
Parameters:
  output -
Parameters:
  state - @throwsPublishException



populate
public void populate(Element xmlElement, State state) throws PopulateException(Code)



processFilterConditions
protected void processFilterConditions(Element xmlElement) throws PublishException(Code)
Populates the search with filter conditions found in xmlElement.
Parameters:
  xmlElement -
throws:
  PublishException -



processSearchConditions
protected void processSearchConditions(Element xmlElement, State state) throws PublishException(Code)
Processes a 'Conditions' element to extract the conditions to be used in the search.
Parameters:
  xmlElement -
Parameters:
  state -
throws:
  PublishException -



publish
public org.w3c.dom.Element publish(Template template, HarmoniseOutput xmlDoc, State state) throws PublishException(Code)



publish
public org.w3c.dom.Element publish(Element topEl, HarmoniseOutput xmlDoc, State state) throws PublishException(Code)



publishResults
protected void publishResults(Element list, HarmoniseOutput output, State state, Template template, List results, int nPageId) throws PublishException(Code)
Publishes the results contained in results using the given Template under the Element list.
Parameters:
  list -
Parameters:
  output -
Parameters:
  state -
Parameters:
  template -
Parameters:
  results -
Parameters:
  nPageId -
throws:
  PublishException -



search
protected Element search(Element search, HarmoniseOutput output, State state) throws PublishException(Code)
Publishes the 'Search' element, at most fills in available values for property instances.
Parameters:
  search -
Parameters:
  output -
Parameters:
  state - @throwsPublishException



setApproved
public void setApproved(boolean bApproved)(Code)

Parameters:
  b -



setOrderBy
public void setOrderBy(ColumnRef colref, String sOrderDirection)(Code)
Sets the column which will be used for ordering the results as well as the direction of the ordering.
Parameters:
  colref -
Parameters:
  sOrderDirection -



setOrderBy
public void setOrderBy(AbstractPropertyInstance propInst, String sOrderDirection)(Code)
Sets the property instance which should be used to order the search results as well as the direction of the ordering.
Parameters:
  propInst -
Parameters:
  sOrderDirection -



setResultSize
public void setResultSize(int nNum)(Code)
Sets the maximum size of the list of results.
Parameters:
  nNum -



setSearchText
protected void setSearchText(String sSearchText)(Code)
Sets the text associated with this search.
Parameters:
  sSearchText -



setSearchType
public void setSearchType(DataStoreObject dobj) throws DataStoreException(Code)
Sets the object type that the search will be conducted on.
Parameters:
  dobj -
throws:
  DataStoreException -



setStringingOperator
public void setStringingOperator(String sOp)(Code)
Sets the logical stringing operator to use between conditions.
Parameters:
  sOp -



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.