Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Representation of a DSpace Object

DSpace API Object (hibernate): org.dspace.content.DSpaceObject

This is the representation of an object from the DSpace database. Since DSpace 6, this object is populated with hibernate.

Rest Object: org.dspace.app.rest.model.DSpaceObject

This is a plain old java object (pojo) representation of a DSpace object.

Coding the REST object

...

The base class in this package uses reflection to identify embedded and linked properties.attributes that are actual links to other REST resources. On a such attribute is discovered the code

  1. wrap the linked REST resource inside a DSpaceResource (so to have the identifier, self link, and links to other resources)
  2. put the wrapper in the embedde

Converter Object: org.dspace.app.rest.converter.DSpaceObjectConverter

Convert between the REST representation of an object and the hibernate representation of an object

Coding a converter object