DLESE Tools
v1.6.0

org.dlese.dpc.index.reader
Class DleseCollectionDocReader

java.lang.Object
  extended by org.dlese.dpc.index.reader.DocReader
      extended by org.dlese.dpc.index.reader.FileIndexingServiceDocReader
          extended by org.dlese.dpc.index.reader.XMLDocReader
              extended by org.dlese.dpc.index.reader.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:
DleseCollectionFileIndexingWriter, Serialized Form

Nested Class Summary
static interface DleseCollectionDocReader.Contributor
          A bean that holds information about a DLESE contributor.
 class DleseCollectionDocReader.OrganizationContributor
          A bean that holds information about a DLESE contributor that is an organization.
 class DleseCollectionDocReader.PersonContributor
          A bean that holds information about a DLESE contributor that is a person.
 
Nested classes/interfaces inherited from class org.dlese.dpc.index.reader.XMLDocReader
XMLDocReader.VocabUiLabelsCollection
 
Field Summary
 
Fields inherited from class org.dlese.dpc.index.reader.XMLDocReader
metadataVocab, recordDataService, repositoryManager
 
Fields inherited from class org.dlese.dpc.index.reader.DocReader
conf, doc, resultDoc, score
 
Constructor Summary
DleseCollectionDocReader()
          Constructor for the DleseCollectionDocReader object
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.
 
Method Summary
 Date getAccessionDateDate()
          Gets the accession date of this collection, or null if this collection is currently not accessioned.
 String getAccessionStatus()
          Gets the most recent accession status of the collection.
 String getAdditionalMetadata()
          Gets the additional metadata for this collection that was indicated in org.dlese.dpc.repository.RepositoryManager.putRecord when the collection was created, or null.
 String getCollectionsString()
          Gets the collection this record is part of, as a string.
 String getCollectionUrl()
          Gets the collection URL or empty String if none is supplied.
 DleseCollectionDocReader.Contributor getContact()
          Gets the contact contributor bean with that contains methods for accessing contributor information (Not implemented).
 String getCost()
          Gets the collection's cost.
 String getDescription()
          Gets the description of the collection.
 String getFormatOfRecords()
          Gets the format of the records in this collection, for example 'adn'.
 String getFullTitle()
          Gets the full title of the collection from the XML record.
 String[] getGradeRanges()
          Gets the GradeRanges associated with this collection, encoded by the vocab manager if it's available.
 boolean getIsEnabled()
          Determines whether this collection is currently enabled for viewing.
 String getKey()
          Gets the collection key used to identify the items in the collection this record refers to.
 String[] getKeywords()
          Gets the keywords as an array of Strings.
 String getKeywordsDisplay()
          Gets the keywords a comma separated list terminated with a period suitable for display to users.
 String getLocationOfFiles()
          Gets the location of the files for this collection on the server.
 String getNumFiles()
          Gets the number of files for this collection.
 String getNumIndexed()
          Gets the number of items indexed for this collection.
 String getNumIndexingErrors()
          Gets the number of indexing errors that were found for this collection.
 String getPartOfDRC()
          Gets part of DRC status [true or false].
 String getReaderType()
          Gets the String 'DleseCollectionDocReader,' which is the key that describes this reader type.
 DleseCollectionDocReader.Contributor getResponsibleParty()
          Gets the responsibleParty contributor bean with that contains methods for accessing contributor information.
 String getReviewProcess()
          Gets the collection's review process statement.
 String getReviewProcessUrl()
          Gets the URL to the collection's review process statement.
 String getScopeUrl()
          Gets the url to the collection's scope statement.
 String getShortTitle()
          Gets the short title of the collection directly from the XML record.
 String[] getSubjects()
          Gets the subjects associated with this collection, encoded by the vocab manager if it's available.
 String getTitle()
          Gets the title of the collection, for example 'DLESE Community Collection (DCC)', as indicated by the the vocab manager.
 boolean isPartOfDRC()
          Gets part of DRC status [true or false].
 
