Class CreateRecordBean

java.lang.Object
io.goobi.viewer.managedbeans.CreateRecordBean
All Implemented Interfaces:
Serializable

@Named @ViewScoped public class CreateRecordBean extends Object implements Serializable
Bean for uploading Dublin Core records.
Author:
florian
See Also:
  • Constructor Details

    • CreateRecordBean

      public CreateRecordBean()
      Constructor. Generates a random uuid for the record
  • Method Details

    • getTempImagesFolder

      public Path getTempImagesFolder()
      Returns:
      the tempImagesFolder
    • getUuid

      public String getUuid()
      Returns:
      the generated UUID for the current record
    • getTitle

      public String getTitle()
      Returns:
      the title
    • setTitle

      public void setTitle(String title)
      Parameters:
      title - the title to set
    • getDescription

      public String getDescription()
      Returns:
      the description
    • setDescription

      public void setDescription(String description)
      Parameters:
      description - the description to set
    • getLanguage

      public String getLanguage()
      Returns:
      the language
    • setLanguage

      public void setLanguage(String language)
      Parameters:
      language - the language to set
    • getDate

      public String getDate()
      Returns:
      the date
    • setDate

      public void setDate(String date)
      Parameters:
      date - the date to set
    • getCreator

      public String getCreator()
      Returns:
      the creator
    • setCreator

      public void setCreator(String creator)
      Parameters:
      creator - the creator to set
    • getCollection

      public String getCollection()
      Returns:
      the collection
    • setCollection

      public void setCollection(String collection)
      Parameters:
      collection - the collection to set
    • getAccessCondition

      public String getAccessCondition()
      Returns:
      the accessCondition
    • setAccessCondition

      public void setAccessCondition(String accessCondition)
      Parameters:
      accessCondition - the accessCondition to set
    • getLicense

      public String getLicense()
    • setLicense

      public void setLicense(String license)
      Parameters:
      license - the license to set
    • saveRecord

      public String saveRecord()
      Add any uploaded images to the record, move the images folder frm temp_media to hotfolder and write the record as Dublin Core xml to the viewer hotfolder
      Returns:
      the url of the create record page to allow creating a new record
    • getPossibleLanguages

      public List<Language> getPossibleLanguages()
      Returns:
      A list of possible languages to use for the record
    • getPossibleLicenses

      public List<LicenseDescription> getPossibleLicenses()
      Returns:
      A list of possible licenses to use for the record
    • generateDCRecord

      protected DCRecordWriter generateDCRecord()
      Create a DCRecordWriter instance containing all metadata of the bean as dc metadata
      Returns:
      theDCRecordWriter
    • reset

      public String reset()
      Mark the record as not ready for indexing and delete all associated images
      Returns:
      the url of the create record page
    • destroy

      @PreDestroy public void destroy()
      Delete the tempImagesFolder with all contained files if it still exists. Called when the user session ends