Package org.dspace.pack.bagit
Class CatalogPacker
- java.lang.Object
-
- org.dspace.pack.bagit.CatalogPacker
-
-
Constructor Summary
Constructors Constructor Description CatalogPacker(org.dspace.core.Context context, String objectId)CatalogPacker(org.dspace.core.Context context, String objectId, String ownerId, List<String> members)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>getMembers()StringgetOwnerId()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 archive)Unpacks (maps) the contents of the passed archive file into this object.
-
-
-
Method Detail
-
getOwnerId
public String getOwnerId()
-
pack
public File pack(File packDir) throws IOException, SQLException, org.dspace.authorize.AuthorizeException
Description copied from interface:PackerPacks (maps) the contents of this object into an archive file.- Specified by:
packin interfacePacker- Parameters:
packDir- the locus of the packing- Returns:
- the packed archive file
- Throws:
IOException- if I/O errorSQLException- if database errororg.dspace.authorize.AuthorizeException- if authorize error
-
unpack
public void unpack(File archive) throws IOException
Description copied from interface:PackerUnpacks (maps) the contents of the passed archive file into this object.- Specified by:
unpackin interfacePacker- Parameters:
archive- the archive file to unpack- Throws:
IOException- if I/O error
-
size
public long size(String method)
Description copied from interface:PackerEstimate the size of the object as packed into a bag. This estimate uses any defined content filters.
-
setContentFilter
public void setContentFilter(String filter)
Description copied from interface:PackerSets 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.- Specified by:
setContentFilterin interfacePacker- Parameters:
filter- filter
-
setReferenceFilter
public void setReferenceFilter(String filter)
- Specified by:
setReferenceFilterin interfacePacker
-
-