public class ADNItemDocReader
extends java.lang.Object
$Id: ADNItemDocReader.java,v 1.9 2010/07/14 00:19:27 jweather Exp $
Modifier and Type | Field and Description |
---|---|
protected ResultDocList |
allItemResultDocs
Description of the Field
|
protected boolean |
allItemsInitialized
Description of the Field
|
protected boolean |
annotationDocReadersInitialized
Description of the Field
|
protected ResultDocList |
annotationResultDocs
Description of the Field
|
protected ResultDocList |
associatedItemResultDocs
Description of the Field
|
protected boolean |
associatedItemsInitialized
Description of the Field
|
protected java.lang.String |
collection
Description of the Field
|
protected java.util.ArrayList |
completedAnnos
Description of the Field
|
protected java.util.HashMap |
completedAnnosByType
Description of the Field
|
protected static boolean |
debug
Description of the Field
|
protected java.lang.String |
DEFAULT
Description of the Field
|
protected ResultDocList |
displayableAssociatedItemResultDocs
Description of the Field
|
protected boolean |
displayableAssociatedItemsInitialized
Description of the Field
|
protected org.dom4j.Document |
doc
Description of the Field
|
protected java.lang.String[] |
EMPTY_ARRAY
Description of the Field
|
protected java.util.ArrayList |
EMPTY_LIST
Description of the Field
|
protected java.lang.String |
id
Description of the Field
|
protected java.util.HashMap |
inProgressAnnosByStatus
Description of the Field
|
protected java.util.ArrayList |
missingAssociatedItemIds
Description of the Field
|
protected org.dom4j.Document |
multiDoc
Description of the Field
|
protected java.lang.String |
multiRecordStatus
Description of the Field
|
protected int |
numAudioInProgress
Description of the Field
|
protected int |
numCompletedAnnos
Description of the Field
|
protected int |
numGraphicalInProgress
Description of the Field
|
protected int |
numInProgressAnnos
Description of the Field
|
protected int |
numTextInProgress
Description of the Field
|
protected java.lang.String |
readerType
Description of the Field
|
protected MetadataVocab |
vocab
Description of the Field
|
Constructor and Description |
---|
ADNItemDocReader(java.lang.String id,
GetRecordResponse response)
Constructor for the ADNItemDocReader object
|
ADNItemDocReader(java.lang.String id,
GetRecordResponse response,
MetadataVocab vocab)
parse a GetRecordResponse (a response from a GetRecord request), to create
an ADNItemDocReader.
|
ADNItemDocReader(java.lang.String id,
java.lang.String collection,
org.dom4j.Document itemRecordDoc,
MetadataVocab vocab)
ADNItemDocReader constructor requiring an itemRecordDoc
|
Modifier and Type | Method and Description |
---|---|
ResultDocList |
getAnnotationResultDocs()
Gets the ResultDocs for all annotations that refer to this resource.
|
java.util.ArrayList |
getAssociatedCollectionKeys()
Gets the collection keys for all enabled collections that are associated
with this resource.
|
java.lang.String[] |
getAssociatedIds()
Gets the IDs of records that refer to the same resource.
|
java.util.ArrayList |
getAudioAnnosInProgress()
Gets the audioAnnosInProgress attribute of the ItemDocReader object
|
java.lang.String |
getCollection()
Gets the collection attribute of the ADNItemDocReader object
|
java.lang.String |
getCollectionKey()
Gets the collection key associated with this record, for example 01.
|
java.lang.String[] |
getCollectionKeys()
Gets the collection keys associated with this record, for example {01,02}.
|
java.util.ArrayList |
getCompletedAdvice()
Gets the completedAdvice attribute of the ItemDocReader object
|
java.util.ArrayList |
getCompletedAnnos()
Gets the completedAnnos attribute of the ItemDocReader object
|
java.util.ArrayList |
getCompletedAnnosOfType(java.lang.String type)
Gets a list of all completed annotataions for this item of the given type.
|
java.util.ArrayList |
getCompletedAnnotation()
Gets the completedAnnotation attribute of the ItemDocReader object
|
java.util.ArrayList |
getCompletedAverageScores()
Gets the completedAverageScores attribute of the ItemDocReader object
|
java.util.ArrayList |
getCompletedBias()
Gets the completedBias attribute of the ItemDocReader object
|
java.util.ArrayList |
getCompletedChallengingSituations()
Gets the completedChallengingSituations attribute of the ItemDocReader
object
|
java.util.ArrayList |
getCompletedChange()
Gets the completedChange attribute of the ItemDocReader object
|
java.util.ArrayList |
getCompletedComment()
Gets the completedComment attribute of the ItemDocReader object
|
java.util.ArrayList |
getCompletedEditorSummaries()
Gets the completedEditorSummaries attribute of the ItemDocReader object
|
java.util.ArrayList |
getCompletedEducationalStandard()
Gets the completedEducationalStandard attribute of the ItemDocReader object
|
java.util.ArrayList |
getCompletedExample()
Gets the completedExample attribute of the ItemDocReader object
|
java.util.ArrayList |
getCompletedExplanation()
Gets the completedExplanation attribute of the ItemDocReader object
|
java.util.ArrayList |
getCompletedQuestion()
Gets the completedQuestion attribute of the ItemDocReader object
|
java.util.ArrayList |
getCompletedReviews()
Gets the completedReviews attribute of the ItemDocReader object
|
java.util.ArrayList |
getCompletedSeeAlso()
Gets the completedSeeAlso attribute of the ItemDocReader object
|
java.util.ArrayList |
getCompletedTeachingTips()
Gets the completedTeachingTips attribute of the ItemDocReader object
|
java.lang.String[] |
getContentStandards()
Gets the contentStandards attribute of the ADNItemDocReader object
|
java.lang.String |
getDescription()
Gets the description attribute of the ADNItemDocReader object
|
protected org.dom4j.Element |
getElement(java.lang.String xpath)
Gets a single Element satisfying given XPath.
|
protected java.util.List |
getElements(java.lang.String xpath)
get all Elements satisfying the given xpath
|
protected java.lang.String |
getElementText(java.lang.String xpath)
return the Text of a Element satisfying the given XPath.
|
protected java.lang.String[] |
getFieldContent(java.lang.String[] values,
java.lang.String useVocabMapping)
Gets the vocab encoded keys for the given values as a String Array.
|
protected java.lang.String |
getFieldContent(java.lang.String value,
java.lang.String useVocabMapping)
Gets the encoded vocab key for the given content.
|
java.lang.String[] |
getGradeRanges()
Gets the gradeRanges for this item (as vocab keys)
|
java.util.ArrayList |
getGraphicalAnnosInProgress()
Gets the graphicalAnnosInProgress attribute of the ItemDocReader object
|
java.lang.String |
getHasCompletedAnno()
Gets the hasCompletedAnno attribute of the ItemDocReader object
|
java.lang.String |
getHasInProgressAnno()
Determines whether the item has an annotation in progress.
|
protected boolean |
getHasRelatedResource()
Returns true if the item has one or more related resource, false otherwise.
|
java.lang.String |
getId()
gets the ID of the item
|
java.util.ArrayList |
getInProgressAnnosOfStatus(java.lang.String status)
Gets all in-progress annotations for this item that have the given status.
|
java.lang.String |
getMetadataPrefix()
Gets the metadataPrefix attribute of the ADNItemDocReader object
|
java.util.List |
getMirrorUrls() |
protected java.lang.String[] |
getMultiElementTexts(java.lang.String xpath)
get the values of all elements matching an XPath
|
java.lang.String[] |
getMultiGradeRanges()
Gets the multiGradeRanges attribute of the ADNItemDocReader object
|
java.lang.String[] |
getMultiResourceTypes()
Gets the multiResourceTypes attribute of the ADNItemDocReader object
|
java.lang.String[] |
getMultiSubjects()
Gets the multiSubjects attribute of the ADNItemDocReader object
|
java.lang.String |
getNumAudioAnnosInProgress()
Gets the numAudioAnnosInProgress attribute of the ItemDocReader object
|
java.lang.String |
getNumCompletedAnnos()
Gets the numCompletedAnnos attribute of the ItemDocReader object
|
java.lang.String |
getNumGraphicalAnnosInProgress()
Gets the numGraphicalAnnosInProgress attribute of the ItemDocReader object
|
java.lang.String |
getNumInProgressAnnos()
Gets the numInProgressAnnos attribute of the ItemDocReader object
|
java.lang.String |
getNumTextAnnosInProgress()
Gets the numTextAnnosInProgress attribute of the ItemDocReader object
|
java.lang.String |
getReaderType()
Gets the String 'ItemDocReader,' which is the key that describes this
reader type.
|
java.lang.String[] |
getResourceTypes()
Gets the resourceTypes attribute of the ADNItemDocReader object
|
java.lang.String[] |
getSubjects()
Gets the subjects attribute of the ADNItemDocReader object
|
java.util.ArrayList |
getTextAnnosInProgress()
Gets the textAnnosInProgress attribute of the ItemDocReader object
|
java.lang.String |
getTitle()
Gets the title attribute of the ADNItemDocReader object
|
java.lang.String |
getUrl()
Gets the url attribute of the
|
java.lang.String |
getUrlTruncated()
Gets the URL for this resource, truncated if it is very long
|
java.lang.String |
getValueOf(java.lang.String xpath)
Gets the valueOf attribute of the ADNItemDocReader object
|
boolean |
hasCompletedAnno()
Determines whether this item has at least one completed annotation.
|
boolean |
hasCompletedAnnoOfType(java.lang.String type)
Determines whether this item has a completed annotataion of the given type.
|
boolean |
hasDoc()
Description of the Method
|
boolean |
hasInProgressAnno()
Determines whether the item has an annotation in progress.
|
boolean |
hasInProgressAnnoOfStatus(java.lang.String status)
Determines whether the item has an annotation in progress with the given
status.
|
protected void |
initAnnosByType()
Description of the Method
|
static void |
prtln(java.lang.String s)
Description of the Method
|
static void |
prtlnArray(java.lang.String[] s)
Description of the Method
|
void |
setReaderType(java.lang.String s)
Sets the readerType attribute of the ADNItemDocReader object
|
protected MetadataVocab vocab
protected static boolean debug
protected java.lang.String id
protected java.lang.String collection
protected java.lang.String readerType
protected org.dom4j.Document doc
protected java.lang.String[] EMPTY_ARRAY
protected java.lang.String DEFAULT
protected java.util.ArrayList EMPTY_LIST
protected ResultDocList associatedItemResultDocs
protected ResultDocList displayableAssociatedItemResultDocs
protected ResultDocList allItemResultDocs
protected ResultDocList annotationResultDocs
protected boolean associatedItemsInitialized
protected boolean displayableAssociatedItemsInitialized
protected boolean allItemsInitialized
protected boolean annotationDocReadersInitialized
protected java.util.ArrayList missingAssociatedItemIds
protected java.lang.String multiRecordStatus
protected org.dom4j.Document multiDoc
protected java.util.HashMap completedAnnosByType
protected java.util.ArrayList completedAnnos
protected java.util.HashMap inProgressAnnosByStatus
protected int numCompletedAnnos
protected int numInProgressAnnos
protected int numAudioInProgress
protected int numGraphicalInProgress
protected int numTextInProgress
public ADNItemDocReader(java.lang.String id, java.lang.String collection, org.dom4j.Document itemRecordDoc, MetadataVocab vocab)
id
- Description of the Parametercollection
- Description of the ParameteritemRecordDoc
- Description of the Parametervocab
- Description of the Parameterpublic ADNItemDocReader(java.lang.String id, GetRecordResponse response)
id
- Description of the Parameterresponse
- Description of the Parameterpublic ADNItemDocReader(java.lang.String id, GetRecordResponse response, MetadataVocab vocab)
id
- Description of the Parameterresponse
- Description of the Parametervocab
- Description of the Parameterpublic boolean hasDoc()
public java.lang.String getReaderType()
public void setReaderType(java.lang.String s)
s
- The new readerType valuepublic java.lang.String getMetadataPrefix()
public java.lang.String getId()
public java.lang.String getUrl()
public java.lang.String getUrlTruncated()
public java.lang.String getTitle()
public java.lang.String getDescription()
public java.lang.String getCollection()
public java.lang.String getCollectionKey()
public java.lang.String[] getCollectionKeys()
public java.util.List getMirrorUrls()
public java.util.ArrayList getAssociatedCollectionKeys()
public java.lang.String[] getGradeRanges()
public java.lang.String[] getMultiGradeRanges()
public java.lang.String[] getResourceTypes()
public java.lang.String[] getMultiResourceTypes()
public java.lang.String[] getSubjects()
public java.lang.String[] getMultiSubjects()
public java.lang.String[] getContentStandards()
protected boolean getHasRelatedResource()
protected java.lang.String[] getFieldContent(java.lang.String[] values, java.lang.String useVocabMapping)
values
- The valuse to encode.useVocabMapping
- The mapping to use, for example "contentStandards".protected java.lang.String getFieldContent(java.lang.String value, java.lang.String useVocabMapping)
value
- The value to encode.useVocabMapping
- The vocab mapping to use, for example
"contentStandard".protected java.util.List getElements(java.lang.String xpath)
xpath
- an XPathprotected org.dom4j.Element getElement(java.lang.String xpath)
xpath
- an XPathprotected java.lang.String getElementText(java.lang.String xpath)
xpath
- an XPath\protected java.lang.String[] getMultiElementTexts(java.lang.String xpath)
xpath
- Description of the Parameterpublic java.lang.String getValueOf(java.lang.String xpath)
xpath
- Description of the Parameterpublic static void prtlnArray(java.lang.String[] s)
s
- Description of the Parameterpublic static void prtln(java.lang.String s)
s
- Description of the Parameterpublic ResultDocList getAnnotationResultDocs()
public java.lang.String[] getAssociatedIds()
public boolean hasCompletedAnno()
public java.lang.String getHasCompletedAnno()
public java.lang.String getNumCompletedAnnos()
public java.lang.String getNumInProgressAnnos()
public java.lang.String getNumTextAnnosInProgress()
public java.lang.String getNumAudioAnnosInProgress()
public java.lang.String getNumGraphicalAnnosInProgress()
public boolean hasCompletedAnnoOfType(java.lang.String type)
type
- The annotation typepublic java.util.ArrayList getCompletedAnnosOfType(java.lang.String type)
type
- The annotation type.public java.lang.String getHasInProgressAnno()
public boolean hasInProgressAnno()
public boolean hasInProgressAnnoOfStatus(java.lang.String status)
status
- Annotation status.public java.util.ArrayList getInProgressAnnosOfStatus(java.lang.String status)
status
- Annotation status.protected void initAnnosByType()
public java.util.ArrayList getTextAnnosInProgress()
public java.util.ArrayList getAudioAnnosInProgress()
public java.util.ArrayList getGraphicalAnnosInProgress()
public java.util.ArrayList getCompletedAnnos()
public java.util.ArrayList getCompletedReviews()
public java.util.ArrayList getCompletedTeachingTips()
public java.util.ArrayList getCompletedEditorSummaries()
public java.util.ArrayList getCompletedChallengingSituations()
public java.util.ArrayList getCompletedAverageScores()
public java.util.ArrayList getCompletedAdvice()
public java.util.ArrayList getCompletedAnnotation()
public java.util.ArrayList getCompletedBias()
public java.util.ArrayList getCompletedChange()
public java.util.ArrayList getCompletedComment()
public java.util.ArrayList getCompletedEducationalStandard()
public java.util.ArrayList getCompletedExample()
public java.util.ArrayList getCompletedExplanation()
public java.util.ArrayList getCompletedQuestion()
public java.util.ArrayList getCompletedSeeAlso()