|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.google.enterprise.adaptor.prebuilt.CommandLineTransform
public class CommandLineTransform
A conduit that allows a simple way to create a document transform based on a command line program.
| Constructor Summary | |
|---|---|
CommandLineTransform()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CommandLineTransform()
| Method Detail |
|---|
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 List<String> getTransformCommand()
public void setWorkingDirectory(File dir)
IllegalArgumentException - if dir is not a directorypublic File getWorkingDirectory()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||