Document::Directory - Manage an archival Document directory.


Document documentation  | view source Contained in the Document distribution.

Index


NAME

Top

 Document::Directory - Manage an archival Document directory.

SYNOPSIS

Top

 use Document::Directory;
 $obj = Document::Directory->open($path,$date,$title);
 $obj = $obj->add ($pageid,$tiles);
 $str = $obj->pagename ($pageid);
 $str = $obj->pagepath ($pageid);
 $fs  = $obj->filespec;
 $obj = $obj->info;

Inheritance

Top

 UNIVERSAL

Description

Top

Manage a Document directory. A document directory contains images of document pages along with a table of contents file (.toc) and a log of what has been done to the document and pages in it. A Document is not a transient object that will be edited or updated. It is an artifact that once created should not be modified.

There are of course some cases in which such changes might be needed. If a page scan is badly done there might be a good reason to replace it. In such cases the old page scan will be saved along with the new one.

While content should not be changed, the .toc file and the file naming can be modified, but the fact of such changes will be logged.

Examples

Top

 None.

Class Variables

Top

 None.

Instance Variables

Top

 filespec	A filespec object containing the document name and location
 logfile	A document log file object.
 tocfile        A document table of contents file object
 toc		In memory copy of the table of contents.

Class Methods

Top

$obj = Document::Directory->open ($path,$date,$title)

Create and initialize instances of Document::Directory for a document that is located at $path and has a name of "$date-$title".

Instance Methods

Top

$obj = $obj->add ($pageid,$titles)

If a the file associated with $pageid exists, add the page id and titles to the .toc file and log the date and time at which this was done.

Returns undef if any of these actions failed.

$str = $obj->pagename ($pageid)

Return the complete page name for $pageid. The name does not include a file extension.

$str = $obj->pagepath ($pageid)

Return the absolute path name which should be used to access $pageid. The file extension is assumed to be .jpeg.

$fs = $obj->filespec)

Return the filespec object which contains the document name and location.

$fs = $obj->filespec)

Print information about the document:

  [Document]
  Document Location:         /Archive/Publications/NuclearHobbiest/
  Document Name:             20080827-NuclearHobbiest
  Date:                      20080827
  Title:                     NuclearHobbiest

Private Class Method

Top

 None.

Private Instance Methods

Top

 None.

KNOWN BUGS

Top

 See TODO.

Errors and Warnings

Top

 None.

SEE ALSO

Top

 Document::Toc, Document::TocFile, Document::LogFile

AUTHOR

Top

Dale Amon <amon@vnl.com>


Document documentation  | view source Contained in the Document distribution.