|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AbstractChapter
An interface to be implemented by classes that can act as Pavlov chapters. As of Pavlov 1.0, the only implementation is Chapter, which reads a chapter from a given book in an XML file. However, there's no reason that an implementation couldn't be written to generate its questions programmatically, i.e., an arithmetic chapter "Addition" that generates questions algorithmically from the question ID.
Method Summary | |
---|---|
String |
getAuthor()
Returns who wrote or maintains this chapter. |
String |
getCover()
Returns the filename for a descriptive image. |
String |
getDescription()
Returns descriptive text about the nature of the questions. |
int |
getNumberOfQuestions()
Number of questions this chapter contains. |
Question |
getQuestion(String id)
Gets the question with the specified ID or null if it doesn't exist. |
Collection<Question> |
getQuestionsCollection()
Returns all questions as a Collection |
Collection<Question> |
getQuestionsReadOnly()
Returns the chapter's questions as a read-only collection. |
String |
getTitle()
Returns the title of this chapter. |
String |
toString()
Returns the chapter's title |
void |
toXML(Writer writer)
Dumps the chapter in XML format to the given writer. |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
Method Detail |
---|
String getAuthor()
String
valueString getCover()
String
valueString getDescription()
String
valueint getNumberOfQuestions()
int
valueQuestion getQuestion(String id)
id
- a String
value
Question
valueString getTitle()
String
valueCollection<Question> getQuestionsCollection()
Collection
valueCollection<Question> getQuestionsReadOnly()
Collection
valueString toString()
toString
in class Object
String
valuevoid toXML(Writer writer) throws IOException
writer
- a Writer
value
IOException
- if an error occurs
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |