Versioning of parts in the document management data model

Versioning properties of document parts are determined by the versioning properties of the item type relation to each part type selected in the item type of a document.

Document parts have the following versioning characteristics:
  • Parts, like regular documents, can have one of three versioning models: versioned-always, versioned-never (default) and application-controlled versioning.
  • If an item type has a version policy of versioned-never, its parts also have a versioning policy of versioned-never.
  • If an item type T has a version-policy of versioned-always and an item I of item type T and you change (by adding/deleting or updating a part) either its attributes or its parts collection, a new version of item I is created.
  • Parts of documents, unlike documents themselves, do not have a maximum number of versions.
  • You can obtain part-level versioning rules from the item type relation object for the part of interest (base, note, annotation and so on).

The following example shows how to get the versioning rules for the base part of an item type.

Example: Java™

String itemTypeName="book";  //example item type
long partId = DK_ICM_PART_BASE;
DKItemTypeDefICM item =null;
DKDatastoreICM ds = new DKDatastoreICM();
...
item = (DKItemTypeDefICM)ds.datastoreDef.retrieveEntity(itemTypeName;
DKItemTypeRelationDefICM itemRelation =
(DKItemTypeRelationDefICM)item.retrieveItemTypeRelation(partId);
versionControlPolicy = itemTypeRelation.getVersionControl();