P
- A concrete parent IsManifest object. Each IsManifest object optionally
contains a list of child IsManifest objects. The container manifest is considered the parent.C
- A concrete child IsManifest object. This is the type of object expected as
children in a parent (P) manifest.public interface IsManifest<P extends IsManifest<P,C>,C extends IsManifest<P,C>> extends HasTutoring, HasFeedbackKey
An implementing class acts as a container for a collection of ASSISTments content. Each manifest, referencing content and optionally contains children manifests, defines a structure for the content. A root manifest represents the starting point for the collection of content.
That content can be a combination of assessment and assistance material. Most typically, the assessment content comes in the form of answerable problems while assistance content comes in the form of tutoring.
Please note that an implementing class must not directly contain content, but rather contains some combination of the following:
Content
subclass which contains the assessment content
Typically:
The following diagram provides an overview example of a manifest and its referenced content:
Modifier and Type | Method and Description |
---|---|
void |
addChildManifest(C child)
Adds a child to this IsManifest.
|
java.lang.String |
addProperty(java.lang.String key,
boolean value) |
java.lang.String |
addProperty(java.lang.String key,
int value) |
java.lang.String |
addProperty(java.lang.String key,
long value) |
java.lang.String |
addProperty(java.lang.String key,
java.lang.String value)
Adds a property to this IsManifest
|
java.util.List<java.lang.String> |
flatten()
Returns a list of Persistence Keys for all of objects referenced by this manifest.
|
int |
getChildCount()
Returns the number of children manifests
|
java.util.List<C> |
getChildManifests()
Returns the children of this manifest.
|
java.util.List<java.lang.String> |
getChildrenContentKeys()
Returns a list of Persistence Keys for this manifest's direct children.
|
ContentTypeAttributes |
getContentAttributes()
Returns the attribute values corresponding to this manifest's assessment content.
|
java.lang.String |
getContentKey()
Returns the Persistence Key for the assessment content referenced by this manifest.
|
java.lang.String |
getContentType()
Returns the fully specified class name of the referenced assessment content.
|
java.lang.String |
getNavigatorClass()
Returns this Manifest's navigator class name, if any.
|
java.util.Map<java.lang.String,java.lang.String> |
getProperties()
Returns the properties assigned to this manifest.
|
java.lang.String |
getTerminatorClass()
Returns this Manifest's terminator class name, if any.
|
ContentTypeAttributes |
getTutoringAttributes()
Returns the attribute values corresponding to this manifest's assistance content.
|
java.lang.String |
getTutoringType()
Returns the fully specified class name of the referenced assistance content.
|
boolean |
hasDescendant(C manifest)
Determines whether the specified manifest is a child of this manifest.
|
boolean |
isContentType(java.lang.String classType)
Returns whether the referenced assessment content is of the specified type.
|
boolean |
isNavigatorType(java.lang.String shortNameType)
Returns whether this Manifest has a specific
Navigator type by name. |
boolean |
isProblem()
Returns whether this manifest represents some type of problem.
|
boolean |
isProblemSet()
Returns whether this manifest represents a problem set.
|
boolean |
isSet()
Returns whether this manifest represents any type of set -
either a problem set or a tutoring set.
|
boolean |
isTerminatorType(java.lang.String shortNameType)
Returns whether this Manifest has a specific
Terminator type by name. |
boolean |
isTutoringItem()
Returns whether this manifest represents some type of assistance content.
|
boolean |
isTutoringSet()
Returns whether this manifest represents an assistance set.
|
boolean |
isTutoringType(java.lang.String classType)
Returns whether the referenced assistance content is of the specified type.
|
void |
setChildManifests(java.util.List<C> childManifests)
Specifies a list of children manifests for this manifest.
|
void |
setContentKey(Persistable content)
Sets the Persistence Key for the assessment content associated with this manifest.
|
void |
setContentKey(java.lang.String contentKey)
Sets the Persistence Key for the assessment content associated with this manifest.
|
void |
setProperties(java.util.Map<java.lang.String,java.lang.String> properties)
Sets caller-defined properties to associate with this manifest.
|
java.lang.String |
toString()
Returns a string representation of this IsManifest.
|
getTutoringKey, setTutoringKey, setTutoringKey
feedBackKeyExists, getFeedbackKey, setFeedbackKey
java.util.List<C> getChildManifests()
int getChildCount()
void setChildManifests(java.util.List<C> childManifests)
The implementing class may choose to manipulate childManifests in such a way that requires the creation of additional persistable data. For example: An IsManifest class might choose to group the children based on the type of skill represented by each referenced assessment content. In that scenario, the setChildManifests() implementation might further choose to create a new manifest for each skill and insert into that new manifest the subset of childManifests containing that skill. In this case, setChildManifests() needs to alert the caller to the presence of generated objects through the return value.
childManifests
- A list of child manifestsvoid addChildManifest(C child)
child
- Child manifest to add.setChildManifests(List)
boolean hasDescendant(C manifest)
manifest
- Manifest to check as a child.java.lang.String getContentKey()
void setContentKey(java.lang.String contentKey)
contentKey
- A Persistence KeysetContentKey(Persistable)
,
getContentKey()
,
getContentType()
,
Persistable
void setContentKey(Persistable content)
This is a convenience method providing an alternative to the following:
this.setContentKey(content.getContentKey()):
content
- A Persistable objectsetContentKey(String)
,
getContentKey()
,
getContentType()
,
Persistable
java.lang.String getContentType()
getContentKey()
,
isContentType(String)
boolean isContentType(java.lang.String classType)
classType
- The fully specified name of a Content
subclass.getContentType()
is identical to
classType; otherwise false.getContentType()
java.lang.String getTutoringType()
HasTutoring.getTutoringKey()
,
isTutoringType(String)
boolean isTutoringType(java.lang.String classType)
classType
- The fully specified name of a Persistable
subclass.HasTutoring.getTutoringKey()
is identical to
classType; otherwise false.HasTutoring.getTutoringKey()
ContentTypeAttributes getContentAttributes()
ContentTypeAttributes
,
getTutoringAttributes()
ContentTypeAttributes getTutoringAttributes()
ContentTypeAttributes
,
getContentAttributes()
boolean isProblem()
boolean isProblemSet()
isProblem()
,
isContentType(String)
,
isTutoringType(String)
boolean isSet()
isProblemSet()
,
isTutoringSet()
boolean isTutoringItem()
boolean isTutoringSet()
java.util.Map<java.lang.String,java.lang.String> getProperties()
setProperties(Map)
void setProperties(java.util.Map<java.lang.String,java.lang.String> properties)
properties
- A collection of user-defined (key,value) pairs.getProperties()
java.lang.String addProperty(java.lang.String key, java.lang.String value)
key
- Property's key namevalue
- Property's valuejava.lang.String addProperty(java.lang.String key, int value)
java.lang.String addProperty(java.lang.String key, long value)
java.lang.String addProperty(java.lang.String key, boolean value)
java.util.List<java.lang.String> flatten()
java.util.List<java.lang.String> getChildrenContentKeys()
java.lang.String getNavigatorClass()
java.lang.String getTerminatorClass()
boolean isNavigatorType(java.lang.String shortNameType)
Navigator
type by name.shortNameType
- The (not fully specified) Navigator class name. Ex: "LinearNavigator"boolean isTerminatorType(java.lang.String shortNameType)
Terminator
type by name.shortNameType
- The (not fully specified) Terminator class name. Ex: "CompleteNTerminator"java.lang.String toString()
toString
in class java.lang.Object