Class ItemDocReader
- All Implemented Interfaces:
Serializable
Document that was
indexed from a DLESE item-level metadata record, such as ADN. The index writer that is responsible for
creating this type of Lucene Document is a ItemFileIndexingWriter.- Author:
- John Weatherley
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassData for a related resource.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 ItemDocReader objectItemDocReader(org.apache.lucene.document.Document doc, SimpleLuceneIndex index) Constructor that may be used programatically to wrap a reader around a LuceneDocumentcreated by aItemFileIndexingWriter. -
Method Summary
Modifier and TypeMethodDescriptionGets the accession date as a String.Gets the accession date as a Java Date.Gets the AccessionStatus for this record.String[]Gets the collection keys for all collections that are associated with this resource including collections that are not enabled.String[]Gets all the IDs associated with this resource, including this record's ID.Gets the ItemDocReaders for all records that refer to this resource.String[]Gets the annotataion collection keys, for example {06, 08}, for all collections that annotate this item.Gets the annotation formats that are associated with this item.Gets the anno pathways that are associated with this record.String[]Gets a String array of all annotation star ratings for this item in numerical form from 1 to 5, or null if none.Gets the annotation statuses that are associated with this item.Gets the ResultDocs for all annotations that refer to this resource.String[]Gets the anno types that are associated with this record.Gets the collection keys for all enabled collections that are associated with this resource.String[]Gets the IDs of records that refer to the same resource, not including this record's ID.Gets the ItemDocReaders for all associated items for this item (refer to same resource).Gets a list ofDleseAnnoDocReaders containing each of the in-progress type 'audio' annotations for this resource.Gets a the average of all star ratings for this item as a String, or null if none.floatGets a the average of all star ratings for this item as a float, or -1 if none.String[]Gets the beneficiary attribute of the ItemDocReader objectGets the collections associated with this record as a single String.Gets a list ofDleseAnnoDocReaders containing each of the completed type 'advice' annotations for this resource.String[]Gets the annotataion collection keys, for example {06, 08}, for all collections that annotate this item with one or more status completed annotations.Gets a list ofDleseAnnoDocReaders containing each of the completed annotations, regardless of type, for this resource.Gets a list of all completed annotataions for this item of the given type.Gets a list ofDleseAnnoDocReaders containing each of the completed type 'annotation' annotations for this resource.Gets a list ofDleseAnnoDocReaders containing each of the completed type 'average scores' annotations for this resource.Gets a list ofDleseAnnoDocReaders containing each of the completed type 'bias' annotations for this resource.Gets a list ofDleseAnnoDocReaders containing each of the completed type 'challenging situation' annotations for this resource.Gets a list ofDleseAnnoDocReaders containing each of the completed type 'change' annotations for this resource.Gets a list ofDleseAnnoDocReaders containing each of the completed type 'comment' annotations for this resource.Gets a list ofDleseAnnoDocReaders containing each of the completed type 'editors summary' annotations for this resource.Gets a list ofDleseAnnoDocReaders containing each of the completed type 'educational standard' annotations for this resource.Gets a list ofDleseAnnoDocReaders containing each of the completed type 'example' annotations for this resource.Gets a list ofDleseAnnoDocReaders containing each of the completed type 'explanation' annotations for this resource.Gets a list ofDleseAnnoDocReaders containing each of the completed type 'question' annotations for this resource.Gets a list ofDleseAnnoDocReaders containing each of the completed type 'review' annotations for this resource.Gets a list ofDleseAnnoDocReaders containing each of the completed type 'see also' annotations for this resource.Gets a list ofDleseAnnoDocReaders containing each of the completed type 'teaching tip' annotations for this resource.Gets the content standard UI labels from the vocab manager for this record, for example 'Change, constancy, and measurement', or 'NSES:K-4:Unifying Concepts and Processes Standards:Change, constancy, and measurement' if the vocab manager is not available.String[]Gets the content standards for this record, for example 01, or 'NSES:K-4:Unifying Concepts and Processes Standards:Change, constancy, and measurement' if no vocab manager is available.Gets the created date as a String.Gets the created date as a Java Date ADN XPath metaMetadata/dateInfo@created.Gets the de-duped ResultDocs for all records that refer to this resource from the dup items index, or null if this is not a duped record.Gets the description for this item.Gets the ItemDocReaders for all associated items (refer to same resource) for this item that have an appropriate status for display in discovery.String[]Gets the errors identified by the ID mapper for this records.String[]Gets the errors types (codes) identified by the ID mapper for this records.Gets the grade range UI labels from the vocab manager for this record, for example 'Primary (K-2)', or 'DLESE:Primary elementary' if the vocab manager is not available.String[]Gets the grade ranges for this record, for example 07, or 'DLESE:Primary elementary' if no vocab manager is available.Gets a list ofDleseAnnoDocReaders containing each of the in-progress type 'graphical' annotations for this resource.Gets the hasCompletedAnno attribute of the ItemDocReader objectDetermines whether the item has an annotation in progress.Determines whether this item has one or more related resources of any type.getInProgressAnnosOfFormat(String format) Gets all in-progress annotations for this item that have the given format, which is one of 'text', 'audio', 'graphical', or 'video'.String[]Gets the instructionalGoal attribute of the ItemDocReader objectString[]Gets the keywords as a sorted array.Gets the keywords as a sorted comma separated list terminated with a period suitable for display to users.Gets the missingAssociatedItemIds for associated items that are not in the index.Gets the accession date for this muti-doc, as a date String, which is the date the resource first appeared in the library among all records that catalog it.Gets the accession date for this multi-doc as a Java Date, which is the date the resource first appeared in the library among all records that catalog it.Gets the the concatinated accession statuses of all associated records for this item.Gets the content standard UI labels from the vocab manager for this record and all others that catalog this resource, for example 'Change, constancy, and measurement', or 'NSES:K-4:Unifying Concepts and Processes Standards:Change, constancy, and measurement' if the vocab manager is not available.String[]Gets the content standards for this record and all others that catalog the same resource, for example 01, or 'NSES:K-4:Unifying Concepts and Processes Standards:Change, constancy, and measurement' if no vocab manager is available.Gets the concatinated descriptions of all associated records for this item.Gets a List of RelatedResource Objects for each related resource from each of the records that catalog this resource that have an appropriate status for display in discovery, or null if none.protected org.apache.lucene.document.DocumentGets the multiDoc lucene Document for this item, or the single doc, if none available.Gets the grade range UI labels from the vocab manager for this record and all others that catalog the same resource, for example 'Primary (K-2)', or 'DLESE:Primary elementary' if the vocab manager is not available.String[]Gets the grade ranges for this record and all others that catalog the same resource, for example 07, or 'DLESE:Primary elementary' if no vocab manager is available.Determines whether this item has one or more related resources of any type from any records that catalogs this resource.Gets the the concatinated IDs of all associated records for this item.String[]Gets the keywords for all associated records as a sorted array.Gets the value 'true' or 'false' depending on whether this item does or does not have multiple records associated with it.Gets the multiRelatedResourceByIdDocs attribute of the ItemDocReader objectString[]Gets the IDs of all related resources that were cataloged by ID from all records that catalog this resource, or null if none were present.Gets a List of RelatedResource Objects for each related resource from each of the records that catalog this resource, or null if none.String[]Gets the URLs of all related resources that were cataloged by URL from all records that catalog this resource, or null if none were presentObject[]Gets the resource type UI labels from the vocab manager for this record and all others that catalog the same resource, for example 'Classroom activity', or 'DLESE:Learning materials:Classroom activity' if the vocab manager is not available, sorted alphabetically.String[]Gets the resource types for this record and all others that catalog the same resource, for example 0c, or 'DLESE:Learning materials:Classroom activity' if no vocab manager is available.Object[]Gets the subject UI labels from the vocab manager for this record and all others that catalog the same resource, for example 'Biology', or 'DLESE:Biology' if the vocab manager is not available, sorted alphabetically.String[]Gets the subjects for this item and all additional items associated via the ID mapper.Gets the concatinated title of all associated records for this item.Gets the Whats New date for the multi-record as a String, which is the whats new date for this resource across all records that catalog it.Gets the Whats New date for the multi-record (if it exists) as a Date, which is the whats new date for this resource across all records that catalog it.Gets the Whats New type for the multi-record (if it exists), which is one of 'itemnew,' 'itemannocomplete,' 'itemannoinprogress,' 'annocomplete,' 'annoinprogress,' 'drcannocomplete,' 'drcannoinprogress,' 'collection'.Gets a the total number of star ratings for this item as a String.intGets a the total number of star ratings for this item as a int.Gets the numAudioAnnosInProgress attribute of the ItemDocReader objectGets the numCompletedAnnos attribute of the ItemDocReader objectGets the numGraphicalAnnosInProgress attribute of the ItemDocReader objectGets the numInProgressAnnos attribute of the ItemDocReader objectGets the numTextAnnosInProgress attribute of the ItemDocReader objectGets the number of video format annotations in progress for this item.Gets the part-of-DRC status (true or false).Gets the String 'ItemDocReader,' which is the key that describes this reader type.Gets the relatedResourceByIdDocs attribute of the ItemDocReader objectString[]Gets the IDs of all related resources that were cataloged by ID, or null if none were presentString[]Gets the URLs of all related resources that were cataloged by URL, or null if none were presentObject[]Gets the resource type UI labels from the vocab manager for this record, for example 'Classroom activity', or 'DLESE:Learning materials:Classroom activity' if the vocab manager is not available, sorted alphabetically.String[]Gets the resource types for this record, for example 0c, or 'DLESE:Learning materials:Classroom activity' if no vocab manager is available.Object[]Gets the subject UI labels from the vocab manager for this record, for example 'Biology', or 'DLESE:Biology' if the vocab manager is not available, sorted alphabetically.String[]Gets the subjects for this record, for example 03, or 'DLESE:Biology' if no vocab manager is available.String[]Gets the teachingMethod attribute of the ItemDocReader objectGets a list ofDleseAnnoDocReaders containing each of the in-progress type 'text' annotations for this resource.getTitle()Gets the title of the item.String[]Gets the toolFor attribute of the ItemDocReader objectString[]Gets the typicalAgeRange attribute of the ItemDocReader objectgetUrl()Gets the URL for this resource.Gets the URL for this resource.Gets the URL for this resource, truncated if it is very longGets a list ofDleseAnnoDocReaders containing each of the in-progress type 'video' annotations for this resource.booleanDetermines whether this item has annotations.booleanDetermines whether this item has at least one completed annotation.booleanhasCompletedAnnoOfType(String type) Determines whether this item has a completed annotataion of the given type, for example 'Review', 'Comment', 'Educational standard', etc.booleanDetermines whether the item has an annotation in progress.booleanhasInProgressAnnoOfFormat(String format) Determines whether the item has an annotation in progress of the given format, which is one of 'text', 'audio', 'graphical', or 'video'.booleanDetermines whether this item has one or more related resources of any type from any records that catalogs this resource.booleanDetermines whether this item has one or more related resources of any type.voidinit()Initializes the ItemDocReader at search time.booleanDetermines whether this item does or does not have multiple records associated with it.protected static voidOutput a line of text to standard out, with datestamp, if debug is set to true.protected static voidOutput a line of text to error out, with datestamp.Methods inherited from class org.dlese.dpc.index.reader.XMLDocReader
getAssignedByIdRelatedRecordsMap, getAssignedByUrlRelatedRecordsMap, getAssignedRelatedIdsOfType, getAssignedRelatedUrlsOfType, getAssignedRelationshipByIdTypes, getAssignedRelationshipByUrlTypes, getAssignedRelationshipsForItemsMap, getAvailableFormats, getCanDissiminateFormat, getCollection, getCollectionKey, getCollectionKeys, getCollectionLabel, getCollections, getDocsource, getFieldId, getHasAssignedRelations, getHasRelations, getId, getIdEncoded, getIdsOfRecordsWithAssignedRelationships, getIndexedContent, getIsMyCollectionDisabled, getIsMyCollectionEnabled, getMetadataPrefix, getMetadataVocab, getMetadataVocabAudience, getMetadataVocabLanguage, getMyCollectionDoc, getMyCollectionsRecordId, getNativeFormat, getNsdlDublinCoreXml, getOaiDatestamp, getOaiDublinCoreXml, getOaiLastModifiedString, getOaiSets, getRelatedIdsOfType, getRelatedRecordsMap, getRelationshipTypes, getRequestedXml, getRequestedXmlFormat, getSet, getSets, getSetString, getUiLabelFromVocabId, getUiLabelFromVocabName, getUiLabelsFromVocabIds, getValidationReport, getValueId, getW3CXmlDoc, getWhatsNewDate, getWhatsNewDateDate, getWhatsNewType, getXml, getXmlDoc, getXmlFormat, getXmlLocalized, getXmlStripped, isValid, 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
-
ItemDocReader
public ItemDocReader()Constructor for the ItemDocReader object -
ItemDocReader
Constructor that may be used programatically to wrap a reader around a LuceneDocumentcreated by aItemFileIndexingWriter.- Parameters:
doc- A LuceneDocumentcreated by aItemFileIndexingWriter.index- The SimpleLuceneIndex in use
-
-
Method Details
-
init
public void init()Initializes the ItemDocReader at search time.- Overrides:
initin classXMLDocReader
-
getMultiDoc
protected org.apache.lucene.document.Document getMultiDoc()Description copied from class:XMLDocReaderGets the multiDoc lucene Document for this item, or the single doc, if none available. A multiDoc is a Document that holds data from multiple XML records that catalog/reference the same resource. This method is overridden by the sub classes that support it.- Overrides:
getMultiDocin classXMLDocReader- Returns:
- The multiDoc value
-
getReaderType
Gets the String 'ItemDocReader,' 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 'ItemDocReader'.
-
getTitle
Gets the title of the item.- Overrides:
getTitlein classXMLDocReader- Returns:
- The title value
-
getKeywords
Gets the keywords as a sorted array. Duplicate keywords are ommitted.- Returns:
- The keywords
-
getMultiKeywords
Gets the keywords for all associated records as a sorted array. Duplicate keywords are ommitted.- Returns:
- The keywords
-
getKeywordsDisplay
Gets the keywords as a sorted comma separated list terminated with a period suitable for display to users. For example: ocean, rain, sea.- Returns:
- The keywords displayed suitable for users.
-
getMultiTitle
Gets the concatinated title of all associated records for this item.- Returns:
- The concatinated title text.
-
getDescription
Gets the description for this item.- Overrides:
getDescriptionin classXMLDocReader- Returns:
- The description value
-
getMultiDescription
Gets the concatinated descriptions of all associated records for this item.- Returns:
- The multiDescription value
-
getMultiIds
Gets the the concatinated IDs of all associated records for this item.- Returns:
- The multiIds value
-
getPartOfDRC
Gets the part-of-DRC status (true or false).- Returns:
- The String "true" or "false".
-
getUrl
Gets the URL for this resource.- Overrides:
getUrlin classXMLDocReader- Returns:
- The url value
-
getUrlEncoded
Gets the URL for this resource.- Returns:
- The url value
-
getUrlTruncated
Gets the URL for this resource, truncated if it is very long- Returns:
- The url value
-
getCollectionsString
Gets the collections associated with this record as a single String. Same as Same asXMLDocReader.getSetString().- Returns:
- The collections.
-
getMultiWhatsNewType
Gets the Whats New type for the multi-record (if it exists), which is one of 'itemnew,' 'itemannocomplete,' 'itemannoinprogress,' 'annocomplete,' 'annoinprogress,' 'drcannocomplete,' 'drcannoinprogress,' 'collection'.- Returns:
- The What's New type or empty String.
-
getMultiWhatsNewDate
Gets the Whats New date for the multi-record as a String, which is the whats new date for this resource across all records that catalog it. Note that this is the appropriate method to use when displaying this value to an end user, instead ofXMLDocReader.getWhatsNewDate().- Returns:
- The What's New date or empty String.
-
getMultiWhatsNewDateDate
Gets the Whats New date for the multi-record (if it exists) as a Date, which is the whats new date for this resource across all records that catalog it. Note that this is the appropriate method to use when displaying this value to an end user, instead ofXMLDocReader.getWhatsNewDateDate().- Returns:
- The What's New date or null.
-
getCreationDate
Gets the created date as a String. ADN XPath metaMetadata/dateInfo@created.- Returns:
- The created date or empty String.
-
getCreationDateDate
Gets the created date as a Java Date ADN XPath metaMetadata/dateInfo@created.- Returns:
- The created Date or null.
-
getMultiAccessionDate
Gets the accession date for this muti-doc, as a date String, which is the date the resource first appeared in the library among all records that catalog it. Note that this is the appropriate method to use when displaying this value to an end user, instead ofgetAccessionDate().- Returns:
- The accession date or empty String.
-
getMultiAccessionDateDate
Gets the accession date for this multi-doc as a Java Date, which is the date the resource first appeared in the library among all records that catalog it. Note that this is the appropriate method to use when displaying this value to an end user, instead ofgetAccessionDateDate().- Returns:
- The accession Date or null.
-
getAccessionDate
Gets the accession date as a String. Note that the appropriate method to use when displaying this value to an end user isgetMultiAccessionDate().- Returns:
- The accession date or empty String.
-
getAccessionDateDate
Gets the accession date as a Java Date. Note that the appropriate method to use when displaying this value to an end user isgetMultiAccessionDateDate().- Returns:
- The accession Date or null.
-
getAccessionStatus
Gets the AccessionStatus for this record.- Returns:
- The status value
-
getMultiAccessionStatus
Gets the the concatinated accession statuses of all associated records for this item.- Returns:
- The status value
-
getBeneficiary
Gets the beneficiary attribute of the ItemDocReader object- Returns:
- The beneficiary value
-
getToolFor
Gets the toolFor attribute of the ItemDocReader object- Returns:
- The toolFor value
-
getInstructionalGoal
Gets the instructionalGoal attribute of the ItemDocReader object- Returns:
- The instructionalGoal value
-
getTeachingMethod
Gets the teachingMethod attribute of the ItemDocReader object- Returns:
- The teachingMethod value
-
getTypicalAgeRange
Gets the typicalAgeRange attribute of the ItemDocReader object- Returns:
- The typicalAgeRange value
-
getGradeRanges
Gets the grade ranges for this record, for example 07, or 'DLESE:Primary elementary' if no vocab manager is available.- Returns:
- The grade ranges
-
getMultiGradeRanges
Gets the grade ranges for this record and all others that catalog the same resource, for example 07, or 'DLESE:Primary elementary' if no vocab manager is available.- Returns:
- The grade ranges as cataloged by all records for this resource
-
getGradeRangeLabels
Gets the grade range UI labels from the vocab manager for this record, for example 'Primary (K-2)', or 'DLESE:Primary elementary' if the vocab manager is not available. To specify the vocab interface to use, first call, otherwise the default will be used, which is 'dds.descr.en-us'.invalid reference
#setVocabInterface(String)An example application using JSTL might look like:
<%-- The following line is optional --%> <c:set property="vocabInterface" target="${docReader}" value="dds.descr.en-us"/> <c:forEach items="${docReader.gradeRangeLabels}" var="myVocabLabel"> ${myVocabLabel} </c:forEach>- Returns:
- A Collection of grade range UI labels as cataloged for this record
-
getMultiGradeRangeLabels
Gets the grade range UI labels from the vocab manager for this record and all others that catalog the same resource, for example 'Primary (K-2)', or 'DLESE:Primary elementary' if the vocab manager is not available. To specify the vocab interface to use, first call, otherwise the default will be used, which is 'dds.descr.en-us'.invalid reference
#setVocabInterface(String)An example application using JSTL might look like:
<%-- The following line is optional --%> <c:set property="vocabInterface" target="${docReader}" value="dds.descr.en-us"/> <c:forEach items="${docReader.multiGradeRangeLabels}" var="myVocabLabel"> ${myVocabLabel} </c:forEach>- Returns:
- A Collection of grade range UI labels as cataloged by all records for this resource
-
getSubjects
Gets the subjects for this record, for example 03, or 'DLESE:Biology' if no vocab manager is available.- Returns:
- The subjects
-
getMultiSubjects
Gets the subjects for this item and all additional items associated via the ID mapper. Duplicats are ommitted.- Returns:
- The subjects value
-
getSubjectLabels
Gets the subject UI labels from the vocab manager for this record, for example 'Biology', or 'DLESE:Biology' if the vocab manager is not available, sorted alphabetically. To specify the vocab interface to use, first call, otherwise the default will be used, which is 'dds.descr.en-us'.invalid reference
#setVocabInterface(String)An example application using JSTL might look like:
<%-- The following line is optional --%> <c:set property="vocabInterface" target="${docReader}" value="dds.descr.en-us"/> <c:forEach items="${docReader.subjectLabels}" var="myVocabLabel"> ${myVocabLabel} </c:forEach>- Returns:
- An array of subject UI label strings as cataloged for this record, sorted alphabetically
-
getMultiSubjectLabels
Gets the subject UI labels from the vocab manager for this record and all others that catalog the same resource, for example 'Biology', or 'DLESE:Biology' if the vocab manager is not available, sorted alphabetically. To specify the vocab interface to use, first call, otherwise the default will be used, which is 'dds.descr.en-us'.invalid reference
#setVocabInterface(String)An example application using JSTL might look like:
<%-- The following line is optional --%> <c:set property="vocabInterface" target="${docReader}" value="dds.descr.en-us"/> <c:forEach items="${docReader.multiSubjectLabels}" var="myVocabLabel"> ${myVocabLabel} </c:forEach>- Returns:
- An array of subject UI label Strings as cataloged by all records for this resource, sorted alphabetically
-
getContentStandards
Gets the content standards for this record, for example 01, or 'NSES:K-4:Unifying Concepts and Processes Standards:Change, constancy, and measurement' if no vocab manager is available.- Returns:
- The content standards
-
getMultiContentStandards
Gets the content standards for this record and all others that catalog the same resource, for example 01, or 'NSES:K-4:Unifying Concepts and Processes Standards:Change, constancy, and measurement' if no vocab manager is available.- Returns:
- The content standards
-
getContentStandardLabels
Gets the content standard UI labels from the vocab manager for this record, for example 'Change, constancy, and measurement', or 'NSES:K-4:Unifying Concepts and Processes Standards:Change, constancy, and measurement' if the vocab manager is not available. To specify the vocab interface to use, first call, otherwise the default will be used, which is 'dds.descr.en-us'.invalid reference
#setVocabInterface(String)An example application using JSTL might look like:
<%-- The following line is optional --%> <c:set property="vocabInterface" target="${docReader}" value="dds.descr.en-us"/> <c:forEach items="${docReader.contentStandardLabels}" var="myVocabLabel"> ${myVocabLabel} </c:forEach>- Returns:
- A Collection of content standard UI labels as cataloged for this record
-
getMultiContentStandardLabels
Gets the content standard UI labels from the vocab manager for this record and all others that catalog this resource, for example 'Change, constancy, and measurement', or 'NSES:K-4:Unifying Concepts and Processes Standards:Change, constancy, and measurement' if the vocab manager is not available. To specify the vocab interface to use, first call, otherwise the default will be used, which is 'dds.descr.en-us'.invalid reference
#setVocabInterface(String)An example application using JSTL might look like:
<%-- The following line is optional --%> <c:set property="vocabInterface" target="${docReader}" value="dds.descr.en-us"/> <c:forEach items="${docReader.multiContentStandardLabels}" var="myVocabLabel"> ${myVocabLabel} </c:forEach>- Returns:
- A Collection of content standard UI labels as cataloged by all records for this resource
-
getResourceTypes
Gets the resource types for this record, for example 0c, or 'DLESE:Learning materials:Classroom activity' if no vocab manager is available.- Returns:
- The resource types
-
getMultiResourceTypes
Gets the resource types for this record and all others that catalog the same resource, for example 0c, or 'DLESE:Learning materials:Classroom activity' if no vocab manager is available.- Returns:
- The resource types
-
getResourceTypeLabels
Gets the resource type UI labels from the vocab manager for this record, for example 'Classroom activity', or 'DLESE:Learning materials:Classroom activity' if the vocab manager is not available, sorted alphabetically. To specify the vocab interface to use, first call, otherwise the default will be used, which is 'dds.descr.en-us'.invalid reference
#setVocabInterface(String)An example application using JSTL might look like:
<%-- The following line is optional --%> <c:set property="vocabInterface" target="${docReader}" value="dds.descr.en-us"/> <c:forEach items="${docReader.resourceTypeLabels}" var="myVocabLabel"> ${myVocabLabel} </c:forEach>- Returns:
- An array of resource type UI label Strings as cataloged by this record, sorted alphabetically.
-
getMultiResourceTypeLabels
Gets the resource type UI labels from the vocab manager for this record and all others that catalog the same resource, for example 'Classroom activity', or 'DLESE:Learning materials:Classroom activity' if the vocab manager is not available, sorted alphabetically. To specify the vocab interface to use, first call, otherwise the default will be used, which is 'dds.descr.en-us'.invalid reference
#setVocabInterface(String)An example application using JSTL might look like:
<%-- The following line is optional --%> <c:set property="vocabInterface" target="${docReader}" value="dds.descr.en-us"/> <c:forEach items="${docReader.multiResourceTypeLabels}" var="myVocabLabel"> ${myVocabLabel} </c:forEach>- Returns:
- An array of resource type UI label Strings as cataloged by all records for this resource, sorted alphabetically
-
getMultiRecordStatus
Gets the value 'true' or 'false' depending on whether this item does or does not have multiple records associated with it.- Returns:
- 'true' if there are multiple records, 'false' if only one.
-
isMultiRecord
public boolean isMultiRecord()Determines whether this item does or does not have multiple records associated with it.- Returns:
- True if there are multiple records, false if only one.
-
hasAnnotations
public boolean hasAnnotations()Determines whether this item has annotations.- Overrides:
hasAnnotationsin classXMLDocReader- Returns:
- True if annotations are present, false otherwise.
-
getAnnoTypes
Gets the anno types that are associated with this record.- Overrides:
getAnnoTypesin classXMLDocReader- Returns:
- The anno types value.
-
getAnnoPathways
Gets the anno pathways that are associated with this record.- Overrides:
getAnnoPathwaysin classXMLDocReader- Returns:
- The list of anno pathway Strings
-
getAnnoStatus
Gets the annotation statuses that are associated with this item.- Overrides:
getAnnoStatusin classXMLDocReader- Returns:
- A list of anno status Strings
-
getAnnoFormats
Gets the annotation formats that are associated with this item.- Overrides:
getAnnoFormatsin classXMLDocReader- Returns:
- A list of anno formats Strings
-
getAnnoRatings
Gets a String array of all annotation star ratings for this item in numerical form from 1 to 5, or null if none. Each rating represents a single annotation's star rating for this item.- Overrides:
getAnnoRatingsin classXMLDocReader- Returns:
- An String array of numbers 1, 2, 3, 4, 5, or null
-
getAverageAnnoRating
Gets a the average of all star ratings for this item as a String, or null if none. The rating is shown to three decimal points, for example '4.333' or '3.000'.- Overrides:
getAverageAnnoRatingin classXMLDocReader- Returns:
- The average star rating to three decimal points as a String
-
getAverageAnnoRatingFloat
public float getAverageAnnoRatingFloat()Gets a the average of all star ratings for this item as a float, or -1 if none.- Overrides:
getAverageAnnoRatingFloatin classXMLDocReader- Returns:
- The average star rating or -1 if none
-
getNumAnnoRatings
Gets a the total number of star ratings for this item as a String. The number is displayed to five digits, for example '00002' or '00000'.- Overrides:
getNumAnnoRatingsin classXMLDocReader- Returns:
- The number of star ratings as a String
-
getNumAnnoRatingsInt
public int getNumAnnoRatingsInt()Gets a the total number of star ratings for this item as a int.- Overrides:
getNumAnnoRatingsIntin classXMLDocReader- Returns:
- The number of star ratings for this item
-
getAnnoCollectionKeys
Gets the annotataion collection keys, for example {06, 08}, for all collections that annotate this item.- Overrides:
getAnnoCollectionKeysin classXMLDocReader- Returns:
- The annoCollectionKeys value
-
getCompletedAnnoCollectionKeys
Gets the annotataion collection keys, for example {06, 08}, for all collections that annotate this item with one or more status completed annotations.- Overrides:
getCompletedAnnoCollectionKeysin classXMLDocReader- Returns:
- The completedAnnoCollectionKeys value
-
getAssociatedCollectionKeys
Gets the collection keys for all enabled collections that are associated with this resource. Associated annotations such as CRS and JESSE that are identified as collections are included. Disabled collections are not included.- Returns:
- A list of associatedCollectionKeys Strings
-
getAllAssociatedCollectionKeys
Gets the collection keys for all collections that are associated with this resource including collections that are not enabled.- Returns:
- The associatedCollectionKeys value
-
getAssociatedIds
Gets the IDs of records that refer to the same resource, not including this record's ID.- Overrides:
getAssociatedIdsin classXMLDocReader- Returns:
- The associated IDs value.
-
getAllIds
Gets all the IDs associated with this resource, including this record's ID.- Overrides:
getAllIdsin classXMLDocReader- Returns:
- The allIds value
-
getErrorTypes
Gets the errors types (codes) identified by the ID mapper for this records. Returns integers as strings.- Returns:
- The ID mapper error types (codes).
-
getErrorStrings
Gets the errors identified by the ID mapper for this records.- Returns:
- The ID mapper errors.
-
getAllItemResultDocs
Gets the ItemDocReaders for all records that refer to this resource. The first record is this item. This returns the full ResultDoc for each item, not the de-duped ResultDocs.- Returns:
- All records that refer to this resource.
-
getDeDupedResultDocs
Gets the de-duped ResultDocs for all records that refer to this resource from the dup items index, or null if this is not a duped record. These are sorted if a sort was specified in the ResultDoc attributes via key 'sortAscendingByField' or 'sortDescendingByField'. See alsogetAllItemResultDocs().- Returns:
- All de-duped ResultDocs for this resource.
- See Also:
-
getAssociatedItemResultDocs
Gets the ItemDocReaders for all associated items for this item (refer to same resource).- Returns:
- The associatedItemDocReaders value
-
getDisplayableAssociatedItemResultDocs
Gets the ItemDocReaders for all associated items (refer to same resource) for this item that have an appropriate status for display in discovery.- Returns:
- The displayableAssociatedItemDocReaders value
-
getMissingAssociatedItemIds
Gets the missingAssociatedItemIds for associated items that are not in the index.- Returns:
- A list of missingAssociatedItemIds Strings
-
hasRelatedResource
public boolean hasRelatedResource()Determines whether this item has one or more related resources of any type. If the related resource is an ID, checks to see that the ID is currently available in the repository.- Returns:
- True if this item has one or more related resources of any type, else false.
-
hasMultiRelatedResource
public boolean hasMultiRelatedResource()Determines whether this item has one or more related resources of any type from any records that catalogs this resource. If the related resource is an ID, checks to see that the ID is currently available in the repository.- Returns:
- True if this item has one or more related resources of any type, else false.
-
getHasRelatedResource
Determines whether this item has one or more related resources of any type.- Returns:
- 'true' if this item has one or more related resources of any type, else 'false'.
-
getMultiHasRelatedResource
Determines whether this item has one or more related resources of any type from any records that catalogs this resource.- Returns:
- 'true' if this item has one or more related resources of any type, else 'false'.
-
getRelatedResourceIds
Gets the IDs of all related resources that were cataloged by ID, or null if none were present- Returns:
- The relatedResourceIds
-
getMultiRelatedResourceIds
Gets the IDs of all related resources that were cataloged by ID from all records that catalog this resource, or null if none were present.- Returns:
- The relatedResourceIds
-
getRelatedResourceByIdDocs
Gets the relatedResourceByIdDocs attribute of the ItemDocReader object- Returns:
- The relatedResourceByIdDocs value
-
getMultiRelatedResourceByIdDocs
Gets the multiRelatedResourceByIdDocs attribute of the ItemDocReader object- Returns:
- The multiRelatedResourceByIdDocs value
-
getMultiRelatedResources
Gets a List of RelatedResource Objects for each related resource from each of the records that catalog this resource, or null if none.- Returns:
- A List of RelatedResource Objects, or null
-
getMultiDisplayableRelatedResources
Gets a List of RelatedResource Objects for each related resource from each of the records that catalog this resource that have an appropriate status for display in discovery, or null if none.- Returns:
- A List of RelatedResource Objects, or null
-
getRelatedResourceUrls
Gets the URLs of all related resources that were cataloged by URL, or null if none were present- Returns:
- The relatedResourceUrls
-
getMultiRelatedResourceUrls
Gets the URLs of all related resources that were cataloged by URL from all records that catalog this resource, or null if none were present- Returns:
- The relatedResourceUrls
-
getAnnotationResultDocs
Gets the ResultDocs for all annotations that refer to this resource.- Overrides:
getAnnotationResultDocsin classXMLDocReader- Returns:
- The ResultDocs value
-
hasCompletedAnno
public boolean hasCompletedAnno()Determines whether this item has at least one completed annotation.- Overrides:
hasCompletedAnnoin classXMLDocReader- Returns:
- True if this item has one or more completed annotation, false otherwise.
-
getHasCompletedAnno
Gets the hasCompletedAnno attribute of the ItemDocReader object- Overrides:
getHasCompletedAnnoin classXMLDocReader- Returns:
- The hasCompletedAnno value
-
getNumCompletedAnnos
Gets the numCompletedAnnos attribute of the ItemDocReader object- Overrides:
getNumCompletedAnnosin classXMLDocReader- Returns:
- The numCompletedAnnos value
-
getNumInProgressAnnos
Gets the numInProgressAnnos attribute of the ItemDocReader object- Overrides:
getNumInProgressAnnosin classXMLDocReader- Returns:
- The numInProgressAnnos value
-
getNumTextAnnosInProgress
Gets the numTextAnnosInProgress attribute of the ItemDocReader object- Overrides:
getNumTextAnnosInProgressin classXMLDocReader- Returns:
- The numTextAnnosInProgress value
-
getNumAudioAnnosInProgress
Gets the numAudioAnnosInProgress attribute of the ItemDocReader object- Overrides:
getNumAudioAnnosInProgressin classXMLDocReader- Returns:
- The numAudioAnnosInProgress value
-
getNumGraphicalAnnosInProgress
Gets the numGraphicalAnnosInProgress attribute of the ItemDocReader object- Overrides:
getNumGraphicalAnnosInProgressin classXMLDocReader- Returns:
- The numGraphicalAnnosInProgress value
-
getNumVideoAnnosInProgress
Gets the number of video format annotations in progress for this item.- Overrides:
getNumVideoAnnosInProgressin classXMLDocReader- Returns:
- The number of video format annotations
-
hasCompletedAnnoOfType
Determines whether this item has a completed annotataion of the given type, for example 'Review', 'Comment', 'Educational standard', etc.- Overrides:
hasCompletedAnnoOfTypein classXMLDocReader- Parameters:
type- The annotation type- Returns:
- True if this item has a completed annotataion of the given type.
-
getCompletedAnnosOfType
Gets a list of all completed annotataions for this item of the given type.- Overrides:
getCompletedAnnosOfTypein classXMLDocReader- Parameters:
type- The annotation type, for example 'Review', 'Teaching tip', etc.- Returns:
- A list of
DleseAnnoDocReaders for all completed annotataions for this item of the given type, or an empty list.
-
getHasInProgressAnno
Determines whether the item has an annotation in progress.- Overrides:
getHasInProgressAnnoin classXMLDocReader- Returns:
- 'true' if the item has an annotation in progress, otherwise 'false'.
-
hasInProgressAnno
public boolean hasInProgressAnno()Determines whether the item has an annotation in progress.- Overrides:
hasInProgressAnnoin classXMLDocReader- Returns:
- True if the item has an annotation in progress, otherwise false.
-
hasInProgressAnnoOfFormat
Determines whether the item has an annotation in progress of the given format, which is one of 'text', 'audio', 'graphical', or 'video'.- Overrides:
hasInProgressAnnoOfFormatin classXMLDocReader- Parameters:
format- Annotation format- Returns:
- True if the item has an annotation in progress of the given format, otherwise false.
-
getInProgressAnnosOfFormat
Gets all in-progress annotations for this item that have the given format, which is one of 'text', 'audio', 'graphical', or 'video'.- Overrides:
getInProgressAnnosOfFormatin classXMLDocReader- Parameters:
format- Annotation format- Returns:
- A list of
DleseAnnoDocReaders
-
getTextAnnosInProgress
Gets a list ofDleseAnnoDocReaders containing each of the in-progress type 'text' annotations for this resource.- Overrides:
getTextAnnosInProgressin classXMLDocReader- Returns:
- A list of
DleseAnnoDocReaders or empty list
-
getAudioAnnosInProgress
Gets a list ofDleseAnnoDocReaders containing each of the in-progress type 'audio' annotations for this resource.- Overrides:
getAudioAnnosInProgressin classXMLDocReader- Returns:
- A list of
DleseAnnoDocReaders
-
getGraphicalAnnosInProgress
Gets a list ofDleseAnnoDocReaders containing each of the in-progress type 'graphical' annotations for this resource.- Overrides:
getGraphicalAnnosInProgressin classXMLDocReader- Returns:
- A list of
DleseAnnoDocReaders or empty list
-
getVideoAnnosInProgress
Gets a list ofDleseAnnoDocReaders containing each of the in-progress type 'video' annotations for this resource.- Overrides:
getVideoAnnosInProgressin classXMLDocReader- Returns:
- A list of
DleseAnnoDocReaders or empty list
-
getCompletedAnnos
Gets a list ofDleseAnnoDocReaders containing each of the completed annotations, regardless of type, for this resource.- Overrides:
getCompletedAnnosin classXMLDocReader- Returns:
- A list of
DleseAnnoDocReaders or empty list
-
getCompletedReviews
Gets a list ofDleseAnnoDocReaders containing each of the completed type 'review' annotations for this resource.- Overrides:
getCompletedReviewsin classXMLDocReader- Returns:
- A list of
DleseAnnoDocReaders or empty list
-
getCompletedTeachingTips
Gets a list ofDleseAnnoDocReaders containing each of the completed type 'teaching tip' annotations for this resource.- Overrides:
getCompletedTeachingTipsin classXMLDocReader- Returns:
- A list of
DleseAnnoDocReaders or empty list
-
getCompletedEditorSummaries
Gets a list ofDleseAnnoDocReaders containing each of the completed type 'editors summary' annotations for this resource.- Overrides:
getCompletedEditorSummariesin classXMLDocReader- Returns:
- A list of
DleseAnnoDocReaders or empty list
-
getCompletedChallengingSituations
Gets a list ofDleseAnnoDocReaders containing each of the completed type 'challenging situation' annotations for this resource.- Overrides:
getCompletedChallengingSituationsin classXMLDocReader- Returns:
- A list of
DleseAnnoDocReaders or empty list
-
getCompletedAverageScores
Gets a list ofDleseAnnoDocReaders containing each of the completed type 'average scores' annotations for this resource.- Overrides:
getCompletedAverageScoresin classXMLDocReader- Returns:
- A list of
DleseAnnoDocReaders or empty list
-
getCompletedAdvice
Gets a list ofDleseAnnoDocReaders containing each of the completed type 'advice' annotations for this resource.- Overrides:
getCompletedAdvicein classXMLDocReader- Returns:
- A list of
DleseAnnoDocReaders or empty list
-
getCompletedAnnotation
Gets a list ofDleseAnnoDocReaders containing each of the completed type 'annotation' annotations for this resource.- Overrides:
getCompletedAnnotationin classXMLDocReader- Returns:
- A list of
DleseAnnoDocReaders or empty list
-
getCompletedBias
Gets a list ofDleseAnnoDocReaders containing each of the completed type 'bias' annotations for this resource.- Overrides:
getCompletedBiasin classXMLDocReader- Returns:
- A list of
DleseAnnoDocReaders or empty list
-
getCompletedChange
Gets a list ofDleseAnnoDocReaders containing each of the completed type 'change' annotations for this resource.- Overrides:
getCompletedChangein classXMLDocReader- Returns:
- A list of
DleseAnnoDocReaders or empty list
-
getCompletedComment
Gets a list ofDleseAnnoDocReaders containing each of the completed type 'comment' annotations for this resource.- Overrides:
getCompletedCommentin classXMLDocReader- Returns:
- A list of
DleseAnnoDocReaders or empty list
-
getCompletedEducationalStandard
Gets a list ofDleseAnnoDocReaders containing each of the completed type 'educational standard' annotations for this resource.- Overrides:
getCompletedEducationalStandardin classXMLDocReader- Returns:
- A list of
DleseAnnoDocReaders or empty list
-
getCompletedExample
Gets a list ofDleseAnnoDocReaders containing each of the completed type 'example' annotations for this resource.- Overrides:
getCompletedExamplein classXMLDocReader- Returns:
- A list of
DleseAnnoDocReaders or empty list
-
getCompletedExplanation
Gets a list ofDleseAnnoDocReaders containing each of the completed type 'explanation' annotations for this resource.- Overrides:
getCompletedExplanationin classXMLDocReader- Returns:
- A list of
DleseAnnoDocReaders or empty list
-
getCompletedQuestion
Gets a list ofDleseAnnoDocReaders containing each of the completed type 'question' annotations for this resource.- Overrides:
getCompletedQuestionin classXMLDocReader- Returns:
- A list of
DleseAnnoDocReaders or empty list
-
getCompletedSeeAlso
Gets a list ofDleseAnnoDocReaders containing each of the completed type 'see also' annotations for this resource.- Overrides:
getCompletedSeeAlsoin classXMLDocReader- Returns:
- A list of
DleseAnnoDocReaders or empty list
-
prtlnErr
Output a line of text to error out, with datestamp.- Parameters:
s- The text that will be output to error out.
-
prtln
Output a line of text to standard out, with datestamp, if debug is set to true.- Parameters:
s- The String that will be output.
-