In order to document empty directories metsrw uses a mets:structMap with
TYPE "logical" and LABEL "Normative Directory Structure". This is done
so that the TYPE "physical" structMap can continue to document the files
and folders that are actually in the package. Since the BagIt spec
requires removal of empty directories, this strategy allows for their
removal while still documenting them in the normative structmap so that
they can be recreated later, if necessary.
FSEntry treats empty directories differently from other filesystem
entry types:
PREMIS objects for empty directories are placed in a dmdSec (as opposed to
an amdSec as is done for files)
serialize_structmap has a normative boolean kwarg that allows for
the creation of <mets:div> hierarchies with and without empty directories,
i.e., for normative logical structmaps and physical structmaps,
respectively.
METSDocument gains _normative_structmap() method that returns an
lxml._Element for the normative logical structmap.
_parse_tree_structmap parses physical and normative structmaps
simultaneously.
In order to document empty directories metsrw uses a mets:structMap with TYPE "logical" and LABEL "Normative Directory Structure". This is done so that the TYPE "physical" structMap can continue to document the files and folders that are actually in the package. Since the BagIt spec requires removal of empty directories, this strategy allows for their removal while still documenting them in the normative structmap so that they can be recreated later, if necessary.
FSEntry
treats empty directories differently from other filesystem entry types:serialize_structmap
has anormative
boolean kwarg that allows for the creation of <mets:div> hierarchies with and without empty directories, i.e., for normative logical structmaps and physical structmaps, respectively.METSDocument
gains_normative_structmap()
method that returns anlxml._Element
for the normative logical structmap._parse_tree_structmap
parses physical and normative structmaps simultaneously.