org.dspace.content

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Content Management System » dspace » org.dspace.content 
org.dspace.content
Provides an API for reading and manipulating content in the DSpace system.

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.
Additionally, each Bitstream is associated with one Bitstream Format; this describes information about the format and encoding of the Bitstream, including a name (for example "Adobe PDF"), a MIME type and a support level.

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.
Workspace Items and Workflow Items may both be manipulated as In Progress Submissions.

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 org.dspace.authorize @see org.dspace.core.Context
Java Source File NameTypeComment
Bitstream.javaClass Class representing bitstreams stored in the DSpace system.

When modifying the bitstream metadata, changes are not reflected in the database until update is called.

BitstreamFormat.javaClass Class representing a particular bitstream format.
Bundle.javaClass Class representing bundles of bitstreams stored in the DSpace system

The corresponding Bitstream objects are loaded into memory.

Collection.javaClass Class representing a collection.

The collection's metadata (name, introductory text etc), workflow groups, and default group of submitters are loaded into memory.

Community.javaClass Class representing a community

The community's metadata (name, introductory text etc.) is loaded into' memory.

DCDate.javaClass Dublin Core date utility class

Dates in the DSpace database are held in the ISO 8601 format.

DCLanguage.javaClass
DCPersonName.javaClass
DCSeriesNumber.javaClass
DCValue.javaClass Simple data structure-like class representing a Dublin Core value.
DSpaceObject.javaClass
FormatIdentifier.javaClass This class handles the recognition of bitstream formats, using the format registry in the database.
InProgressSubmission.javaInterface
InstallItem.javaClass
Item.javaClass Class representing an item in DSpace.

This class holds in memory the item Dublin Core metadata, the bundles in the item, and the bitstreams in those bundles.

ItemComparator.javaClass Compare two Items by their DCValues. The DCValues to be compared are specified by the element, qualifier and language parameters to the constructor.
ItemIterator.javaClass Specialized iterator for DSpace Items.
MetadataField.javaClass DSpace object that represents a metadata field, which is defined by a combination of schema, element, and qualifier.
MetadataSchema.javaClass Class representing a schema in DSpace.

The schema object exposes a name which can later be used to generate namespace prefixes in RDF or XML, e.g.

MetadataValue.javaClass Database access class representing a Dublin Core metadata value.
NonUniqueMetadataException.javaClass 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.
Site.javaClass Represents the root of the DSpace Archive. By default, the handle suffix "0" represents the Site, e.g.
SupervisedItem.javaClass Class to handle WorkspaceItems which are being supervised.
Thumbnail.javaClass
WorkspaceItem.javaClass
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.