org.im4java.core
Class Operation

java.lang.Object
  extended by org.im4java.core.Operation
Direct Known Subclasses:
DCRAWOps, ETOps, GMOps, IMOps, JPTOps, UFRawOps

public class Operation
extends java.lang.Object

This class models the command-line of an image-command. Objects of this class hold the arguments in a list and keep track of special "dynamic" operations.

Version:
$Revision: 1.6 $
Author:
$Author: bablokb, Bruno Mascret (warnings) $

Field Summary
(package private) static java.lang.String DOP_PLACEHOLDER
          Placeholder-string for dynamic operations.
(package private)  java.util.LinkedList<java.lang.String> iCmdArgs
          The list of command-line arguments.
private  java.util.LinkedList<DynamicOperation> iDynamicOperations
          DynamicOperations for this Operation.
static java.lang.String IMG_PLACEHOLDER
          Placeholder-string for images.
 
Constructor Summary
Operation()
          Constructor.
 
Method Summary
 Operation addDynamicOperation(DynamicOperation pOperation)
          Add a DynamicOperation to this Operation.
 Operation addImage()
          Add an image-placeholder to an Operation.
 Operation addImage(int n)
          Add multiple image-placeholders to an Operation.
 Operation addImage(java.lang.String... pImages)
          Add image(s) to the operation.
 Operation addOperation(Operation pOperation)
          Add an Operation.
 Operation addRawArgs(java.util.List<java.lang.String> pArgs)
          Add raw text to the list of arguments.
 Operation addRawArgs(java.lang.String... pArgs)
          Add raw text to the list of arguments.
 Operation cloneObject()
          Clone the (java) object.
 java.util.LinkedList<java.lang.String> getCmdArgs()
          Return the raw arguments.
 java.util.LinkedList<DynamicOperation> getDynamicOperations()
          Return the list of DynmicOperations.
 java.lang.String toString()
          Convert to String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

IMG_PLACEHOLDER

public static final java.lang.String IMG_PLACEHOLDER
Placeholder-string for images.

See Also:
Constant Field Values

DOP_PLACEHOLDER

static final java.lang.String DOP_PLACEHOLDER
Placeholder-string for dynamic operations.

See Also:
Constant Field Values

iCmdArgs

java.util.LinkedList<java.lang.String> iCmdArgs
The list of command-line arguments.


iDynamicOperations

private java.util.LinkedList<DynamicOperation> iDynamicOperations
DynamicOperations for this Operation.

Constructor Detail

Operation

public Operation()
Constructor.

Method Detail

toString

public java.lang.String toString()
Convert to String. Note that the arguments are not quoted!

Overrides:
toString in class java.lang.Object

cloneObject

public Operation cloneObject()
Clone the (java) object. Note that ImageMagick has a -clone operator, therefore this class has a method clone() (inherited from Core) which does not clone the java-object, but wraps the IM-clone operator!


addRawArgs

public Operation addRawArgs(java.lang.String... pArgs)
Add raw text to the list of arguments.


addRawArgs

public Operation addRawArgs(java.util.List<java.lang.String> pArgs)
Add raw text to the list of arguments.


getCmdArgs

public java.util.LinkedList<java.lang.String> getCmdArgs()
Return the raw arguments.


addImage

public Operation addImage(java.lang.String... pImages)
Add image(s) to the operation.


addImage

public Operation addImage()
Add an image-placeholder to an Operation.


addImage

public Operation addImage(int n)
Add multiple image-placeholders to an Operation.


addOperation

public Operation addOperation(Operation pOperation)
Add an Operation.


addDynamicOperation

public Operation addDynamicOperation(DynamicOperation pOperation)
Add a DynamicOperation to this Operation. We just save the DynamicOperation in the internal list and add a placeholder for the operation.

Parameters:
pOperation -
Returns:

getDynamicOperations

public java.util.LinkedList<DynamicOperation> getDynamicOperations()
Return the list of DynmicOperations.

Returns: