org.annolab.tt4j
Class DefaultExecutableResolver

java.lang.Object
  extended by org.annolab.tt4j.DefaultExecutableResolver
All Implemented Interfaces:
ExecutableResolver

public class DefaultExecutableResolver
extends java.lang.Object
implements ExecutableResolver

Assume that TreeTagger is installed and available in the path.

Author:
Richard Eckart de Castilho

Field Summary
protected  java.util.List<java.lang.String> _additionalPaths
           
protected  PlatformDetector _platform
           
 
Constructor Summary
DefaultExecutableResolver()
           
 
Method Summary
 void destroy()
          Destroy transient resources for the executable file.
 java.lang.String getExecutable()
          Get the executable file.
 void setAdditionalPaths(java.util.List<java.lang.String> aAdditionalPaths)
          Set additional paths that will be used for searching the TreeTagger executable.
 void setPlatformDetector(PlatformDetector aPlatform)
          Set platform information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_platform

protected PlatformDetector _platform

_additionalPaths

protected java.util.List<java.lang.String> _additionalPaths
Constructor Detail

DefaultExecutableResolver

public DefaultExecutableResolver()
Method Detail

destroy

public void destroy()
Description copied from interface: ExecutableResolver
Destroy transient resources for the executable file. E.g. if the file was extracted to a temporary location from an archive/classpath, it can be deleted by this method.

Specified by:
destroy in interface ExecutableResolver

setAdditionalPaths

public void setAdditionalPaths(java.util.List<java.lang.String> aAdditionalPaths)
Set additional paths that will be used for searching the TreeTagger executable.

Parameters:
aAdditionalPaths - list of additional paths.
See Also:
Util.getSearchPaths(List, String)

getExecutable

public java.lang.String getExecutable()
                               throws java.io.IOException
Description copied from interface: ExecutableResolver
Get the executable file. If necessary the file can be provided in a temporary location by this method.

Specified by:
getExecutable in interface ExecutableResolver
Returns:
the executable file.
Throws:
java.io.IOException - if the file cannot be located/provided.

setPlatformDetector

public void setPlatformDetector(PlatformDetector aPlatform)
Set platform information.

Specified by:
setPlatformDetector in interface ExecutableResolver
Parameters:
aPlatform - the platform information.


Copyright © 2012. All Rights Reserved.