|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.griphyn.vdl.Chimera
org.griphyn.vdl.classes.VDL
org.griphyn.vdl.classes.Leaf
org.griphyn.vdl.classes.LFN
public class LFN
This class captures the logical filename and its linkage. Also,
some static methods allow to use the linkage constants outside
the class.
LFN extends the Leaf class by adding
a filename and linkage type.
Leaf,
Text,
Use,
Value,
Scalar,
List,
Serialized Form| Field Summary | |
|---|---|
static int |
INOUT
Linkage type: file is used as input and output. |
static int |
INPUT
Linkage type: input file. |
private boolean |
m_dontRegister
Marks a filename for registration in a replica catalog. |
private int |
m_dontTransfer
Marks a filename for transfer to the result collector. |
private String |
m_filename
The filename is the logical name of the file. |
private int |
m_link
The linkage type of the logical file aids the linkage process. |
private boolean |
m_optional
If a filename is marked as optional, it's non-existence must not stop a workflow. |
private String |
m_temporary
If a filename is marked transient, the higher level planners might have some notion where to place it, or how to name it. |
private int |
m_type
The type of the filename, whether it refers to a data, pattern or executable. |
static int |
NONE
Linkage type: no linkage, usually used for constants etc. |
static int |
OUTPUT
Linkage type: output file. |
static int |
TYPE_DATA
Type of File: Denotes a data file. |
static int |
TYPE_EXECUTABLE
Type of File: Denotes an executable file. |
static int |
TYPE_PATTERN
Type of File: Denotes a pattern. |
static int |
XFER_MANDATORY
Transfer mode: The transfer of the file to the result collector is mandatory. |
static int |
XFER_NOT
Transfer mode: The file will not be transferred to the result collector. |
static int |
XFER_OPTIONAL
Transfer mode: The transfer of the file to the result collector is optional. |
| Constructor Summary | |
|---|---|
LFN()
ctor. |
|
LFN(String filename)
Default ctor: create an instance with a logical filename. |
|
LFN(String filename,
int link)
ctor: create a file with a name and linkage. |
|
LFN(String filename,
int link,
String hint)
ctor: create a possibly transient file with a name, linkage and hint. |
|
LFN(String filename,
int link,
String hint,
boolean dontRegister,
int dontTransfer)
Deprecated. |
|
LFN(String filename,
int link,
String hint,
boolean dontRegister,
int dontTransfer,
boolean optional)
Deprecated. |
|
LFN(String filename,
int link,
String hint,
boolean dontRegister,
int dontTransfer,
boolean optional,
int type)
ctor: Creates a filename given almost all specs. |
|
| Method Summary | |
|---|---|
private boolean |
abbreviatable()
Convenience function to call the static test, if a filename can use the abbreviated notation. |
static boolean |
abbreviatable(String temp,
boolean dr,
int dt,
boolean opt)
Predicate to determine, if the output can be abbreviated. |
Object |
clone()
Creates and returns a copy of this object. |
boolean |
getDontRegister()
Deprecated. |
int |
getDontTransfer()
Deprecated. |
String |
getFilename()
Accessor: Obtains the logical filename of the object. |
int |
getLink()
Accessor: Obtains the linkage type from the object. |
boolean |
getOptional()
Acessor: Obtains the optionality of the file. |
boolean |
getRegister()
Accessor: Obtains the predicate on registring with a replica catalog. |
String |
getTemporary()
Accessor: Obtains the file name suggestion for a transient file. |
int |
getTransfer()
Accessor: Obtains the transfering mode. |
int |
getType()
Accessor: Returns the predicate on the type of the LFN |
static boolean |
isInRange(int x)
Predicate to determine, if an integer is within the valid range for linkage types. |
void |
setDontRegister(boolean dontRegister)
Deprecated. |
void |
setDontTransfer(int dontTransfer)
Deprecated. |
void |
setFilename(String fn)
Accessor: Sets the filename |
void |
setLink(int link)
Accessor: Sets the linkage type. |
void |
setOptional(boolean optional)
Acessor: Sets the optionality of the file. |
void |
setRegister(boolean register)
Accessor: Sets the predicate on registring with a replica catalog. |
void |
setTemporary(String name)
Accessor: Sets a file name suggestion for a transient file. |
void |
setTransfer(int transfer)
Accessor: Sets the transfer mode. |
void |
setType(int type)
Accessor: Sets the predicate on the type of the LFN |
String |
toString()
Convert the logical filename and linkage into something human readable. |
static String |
toString(int x)
Converts an integer into the symbolic linkage type represented by the constant. |
void |
toString(Writer stream)
Prints the current content onto the stream. |
String |
toXML(String indent)
Dumps the state of the current element as XML output. |
void |
toXML(Writer stream,
String indent,
String namespace)
Dump the state of the current element as XML output. |
static boolean |
transferInRange(int x)
Predicate to determine, if an integer is within the valid range for transfer modes. |
static String |
transferString(int x)
Converts an integer into the symbolic transfer mode represented by the constant. |
static boolean |
typeInRange(int x)
Predicate to determine, if an integer is within the valid range for type |
static int |
typeInt(String x)
Converts a String into the corresponding integer value. |
static String |
typeString(int x)
Converts an integer into the symbolic type mode represented by the constant. |
| Methods inherited from class org.griphyn.vdl.classes.Leaf |
|---|
getValue, setValue |
| Methods inherited from class org.griphyn.vdl.Chimera |
|---|
escape, quote, toXML, toXML, writeAttribute |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int NONE
public static final int INPUT
public static final int OUTPUT
public static final int INOUT
private String m_filename
private int m_link
private boolean m_dontRegister
m_dontTransfer,
m_temporarypublic static final int XFER_MANDATORY
public static final int XFER_OPTIONAL
public static final int XFER_NOT
public static final int TYPE_DATA
public static final int TYPE_EXECUTABLE
public static final int TYPE_PATTERN
private int m_dontTransfer
m_dontRegister,
m_temporaryprivate String m_temporary
m_dontRegister,
m_dontTransferprivate boolean m_optional
private int m_type
| Constructor Detail |
|---|
public LFN()
public LFN(String filename)
NONE.
filename - is the logical filename to store.
public LFN(String filename,
int link)
throws IllegalArgumentException
filename - is the logical filename to store.link - is the linkage of the file to remember.
IllegalArgumentException - if the linkage does not match the
legal range.
public LFN(String filename,
int link,
String hint)
throws IllegalArgumentException
filename - is the logical filename to store.link - is the linkage of the file to remember.hint - is an expression for a temporary filename choice.
If it is not null, the files will neither be marked for registration
nor for transfer to the output collector.
IllegalArgumentException - if the linkage does not match the
legal range.
public LFN(String filename,
int link,
String hint,
boolean dontRegister,
int dontTransfer)
throws IllegalArgumentException
filename - is the logical filename to store.link - is the linkage of the file to remember.hint - is an expression for a temporary filename choice.dontRegister - whether to to register with a replica catalog.dontTransfer - whether to transfer the file to the collector.
IllegalArgumentException - if the linkage does not match the
legal range, or the transfer mode does not match its legal range.
public LFN(String filename,
int link,
String hint,
boolean dontRegister,
int dontTransfer,
boolean optional)
throws IllegalArgumentException
filename - is the logical filename to store.link - is the linkage of the file to remember.hint - is an expression for a temporary filename choice.dontRegister - whether to to register with a replica catalog.dontTransfer - whether to transfer the file to the collector.optional - whether the file is optional or required.
IllegalArgumentException - if the linkage does not match the
legal range, or the transfer mode does not match its legal range.
public LFN(String filename,
int link,
String hint,
boolean dontRegister,
int dontTransfer,
boolean optional,
int type)
throws IllegalArgumentException
filename - is the logical filename to store.link - is the linkage of the file to remember.hint - is an expression for a temporary filename choice.dontRegister - whether to to register with a replica catalog.dontTransfer - whether to transfer the file to the collector.optional - whether the file is optional or required.type - whether the file is data|executable|pattern
IllegalArgumentException - if the linkage does not match the
legal range, or the transfer mode does not match its legal range.| Method Detail |
|---|
public static boolean isInRange(int x)
x - is the integer to test for in-intervall.
NONE
≤ x ≤ INOUT, false otherwise.public static String toString(int x)
x - is the integer with the linkage type to symbolically convert
public static boolean transferInRange(int x)
x - is the integer to test for in-intervall.
XFER_MANDATORY
≤ x ≤ XFER_NOT, false otherwise.public static String transferString(int x)
x - is the integer with the linkage type to symbolically convert
public static boolean typeInRange(int x)
x - is the integer to test for in-intervall.
TYPE_DATA
≤ x ≤ TYPE_PATTERN, false otherwise.public static String typeString(int x)
x - is the integer with the linkage type to symbolically convert
public static int typeInt(String x)
x - is the String to symbolically convert
public Object clone()
clone in class Leafpublic int getLink()
LFN objects default to no linkage.setLink(int)public String getFilename()
setFilename( java.lang.String )public boolean getRegister()
setRegister( boolean )public int getType()
setType( int )public boolean getDontRegister()
setRegister( boolean ),
getRegister()public int getTransfer()
setTransfer( int )public int getDontTransfer()
getTransfer(),
setTransfer( int )public boolean getOptional()
setOptional( boolean )public String getTemporary()
setTemporary(String)
public void setLink(int link)
throws IllegalArgumentException
link - is the new linkage type to use. Please note that it
must match the range of legal values.
IllegalArgumentException - if the range is beyong legal values.getLink()public void setFilename(String fn)
fn - is the new logical filename.getFilename()public void setRegister(boolean register)
register - is true, if the file should be registered with a
replica catalog.getRegister( )public void setType(int type)
type - the type of LFNgetType( )public void setDontRegister(boolean dontRegister)
dontRegister - is false, if the file should be registered with a
replica catalog.getDontRegister(),
setRegister( boolean ),
#getRegister( boolean )
public void setTransfer(int transfer)
throws IllegalArgumentException
transfer - the transfer flag
IllegalArgumentException - if the transfer mode is outside
its legal range.getTransfer( ),
XFER_MANDATORY,
XFER_OPTIONAL,
XFER_NOT
public void setDontTransfer(int dontTransfer)
throws IllegalArgumentException
dontTransfer - is false, if the file should be transferred to
the output collector.
IllegalArgumentException - if the transfer mode is outside
its legal range.getDontTransfer( ),
XFER_MANDATORY,
XFER_OPTIONAL,
XFER_NOTpublic void setOptional(boolean optional)
optional - false, if the file is required, or true, if it is
optional.getOptional()public void setTemporary(String name)
name - is a transient name suggestion for this filename instance.
No automatic marking of transiency will be done!getTemporary()
public static boolean abbreviatable(String temp,
boolean dr,
int dt,
boolean opt)
null and dontRegister is false and
dontTransfer is mandatory, or the hint exists, and dontRegister
is true and dontTransfer is no transfer.
temp - is the temporary hintdr - is the value of dontRegisterdt - is the value of dontTransferopt - is whether a given file is optional or not
private boolean abbreviatable()
abbreviatable( String, boolean, int, boolean )public String toString()
toString in class Chimera
public void toString(Writer stream)
throws IOException
toString in class Chimerastream - is a stream opened and ready for writing. This can also
be a string stream for efficient output.
IOException - if something happens to the stream.public String toXML(String indent)
indent - is a String of spaces used for pretty
printing. The initial amount of spaces should be an empty string.
public void toXML(Writer stream,
String indent,
String namespace)
throws IOException
toXML in class Chimerastream - is a stream opened and ready for writing. This can also
be a string stream for efficient output.indent - is a String of spaces used for pretty
printing. The initial amount of spaces should be an empty string.
The parameter is used internally for the recursive traversal.namespace - is the XML schema namespace prefix. If neither
empty nor null, each element will be prefixed with this prefix,
and the root element will map the XML namespace.
IOException - if something fishy happens to the stream.BufferedWriter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||