Remote Systems
v6.4.1

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

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

public class FileClassifier
extends Thread


Nested Class Summary
protected  class FileClassifier.Pair
           
 
Field Summary
protected  String _systemShell
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
FileClassifier(DataElement subject)
           
 
Method Summary
protected  String classify(File parentFile, String line, String specialEncoding, boolean resolveLink)
          Classifies from the given line of classification output.
protected  void classifyChildren(File parentFile, String files, boolean resolveLinks)
          Classifies the children of a given file.
 String classifyFile(File aFile)
          Classify a file.
protected  void classifyVirtualChildren(String parentPath)
          Classify virtual children.
protected  String readLine(DataInputStream stream, String encoding)
           
protected  List readLines(DataInputStream stream, String encoding)
           
protected  String resolveSymbolicLink(File parentFile, String originalName, String fulltype, String symbolicLinkStr, boolean resolveLink, String specialEncoding)
           
 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

_systemShell

protected String _systemShell
Constructor Detail

FileClassifier

public FileClassifier(DataElement subject)
Method Detail

run

public void run()

classify

protected String classify(File parentFile,
                          String line,
                          String specialEncoding,
                          boolean resolveLink)
Classifies from the given line of classification output.

Parameters:
parentFile - the parent file.
line - the line of output to parse.
specialEncoding - a special encoding, if there is one.
resolveLink - resolve link.
Returns:
the classification.

resolveSymbolicLink

protected String resolveSymbolicLink(File parentFile,
                                     String originalName,
                                     String fulltype,
                                     String symbolicLinkStr,
                                     boolean resolveLink,
                                     String specialEncoding)

classifyFile

public String classifyFile(File aFile)
Classify a file. It classifies the file by running "sh -c file ".

Parameters:
aFile - the file to classify.
Returns:
the classification.

readLines

protected List readLines(DataInputStream stream,
                         String encoding)
                  throws Exception
Throws:
Exception

readLine

protected String readLine(DataInputStream stream,
                          String encoding)
                   throws Exception
Throws:
Exception

classifyChildren

protected void classifyChildren(File parentFile,
                                String files,
                                boolean resolveLinks)
Classifies the children of a given file.

Parameters:
parentFile - the parent file.
files - the files to classify. Specify "*" to classify all files.
resolveLinks - resolve links if possible.

classifyVirtualChildren

protected void classifyVirtualChildren(String parentPath)
Classify virtual children.


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.