uk.ac.ed.inf.ogsaconfig.garm.collections
Class ConcreteVFile

java.lang.Object
  |
  +--uk.ac.ed.inf.ogsaconfig.garm.VFile
        |
        +--uk.ac.ed.inf.ogsaconfig.garm.collections.ConcreteVFile

public abstract class ConcreteVFile
extends VFile

A concrete VFile is one which represents an actual file and is responsible for streaming it from some medium upon request. THis is opposed to a meta vfile which relies on some wrapped vfile inside itself to perform streaming. Classes subclassing ConcreteVFile need only implement time() and source().


Constructor Summary
protected ConcreteVFile(java.lang.String path, FileCollection source)
           
 
Method Summary
 java.io.File hierarchy()
          Returns the hierarchy of the file in the filesystem
 java.lang.String name()
          Returns the name of the file
 FileCollection source()
          Returns the file collection from which this file originates
abstract  java.io.InputStream stream()
          Returns an InputStream from which the file itself can be read
abstract  java.util.Date time()
          Returns the modification time of the file.
 FileType type()
          Returns the semantic type of the file
 
Methods inherited from class uk.ac.ed.inf.ogsaconfig.garm.VFile
equals, hashCode, hierarchiesEqual, isEmptyHierarchy
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConcreteVFile

protected ConcreteVFile(java.lang.String path,
                        FileCollection source)
Parameters:
path - is the path to the file this represents
source - is the FileCollection this vfile belongs to
Method Detail

name

public java.lang.String name()
Description copied from class: VFile
Returns the name of the file

Specified by:
name in class VFile

hierarchy

public java.io.File hierarchy()
Description copied from class: VFile
Returns the hierarchy of the file in the filesystem

Specified by:
hierarchy in class VFile

type

public FileType type()
Description copied from class: VFile
Returns the semantic type of the file

Specified by:
type in class VFile

source

public FileCollection source()
Description copied from class: VFile
Returns the file collection from which this file originates

Specified by:
source in class VFile

time

public abstract java.util.Date time()
Description copied from class: VFile
Returns the modification time of the file. Used for freshness testing

Specified by:
time in class VFile

stream

public abstract java.io.InputStream stream()
                                    throws java.io.IOException
Description copied from class: VFile
Returns an InputStream from which the file itself can be read

Specified by:
stream in class VFile
java.io.IOException