Methods inherited from class org.dlese.dpc.index.reader.XMLDocReader
getAllIds, getAnnoCollectionKeys, getAnnoFormats, getAnnoPathways, getAnnoRatings, getAnnoStatus, getAnnotationResultDocs, getAnnoTypes, getAssignedByIdRelatedRecordsMap, getAssignedByUrlRelatedRecordsMap, getAssignedRelatedIdsOfType, getAssignedRelatedUrlsOfType, getAssignedRelationshipByIdTypes, getAssignedRelationshipByUrlTypes, getAssignedRelationshipsForItemsMap, getAssociatedIds, getAudioAnnosInProgress, getAvailableFormats, getAverageAnnoRating, getAverageAnnoRatingFloat, getCanDissiminateFormat, getCollection, getCollectionKey, getCollectionKeys, getCollectionLabel, getCollections, getCompletedAdvice, getCompletedAnnoCollectionKeys, getCompletedAnnos, getCompletedAnnosOfType, getCompletedAnnotation, getCompletedAverageScores, getCompletedBias, getCompletedChallengingSituations, getCompletedChange, getCompletedComment, getCompletedEditorSummaries, getCompletedEducationalStandard, getCompletedExample, getCompletedExplanation, getCompletedQuestion, getCompletedReviews, getCompletedSeeAlso, getCompletedTeachingTips, getDocsource, getFieldId, getGraphicalAnnosInProgress, getHasAssignedRelations, getHasCompletedAnno, getHasInProgressAnno, getHasRelations, getId, getIdEncoded, getIdsOfRecordsWithAssignedRelationships, getIndexedContent, getInProgressAnnosOfFormat, getIsMyCollectionDisabled, getIsMyCollectionEnabled, getMetadataPrefix, getMetadataVocab, getMetadataVocabAudience, getMetadataVocabLanguage, getMultiDoc, getMyCollectionDoc, getMyCollectionsRecordId, getNativeFormat, getNsdlDublinCoreXml, getNumAnnoRatings, getNumAnnoRatingsInt, getNumAudioAnnosInProgress, getNumCompletedAnnos, getNumGraphicalAnnosInProgress, getNumInProgressAnnos, getNumTextAnnosInProgress, getNumVideoAnnosInProgress, getOaiDatestamp, getOaiDublinCoreXml, getOaiLastModifiedString, getOaiSets, getRelatedIdsOfType, getRelatedRecordsMap, getRelationshipTypes, getRequestedXml, getRequestedXmlFormat, getSet, getSets, getSetString, getTextAnnosInProgress, getUiLabelFromVocabId, getUiLabelFromVocabName, getUiLabelsFromVocabIds, getUrl, getValidationReport, getValueId, getVideoAnnosInProgress, getW3CXmlDoc, getWhatsNewDate, getWhatsNewDateDate, getWhatsNewType, getXml, getXmlDoc, getXmlFormat, getXmlLocalized, getXmlStripped, hasAnnotations, hasCompletedAnno, hasCompletedAnnoOfType, hasInProgressAnno, hasInProgressAnnoOfFormat, init, isValid, prtln, prtlnErr, setMetadataVocabAudience, setMetadataVocabLanguage, setRequestedXmlFormat
 
Methods inherited from class org.dlese.dpc.index.reader.FileIndexingServiceDocReader
fileExists, getDateFileWasIndexed, getDateFileWasIndexedString, getDateStamp, getDeleted, getDocDir, getDocsourceEncoded, getDoctype, getFile, getFileExists, getFileName, getFullContent, getFullContentEncodedAs, getLastModified, getLastModifiedAsUTC, getLastModifiedString, isDeleted, setDebug
 
Methods inherited from class org.dlese.dpc.index.reader.DocReader
doInit, getAttribute, getDocMap, getDocument, getIndex, getLazyDocMap, getQuery, getRepositoryManager, getScore, setDoc
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 Detail

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 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

public DleseCollectionDocReader.Contributor 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.

DLESE Tools
v1.6.0