Book properties and methods
You can use the book production properties and methods to open and close IdML books, define and specify operation sets and operations, and add managed elements and relationships to operations.
Properties
Table 1 describes the book properties for the DLA production API.
| Property | Description |
|---|---|
| source |
The cdmManagementSoftwareSystem instance that identifies the source of the discovery data contained in the book. |
| timestamp |
The IdML book creation time, specified using UTC. |
Methods
Table 2 describes the book production methods.
| Method | Description |
|---|---|
| addManagedElement(managedElement) |
Append an IDMLManagedElement to the current operation in the current operationSet. It is an error to call this method if there is no current operation. The method returns a reference to the IDMLBook. |
| addManagedElements(managedElements) |
Append a list of IDMLManagedElements to the current operation in the current operationSet. It is an error to call this method if there is no current operation. The method returns a reference to the IDMLBook. |
| addRelationship(relationship) |
Append an IDMLRelationship to the current operation in the current operationSet. It is an error to call this method if there is no current operation. The method returns a reference to the IDMLBook. |
| addRelationships(relationships) |
Append a list of IDMLRelationships to the current operation in the current operationSet. It is an error to call this method if there is no current operation. The method returns a reference to the IDMLBook. |
| closeBook() |
Complete the book and close the file. It is an error to call this method unless the book has previously been opened using the openBook() method. It is also an error to call this method if the last call to openOperationSet() was not followed by a call to closeOperationSet(). The method returns a reference to the IDMLBook. |
| closeOperation() |
Complete the current operation, as specified by the most recent call to the openCreateOperation(), openDeleteOperation(), or openModifyOperation() method. Following this call, there is no current operation defined until a subsequent call to open an operation. It is an error to call this method if there is no open operation. The method returns a reference to the IDMLBook. |
| closeOperationSet() |
Complete the current operationSet. Following this call, there is no current operationSet defined until a subsequent openOperationSet call. It is an error to call this method if there is no open operationSet. The method returns a reference to the IDMLBook. |
| create(source, timestamp, modelSchemaURI, modelSchemaVersion) |
This is a class scope method that creates an instance of an IDMLBook. The method accepts the following parameters:
|
| create(source, timestamp) |
This is a class scope method that creates an instance of an IDMLBook. Similar to create(source, timestamp, modelSchemaURI, modelSchemaVersion), this method uses the base Common Data Model schema for validation instead of the user-specified modelSchemaURI and modelSchemaVersion. |
| getBookName() |
Retrieve a character string with a name that conforms to the conventions for IdML book file names, based on the type, source, and timestamp properties. |
| getSource() |
Retrieve the value of the source property. |
| getTimestamp() |
Retrieve the value of the timestamp property. |
| openBook(outputStream) |
Retrieve a reference to the IDMLBook which serves as the output stream to which the contents will be written. You can only call this method once for a particular IDMLBook. |
| openCreateOperation(timestamp) |
Begin a create operation. You can specify a timestamp value for the operation. It is an error to call this method if there is no current operationSet. The method returns a reference to the IDMLBook. |
| openDeleteOperation(timestamp) |
Begin a delete operation. You can specify a timestamp value for the operation. It is an error to call this method if there is no current operationSet. The method returns a reference to the IDMLBook. |
| openModifyOperation(timestamp) |
Begin a modify operation. You can specify a timestamp value for the operation. It is an error to call this method if there is no current operationSet. The method returns a reference to the IDMLBook. |
| openOperationSet(transactional) |
Open a new operationSet. The transactional parameter specifies whether the reader of the book should treat all operations in the operationSet as one transaction. You must call the openBook() method before calling openOperationSet. It is also an error to call the openOperationSet() mehtod if there is an existing operationSet open. The method returns a reference to the IDMLBook. |
| openRefreshOperation(timestamp) |
Begin a refresh operation. You can specify a timestamp value for the operation. It is an error to call this method if there is no current operationSet. The method returns a reference to the IDMLBook. |