gov.loc.repository.bagit
Interface Bag.BagPartFactory

Enclosing interface:
Bag

public static interface Bag.BagPartFactory

Creates various parts of a bag, as appropriate for the version and underlying implementation of the Bag interface.

You should never create implementations for the various components of a bag directly. Instead, you should obtain a parts factory through Bag.getBagPartFactory() and then create the desired component through the factory.

The components created are not already "bound" to a bag. They must still be added to the bag using methods such as Bag.putBagFile(BagFile).

See Also:
Bag

Method Summary
 BagInfoTxt createBagInfoTxt()
           
 BagInfoTxt createBagInfoTxt(BagFile bagFile)
           
 BagInfoTxtReader createBagInfoTxtReader(java.lang.String encoding, java.io.InputStream in)
           
 BagInfoTxtWriter createBagInfoTxtWriter(java.io.OutputStream out, java.lang.String encoding)
           
 BagInfoTxtWriter createBagInfoTxtWriter(java.io.OutputStream out, java.lang.String encoding, int lineLength, int indentSpaces)
           
 BagItTxt createBagItTxt()
           
 BagItTxt createBagItTxt(BagFile bagFile)
           
 BagItTxtReader createBagItTxtReader(java.lang.String encoding, java.io.InputStream in)
           
 BagItTxtWriter createBagItTxtWriter(java.io.OutputStream out, java.lang.String encoding)
           
 BagItTxtWriter createBagItTxtWriter(java.io.OutputStream out, java.lang.String encoding, int lineLength, int indentSpaces)
           
 FetchTxt createFetchTxt()
           
 FetchTxt createFetchTxt(BagFile sourceBagFile)
           
 FetchTxtReader createFetchTxtReader(java.io.InputStream in, java.lang.String encoding)
           
 FetchTxtWriter createFetchTxtWriter(java.io.OutputStream out)
           
 Manifest createManifest(java.lang.String name)
           
 Manifest createManifest(java.lang.String name, BagFile sourceBagFile)
           
 ManifestReader createManifestReader(java.io.InputStream in, java.lang.String encoding)
           
 ManifestReader createManifestReader(java.io.InputStream in, java.lang.String encoding, boolean treatBackSlashAsPathSeparator)
           
 ManifestWriter createManifestWriter(java.io.OutputStream out)
           
 BagFactory.Version getVersion()
           
 void setManifestSeparator(java.lang.String separator)
           
 

Method Detail

createManifestReader

ManifestReader createManifestReader(java.io.InputStream in,
                                    java.lang.String encoding)

createManifestReader

ManifestReader createManifestReader(java.io.InputStream in,
                                    java.lang.String encoding,
                                    boolean treatBackSlashAsPathSeparator)

createManifestWriter

ManifestWriter createManifestWriter(java.io.OutputStream out)

createManifest

Manifest createManifest(java.lang.String name)

createManifest

Manifest createManifest(java.lang.String name,
                        BagFile sourceBagFile)

createBagItTxtReader

BagItTxtReader createBagItTxtReader(java.lang.String encoding,
                                    java.io.InputStream in)

createBagItTxtWriter

BagItTxtWriter createBagItTxtWriter(java.io.OutputStream out,
                                    java.lang.String encoding,
                                    int lineLength,
                                    int indentSpaces)

createBagItTxtWriter

BagItTxtWriter createBagItTxtWriter(java.io.OutputStream out,
                                    java.lang.String encoding)

createBagItTxt

BagItTxt createBagItTxt(BagFile bagFile)

createBagItTxt

BagItTxt createBagItTxt()

createBagInfoTxtReader

BagInfoTxtReader createBagInfoTxtReader(java.lang.String encoding,
                                        java.io.InputStream in)

createBagInfoTxtWriter

BagInfoTxtWriter createBagInfoTxtWriter(java.io.OutputStream out,
                                        java.lang.String encoding,
                                        int lineLength,
                                        int indentSpaces)

createBagInfoTxtWriter

BagInfoTxtWriter createBagInfoTxtWriter(java.io.OutputStream out,
                                        java.lang.String encoding)

createBagInfoTxt

BagInfoTxt createBagInfoTxt(BagFile bagFile)

createBagInfoTxt

BagInfoTxt createBagInfoTxt()

createFetchTxtReader

FetchTxtReader createFetchTxtReader(java.io.InputStream in,
                                    java.lang.String encoding)

createFetchTxtWriter

FetchTxtWriter createFetchTxtWriter(java.io.OutputStream out)

createFetchTxt

FetchTxt createFetchTxt()

createFetchTxt

FetchTxt createFetchTxt(BagFile sourceBagFile)

getVersion

BagFactory.Version getVersion()

setManifestSeparator

void setManifestSeparator(java.lang.String separator)