This is a description of the procedure to automatically build a batch of Text objects from template using Batch Builder 2 (BB). Use this method if you have a large number of objects (over 10) that need to be created and your source files are in directories that are not broken by object.
Procedure summary:
- Create a new project.
- Enter DRS deposit settings.
- Create object template.
- Add directives to template.
- Move/copy files into template directories.
- Add object name prefix to file names or supply a mapping.txt file.
Create new object batch.
Process the batch.
What you need before you start:
- Prepare a dozen of text files and put them in a directory of your choice somewhere on local hard disk or network drive.
- Decide what you will use for Owner Supplied Names for your objects and the files they consist of. For instance, you could use local classification or local accession numbers. See Section 3 for more information about owner supplied names.
- Make sure you either provide object name prefix for each file to specify which objects it should be assigned to (The syntax is: [obj-osn]--[file_name].[extension]) or provide object assignment for your file in an external mapping file. For more details about providing object prefixes for your files see Section 1.2.2. For more details about external mapping files see Section 15.1
Procedure:
- Create a new project.
- Open BB by double clicking on the executable.
- From the Project menu select New.
- In the dialog enter Project Name (used for internal tracking); select the directory on disk in which the project will be saved (click the ellipsis button to browse to it on disk); select Content Model "text" from the dropdown; click OK to continue.
- Open BB by double clicking on the executable.
- Enter DRS deposit information.
- Click on "Deposit Settings" in Project Panel tree.
- Enter deposit data in the form:
Batch Name Pattern: default - {owner}{batchDir}{yyyy}{mo}{dd}_{hh24}{mm}{ss}
(This is the name for a batch that appears on DRS deposit reports. Batch name must be at least 3 characters long.)
Success Email: type email and press enter.
Failure Email: type email and press enter.
Success Method: choose how you will receive load report.
Deposit Agent: type your HUID.
- Click on "Deposit Settings" in Project Panel tree.
- Create object template (called "batch template" in BB 1).
- Select "Object Template" in Project Panel on the left and then enter information in the Content Panel on the right.
- Enter Owner Code for objects you will be depositing (use all caps).
- Enter Billing Code for objects you will be depositing (use all caps).
- Select DRS Access Flag value for objects you will be depositing.
- Enter the URN Authority Path for your objects (Look up your Path here if needed: http://nrs.harvard.edu/urn-3:hul.ois:nrsstatusprod) – use all caps.
- Enter URN Resource Name Pattern.
- (Optional) Switch to "optional" tab in the Content Panel to enter any additional optional metadata (for example descriptive metadata, roles or/and relationships that will apply to your objects). For more about optional metadata see Sections 178. Adding Relationships, 189. Adding Descriptive Metadata, 1910. Adding Licenses, Documentation and Other Supporting Content. Note that metadata entered at the object level will override metadata entered at the template level.
- Select "Object Template" in Project Panel on the left and then enter information in the Content Panel on the right.
- Add directories to template.
- Right click on "Object Template" in the Project Panel on the left and add a directory (The directory name starts with "text" but you can append a custom suffix).
- In the Project Panel on the left select the directory you just created.
- In the Content Panel on the right, choose "yes" from the dropdown list for the field "First Generation in DRS".
- Choose "HIGHUSE" for Usage Class.
- Note about Role: For text objects, role at the file directory level is optional. In any case, there is no "deliverable" role at this level and one is not needed since the DRS loader automatically generates a delivery URN for text files.
- Go to Project menu in the top menu bar and choose Save to save your project.
- Right click on "Object Template" in the Project Panel on the left and add a directory (The directory name starts with "text" but you can append a custom suffix).
- Move/Copy files into template directory.
(Done outside Batch Builder)
Once you added directories to Object Template in BB, they were also created on disk. The directory structure on disk is the same as what you see in the Project Panel in Batch Builder when you expand the Object Template icon, but on disk the Object Template directory is called "template." If you need to check where on disk Batch Builder built the directory structure, click on Deposit Settings in the Project Panel and take a look at the Project Path field at the bottom of the main metadata panel.
Copy files to the corresponding text directory inside the template directory. - Add object name prefix to file names or supply a mapping.txt file.
In order to tell BB which object each file should end up with you need to either add object name prefixes to each file name or supply a mapping.txt file that associates each file with its future object.
...
- From the Object menu in BB select "Create a new batch with objects from template"; enter the name of the batch directory to be created on disk and click OK. A new batch icon will be added to the Project Panel on the right (icon with a red letter B) and new objects will be built that are going to be part of this batch.
- In the Project Panel click on the "+" next to the Batch icon of the batch you just created to expand the tree – it will show the icons for the new objects (a blue letter O).
- (Optional) Select the object icon of your new object in the Project Panel and switch to "optional" tab in the Content Panel to add any additional optional metadata (for example descriptive metadata, roles or/and relationships that will apply to your objects). For more about optional metadata see Sections 178. Adding Relationships, 189. Adding Descriptive Metadata, 1910. Adding Licenses, Documentation and Other Supporting Content. Note that metadata entered at the object level will override metadata entered at the template level.
- From the Object menu in BB select "Create a new batch with objects from template"; enter the name of the batch directory to be created on disk and click OK. A new batch icon will be added to the Project Panel on the right (icon with a red letter B) and new objects will be built that are going to be part of this batch.
...
- In the command line window (Terminal on Mac or Linux or CMD on Windows) change to the BB installation directory, e.g.: cd C:\Program Files\BatchBuilder\BatchBuilder-2.0.45
Type bathcbuildercli –a build –p [project_directory_path] –b [batch_directory_name], e.g.: batchbuildercli -a build -p "E:\My Project" -b batch1 - (Optional) add additional parameters to the bathcbuildercli command to substitute batch, object and directory level properties. For more information see Section 14. Processing Batches Using Command Line Interface.
- When the batch is successfully processed you will see the following messages:
Building PREMIS file metadata...
Building HulDrsAdmin file metadata...
Success!
- In the command line window (Terminal on Mac or Linux or CMD on Windows) change to the BB installation directory, e.g.: cd C:\Program Files\BatchBuilder\BatchBuilder-2.0.45
...