Class DleseAnnoDocReader

All Implemented Interfaces:
Serializable

public class DleseAnnoDocReader extends XMLDocReader
A bean for accessing the data stored in a Lucene Document that was indexed from a DLESE annotation-level metadata record. The index writer that is responsible for creating this type of Lucene Document is a DleseAnnoFileIndexingServiceWriter.
Author:
John Weatherley
See Also:
  • Constructor Details

    • DleseAnnoDocReader

      public DleseAnnoDocReader()
      Constructor for the DleseAnnoDocReader object
    • DleseAnnoDocReader

      public DleseAnnoDocReader(org.apache.lucene.document.Document doc)
      Constructor that may be used programatically to wrap a reader around a Lucene Document that was created by a FileIndexingServiceWriter.
      Parameters:
      doc - A Lucene Document created by a ItemFileIndexingWriter.
  • Method Details

    • getReaderType

      public String getReaderType()
      Gets the String 'DleseAnnoDocReader,' which is the key that describes this reader type. This may be used in (Struts) beans to determine which type of reader is available for a given search result and thus what data is available for display in the UI. The reader type determines which getter methods are available.
      Overrides:
      getReaderType in class XMLDocReader
      Returns:
      The String 'DleseAnnoDocReader'.
    • getAnnotatedItemResultDoc

      public ResultDoc getAnnotatedItemResultDoc()
      Gets the ResultDoc of the item this annotates, or null if not available.
      Returns:
      The athe ResultDoc of the item this annotates.
    • getServiceName

      public String getServiceName()
      Gets the serviceName attribute of the DleseAnnoDocReader object
      Returns:
      The serviceName value
    • getItemId

      public String getItemId()
      Gets the ID of the item this annotates.
      Returns:
      The ID of the annotated item
    • getTitle

      public String getTitle()
      Gets the title of the annotation.
      Overrides:
      getTitle in class XMLDocReader
      Returns:
      The title or empty if none
    • getDescription

      public String getDescription()
      Gets the content of the annotation itself, or empty if none.
      Overrides:
      getDescription in class XMLDocReader
      Returns:
      The content or empty
      See Also:
    • getUrl

      public String getUrl()
      Gets the url containing the content of the annotation, or empty if none.
      Overrides:
      getUrl in class XMLDocReader
      Returns:
      The url or empty
      See Also:
    • getPathway

      public String getPathway()
      Gets the annotation pathway, for example 'CRS (Community Review System)'.
      Returns:
      The pathway value or empty
    • getRating

      public String getRating()
      Gets the star rating as a number from 1 to 5 or empty if none assigned. Available since anno framwork v1.0.
      Returns:
      The start rating or empty String if none
    • getStatus

      public String getStatus()
      Gets the status of the annotation, which is one of 'completed', 'in progress' or 'retired'. Note that status used to also contain the format string but there is now a separate field for format - see getFormat(). The status String here is the same regardless of whether the underlying record is in framework version 1.0 or 0.1.
      Returns:
      The status value
    • getFormat

      public String getFormat()
      Gets the format of the annotation, which is one of 'audio', 'graphical', 'text', or 'video'. The format String here is the same regardless of whether the underlying record is in framework version 1.0 or 0.1. Note that format used to be part of the status in v0.1 - see getStatus().
      Returns:
      The format value
    • getType

      public String getType()
      Gets the type of annotation, for example 'Review', 'Comment', 'Educational standard', etc.
      Returns:
      The type value
    • getDate

      public String getDate()
      Deprecated.
      As of annotation framework v1.0, this field no longer exists.
      Gets the annotation date as a String, available only for annos in verion 0.1.
      Returns:
      The date String, or empty if none available.
    • getDateDate

      public Date getDateDate()
      Deprecated.
      As of annotation framework v1.0, this field no longer exists.
      Gets the annotation date as a Date object, available only for annos in verion 0.1.
      Returns:
      The Date object or null if not available
    • getIsPartOfDrc

      public String getIsPartOfDrc()
      True if the annotation that is part of the DRC, false otherwise.
      Returns:
      The String 'true' or 'false'.
    • isPartOfDrc

      public boolean isPartOfDrc()
      True if the annotation that is part of the DRC, false otherwise.
      Returns:
      The partOfDrc value
    • getIsCompleted

      public boolean getIsCompleted()
      Determines whether the annotation status is 'completed'.
      Returns:
      True if status is 'completed'
    • getIsInProgress

      public boolean getIsInProgress()
      Determines whether the annotation status is 'in progress'.
      Returns:
      True if status is 'in progress'
    • getIsRetired

      public boolean getIsRetired()
      Determines whether the annotation status is 'retired'.
      Returns:
      True if status is 'retired'