Package org.dspace.pack
Interface Packer
-
- All Known Implementing Classes:
CatalogPacker,CollectionPacker,CommunityPacker,ItemPacker,METSPacker,SitePacker
public interface PackerPacker packages and unpackages DSpace objects into archive files- Author:
- richardrodgers
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Filepack(File packDir)Packs (maps) the contents of this object into an archive file.voidsetContentFilter(String filter)Sets a filter on this packer.voidsetReferenceFilter(String filter)longsize(String method)Estimate the size of the object as packed into a bag.voidunpack(File archFile)Unpacks (maps) the contents of the passed archive file into this object.
-
-
-
Method Detail
-
pack
File pack(File packDir) throws org.dspace.authorize.AuthorizeException, IOException, SQLException
Packs (maps) the contents of this object into an archive file.- Parameters:
packDir- the locus of the packing- Returns:
- the packed archive file
- Throws:
org.dspace.authorize.AuthorizeException- if authorize errorIOException- if I/O errorSQLException- if database error
-
unpack
void unpack(File archFile) throws org.dspace.authorize.AuthorizeException, IOException, SQLException
Unpacks (maps) the contents of the passed archive file into this object.- Parameters:
archFile- the archive file to unpack- Throws:
org.dspace.authorize.AuthorizeException- if authorize errorIOException- if I/O errorSQLException- if database error
-
size
long size(String method) throws SQLException
Estimate the size of the object as packed into a bag. This estimate uses any defined content filters.- Parameters:
method- how to estimate - not currently implemented- Returns:
- the bagged object size in bytes
- Throws:
SQLException- if database error
-
setContentFilter
void setContentFilter(String filter)
Sets a filter on this packer. A filter will ignore (skip) object content when packing to a bag. Filter syntax:["+"]{BundleName,}+That is, a list of Item bundle names taken to be exclusions, unless preceeded by a '+", where the list is taken to be inclusive.- Parameters:
filter- filter
-
setReferenceFilter
void setReferenceFilter(String filter)
-
-