gov.bnl.star.offline.scheduler
Class OutputFile

java.lang.Object
  extended by gov.bnl.star.offline.scheduler.OutputFile

public class OutputFile
extends java.lang.Object

Represent an Output file description. It can be either a file, a wildcard or a directory. It also contains the target where the output should be copied.

This representation is only temporary, and it is an evolution to the URL used as input files. To make everything consistent, input and output representation should be reviewed to separate definition, and actions such as the file copy. It might be more than needed, and that is why it hasn't been yet done.

Version:
$Revision: 1.10 $ $Date: 2006/11/21 00:41:32 $
Author:
Gabriele Carcassi

Field Summary
static int DIRECTORY
          source/destination represents a directory
static int FILE
          source/destination represents a file
static int NONE
          no destination is set, using actions
static int WILDCARD
          source/destination represents a wildcard
 
Constructor Summary
OutputFile()
           
OutputFile(java.lang.String fromScratch, java.lang.String toURL)
          Creates a new description for the output files.
 
Method Summary
 java.util.List getActionList()
          Returns the list of actions to be done on this output.
 int getDestType()
          Returns the type of source: file or directory.
 java.lang.String getFromScratch()
          Returns the relative path of the output in the scratch directory
 int getSourceType()
          Returns the type of source: file, wildcard or directory.
 java.net.URI getToURL()
          Returns the URL reprenting the location in which to copy the output after the job finishes.
 java.lang.String getToURLString()
           
 void setActionList(java.util.List actionList)
           
 void setFromScratch(java.lang.String fromScratch)
           
 void setToURLString(java.lang.String XtoURL)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FILE

public static final int FILE
source/destination represents a file

See Also:
Constant Field Values

WILDCARD

public static final int WILDCARD
source/destination represents a wildcard

See Also:
Constant Field Values

DIRECTORY

public static final int DIRECTORY
source/destination represents a directory

See Also:
Constant Field Values

NONE

public static final int NONE
no destination is set, using actions

See Also:
Constant Field Values
Constructor Detail

OutputFile

public OutputFile()

OutputFile

public OutputFile(java.lang.String fromScratch,
                  java.lang.String toURL)
Creates a new description for the output files.

Parameters:
fromScratch - relative path in the scratch directory
toURL - URL represnting the location where to copy the output at the end of the job
Method Detail

getSourceType

public int getSourceType()
Returns the type of source: file, wildcard or directory.

Returns:
FILE, WILDCARD or DIRECTORY

getDestType

public int getDestType()
Returns the type of source: file or directory.

Returns:
FILE or DIRECTORY

getFromScratch

public java.lang.String getFromScratch()
Returns the relative path of the output in the scratch directory

Returns:
a relative path in the scratch directory

setFromScratch

public void setFromScratch(java.lang.String fromScratch)

getActionList

public java.util.List getActionList()
Returns the list of actions to be done on this output. Actions include copies or registration to the file catalog. The list return is modifiable, so to add or remove an action simply get the list and modify it.


setActionList

public void setActionList(java.util.List actionList)

getToURL

public java.net.URI getToURL()
Returns the URL reprenting the location in which to copy the output after the job finishes.

Returns:
a URL

getToURLString

public java.lang.String getToURLString()

setToURLString

public void setToURLString(java.lang.String XtoURL)


Copyright © 2002-2004 STAR collaboration - Brookhaven National Laboratory. All Rights Reserved.