Java Doc for SearchGroup.java in  » IDE-Netbeans » library » org » openidex » 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 » IDE Netbeans » library » org.openidex.search 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.openidex.search.SearchGroup

All known Subclasses:   org.openidex.search.FileObjectSearchGroup,  org.openidex.search.DataObjectSearchGroup,
SearchGroup
abstract public class SearchGroup (Code)
Class which groups individual search types. It provides several services to provide search on them. The services are scanning node system to provide search object for group of search types -> efficient search.
author:
   Peter Zavadsky
author:
   Marian Petras

Inner Class :public interface Factory
Inner Class :final public static class Registry extends Object

Field Summary
final public static  StringPROP_FOUND
     Property name which is fired when performing search and searched object passed criteria.
final public static  StringPROP_RESULT
     Property name which is fired for in for the case original node's has changed the way result was changed based on set criteria.
final protected  Set<Object>resultObjects
     Set of objects which passed the search criteria (searchtypes).
final protected  Set<Node>searchRoots
     Set of nodes on which sub-system to search.
protected  SearchType[]searchTypes
    
protected volatile  booleanstopped
     Flag indicating the search should be stopped.


Method Summary
protected  voidadd(SearchType searchType)
     Adds a search type to this search group.
public synchronized  voidaddPropertyChangeListener(PropertyChangeListener l)
     Adds property change listener.
public static  SearchGroup[]createSearchGroups(SearchType[] items)
     Creates a search group for each type of object searchable by all the specified search types.

At first, a set of object types common to all search types (i.e.

abstract protected  voiddoSearch()
     Provides actual search.
protected  voidfirePropertyChange(String name, Object oldValue, Object newValue)
     Fires property change event.
abstract public  NodegetNodeForFoundObject(Object object)
     Gets node for found object.
public  Set<Object>getResultObjects()
     Getter for result object property.
public  Node[]getSearchRoots()
     Gets search root nodes.
public  SearchType[]getSearchTypes()
     Returns list of search types.
protected  voidprepareSearch()
     Prepares search.
protected  voidprocessSearchObject(Object searchObject)
     Provides search on one search object instance.
public synchronized  voidremovePropertyChangeListener(PropertyChangeListener l)
     Removes property change listener.
public  voidsearch()
     Does search.
public  voidsetSearchRootNodes(Node[] roots)
     Sets roots of nodes in which its interested to search.
final public  voidstopSearch()
     Stops searching.

Field Detail
PROP_FOUND
final public static String PROP_FOUND(Code)
Property name which is fired when performing search and searched object passed criteria.



PROP_RESULT
final public static String PROP_RESULT(Code)
Property name which is fired for in for the case original node's has changed the way result was changed based on set criteria. Interested listeners should then get the event with values
  • property change name = PROP_RESULT
  • property source = this search type instance
  • old value = detail which was changed or null there wasn't before for the node -> new value has to be non-null for the latter case.
  • new value = detail which was changed or null if the node was removed from the result -> old value has to be non-null for that case
This allows implementation of the dynamic changing of result suggested by Jesse and Sebastian (at least partially implemented now).



resultObjects
final protected Set<Object> resultObjects(Code)
Set of objects which passed the search criteria (searchtypes).



searchRoots
final protected Set<Node> searchRoots(Code)
Set of nodes on which sub-system to search.



searchTypes
protected SearchType[] searchTypes(Code)
search types added to this search group



stopped
protected volatile boolean stopped(Code)
Flag indicating the search should be stopped.





Method Detail
add
protected void add(SearchType searchType)(Code)
Adds a search type to this search group. If the group already contains the search type, the group is left unmodified.
Parameters:
  searchType - search type to be added



addPropertyChangeListener
public synchronized void addPropertyChangeListener(PropertyChangeListener l)(Code)
Adds property change listener.



createSearchGroups
public static SearchGroup[] createSearchGroups(SearchType[] items)(Code)
Creates a search group for each type of object searchable by all the specified search types.

At first, a set of object types common to all search types (i.e. Classs representing object types, common to all search types) is computed. Then a search group is created for each of the Classs.
Parameters:
  search - types to create search groups for created search groups
See Also:   SearchType.getSearchTypeClasses




doSearch
abstract protected void doSearch()(Code)
Provides actual search. The subclasses implementating this method should scan the node system specified by searchRoots, extract search objects from them, add them to the search object set, test over all search type items in this group, in case if satisfied all it should fire PROP_FOUND property change and add the object to resultObjects set. The method implemenatation should call SearchGroup.processSearchObject method for each search object in the node systems.



firePropertyChange
protected void firePropertyChange(String name, Object oldValue, Object newValue)(Code)
Fires property change event.



getNodeForFoundObject
abstract public Node getNodeForFoundObject(Object object)(Code)
Gets node for found object.



getResultObjects
public Set<Object> getResultObjects()(Code)
Getter for result object property.



getSearchRoots
public Node[] getSearchRoots()(Code)
Gets search root nodes.



getSearchTypes
public SearchType[] getSearchTypes()(Code)
Returns list of search types. search types added to this group
See Also:   SearchGroup.add



prepareSearch
protected void prepareSearch()(Code)
Prepares search.



processSearchObject
protected void processSearchObject(Object searchObject)(Code)
Provides search on one search object instance. The object is added to set of searched objects and passed to all search types encapsulated by this search group. In the case the object passes all search types is added to the result set and fired an event PROP_FOUND about successful match to interested property change listeners.
Parameters:
  searchObject - object to provide actuall test on it. The actual instancehas to be of type returned by all SearchKey.getSearchObjectTypereturned by SearchType of this SearchGroup



removePropertyChangeListener
public synchronized void removePropertyChangeListener(PropertyChangeListener l)(Code)
Removes property change listener.



search
public void search()(Code)
Does search.



setSearchRootNodes
public void setSearchRootNodes(Node[] roots)(Code)
Sets roots of nodes in which its interested to search. This method is called at the first search type in the possible created chain of search types.



stopSearch
final public void stopSearch()(Code)
Stops searching.



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.