edu.isi.pegasus.planner.dax
Class File

java.lang.Object
  extended by edu.isi.pegasus.planner.dax.CatalogType
      extended by 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: 3201 $
Author:
gmehta

Nested Class Summary
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.
 
Field Summary
protected  boolean mExecutable
          Is the file an executable.
protected  File.LINK mLink
           
protected  String mName
          The logical name of the file.
protected  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  File.TRANSFER mTransfer
          Should the file be transferred on generation.
protected  String mVersion
          The logical version of the file.
 
Fields inherited from class edu.isi.pegasus.planner.dax.CatalogType
mLogger, mMetadata, mPFNs, mProfiles
 
Constructor Summary
File(File f)
          Copy constructor
File(File f, File.LINK link)
          Copy constructor, but change the linkage of the file.
File(String name)
          Create new file object
File(String name, File.LINK link)
          Create new file object
File(String namespace, String name, String version)
          Create new File object
File(String namespace, String name, String version, File.LINK link)
          Create a new file object
 
Method Summary
 File clone()
          Return a clone of this File
 boolean equals(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.
 String getName()
          Get the name of the file
 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.
 File.TRANSFER getTransfer()
          Get the transfer type of the file
 String getVersion()
          Get the version of the file
 int hashCode()
          HashCode of this File
 File setExecutable()
          Mart the file as executable.
 File SetExecutable()
          Deprecated.  
 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 setTransfer(File.TRANSFER transferflag)
          Set the transfer type of the file
 void toXML(XMLWriter writer)
          Write the file object
 void toXML(XMLWriter writer, int indent)
          Write the file object, with indent level N
 void toXML(XMLWriter writer, int indent, 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
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mNamespace

protected String mNamespace
The namespace on a file. This is used for Executables only


mName

protected String mName
The logical name of the file.


mVersion

protected 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.

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 - File
link - Link

File

public File(String namespace,
            String name,
            String version)
Create new File object

Parameters:
namespace -
name -
version -

File

public File(String name)
Create new file object

Parameters:
name - The name of the file

File

public File(String name,
            File.LINK link)
Create new file object

Parameters:
name - The name of the file
link - The linkage of the file

File

public File(String namespace,
            String name,
            String version,
            File.LINK link)
Create a new file object

Parameters:
namespace - The namespace of the file
name - The name of the file
version - The version of the file
link - The linkage of the file.
Method Detail

getName

public String getName()
Get the name of the file

Returns:

getNamespace

public String getNamespace()
Get the namespace of the file

Returns:

getVersion

public 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()
Mart the file as executable. Default is false

Returns:

SetExecutable

public File SetExecutable()
Deprecated. 

Use setExecutable instead.

Returns:

getExecutable

public boolean getExecutable()
Check if the file is an executable

Returns:

equals

public boolean equals(Object o)
Check if this File is equal to Object o

Overrides:
equals in class Object
Parameters:
o -
Returns:

hashCode

public int hashCode()
HashCode of this File

Overrides:
hashCode in class Object
Returns:

clone

public File clone()
Return a clone of this File

Overrides:
clone in class Object
Returns:

toXML

public void toXML(XMLWriter writer)
Write the file object

Overrides:
toXML in class CatalogType
Parameters:
writer -
See Also:
XMLWriter

toXML

public void toXML(XMLWriter writer,
                  int indent)
Write the file object, with indent level N

Overrides:
toXML in class CatalogType
Parameters:
writer -
indent -
See Also:
XMLwriter

toXML

public void toXML(XMLWriter writer,
                  int indent,
                  String elementname)
Write the file object as XML but render it as the elementname

Parameters:
writer -
indent -
elementname -


Copyright © 2011 The University of Southern California. All Rights Reserved.