org.daisy.zedval.engine
Class ManifestFile

java.lang.Object
  extended byjava.io.File
      extended byorg.daisy.zedval.engine.ZedFile
          extended byorg.daisy.zedval.engine.ManifestFile
All Implemented Interfaces:
java.lang.Comparable, java.io.Serializable
Direct Known Subclasses:
AudioFile, CssFile, DtdFile, ImageFile, OtherFile, XmlFile

public abstract class ManifestFile
extends ZedFile

A ManifestFile object represents a single DTB file that can appear in a package manifest

Author:
James Pritchett
See Also:
Serialized Form

Field Summary
static java.lang.String MIME_JPEG
           
static java.lang.String MIME_MP3
           
static java.lang.String MIME_NCX
           
static java.lang.String MIME_PACKAGE
           
static java.lang.String MIME_PNG
           
static java.lang.String MIME_RESOURCE
           
static java.lang.String MIME_SMIL
           
static java.lang.String MIME_SVG
           
static java.lang.String MIME_TEXT
           
static java.lang.String MIME_WAV
           
static java.lang.String MIME_AAC
           
 
Fields inherited from class java.io.File
pathSeparator, pathSeparatorChar, separator, separatorChar
 
Constructor Summary
ManifestFile(java.lang.String fullPath, java.lang.String id, java.lang.String mimeType)
           
 
Method Summary
 java.lang.String getId()
          Returns id of this file (from package manifest)
 java.lang.String getMimeType()
          Returns MIME type of this file (as declared in package)
 PackageFile getPackage()
          Returns the PackageFile object whose manifest contains this file
 void setID(java.lang.String id)
          Sets id of file
 void setMimeType(java.lang.String mimeType)
          Sets MIME type of file
 void setPackage(PackageFile p)
          Sets the parent PackageFile
 java.lang.String toString()
           
 
Methods inherited from class org.daisy.zedval.engine.ZedFile
getName
 
Methods inherited from class java.io.File
canRead, canWrite, compareTo, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getParent, getParentFile, getPath, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setLastModified, setReadOnly, toURI, toURL
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

MIME_PACKAGE

public static final java.lang.String MIME_PACKAGE
See Also:
Constant Field Values

MIME_NCX

public static final java.lang.String MIME_NCX
See Also:
Constant Field Values

MIME_RESOURCE

public static final java.lang.String MIME_RESOURCE
See Also:
Constant Field Values

MIME_SMIL

public static final java.lang.String MIME_SMIL
See Also:
Constant Field Values

MIME_TEXT

public static final java.lang.String MIME_TEXT
See Also:
Constant Field Values

MIME_AAC

public static final java.lang.String MIME_AAC
See Also:
Constant Field Values

MIME_MP3

public static final java.lang.String MIME_MP3
See Also:
Constant Field Values

MIME_WAV

public static final java.lang.String MIME_WAV
See Also:
Constant Field Values

MIME_PNG

public static final java.lang.String MIME_PNG
See Also:
Constant Field Values

MIME_JPEG

public static final java.lang.String MIME_JPEG
See Also:
Constant Field Values

MIME_SVG

public static final java.lang.String MIME_SVG
See Also:
Constant Field Values
Constructor Detail

ManifestFile

public ManifestFile(java.lang.String fullPath,
                    java.lang.String id,
                    java.lang.String mimeType)
Parameters:
fullPath - File path (full, including name)
id - id from package file manifest
mimeType - File MIME type as given in package manifest
Method Detail

setID

public void setID(java.lang.String id)
Sets id of file

Parameters:
id - ID of file from package manifest

setMimeType

public void setMimeType(java.lang.String mimeType)
Sets MIME type of file

Parameters:
mimeType - MIME type value from package manifest

setPackage

public void setPackage(PackageFile p)
Sets the parent PackageFile

Parameters:
p - PackageFile object whose manifest contains this file

getPackage

public PackageFile getPackage()
Returns the PackageFile object whose manifest contains this file

Returns:
PackageFile object

getId

public java.lang.String getId()
Returns id of this file (from package manifest)

Returns:
Returns id of this file (from package manifest)

getMimeType

public java.lang.String getMimeType()
Returns MIME type of this file (as declared in package)

Returns:
MIME type of this file (as declared in package)

toString

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