Package edu.isi.pegasus.planner.dax
Class File
- java.lang.Object
-
- edu.isi.pegasus.planner.dax.CatalogType
-
- edu.isi.pegasus.planner.dax.File
-
public class File extends CatalogType
This class is the container for any File object, either the RC section, or uses- Version:
- $Revision$
- Author:
- gmehta
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFile.LINKThe linkages that a file can be ofstatic classFile.TRANSFERThree Transfer modes supported, Transfer this file, don't transfer or stageout as well as optional.
-
Field Summary
Fields Modifier and Type Field Description protected booleanmExecutableIs the file an executable.protected File.LINKmLinkprotected java.lang.StringmNameThe logical name of the file.protected java.lang.StringmNamespaceThe namespace on a file.protected booleanmOptionalIs the file optionalprotected booleanmRegisterShould the file be registered in the replica catalogprotected java.lang.StringmSizeFile size of the file no units requiredprotected File.TRANSFERmTransferShould the file be transferred on generation.protected java.lang.StringmVersionThe logical version of the file.-
Fields inherited from class edu.isi.pegasus.planner.dax.CatalogType
mLogger, mMetadata, mPFNs, mProfiles
-
-
Constructor Summary
Constructors Constructor Description File(File f)Copy constructorFile(File f, File.LINK link)Copy constructor, but change the linkage of the file.File(java.lang.String name)Create new file objectFile(java.lang.String name, File.LINK link)Create new file objectFile(java.lang.String namespace, java.lang.String name, java.lang.String version)Create new File objectFile(java.lang.String namespace, java.lang.String name, java.lang.String version, File.LINK link)Create a new file object
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Fileclone()Return a clone of this Filebooleanequals(java.lang.Object o)Check if this File is equal to Object obooleangetExecutable()Check if the file is an executableFile.LINKgetLink()Get the linkage of the file.java.lang.StringgetName()Get the name of the filejava.lang.StringgetNamespace()Get the namespace of the filebooleangetOptional()Check the optional flag of the filebooleangetRegister()Get the register flag of this file.java.lang.StringgetSize()Return the size of the fileFile.TRANSFERgetTransfer()Get the transfer type of the filejava.lang.StringgetVersion()Get the version of the fileinthashCode()HashCode of this FilebooleanisFile()FilesetExecutable()Mark the file as executable.FilesetExecutable(boolean executable)Mark the file as executable.FilesetLink(File.LINK link)Set the file linkageFilesetOptional(boolean optionalflag)Set the optional flag on the file.FilesetRegister(boolean registerflag)Set the register flag of the file.FilesetSize(java.lang.String size)Set the size of the file.FilesetTransfer(File.TRANSFER transferflag)Set the transfer type of the filevoidtoXML(XMLWriter writer)Write the file objectvoidtoXML(XMLWriter writer, int indent)Write the file object, with indent level NvoidtoXML(XMLWriter writer, int indent, java.lang.String elementname)Write the file object as XML but render it as the elementname-
Methods inherited from class edu.isi.pegasus.planner.dax.CatalogType
addMetaData, addMetaData, addMetaData, addPhysicalFile, addPhysicalFile, addPhysicalFile, addPhysicalFiles, addProfile, addProfile, addProfiles, addProfiles, getMetaData, getPhysicalFiles, getProfiles, isExecutable
-
-
-
-
Field Detail
-
mNamespace
protected java.lang.String mNamespace
The namespace on a file. This is used for Executables only
-
mName
protected java.lang.String mName
The logical name of the file.
-
mVersion
protected java.lang.String mVersion
The logical version of the file. This is used for executables only.
-
mLink
protected File.LINK mLink
-
mOptional
protected boolean mOptional
Is the file optional
-
mRegister
protected boolean mRegister
Should the file be registered in the replica catalog
-
mTransfer
protected File.TRANSFER mTransfer
Should the file be transferred on generation.
-
mExecutable
protected boolean mExecutable
Is the file an executable.
-
mSize
protected java.lang.String mSize
File size of the file no units required
-
-
Constructor Detail
-
File
public File(File f)
Copy constructor- Parameters:
f- File
-
File
public File(File f, File.LINK link)
Copy constructor, but change the linkage of the file.- Parameters:
f- Filelink- Link
-
File
public File(java.lang.String namespace, java.lang.String name, java.lang.String version)Create new File object- Parameters:
namespace-name-version-
-
File
public File(java.lang.String name)
Create new file object- Parameters:
name- The name of the file
-
File
public File(java.lang.String name, File.LINK link)Create new file object- Parameters:
name- The name of the filelink- The linkage of the file
-
File
public File(java.lang.String namespace, java.lang.String name, java.lang.String version, File.LINK link)Create a new file object- Parameters:
namespace- The namespace of the filename- The name of the fileversion- The version of the filelink- The linkage of the file.
-
-
Method Detail
-
getName
public java.lang.String getName()
Get the name of the file- Returns:
-
getNamespace
public java.lang.String getNamespace()
Get the namespace of the file- Returns:
-
getVersion
public java.lang.String getVersion()
Get the version of the file- Returns:
-
getLink
public File.LINK getLink()
Get the linkage of the file.- Returns:
-
setLink
public File setLink(File.LINK link)
Set the file linkage- Parameters:
link-- Returns:
- See Also:
File.LINK
-
setOptional
public File setOptional(boolean optionalflag)
Set the optional flag on the file. Default is false- Parameters:
optionalflag-- Returns:
-
getOptional
public boolean getOptional()
Check the optional flag of the file- Returns:
-
setRegister
public File setRegister(boolean registerflag)
Set the register flag of the file. Default is true- Parameters:
registerflag-- Returns:
-
getRegister
public boolean getRegister()
Get the register flag of this file.- Returns:
-
setTransfer
public File setTransfer(File.TRANSFER transferflag)
Set the transfer type of the file- Parameters:
transferflag-- Returns:
- See Also:
File.TRANSFER
-
getTransfer
public File.TRANSFER getTransfer()
Get the transfer type of the file- Returns:
-
setExecutable
public File setExecutable(boolean executable)
Mark the file as executable. Default is false- Parameters:
executable-- Returns:
-
setExecutable
public File setExecutable()
Mark the file as executable. Default is false- Returns:
-
getExecutable
public boolean getExecutable()
Check if the file is an executable- Returns:
-
setSize
public File setSize(java.lang.String size)
Set the size of the file.- Parameters:
size-- Returns:
-
getSize
public java.lang.String getSize()
Return the size of the file- Returns:
- empty string if no size defined, otherwise returns the size
-
isFile
public boolean isFile()
- Overrides:
isFilein classCatalogType
-
equals
public boolean equals(java.lang.Object o)
Check if this File is equal to Object o- Overrides:
equalsin classjava.lang.Object- Parameters:
o-- Returns:
-
hashCode
public int hashCode()
HashCode of this File- Overrides:
hashCodein classjava.lang.Object- Returns:
-
clone
public File clone()
Return a clone of this File- Overrides:
clonein classjava.lang.Object- Returns:
-
toXML
public void toXML(XMLWriter writer)
Write the file object- Overrides:
toXMLin classCatalogType- Parameters:
writer-- See Also:
XMLWriter
-
toXML
public void toXML(XMLWriter writer, int indent)
Write the file object, with indent level N- Overrides:
toXMLin classCatalogType- Parameters:
writer-indent-- See Also:
XMLwriter
-
toXML
public void toXML(XMLWriter writer, int indent, java.lang.String elementname)
Write the file object as XML but render it as the elementname- Parameters:
writer-indent-elementname-
-
-