| org.griphyn.vdl.classes.VDL org.griphyn.vdl.classes.Leaf org.griphyn.vdl.classes.LFN
LFN | public class LFN extends Leaf implements Cloneable,Serializable(Code) | | 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.
author: Jens-S. Vöckler author: Yong Zhao version: $Revision: 460 $ See Also: Leaf See Also: Text See Also: Use See Also: Value See Also: Scalar See Also: List |
Field Summary | |
final public static int | INOUT Linkage type: file is used as input and output. | final public static int | INPUT Linkage type: input file. | final public static int | NONE Linkage type: no linkage, usually used for constants etc. | final public static int | OUTPUT Linkage type: output file. | final public static int | TYPE_DATA Type of File: Denotes a data file. | final public static int | TYPE_EXECUTABLE Type of File: Denotes an executable file. | final public static int | TYPE_PATTERN Type of File: Denotes a pattern. | final public static int | XFER_MANDATORY Transfer mode: The transfer of the file to the result collector
is mandatory. | final public static int | XFER_NOT Transfer mode: The file will not be transferred to the result
collector. | final public static int | XFER_OPTIONAL Transfer mode: The transfer of the file to the result collector
is optional. |
Constructor Summary | |
public | LFN() ctor. | public | LFN(String filename) Default ctor: create an instance with a logical filename. | public | LFN(String filename, int link) ctor: create a file with a name and linkage. | public | LFN(String filename, int link, String hint) ctor: create a possibly transient file with a name, linkage and hint. | public | LFN(String filename, int link, String hint, boolean dontRegister, int dontTransfer) ctor: Creates a filename given almost all specs. | public | LFN(String filename, int link, String hint, boolean dontRegister, int dontTransfer, boolean optional) ctor: Creates a filename given almost all specs. | public | 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 | |
public static boolean | abbreviatable(String temp, boolean dr, int dt, boolean opt) Predicate to determine, if the output can be abbreviated. | public Object | clone() Creates and returns a copy of this object. | public boolean | getDontRegister() Accessor: Obtains the predicate on registring with a replica
catalog. | public int | getDontTransfer() Accessor: Obtains the transfering mode. | public String | getFilename() Accessor: Obtains the logical filename of the object. | public int | getLink() Accessor: Obtains the linkage type from the object.
the linkage type of the current object. | public boolean | getOptional() Acessor: Obtains the optionality of the file. | public boolean | getRegister() Accessor: Obtains the predicate on registring with a replica
catalog. | public String | getTemporary() Accessor: Obtains the file name suggestion for a transient file.
If a filename is marked transient, the higher level planners might
have some notion where to place it, or how to name it. | public int | getTransfer() Accessor: Obtains the transfering mode. | public int | getType() | public static boolean | isInRange(int x) Predicate to determine, if an integer is within the valid range for
linkage types.
Parameters: x - is the integer to test for in-intervall. | public void | setDontRegister(boolean dontRegister) Accessor: Sets the predicate on registring with a replica catalog. | public void | setDontTransfer(int dontTransfer) Accessor: Sets the transfer mode. | public void | setFilename(String fn) | public void | setLink(int link) Accessor: Sets the linkage type.
Parameters: link - is the new linkage type to use. | public void | setOptional(boolean optional) Acessor: Sets the optionality of the file. | public void | setRegister(boolean register) Accessor: Sets the predicate on registring with a replica catalog. | public void | setTemporary(String name) Accessor: Sets a file name suggestion for a transient file. | public void | setTransfer(int transfer) Accessor: Sets the transfer mode. | public void | setType(int type) | public static String | toString(int x) Converts an integer into the symbolic linkage type represented by
the constant. | public String | toString() Convert the logical filename and linkage into something human readable. | public void | toString(Writer stream) Prints the current content onto the stream.
Parameters: stream - is a stream opened and ready for writing. | public String | toXML(String indent) Dumps the state of the current element as XML output. | public void | toXML(Writer stream, String indent, String namespace) Dump the state of the current element as XML output. | public static boolean | transferInRange(int x) Predicate to determine, if an integer is within the valid range for
transfer modes.
Parameters: x - is the integer to test for in-intervall. | public static String | transferString(int x) Converts an integer into the symbolic transfer mode represented by
the constant. | public static boolean | typeInRange(int x) Predicate to determine, if an integer is within the valid range for
type
Parameters: x - is the integer to test for in-intervall. | public static int | typeInt(String x) Converts a String into the corresponding integer value. | public static String | typeString(int x) Converts an integer into the symbolic type mode represented by
the constant. |
INOUT | final public static int INOUT(Code) | | Linkage type: file is used as input and output. Please note that
this linkage does not allow for DAG linking.
|
INPUT | final public static int INPUT(Code) | | Linkage type: input file.
|
NONE | final public static int NONE(Code) | | Linkage type: no linkage, usually used for constants etc.
It can also be used to indicate that the linkage is unknown.
The NONE linkage does not participate in DAG construction.
|
OUTPUT | final public static int OUTPUT(Code) | | Linkage type: output file.
|
TYPE_DATA | final public static int TYPE_DATA(Code) | | Type of File: Denotes a data file. They are generally looked up in a replica
catalog.
|
TYPE_EXECUTABLE | final public static int TYPE_EXECUTABLE(Code) | | Type of File: Denotes an executable file. They are generally looked up in a
transformation catalog.
|
TYPE_PATTERN | final public static int TYPE_PATTERN(Code) | | Type of File: Denotes a pattern. They are generally looked up in a
pattern catalog.
|
XFER_MANDATORY | final public static int XFER_MANDATORY(Code) | | Transfer mode: The transfer of the file to the result collector
is mandatory. Failure to transfer the file will make the workflow
fail.
|
XFER_NOT | final public static int XFER_NOT(Code) | | Transfer mode: The file will not be transferred to the result
collector.
|
XFER_OPTIONAL | final public static int XFER_OPTIONAL(Code) | | Transfer mode: The transfer of the file to the result collector
is optional. Failure to transfer the file will not abort
the workflow.
|
LFN | public LFN(String filename)(Code) | | Default ctor: create an instance with a logical filename. The linkage
defaults to
LFN.NONE .
Parameters: filename - is the logical filename to store. |
LFN | public LFN(String filename, int link) throws IllegalArgumentException(Code) | | ctor: create a file with a name and linkage.
Parameters: filename - is the logical filename to store. Parameters: link - is the linkage of the file to remember. throws: IllegalArgumentException - if the linkage does not match thelegal range. |
LFN | public LFN(String filename, int link, String hint) throws IllegalArgumentException(Code) | | ctor: create a possibly transient file with a name, linkage and hint.
Parameters: filename - is the logical filename to store. Parameters: link - is the linkage of the file to remember. Parameters: hint - is an expression for a temporary filename choice.If it is not null, the files will neither be marked for registrationnor for transfer to the output collector. throws: IllegalArgumentException - if the linkage does not match thelegal range. |
LFN | public LFN(String filename, int link, String hint, boolean dontRegister, int dontTransfer) throws IllegalArgumentException(Code) | | ctor: Creates a filename given almost all specs. This is a backward
compatible constructor, as it lacks access to the optional transfer
attribute.
Parameters: filename - is the logical filename to store. Parameters: link - is the linkage of the file to remember. Parameters: hint - is an expression for a temporary filename choice. Parameters: dontRegister - whether to to register with a replica catalog. Parameters: dontTransfer - whether to transfer the file to the collector. throws: IllegalArgumentException - if the linkage does not match thelegal range, or the transfer mode does not match its legal range. since: 1.21 |
LFN | public LFN(String filename, int link, String hint, boolean dontRegister, int dontTransfer, boolean optional) throws IllegalArgumentException(Code) | | ctor: Creates a filename given almost all specs. This is a backward
compatible constructor, as it lacks access to the optional transfer
attribute.
Parameters: filename - is the logical filename to store. Parameters: link - is the linkage of the file to remember. Parameters: hint - is an expression for a temporary filename choice. Parameters: dontRegister - whether to to register with a replica catalog. Parameters: dontTransfer - whether to transfer the file to the collector. Parameters: optional - whether the file is optional or required. throws: IllegalArgumentException - if the linkage does not match thelegal range, or the transfer mode does not match its legal range. since: 1.23 |
LFN | public LFN(String filename, int link, String hint, boolean dontRegister, int dontTransfer, boolean optional, int type) throws IllegalArgumentException(Code) | | ctor: Creates a filename given almost all specs. This is a backward
compatible constructor, as it lacks access to the optional transfer
attribute.
Parameters: filename - is the logical filename to store. Parameters: link - is the linkage of the file to remember. Parameters: hint - is an expression for a temporary filename choice. Parameters: dontRegister - whether to to register with a replica catalog. Parameters: dontTransfer - whether to transfer the file to the collector. Parameters: optional - whether the file is optional or required. Parameters: type - whether the file is data|executable|pattern throws: IllegalArgumentException - if the linkage does not match thelegal range, or the transfer mode does not match its legal range. since: 1.23 |
abbreviatable | public static boolean abbreviatable(String temp, boolean dr, int dt, boolean opt)(Code) | | Predicate to determine, if the output can be abbreviated. Filenames
can be abbreviated, if one of these two conditions are met: The
hint is null and dontRegister is false and
dontTransfer is mandatory, or the hint exists, and dontRegister
is true and dontTransfer is no transfer.
Parameters: temp - is the temporary hint Parameters: dr - is the value of dontRegister Parameters: dt - is the value of dontTransfer Parameters: opt - is whether a given file is optional or not true, if the filename can use abbreviated mode |
clone | public Object clone()(Code) | | Creates and returns a copy of this object.
a new instance. |
getDontRegister | public boolean getDontRegister()(Code) | | Accessor: Obtains the predicate on registring with a replica
catalog.
false if the file will be registered with a replica catalog. See Also: LFN.setRegister(boolean) See Also: LFN.getRegister() since: 1.21 |
getDontTransfer | public int getDontTransfer()(Code) | | Accessor: Obtains the transfering mode.
false if the file will be tranferred to an output collector. See Also: LFN.getTransfer() See Also: LFN.setTransfer(int) since: 1.21 |
getLink | public int getLink()(Code) | | Accessor: Obtains the linkage type from the object.
the linkage type of the current object. Note thatLFN objects default to no linkage. See Also: LFN.setLink(int) |
getOptional | public boolean getOptional()(Code) | | Acessor: Obtains the optionality of the file.
false, if the file is required, or true, if it is optional. See Also: LFN.setOptional(boolean) since: 1.23 |
getRegister | public boolean getRegister()(Code) | | Accessor: Obtains the predicate on registring with a replica
catalog.
true if the file will be registered with a replica catalog. See Also: LFN.setRegister(boolean) since: 2.1 |
getTemporary | public String getTemporary()(Code) | | Accessor: Obtains the file name suggestion for a transient file.
If a filename is marked transient, the higher level planners might
have some notion where to place it, or how to name it. Lower level
planners are not necessarily required to follow this hint.
the transient name suggestion of the file. The currentsettings will always be returned, regardless of the transiencystate of the file. See Also: LFN.setTemporary(String) |
getTransfer | public int getTransfer()(Code) | | Accessor: Obtains the transfering mode.
true if the file will be tranferred to an output collector. See Also: LFN.setTransfer(int) since: 2.1 |
getType | public int getType()(Code) | | Accessor: Returns the predicate on the type of the LFN
the type of LFN See Also: LFN.setType(int) since: 2.1 |
isInRange | public static boolean isInRange(int x)(Code) | | Predicate to determine, if an integer is within the valid range for
linkage types.
Parameters: x - is the integer to test for in-intervall. true, if the integer satisfies LFN.NONE≤ x ≤ LFN.INOUT, false otherwise. |
setFilename | public void setFilename(String fn)(Code) | | Accessor: Sets the filename
Parameters: fn - is the new logical filename. See Also: LFN.getFilename() |
setOptional | public void setOptional(boolean optional)(Code) | | Acessor: Sets the optionality of the file.
Parameters: optional - false, if the file is required, or true, if it isoptional. See Also: LFN.getOptional() since: 1.23 |
setRegister | public void setRegister(boolean register)(Code) | | Accessor: Sets the predicate on registring with a replica catalog.
Parameters: register - is true, if the file should be registered with areplica catalog. See Also: LFN.getRegister() since: 2.1 |
setTemporary | public void setTemporary(String name)(Code) | | Accessor: Sets a file name suggestion for a transient file. If a
filename is marked transient, the higher level planners might have
some notion where to place it, or how to name it. Lower level
planners are not necessarily required to follow this hint.
Parameters: name - is a transient name suggestion for this filename instance.No automatic marking of transiency will be done! See Also: LFN.getTemporary() |
setType | public void setType(int type)(Code) | | Accessor: Sets the predicate on the type of the LFN
Parameters: type - the type of LFN See Also: LFN.getType() since: 2.1 |
toString | public static String toString(int x)(Code) | | Converts an integer into the symbolic linkage type represented by
the constant.
Parameters: x - is the integer with the linkage type to symbolically convert a string with the symbolic linkage name, or null, if theconstant is out of range. |
toString | public String toString()(Code) | | Convert the logical filename and linkage into something human readable.
The output is also slightly nudged towards machine parsability.
a textual description of the element and its attributes. |
toString | public void toString(Writer stream) throws IOException(Code) | | Prints the current content onto the stream.
Parameters: stream - is a stream opened and ready for writing. This can alsobe a string stream for efficient output. throws: IOException - if something happens to the stream. |
toXML | public String toXML(String indent)(Code) | | Dumps the state of the current element as XML output. This method
converts the data into pretty-printed XML output meant for machine
consumption.
Parameters: indent - is a String of spaces used for prettyprinting. The initial amount of spaces should be an empty string. a String which contains the state of the current classand its siblings using XML. Note that these strings might become large. |
toXML | public void toXML(Writer stream, String indent, String namespace) throws IOException(Code) | | Dump the state of the current element as XML output. This function
traverses all sibling classes as necessary, and converts the data
into pretty-printed XML output. The stream interface should be able
to handle large output efficiently, if you use a buffered writer.
Parameters: stream - is a stream opened and ready for writing. This can alsobe a string stream for efficient output. Parameters: indent - is a String of spaces used for prettyprinting. The initial amount of spaces should be an empty string.The parameter is used internally for the recursive traversal. Parameters: namespace - is the XML schema namespace prefix. If neitherempty nor null, each element will be prefixed with this prefix,and the root element will map the XML namespace. exception: IOException - if something fishy happens to the stream. |
transferInRange | public static boolean transferInRange(int x)(Code) | | Predicate to determine, if an integer is within the valid range for
transfer modes.
Parameters: x - is the integer to test for in-intervall. true, if the integer satisfies LFN.XFER_MANDATORY≤ x ≤ LFN.XFER_NOT, false otherwise. |
transferString | public static String transferString(int x)(Code) | | Converts an integer into the symbolic transfer mode represented by
the constant.
Parameters: x - is the integer with the linkage type to symbolically convert a string with the symbolic linkage name, or null, if theconstant is out of range. |
typeInRange | public static boolean typeInRange(int x)(Code) | | Predicate to determine, if an integer is within the valid range for
type
Parameters: x - is the integer to test for in-intervall. true, if the integer satisfies LFN.TYPE_DATA≤ x ≤ LFN.TYPE_PATTERN, false otherwise. |
typeInt | public static int typeInt(String x)(Code) | | Converts a String into the corresponding integer value.
Parameters: x - is the String to symbolically convert an integer with the value or -1 if not valid. |
typeString | public static String typeString(int x)(Code) | | Converts an integer into the symbolic type mode represented by
the constant.
Parameters: x - is the integer with the linkage type to symbolically convert a string with the symbolic linkage name, or null, if theconstant is out of range. |
|
|