站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

SearchInfoFactory (Search API) - NetBeans API Javadoc (Current Development Version)

org.openidex.util/3 3.11

org.openidex.search
Class SearchInfoFactory

java.lang.Object
  extended by org.openidex.search.SearchInfoFactory

public final class SearchInfoFactory
extends Object

Factory for creating SearchInfo objects.

Since:
org.openidex.util/3 3.3
See Also:
SearchInfo

Field Summary
static FileObjectFilter SHARABILITY_FILTER
          filter that skips files and folders which are not sharable according to the SharabilityQuery
static FileObjectFilter VISIBILITY_FILTER
          filter that skips files and folders which are not visible according to the VisibilityQuery
 
Method Summary
static SearchInfo createSearchInfo(FileObject[] folders, boolean recursive, FileObjectFilter[] filters)
          Creates a SearchInfo object for given folders.
static SearchInfo createSearchInfo(FileObject folder, boolean recursive, FileObjectFilter[] filters)
          Creates a SearchInfo object for a given folder.
static SearchInfo createSearchInfoBySubnodes(Node node)
          Creates a SearchInfo object combining SearchInfo objects returned by the node's subnodes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VISIBILITY_FILTER

public static final FileObjectFilter VISIBILITY_FILTER
filter that skips files and folders which are not visible according to the VisibilityQuery

See Also:
VisibilityQuery

SHARABILITY_FILTER

public static final FileObjectFilter SHARABILITY_FILTER
filter that skips files and folders which are not sharable according to the SharabilityQuery

See Also:
SharabilityQuery
Method Detail

createSearchInfo

public static SearchInfo createSearchInfo(FileObject folder,
                                          boolean recursive,
                                          FileObjectFilter[] filters)
Creates a SearchInfo object for a given folder. The returned SearchInfo object's method SearchInfo.canSearch() always returns true and iterates through DataObjects found in the given folder. Files and folders that do not pass any of the given filters are skipped (not searched). If multiple filters are passed, the filters are applied on each file/folder in the same order as in the array passed to this method.

Parameters:
folder - folder which should be searched
recursive - whether the folder's subfolders should be taken into account
filters - filters to be used when searching; or null if no filters should be used
Returns:
SearchInfo object which iterates through DataObjects found in the specified folder and (optionally) its subfolders
See Also:
FileObjectFilter

createSearchInfo

public static SearchInfo createSearchInfo(FileObject[] folders,
                                          boolean recursive,
                                          FileObjectFilter[] filters)
Creates a SearchInfo object for given folders. The returned SearchInfo object's method SearchInfo.canSearch() always returns true and iterates through DataObjects found in the given folders. Files and folders that do not pass any of the given filters are skipped (not searched). If multiple filters are passed, the filters are applied on each file/folder in the same order as in the array passed to this method.

Parameters:
folders - folders which should be searched
recursive - whether the folders' subfolders should be taken into account
filters - filters to be used when searching; or null if no filters should be used
Returns:
SearchInfo object which iterates through DataObjects found in the specified folders and (optionally) their subfolders
See Also:
FileObjectFilter

createSearchInfoBySubnodes

public static SearchInfo createSearchInfoBySubnodes(Node node)
Creates a SearchInfo object combining SearchInfo objects returned by the node's subnodes. Method SearchInfo.canSearch() of the resulting SearchInfo objects returns true if and only if at least one of the nodes is searchable (its method canSearch() returns true). The iterator iterates through all DataObjects returned by the subnode's SearchInfo iterators.

Parameters:
node - node to create SearchInfo for
Returns:
SearchInfo object representing combination of SearchInfo objects of the node's subnodes

org.openidex.util/3 3.11

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.