Class DleseCollectionDocReader

All Implemented Interfaces:
Serializable

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

    • DleseCollectionDocReader

      public DleseCollectionDocReader()
      Constructor for the DleseCollectionDocReader object
    • DleseCollectionDocReader

      public DleseCollectionDocReader(org.apache.lucene.document.Document doc, SimpleLuceneIndex index)
      Constructor that may be used programatically to wrap a reader around a Lucene Document created by a DleseCollectionFileIndexingWriter.
      Parameters:
      doc - A Lucene Document created by a DleseCollectionFileIndexingWriter.
      index - The index being used
  • Method Details

    • getReaderType

      public String getReaderType()
      Gets the String 'DleseCollectionDocReader,' 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 'DleseCollectionDocReader'.
    • getAdditionalMetadata

      public String getAdditionalMetadata()
      Gets the additional metadata for this collection that was indicated in
      invalid reference
      org.dlese.dpc.repository.RepositoryManager.putRecord
      when the collection was created, or null.
      Returns:
      The additional metadata as an String (may be an XML String), or null if none.
    • getIsEnabled

      public boolean getIsEnabled()
      Determines whether this collection is currently enabled for viewing.
      Returns:
      True if enabled, otherwise false.
    • getTitle

      public String getTitle()
      Gets the title of the collection, for example 'DLESE Community Collection (DCC)', as indicated by the the vocab manager. If the vocab manger is not available, returns the same as getShortTitle().
      Overrides:
      getTitle in class XMLDocReader
      Returns:
      The vocab manager title for this collection
    • getFullTitle

      public String getFullTitle()
      Gets the full title of the collection from the XML record.
      Returns:
      The fullTitle value
    • getShortTitle

      public String getShortTitle()
      Gets the short title of the collection directly from the XML record.
      Returns:
      The shortTitle value
    • getDescription

      public String getDescription()
      Gets the description of the collection.
      Overrides:
      getDescription in class XMLDocReader
      Returns:
      The description value
    • getFormatOfRecords

      public String getFormatOfRecords()
      Gets the format of the records in this collection, for example 'adn'.
      Returns:
      The format string, for example, adn.
    • getKey

      public String getKey()
      Gets the collection key used to identify the items in the collection this record refers to. For example, dcc or comet. This is NOT the key to the collection this record belogs to.
      Returns:
      The Key value
    • getAccessionStatus

      public String getAccessionStatus()
      Gets the most recent accession status of the collection.
      Returns:
      The most recent accession status of the collection.
    • getAccessionDateDate

      public Date getAccessionDateDate()
      Gets the accession date of this collection, or null if this collection is currently not accessioned.
      Returns:
      The accession date or null if currently not accessioned
    • getPartOfDRC

      public String getPartOfDRC()
      Gets part of DRC status [true or false].
      Returns:
      The String "true" or "false".
    • isPartOfDRC

      public boolean isPartOfDRC()
      Gets part of DRC status [true or false].
      Returns:
      True if this collection is part of DRC, false otherwise.
    • getCollectionUrl

      public String getCollectionUrl()
      Gets the collection URL or empty String if none is supplied.
      Returns:
      The url value
    • getScopeUrl

      public String getScopeUrl()
      Gets the url to the collection's scope statement.
      Returns:
      The scope URL or empty String.
    • getReviewProcessUrl

      public String getReviewProcessUrl()
      Gets the URL to the collection's review process statement.
      Returns:
      The URL to the collection's review process statement, or empty String if not available.
    • getReviewProcess

      public String getReviewProcess()
      Gets the collection's review process statement.
      Returns:
      The collection's review process statement, or empty String if not available.
    • getCost

      public String getCost()
      Gets the collection's cost.
      Returns:
      The cost of the collection.
    • getCollectionsString

      public String getCollectionsString()
      Gets the collection this record is part of, as a string.
      Returns:
      The collection.
    • getGradeRanges

      public String[] getGradeRanges()
      Gets the GradeRanges associated with this collection, encoded by the vocab manager if it's available.
      Returns:
      The gradeRanges value
    • getSubjects

      public String[] getSubjects()
      Gets the subjects associated with this collection, encoded by the vocab manager if it's available.
      Returns:
      The subjects value
    • getKeywords

      public String[] getKeywords()
      Gets the keywords as an array of Strings. Note that some keywords are actually phrases comprised of multiple words.
      Returns:
      The keywords
    • getKeywordsDisplay

      public String getKeywordsDisplay()
      Gets the keywords a comma separated list terminated with a period suitable for display to users. For example: ocean, sea, rain.
      Returns:
      The keywords displayed suitable for users.
    • getLocationOfFiles

      public String getLocationOfFiles()
      Gets the location of the files for this collection on the server.
      Returns:
      The locationOfFiles value
    • getNumFiles

      public String getNumFiles()
      Gets the number of files for this collection.
      Returns:
      The numFiles value
    • getNumIndexed

      public String getNumIndexed()
      Gets the number of items indexed for this collection.
      Returns:
      The numIndexed value
    • getNumIndexingErrors

      public String getNumIndexingErrors()
      Gets the number of indexing errors that were found for this collection.
      Returns:
      The numIndexingErrors value
    • getContact

      Gets the contact contributor bean with that contains methods for accessing contributor information (Not implemented). Note: This is not yet implemented (returns null)!!!
      Returns:
      The contact Contributor bean.
    • getResponsibleParty

      public DleseCollectionDocReader.Contributor getResponsibleParty()
      Gets the responsibleParty contributor bean with that contains methods for accessing contributor information. Note: This is not yet implemented (returns null)!!!
      Returns:
      The responsibleParty Contributor bean.