public class File extends CatalogType
Modifier and Type | Class and Description |
---|---|
static class |
File.LINK
The linkages that a file can be of
|
static class |
File.TRANSFER
Three Transfer modes supported, Transfer this file, don't transfer or stageout as well as optional.
|
Modifier and Type | Field and Description |
---|---|
protected boolean |
mExecutable
Is the file an executable.
|
protected File.LINK |
mLink |
protected java.lang.String |
mName
The logical name of the file.
|
protected java.lang.String |
mNamespace
The namespace on a file.
|
protected boolean |
mOptional
Is the file optional
|
protected boolean |
mRegister
Should the file be registered in the replica catalog
|
protected java.lang.String |
mSize
File size of the file no units required
|
protected File.TRANSFER |
mTransfer
Should the file be transferred on generation.
|
protected java.lang.String |
mVersion
The logical version of the file.
|
mLogger, mMetadata, mPFNs, mProfiles
Constructor and Description |
---|
File(File f)
Copy constructor
|
File(File f,
File.LINK link)
Copy constructor, but change the linkage of the file.
|
File(java.lang.String name)
Create new file object
|
File(java.lang.String name,
File.LINK link)
Create new file object
|
File(java.lang.String namespace,
java.lang.String name,
java.lang.String version)
Create new File object
|
File(java.lang.String namespace,
java.lang.String name,
java.lang.String version,
File.LINK link)
Create a new file object
|
Modifier and Type | Method and Description |
---|---|
File |
clone()
Return a clone of this File
|
boolean |
equals(java.lang.Object o)
Check if this File is equal to Object o
|
boolean |
getExecutable()
Check if the file is an executable
|
File.LINK |
getLink()
Get the linkage of the file.
|
java.lang.String |
getName()
Get the name of the file
|
java.lang.String |
getNamespace()
Get the namespace of the file
|
boolean |
getOptional()
Check the optional flag of the file
|
boolean |
getRegister()
Get the register flag of this file.
|
java.lang.String |
getSize()
Return the size of the file
|
File.TRANSFER |
getTransfer()
Get the transfer type of the file
|
java.lang.String |
getVersion()
Get the version of the file
|
int |
hashCode()
HashCode of this File
|
boolean |
isFile() |
File |
setExecutable()
Mark the file as executable.
|
File |
setExecutable(boolean executable)
Mark the file as executable.
|
File |
setLink(File.LINK link)
Set the file linkage
|
File |
setOptional(boolean optionalflag)
Set the optional flag on the file.
|
File |
setRegister(boolean registerflag)
Set the register flag of the file.
|
File |
setSize(java.lang.String size)
Set the size of the file.
|
File |
setTransfer(File.TRANSFER transferflag)
Set the transfer type of the file
|
void |
toXML(edu.isi.pegasus.common.util.XMLWriter writer)
Write the file object
|
void |
toXML(edu.isi.pegasus.common.util.XMLWriter writer,
int indent)
Write the file object, with indent level N
|
void |
toXML(edu.isi.pegasus.common.util.XMLWriter writer,
int indent,
java.lang.String elementname)
Write the file object as XML but render it as the elementname
|
addMetaData, addMetaData, addMetaData, addPhysicalFile, addPhysicalFile, addPhysicalFile, addPhysicalFiles, addProfile, addProfile, addProfiles, addProfiles, getMetaData, getPhysicalFiles, getProfiles, isExecutable
protected java.lang.String mNamespace
protected java.lang.String mName
protected java.lang.String mVersion
protected File.LINK mLink
protected boolean mOptional
protected boolean mRegister
protected File.TRANSFER mTransfer
protected boolean mExecutable
protected java.lang.String mSize
public File(java.lang.String name)
name
- The name of the filepublic File(java.lang.String name, File.LINK link)
name
- The name of the filelink
- The linkage of the filepublic File(File f)
f
- Filepublic File(File f, File.LINK link)
f
- Filelink
- Linkpublic File(java.lang.String namespace, java.lang.String name, java.lang.String version)
namespace
- name
- version
- public File(java.lang.String namespace, java.lang.String name, java.lang.String version, File.LINK link)
namespace
- The namespace of the filename
- The name of the fileversion
- The version of the filelink
- The linkage of the file.public java.lang.String getName()
public java.lang.String getNamespace()
public java.lang.String getVersion()
public File.LINK getLink()
public File setLink(File.LINK link)
link
- File.LINK
public File setOptional(boolean optionalflag)
optionalflag
- public boolean getOptional()
public File setRegister(boolean registerflag)
registerflag
- public boolean getRegister()
public File setTransfer(File.TRANSFER transferflag)
transferflag
- File.TRANSFER
public File.TRANSFER getTransfer()
public File setExecutable(boolean executable)
executable
- public File setExecutable()
public boolean getExecutable()
public File setSize(java.lang.String size)
size
- public java.lang.String getSize()
public boolean isFile()
isFile
in class CatalogType
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- public int hashCode()
hashCode
in class java.lang.Object
public File clone()
clone
in class java.lang.Object
public void toXML(edu.isi.pegasus.common.util.XMLWriter writer)
toXML
in class CatalogType
writer
- XMLWriter
public void toXML(edu.isi.pegasus.common.util.XMLWriter writer, int indent)
toXML
in class CatalogType
writer
- indent
- XMLwriter
public void toXML(edu.isi.pegasus.common.util.XMLWriter writer, int indent, java.lang.String elementname)
writer
- indent
- elementname
-