public class CommandLineTransform extends Object implements DocumentTransform
| Constructor and Description |
|---|
CommandLineTransform() |
| Modifier and Type | Method and Description |
|---|---|
static CommandLineTransform |
create(Map<String,String> config)
Accepts keys
"cmd", "workingDirectory", and "arg?". |
boolean |
getCommandAcceptsParameters() |
List<String> |
getTransformCommand() |
File |
getWorkingDirectory() |
void |
setCommandAcceptsParameters(boolean commandAcceptsParameters)
This controls whether the input parameters to the transform call are passed
along to the actual call to the command.
|
void |
setTransformCommand(List<String> transformCommand)
Sets the command that is in charge of transforming the document content.
|
void |
setWorkingDirectory(File dir)
Sets the working directory.
|
void |
transform(Metadata metadata,
Map<String,String> params)
Any changes to
metadata and params will be
passed on to subsequent transforms. |
public static CommandLineTransform create(Map<String,String> config)
"cmd", "workingDirectory", and "arg?".
The "arg?" configuration values should be numerically increasing
starting from one: "arg1", "arg2", "arg3, ...public void transform(Metadata metadata, Map<String,String> params)
DocumentTransformmetadata and params will be
passed on to subsequent transforms. This method must be thread-safe.transform in interface DocumentTransformpublic void setCommandAcceptsParameters(boolean commandAcceptsParameters)
public boolean getCommandAcceptsParameters()
public void setTransformCommand(List<String> transformCommand)
public void setWorkingDirectory(File dir)
IllegalArgumentException - if dir is not a directorypublic File getWorkingDirectory()