Package io.goobi.viewer.managedbeans
Class ArchiveMetadataBean
java.lang.Object
io.goobi.viewer.managedbeans.ArchiveMetadataBean
- All Implemented Interfaces:
Serializable
Short lived bean to store
metadata lists for archiveEntries.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor using local configuration to load metadata list.ArchiveMetadataBean(Configuration config) Creates a new ArchiveMetadataBean instance for testing. -
Method Summary
Modifier and TypeMethodDescriptiongetMetadata(ArchiveEntry entry) Get theArchiveEntryMetadataListfor the givenArchiveEntry.booleanisMetadataLoaded(String entryId) Checks if metadata for theArchiveEntrywith the given id has already been cached in the bean.voidsetUnitDate(ArchiveEntry entry)
-
Constructor Details
-
ArchiveMetadataBean
public ArchiveMetadataBean()Default constructor using local configuration to load metadata list. -
ArchiveMetadataBean
Creates a new ArchiveMetadataBean instance for testing.Receives custom config object of which only the method
Configuration.getArchiveMetadata()is used.- Parameters:
config- configuration object used to load archive metadata definitions
-
-
Method Details
-
isMetadataLoaded
Checks if metadata for theArchiveEntrywith the given id has already been cached in the bean.- Parameters:
entryId- id of the archive entry- Returns:
- true if metadata for the entry is stored in the bean
-
getMetadata
Get theArchiveEntryMetadataListfor the givenArchiveEntry. If the metadata is not already stored in the bean, it is created using the entry's solr document and the metadata list of the bean, and stored within the bean- Parameters:
entry- The entry which metadata to return- Returns:
- the metadata list for the given entry
- Throws:
PresentationException- If the metadata list had to be created and an error occurred while doing so
-
setUnitDate
-