NAME

Document::Directory - Manage an archival Document directory.

SYNOPSIS

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

UNIVERSAL

Description

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

None.

Class Variables

None.

Instance Variables

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

$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

$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

None.

Private Instance Methods

None.

KNOWN BUGS

See TODO.

Errors and Warnings

None.

SEE ALSO

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

AUTHOR

Dale Amon <amon@vnl.com>

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 182:

You forgot a '=back' before '=head1'

Around line 217:

=back doesn't take any parameters, but you said =back 4