Package org.dspace.content
The DSpace Data Model
Data in DSpace is stored in the model below. Multiple inclusion is permitted at every level; the documentation for each class describes the system's behaviour for coping with this.| Community | Communities correspond to organisational units within an institution. |
| Collection | Collections are groupings of related content. Each collection may have an associated workflow; this is the review process that submissions go through before being included in the archive. |
| Item | Items are the basic archival units. An item corresponds to a single logical piece of content and associated metadata. |
| Bundle | Bundles are groupings of Bitstreams that make no sense in isolation; for example, the files making up an HTML document would all go in one Bundle. A PDF version of the same Item, or a dataset stored with the Item, would go in a separate Bundle. |
| Bitstream | Bitstreams are sequences of bits, typically files, that make up the raw content of Items. |
Submissions are created as Workspace Items. A Workspace Item is an Item in progress. Once item assembly is complete, one of two things may happen:
- If the Collection being submitted to has an associated workflow, it is started. At this point the Workspace Item becomes a Workflow Item.
- If the Collection has no associated workflow, the Workspace Item is removed and the assembled Item is included in the Collection.
Using the Content Management API
The general paradigm for using DSpace is to create a Context; this is akin to opening a connection to a database (which, coincidentally, is one of the things that happens.)The classes in this package are then used to create in-memory snapshots that represent the corresponding logical objects stored in the system. When the reading or manipulating is done, the Context may either be aborted, in which case any changes made are discarded, or completed, in which case any changes made are committed to main DSpace storage.
If any error occurs if you are making changes, you should abort the current context, since the in-memory snapshots might be in an inconsistent state.
Typically, when changing a particular object in the system, the changes will
not be written to main DSpace storage unless update is called on
the object prior to Context completion. Where this is not the case, it is
stated in the method documentation.
Instances of the classes in this package are tied to that Context; when the Context has been finished with the objects essentially become invalid.
An example use of the Content Management API is shown below:
try
{
// Create a DSpace context
context = new org.dspace.core.Context();
// Set the current user
context.setCurrentUser(authenticatedUser)
// Create my new collection
Collection c = Collection.create(context);
c.setMetadata("name", "My New Collection");
c.update(); // Updates the metadata within the context
// Find an item
item = Item.find(context, 1234);
// Remove it from its old collections
Collection[] colls = item.getCollections();
colls[0].removeItem(item);
// Add it to my new collection
c.addItem(item);
// All went well; complete the context so changes are written
context.complete();
}
catch (SQLException se)
{
// Something went wrong with the database; abort the context so
// no changes are written
context.abort();
}
catch (AuthorizeException ae)
{
// authenticatedUser does not have permission to perform one of the
// above actions, so no changes should be made at all.
context.abort();
}
// The context will have been completed or aborted here, so it may
// no longer be used, nor any objects that were created with it (e.g. item)
- See Also:
org.dspace.authorize,Context
-
Interface Summary Interface Description DSpaceObjectLegacySupport Database Object interface interface class that adds that getLegacyId method which returns the old integer based identifier that was used to identify DSpaceObjects prior to DSpace 6.0InProgressSubmission Interface for manipulating in-progress submissions, without having to know at which stage of submission they are (in workspace or workflow system)RelationshipMetadataService Interface used for theRelationshipMetadataServiceImplThis will define methods regarding the RelationshipMetadata -
Class Summary Class Description Bitstream Class representing bitstreams stored in the DSpace system.Bitstream_ BitstreamFormat Class representing a particular bitstream format.BitstreamFormat_ BitstreamFormatServiceImpl Service implementation for the BitstreamFormat object.BitstreamServiceImpl Service implementation for the Bitstream object.Bundle Class representing bundles of bitstreams stored in the DSpace systemBundle_ BundleServiceImpl Service implementation for the Bundle object.Collection Class representing a collection.Collection_ CollectionNameComparator Compares the names of twoCollections.CollectionServiceImpl Service implementation for the Collection object.Community Class representing a communityCommunity_ CommunityServiceImpl Service implementation for the Community object.DCDate Dublin Core date utility classDCLanguage Utility class for dealing with languagesDCPersonName DSpace person name utility classDCSeriesNumber Series and report number, as stored in relation.ispartofseriesDSpaceObject Abstract base class for DSpace objectsDSpaceObject_ DSpaceObjectServiceImpl<T extends DSpaceObject> Service implementation class for the DSpaceObject.Entity This class represents an Entity object.EntityServiceImpl EntityType Class representing an EntityType This class contains an Integer ID that will be the unique value for this class and also the primary key This also has a label that will be used to identify what kind of EntityType this object isEntityType_ EntityTypeServiceImpl InstallItemServiceImpl Support to install an Item in the archive.Item Class representing an item in DSpace.Item_ ItemComparator Compare two Items by their DCValues.ItemServiceImpl Service implementation for the Item object.LicenseUtils Utility class to manage generation and storing of the license text that the submitter has to grant/granted for archiving the itemMetadataField DSpace object that represents a metadata field, which is defined by a combination of schema, element, and qualifier.MetadataField_ MetadataFieldServiceImpl Service implementation for the MetadataField object.MetadataSchema Class representing a schema in DSpace.MetadataSchema_ MetadataSchemaServiceImpl Service implementation for the MetadataSchema object.MetadataValue Database access class representing a Dublin Core metadata value.MetadataValue_ MetadataValueServiceImpl Service implementation for the MetadataValue object.Relationship This class represents a relationship It has a leftItem and a rightItem which are both DSpaceObjects that have a specified RelationshipType that links them together It also has a left and right place column that works just like a normal DSpace metadata place columnRelationship_ RelationshipMetadataServiceImpl RelationshipMetadataValue This class is used as a representation of MetadataValues for the MetadataValues that are derived from the Relationships that the item has.RelationshipServiceImpl RelationshipType Class representing a RelationshipType This class contains an Integer ID that will be the unique value and primary key in the database.RelationshipType_ RelationshipTypeServiceImpl Site Represents the root of the DSpace Archive.Site_ SiteServiceImpl Service implementation for the Site object.SupervisedItemServiceImpl Thumbnail Wrapper class for bitstreams with Thumbnails associated with them for convenience in the browse systemWorkspaceItem Class representing an item in the process of being submitted by a userWorkspaceItem_ WorkspaceItemServiceImpl Service implementation for the WorkspaceItem object. -
Enum Summary Enum Description MetadataSchemaEnum This is an enum that holds track of a few special MetadataSchema types.ProcessStatus This Enum holds a representation of all the possible states that a Process can be in -
Exception Summary Exception Description NonUniqueMetadataException An exception that gets thrown when a metadata field cannot be created or saved due to an existing field with an identical element and qualifier.