|
||||||||||
| 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.dax.DAX
org.griphyn.vdl.dax.Leaf
org.griphyn.vdl.dax.Filename
public class Filename
This class captures the logical filename and its linkage. Also, some static methods allow to use the linkage constants outside the class.
Filename extends the Leaf class by adding a
filename, linkage type, temporary pattern, and management attributes.
Leaf,
PseudoText| Field Summary | |
|---|---|
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. |
private String |
m_variable
|
| Constructor Summary | |
|---|---|
Filename()
Default ctor: create a hollow instance which needs to be filled with content. |
|
Filename(LFN lfn)
convenience ctor: create a DAX filename from a VDLx filename. |
|
Filename(String filename)
Default ctor: create an instance with a logical filename. |
|
Filename(String filename,
int link)
ctor: create a file with a name and linkage. |
|
Filename(String filename,
int link,
String hint)
ctor: create a transient file with a name, linkage and hint. |
|
Filename(String filename,
int link,
String hint,
boolean dontRegister,
int dontTransfer,
String variable)
ctor: Creates a filename given all specs. |
|
Filename(String filename,
int link,
String hint,
boolean dontRegister,
int dontTransfer,
String variable,
boolean optional)
ctor: Creates a filename given all specs. |
|
| Method Summary | |
|---|---|
private boolean |
abbreviatable()
Convenience function to call the static test, if a filename can use the abbreviated notation. |
Object |
clone()
Creates and returns a copy of this object. |
boolean |
getDontRegister()
Deprecated. |
int |
getDontTransfer()
Deprecated. |
String |
getFilename()
Accessor: Obtains the logical filename for this instance. |
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 |
String |
getVariable()
Accessor: Obtains the responsible variable. |
void |
setDontRegister(boolean dontRegister)
Deprecated. |
void |
setDontTransfer(int dontTransfer)
Deprecated. |
void |
setFilename(String name)
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 |
void |
setVariable(String variable)
Accessor: Sets the responsible variable. |
String |
shortXML(String indent,
String namespace,
int flag)
Dumps the state of the filename as PlainFilenameType or StdioFilenameType without the transiency information. |
void |
shortXML(Writer stream,
String indent,
String namespace,
int flag)
Dumps the state of the filename as PlainFilenameType or StdioFilenameType without the transiency information. |
String |
toString()
Convert the logical filename and linkage into something human readable. |
void |
toString(Writer stream)
Converts the active state into something meant for human consumption. |
String |
toXML(String indent,
String namespace)
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. |
| Methods inherited from class org.griphyn.vdl.Chimera |
|---|
escape, quote, toXML, writeAttribute |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private String m_filename
private int m_link
private boolean m_dontRegister
m_dontTransfer,
m_temporaryprivate int m_dontTransfer
m_dontRegister,
m_temporaryprivate String m_temporary
m_dontRegister,
m_dontTransferprivate boolean m_optional
private String m_variable
private int m_type
| Constructor Detail |
|---|
public Filename()
public Filename(String filename)
LFN.NONE.
filename - is the logical filename to store.
public Filename(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 Filename(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 the transient filename. If null, the file is regular,
if set, the file is assumed to be neither registered not transferred.
IllegalArgumentException - if the linkage does not match the
legal range.
public Filename(String filename,
int link,
String hint,
boolean dontRegister,
int dontTransfer,
String variable)
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.variable - is the variable that is responsible for this LFN.
IllegalArgumentException - if the linkage does not match the
legal range, or the transfer mode does not match its legal range.
public Filename(String filename,
int link,
String hint,
boolean dontRegister,
int dontTransfer,
String variable,
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.variable - is the variable that is responsible for this LFN.optional - records the optionality of a given file.
IllegalArgumentException - if the linkage does not match the
legal range, or the transfer mode does not match its legal range.
public Filename(LFN lfn)
throws IllegalArgumentException
lfn - is a VDLx logical filename.
IllegalArgumentException| Method Detail |
|---|
public Object clone()
clone in class Leafpublic int getLink()
Filename constructor defaults to no linkage.setLink(int)public String getFilename()
setFilename( java.lang.String )public boolean getDontRegister()
getRegister( )public boolean getRegister()
setRegister( boolean )public int getType()
setType( int )public int getDontTransfer()
getTransfer()public int getTransfer()
setTransfer( int )public boolean getOptional()
setOptional( boolean )public String getTemporary()
setTemporary(String)public String getVariable()
setVariable( 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 name)
name - is the new logical filename.getFilename()public void setDontRegister(boolean dontRegister)
dontRegister - is false, if the file should be registered with a
replica catalog.#setRegister()public void setRegister(boolean register)
register - is true, if the file should be registered with a
replica catalog.getRegister( )
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.#setTransfer( ),
LFN.XFER_MANDATORY,
LFN.XFER_OPTIONAL,
LFN.XFER_NOT
public void setTransfer(int transfer)
throws IllegalArgumentException
transfer - the transfer flag
IllegalArgumentException - if the transfer mode is outside
its legal range.getTransfer( ),
LFN.XFER_MANDATORY,
LFN.XFER_OPTIONAL,
LFN.XFER_NOTpublic void setOptional(boolean optional)
optional - false, if the file is required, or true, if it is
optional.getOptional()public void setType(int type)
type - the type of LFNgetType( )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 void setVariable(String variable)
variable - the variable responsible for setting this LFN.getVariable()private boolean abbreviatable()
LFN.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 fishy happens to the stream.
public String shortXML(String indent,
String namespace,
int flag)
shortXML in class Leafindent - is a String of spaces used for pretty
printing. The initial amount of spaces should be an empty string.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.flag - 0x01: also dump the linkage information, 0x02: also
dump optionality
Chimera.toXML( String, String )
public String toXML(String indent,
String namespace)
toXML in class Chimeraindent - is a String of spaces used for pretty
printing. The initial amount of spaces should be an empty string.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.
public void shortXML(Writer stream,
String indent,
String namespace,
int flag)
throws IOException
shortXML in class Leafstream - 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.flag - if 0x01, dump linkage, if 0x02 is set, dump optionality.
IOException - if something fishy happens to the stream.Chimera.toXML( Writer, String, 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 | |||||||||