Page History
...
- Versioning is at the level of data files.
Wiki Markup Data packages and data files have a relationship between their identifiers. Each version of a file/package is represented by a separate DOI. The "base" DOI points to the most recent version of the file/package, but a version number can be added to the base DOI to access previous versions. See the \[\[\]\] page for more details about the DOI format.
- When a new version of data file is deposited, a new identifier will be created.
- Adding or changing README files or metadata will not result in creation of a new identifier.
- All metadata changes are logged by writing a metadata snapshot to the filesystem this allows us to retain a record of the changes, even though they are not available as explicit versions (and not viewable in the UI). - If all we are doing is adding a new bitstream without changing the existing bitstreams, there is no need to force a version number change.
- When a new identifier is created for a data file, a new identifier is automatically created for the corresponding data package.
- Each version of the item includes metadata about who created the version and the date/time. (it is essentially a full copy of the item, with modifications)
- Only the most recent version of an item is available via the search interface.
- On the item page, there is a link to view previous/subsequent versions.
- By examining the metadata, it is possible to determine whether an item is the most recent version, the original version, or an intermediate version.
- Previous versions of bitstreams are retained. If something was once retrievable, it is always retrievable.
- Creation of a new version is initiated by the author. On the "submissions" page, users should see all of their archived submissions. Each archived submission should have a button to submit a new version of a data file - this button doesn't appear anywhere else
- Expose Versioning detail in DSpace API and Services (I.E. OAI, Bagit, Etc.)
Administration
- Current Code Locations
Technical Details
Work Areas for Implementation of Version History
...
- Separate New Versions of an Item May be started
- Can only one new version be started, until it has been finalized?
- Should the new version of the data package, data files, and bitstreams be processed in the submission and/or reviewing workflow?
- Should information about the revision be hidden until approved?
- Should the handle of a replaced item automatically point to the latest version?
Code Block /** * Creates a Item in the database that maintains all the same * attributes and metadata as the Item it supplants with a new * revision number and a link to the given Item as the previousRevision * a new bitstream is not created * * This Item is ready to be put into the Workspace or a Workflow * * @param item The Item to create a new version of */ public static Item newVersionOfItem(Context context, Item originalItem) { try { ArchiveManager am = new ArchiveManager(); ItemDAO itemDAO = ItemDAOFactory.getInstance(context); WorkspaceItemDAO wsiDAO = WorkspaceItemDAOFactory.getInstance(context); Item item = itemDAO.create(); Item head = itemDAO.getHeadRevision(originalItem.getOriginalItemID()); item.setArchived(false); item.setWithdrawn(originalItem.isWithdrawn()); // Done by ItemDAO.update ... item.setLastModified(); item.setOriginalItemID(originalItem.getOriginalItemID()); item.setRevision(head.getRevision()+1); item.setPreviousItemID(head.getID()); //System.out.println("Head: " + head.toString()); item.setOwningCollectionId(originalItem.getOwningCollection().getID()); item.setSubmitter(originalItem.getSubmitter().getID()); item.setMetadata(originalItem.getMetadata()); // Add uri as identifier.uri DC value item.clearMetadata("dc", "identifier", "uri", null); for (Bundle bundle : originalItem.getBundles()) { item.addBundle(am.dupeBundle(context, bundle)); } itemDAO.update(item); wsiDAO.create(item); return item; } catch (Exception e) { throw new RuntimeException(e); } } /** * Takes in a bundle and makes a deep copy of it. * Without duping bitstreams. * * @param bundle */ private Bundle dupeBundle (Context context, Bundle bundle) throws AuthorizeException { BundleDAO bdao = BundleDAOFactory.getInstance(context); Bundle dupe = bdao.create(); Bitstream[] bitstreams = null; int primary = bundle.getPrimaryBitstreamID(); bitstreams = bundle.getBitstreams(); for (Bitstream b : bitstreams) { dupe.addBitstream(b); if (primary == b.getID()) { dupe.setPrimaryBitstreamID(b.getID()); } } dupe.setName(bundle.getName()); return dupe; } }
...
Overview
Content Tools