Package org.mycore.frontend.basket
Class MCRBasketEntry
java.lang.Object
org.mycore.frontend.basket.MCRBasketEntry
Represents an entry in a basket. Each entry has at least
a unique ID, for example the MCRObjectID, and an URI that
can be used to read the object's XML representation to
render the object in the basket UI. Each basket entry
may have an optional comment. The basket entry provides
methods to resolve the object's XML and to set in in the
basket entry. This can be used by applications that wish
to edit XML in the basket itself.
- Author:
- Frank Lützenkirchen
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the optional comment set for this basket entry.Returns the XML data of the object in the basket entry, or null if setContent() or resolveContent() was not called yet.getID()
Returns the ID of the object contained in this basket entrygetURI()
Returns the URI where to read the object's XML data fromint
hashCode()
void
Reads the XML data of the object in the basket entry, using the given URI, and stores it in the basket entry.void
setComment
(String comment) Sets the optional comment for this basket entry.void
setContent
(Element content) Sets the XML data of the object in the basket entry.
-
Constructor Details
-
MCRBasketEntry
Creates a new basket entry. The XML that represents the object is not immediately read from the given URI. Call resolveContent() to read the content.- Parameters:
id
- the ID of the object to add to the basket.uri
- the URI where to read the object's xml data from
-
-
Method Details
-
getID
Returns the ID of the object contained in this basket entry -
getURI
Returns the URI where to read the object's XML data from -
resolveContent
public void resolveContent()Reads the XML data of the object in the basket entry, using the given URI, and stores it in the basket entry. -
getContent
Returns the XML data of the object in the basket entry, or null if setContent() or resolveContent() was not called yet. -
setContent
Sets the XML data of the object in the basket entry. -
getComment
Returns the optional comment set for this basket entry. -
setComment
Sets the optional comment for this basket entry. -
equals
-
hashCode
public int hashCode()
-