eu.planets_project.services.datatypes
Interface DigitalObject
public interface DigitalObject
A representation of a digital object. Instances are created using a builder
to allow optional named constructor parameters and ensure consistent state
during creation. E.g. to create a digital object with only the required
argument, you'd use:
DigitalObject o = new DigitalObject.Builder(content).build();
You can cascade additional calls for optional arguments:
DigitalObject o = new
DigitalObject.Builder(content).manifestationOf(abstraction
).title(title).build();
DigitalObject instances can be serialized to XML. Given such an XML
representation, a digital object can be instantiated using the builder:
DigitalObject o = new DigitalObject.Builder(xml).build();
For usage examples, see the tests in DigitalObjectTests
and web
service sample usage in pserv/IF/simple.
getTitle
java.lang.String getTitle()
- Returns:
- The title of this digital object.
getFormat
java.net.URI getFormat()
- Returns:
- The type of this digital object.
getPermanentUri
java.net.URI getPermanentUri()
- Returns:
- The unique identifier.
getManifestationOf
java.net.URI getManifestationOf()
- Returns:
- The URI that this digital object is a manifestation of.
getMetadata
java.util.List<Metadata> getMetadata()
- Returns:
- Additional repository-specific metadata. Returns a defensive
copy, changes to the obtained list won't affect this digital
object.
getContent
DigitalObjectContent getContent()
- Returns:
- The actual content reference. Required. Returns a defensive copy,
changes to the obtained instance won't affect this digital
object.
getEvents
java.util.List<Event> getEvents()
- Returns:
- The 0..n events that happened to this digital object. Returns a
defensive copy, changes to the obtained list won't affect this
digital object.
getFragments
java.util.List<java.lang.String> getFragments()
- Returns:
- The 0..n fragment IDs this digital object consists of. Returns a
defensive copy, changes to the obtained list won't affect this
digital object. If required, a future version of the framework
might use a complex type to represent a fragment.
toXml
java.lang.String toXml()
- Returns:
- An XML representation of this digital object (can be used to
instantiate an object using the builder constructor)
Copyright © 2007-2010 The Planets Consortium. All Rights Reserved.