gov.bnl.star.offline.scheduler.catalog
Class PhysicalFile

java.lang.Object
  extended by gov.bnl.star.offline.scheduler.catalog.PhysicalFile
All Implemented Interfaces:
java.io.Serializable

public class PhysicalFile
extends java.lang.Object
implements java.io.Serializable

Represnt a file returned by the Catalog. This object is basically read only, and it's used to compare different copies of the same logical file.

Version:
$Revision: 1.11 $ $Date: 2006/11/21 00:41:31 $
Author:
Gabriele Carcassi & Pavel Jakl & Levente Hajdu
See Also:
Serialized Form

Constructor Summary
PhysicalFile()
           
PhysicalFile(java.lang.Object logicalID, java.lang.String storage, java.lang.String node, java.lang.String path, java.lang.String filename, java.util.Map attributes)
          Creates a new instance of PhysicalFile
PhysicalFile(java.net.URL url)
           
 
Method Summary
 java.net.URL asURL()
          Returns the formatted URL for the input file.
 java.lang.Object getAtribute(java.lang.String attr)
           
 java.util.Map getAttributes()
           
 java.lang.String getFilename()
          Returns the filename.
 java.lang.Object getLogicalID()
          Returns the logical name of the file
 java.lang.String getNode()
          Returns the node where the file resides.
 java.lang.String getPath()
          Returns the path to the file.
 java.lang.String getStorage()
          Returns the storage type.
 void setAttribute(java.lang.String attr, java.lang.Object value)
           
 java.util.Map setAttributes()
           
 void setAttributes(java.util.Map attributes)
           
 void setFilename(java.lang.String filename)
           
 void setLogicalID(java.lang.String logicalID)
           
 void setNode(java.lang.String node)
           
 void setPath(java.lang.String path)
           
 void setStorage(java.lang.String storage)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PhysicalFile

public PhysicalFile()

PhysicalFile

public PhysicalFile(java.lang.Object logicalID,
                    java.lang.String storage,
                    java.lang.String node,
                    java.lang.String path,
                    java.lang.String filename,
                    java.util.Map attributes)
Creates a new instance of PhysicalFile

Parameters:
logicalID - the logical name of the file
storage - the type of storage (NFS, local, ...)
node - the node (es. rcas6023.rhic.bnl.gov)
path - the path to the file
filename - the filename

PhysicalFile

public PhysicalFile(java.net.URL url)
Method Detail

setAttribute

public void setAttribute(java.lang.String attr,
                         java.lang.Object value)

getAtribute

public java.lang.Object getAtribute(java.lang.String attr)

setAttributes

public void setAttributes(java.util.Map attributes)

getAttributes

public java.util.Map getAttributes()

setAttributes

public java.util.Map setAttributes()

getLogicalID

public java.lang.Object getLogicalID()
Returns the logical name of the file

Returns:
the logical name

setLogicalID

public void setLogicalID(java.lang.String logicalID)

getStorage

public java.lang.String getStorage()
Returns the storage type.

Returns:
a String describing the storage type (local, NFS, HPSS, ...)

setStorage

public void setStorage(java.lang.String storage)

getNode

public java.lang.String getNode()
Returns the node where the file resides.

Returns:
null if the file is not on local disk

setNode

public void setNode(java.lang.String node)

getPath

public java.lang.String getPath()
Returns the path to the file.

Returns:
the path to the file.

setPath

public void setPath(java.lang.String path)

getFilename

public java.lang.String getFilename()
Returns the filename.

Returns:
the filename

setFilename

public void setFilename(java.lang.String filename)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

asURL

public java.net.URL asURL()
Returns the formatted URL for the input file.

Returns:
the URL describing the input file


Copyright © 2002-2004 STAR collaboration - Brookhaven National Laboratory. All Rights Reserved.