Remote Systems
v6.4.1

com.ibm.etools.systems.universal.miners
Class UniversalSearchHandler

java.lang.Object
  extended byjava.lang.Thread
      extended bycom.ibm.etools.systems.universal.miners.UniversalSearchHandler
All Implemented Interfaces:
ICancellableHandler, Runnable

public class UniversalSearchHandler
extends Thread
implements ICancellableHandler


Field Summary
protected  HashSet _alreadySearched
           
protected  String _classificationString
           
protected  DataStore _dataStore
           
protected  DataElement _deArchiveFile
           
protected  DataElement _deFile
           
protected  DataElement _deFolder
           
protected  DataElement _deGrep
           
protected  int _depth
           
protected  DataElement _deVirtualFile
           
protected  SystemSearchFileNameMatcher _fileNameMatcher
           
protected  boolean _fsCaseSensitive
           
protected  boolean _isCancelled
           
protected  boolean _isDone
           
protected  boolean _isFileSearch
           
protected  UniversalFileSystemMiner _miner
           
protected  SystemSearchString _searchString
           
protected  DataElement _status
           
protected  SystemSearchStringMatcher _stringMatcher
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
UniversalSearchHandler(DataStore dataStore, UniversalFileSystemMiner miner, SystemSearchString searchString, boolean fsCaseSensitive, File theFile, DataElement status)
           
 
Method Summary
 void cancel()
           
protected  void convert(DataElement deObj, String absPath, SystemSearchLineMatch[] lineMatches)
          Converts from system line matches to data elements that will be sent back.
protected  boolean doesClassificationMatch(String absolutePath)
          Returns whether classification matches.
protected  boolean doesFilePatternMatch(String compareStr)
           
protected  boolean hasSearchedDirectory(File file)
           
protected  void internalSearch(File theFile, int depth)
           
protected  boolean internalSearchWithinFile(DataElement remoteFile, String absPath, File theFile)
           
 boolean isCancelled()
           
 boolean isDone()
           
 void run()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_alreadySearched

protected HashSet _alreadySearched

_isCancelled

protected boolean _isCancelled

_isDone

protected boolean _isDone

_depth

protected int _depth

_dataStore

protected DataStore _dataStore

_miner

protected UniversalFileSystemMiner _miner

_status

protected DataElement _status

_searchString

protected SystemSearchString _searchString

_stringMatcher

protected SystemSearchStringMatcher _stringMatcher

_isFileSearch

protected boolean _isFileSearch

_fileNameMatcher

protected SystemSearchFileNameMatcher _fileNameMatcher

_classificationString

protected String _classificationString

_deGrep

protected DataElement _deGrep

_deFile

protected DataElement _deFile

_deFolder

protected DataElement _deFolder

_deArchiveFile

protected DataElement _deArchiveFile

_deVirtualFile

protected DataElement _deVirtualFile

_fsCaseSensitive

protected boolean _fsCaseSensitive
Constructor Detail

UniversalSearchHandler

public UniversalSearchHandler(DataStore dataStore,
                              UniversalFileSystemMiner miner,
                              SystemSearchString searchString,
                              boolean fsCaseSensitive,
                              File theFile,
                              DataElement status)
Method Detail

run

public void run()
Specified by:
run in interface Runnable

isCancelled

public boolean isCancelled()
Specified by:
isCancelled in interface ICancellableHandler

isDone

public boolean isDone()
Specified by:
isDone in interface ICancellableHandler

cancel

public void cancel()
Specified by:
cancel in interface ICancellableHandler

hasSearchedDirectory

protected boolean hasSearchedDirectory(File file)

internalSearch

protected void internalSearch(File theFile,
                              int depth)

internalSearchWithinFile

protected boolean internalSearchWithinFile(DataElement remoteFile,
                                           String absPath,
                                           File theFile)

doesFilePatternMatch

protected boolean doesFilePatternMatch(String compareStr)

doesClassificationMatch

protected boolean doesClassificationMatch(String absolutePath)
Returns whether classification matches.

Parameters:
absolutePath - the absolute path of the file for which we want to check classification.
Returns:
true if the classification matches, false otherwise.

convert

protected void convert(DataElement deObj,
                       String absPath,
                       SystemSearchLineMatch[] lineMatches)
Converts from system line matches to data elements that will be sent back.

Parameters:
deObj - the element representing the file for which matches have been found.
absPath - the absolute path of the file.
lineMatches - an array of line matches, or empty if no matches.

Remote Systems
v6.4.1

Copyright © 2005 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.