Package org.dlese.dpc.index.reader
Class DleseAnnoDocReader
java.lang.Object
org.dlese.dpc.index.reader.DocReader
org.dlese.dpc.index.reader.FileIndexingServiceDocReader
org.dlese.dpc.index.reader.XMLDocReader
org.dlese.dpc.index.reader.DleseAnnoDocReader
- All Implemented Interfaces:
Serializable
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:
-
Nested Class Summary
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 -
Constructor Summary
ConstructorsConstructorDescriptionConstructor for the DleseAnnoDocReader objectDleseAnnoDocReader(org.apache.lucene.document.Document doc) Constructor that may be used programatically to wrap a reader around a LuceneDocumentthat was created by aFileIndexingServiceWriter. -
Method Summary
Modifier and TypeMethodDescriptionGets the ResultDoc of the item this annotates, or null if not available.getDate()Deprecated.As of annotation framework v1.0, this field no longer exists.Deprecated.As of annotation framework v1.0, this field no longer exists.Gets the content of the annotation itself, or empty if none.Gets the format of the annotation, which is one of 'audio', 'graphical', 'text', or 'video'.booleanDetermines whether the annotation status is 'completed'.booleanDetermines whether the annotation status is 'in progress'.True if the annotation that is part of the DRC, false otherwise.booleanDetermines whether the annotation status is 'retired'.Gets the ID of the item this annotates.Gets the annotation pathway, for example 'CRS (Community Review System)'.Gets the star rating as a number from 1 to 5 or empty if none assigned.Gets the String 'DleseAnnoDocReader,' which is the key that describes this reader type.Gets the serviceName attribute of the DleseAnnoDocReader objectGets the status of the annotation, which is one of 'completed', 'in progress' or 'retired'.getTitle()Gets the title of the annotation.getType()Gets the type of annotation, for example 'Review', 'Comment', 'Educational standard', etc.getUrl()Gets the url containing the content of the annotation, or empty if none.booleanTrue if the annotation that is part of the DRC, false otherwise.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, getValidationReport, getValueId, getVideoAnnosInProgress, getW3CXmlDoc, getWhatsNewDate, getWhatsNewDateDate, getWhatsNewType, getXml, getXmlDoc, getXmlFormat, getXmlLocalized, getXmlStripped, hasAnnotations, hasCompletedAnno, hasCompletedAnnoOfType, hasInProgressAnno, hasInProgressAnnoOfFormat, init, isValid, prtln, prtlnErr, setMetadataVocabAudience, setMetadataVocabLanguage, setRequestedXmlFormatMethods 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, setDebugMethods inherited from class org.dlese.dpc.index.reader.DocReader
doInit, getAttribute, getDocMap, getDocument, getIndex, getLazyDocMap, getQuery, getRepositoryManager, getScore, setDoc
-
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 LuceneDocumentthat was created by aFileIndexingServiceWriter.- Parameters:
doc- A LuceneDocumentcreated by aItemFileIndexingWriter.
-
-
Method Details
-
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:
getReaderTypein classXMLDocReader- Returns:
- The String 'DleseAnnoDocReader'.
-
getAnnotatedItemResultDoc
Gets the ResultDoc of the item this annotates, or null if not available.- Returns:
- The athe ResultDoc of the item this annotates.
-
getServiceName
Gets the serviceName attribute of the DleseAnnoDocReader object- Returns:
- The serviceName value
-
getItemId
Gets the ID of the item this annotates.- Returns:
- The ID of the annotated item
-
getTitle
Gets the title of the annotation.- Overrides:
getTitlein classXMLDocReader- Returns:
- The title or empty if none
-
getDescription
Gets the content of the annotation itself, or empty if none.- Overrides:
getDescriptionin classXMLDocReader- Returns:
- The content or empty
- See Also:
-
getUrl
Gets the url containing the content of the annotation, or empty if none.- Overrides:
getUrlin classXMLDocReader- Returns:
- The url or empty
- See Also:
-
getPathway
Gets the annotation pathway, for example 'CRS (Community Review System)'.- Returns:
- The pathway value or empty
-
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
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 - seegetFormat(). 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
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 - seegetStatus().- Returns:
- The format value
-
getType
Gets the type of annotation, for example 'Review', 'Comment', 'Educational standard', etc.- Returns:
- The type value
-
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
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
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'
-