public class Manifest extends Persistable implements IsManifest<Manifest,Manifest>
IsManifest.
The following discusses how to associate and identify the content and tutoring with a Manifest:
setContentKey(Persistable).
getContentAttributes() returns a ContentType
specifying the content represented by a Manifest instance.
setTutoringKey(Manifest).
getTutoringType() returns a ContentType
specifying the tutoring associated with a Manifest instance.
WorkedExample or
a TutoringSet, can be connected to a Manifest.
TutorStrategies object. Call
setTutoringType() passing in the TutorStrategies. The
navigator type associated with parent Manifest decides which Hint
Set to use for a given student.
WorkedExample or a
TutoringSet, can be connected to a Manifest, or a collection
alternate tutoring strategies
The following diagram provides an example hierarchy of the Manifests describing a ProblemSet:
| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<Manifest> |
childManifests |
protected static java.util.List<java.lang.String> |
propertyKeysForSimpleClassName |
| Modifier | Constructor and Description |
|---|---|
|
Manifest(java.lang.String uid)
Constructor
|
protected |
Manifest(java.lang.String classType,
java.lang.String uid)
Constructor for use by subclasses only
|
| Modifier and Type | Method and Description |
|---|---|
void |
addChildManifest(Manifest 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
|
boolean |
feedBackKeyExists()
Indicates whether this object currently has a feedback key
associated with it.
|
java.util.List<java.lang.String> |
flatten()
Returns a list of Persistence Keys for all of objects referenced by this manifest.
|
java.util.List<Manifest> |
getAllDescendantProblemManifests() |
java.util.List<Manifest> |
getAllDescendants()
Return all of the manifests that are a descendant of this one.
|
boolean |
getBooleanProperty(java.lang.String property,
boolean defaultValue) |
int |
getChildCount()
Returns the number of children manifests
|
Manifest |
getChildManifest(java.lang.String manKey)
Return the child manifest with the given key, or none if it doesn't
exist.
|
java.util.List<Manifest> |
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.
|
static java.lang.String |
getClassName() |
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.
|
Manifest |
getDescendantManifest(java.lang.String manKey)
If this manifest has a descendant with the given manifest key, return it,
otherwise return null.
|
int |
getDescendantProblemCount()
Return the total number of problems in this Manifest.
|
java.lang.String |
getFeedbackKey()
Get the feedback key associated with this object (if it exists).
|
int |
getIntProperty(java.lang.String property,
int defaultValue) |
java.lang.String |
getNavigatorClass()
Returns this Manifest's navigator class name, if any.
|
Manifest |
getParent() |
java.util.Map<java.lang.String,java.lang.String> |
getProperties()
Returns the properties assigned to this manifest.
|
static Manifest |
getRoot(Manifest node) |
java.util.List<java.lang.String> |
getSkillIds()
Take the string representation of the skill Ids property, and split it into
a list of string ID's, returning a List
|
java.lang.String |
getStringProperty(java.lang.String property,
java.lang.String defaultValue) |
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 |
getTutoringKey()
Returns the Persistence Key for the assistance manifest associated with an object.
|
java.lang.String |
getTutoringType()
Returns the fully specified class name of the referenced assistance content.
|
boolean |
hasChildManifestKey(java.lang.String childManifestKey)
Returns whether this Manifest contains a particular child Manifest.
|
boolean |
hasChildManifestWithTutoringKey(java.lang.String tutoringKey) |
boolean |
hasDescendant(Manifest manifest)
Determines whether the specified manifest is a child of this manifest.
|
boolean |
hasDescendant(java.lang.String manifestKey) |
boolean |
hasDescendantWithTutoringKey(java.lang.String tutoringKey)
Return whether or not this manifest has a descendant manifest with the
tutoring key equal to the given key.
|
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 |
isScaffolding()
Returns whether this Manifest has the property set to say it is a scaffolding manifest.
|
boolean |
isSet()
Returns whether this manifest represents any type of set -
either a problem set or a tutoring set.
|
boolean |
isSkillBuilderProblem()
Returns whether this Manifest is a descendant problem of a Skill Builder
|
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<Manifest> 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 |
setFeedbackKey(java.lang.String feedbackKey)
Set the feedback key associated with this object.
|
void |
setParent(Manifest parent) |
void |
setProperties(java.util.Map<java.lang.String,java.lang.String> properties)
Sets caller-defined properties to associate with this manifest.
|
void |
setTutoringKey(Manifest tutoring)
Sets the Persistence Key for the assistance manifest associated with an object.
|
void |
setTutoringKey(java.lang.String tutoringKey)
Sets the Persistence Key for the assistance manifest associated with an object.
|
ManifestDTO |
toDTO() |
java.lang.String |
toString()
Returns a string representation of this object.
|
java.lang.String |
toString(java.lang.String indent) |
java.lang.String |
toStringSummary() |
java.lang.String |
toStringSummary(java.lang.String indent) |
java.lang.String |
toStringSummary(java.lang.String indent,
int childLimit) |
void |
validate()
Check this object's data for inconsistencies
Subclasses must (by informal contract) implement this method!
|
createKey, createKey, equals, extractType, extractUID, getKey, getShortKey, getShortKey, getType, getUID, getValidatorUtilities, setValidatorUtilities, validateKeyprotected java.util.List<Manifest> childManifests
protected static final java.util.List<java.lang.String> propertyKeysForSimpleClassName
public Manifest(java.lang.String uid)
uid - Unique identifier for this Manifest.UIDGeneratorprotected Manifest(java.lang.String classType,
java.lang.String uid)
classType - Fully specified name subclass nameuid - Unique identifier for this Manifest.UIDGeneratorpublic static java.lang.String getClassName()
public java.util.Map<java.lang.String,java.lang.String> getProperties()
IsManifestgetProperties in interface IsManifest<Manifest,Manifest>IsManifest.setProperties(Map)public void setProperties(java.util.Map<java.lang.String,java.lang.String> properties)
IsManifestsetProperties in interface IsManifest<Manifest,Manifest>properties - A collection of user-defined (key,value) pairs.IsManifest.getProperties()public java.lang.String addProperty(java.lang.String key,
int value)
addProperty in interface IsManifest<Manifest,Manifest>public java.lang.String addProperty(java.lang.String key,
boolean value)
addProperty in interface IsManifest<Manifest,Manifest>public java.lang.String addProperty(java.lang.String key,
long value)
addProperty in interface IsManifest<Manifest,Manifest>public java.lang.String addProperty(java.lang.String key,
java.lang.String value)
IsManifestaddProperty in interface IsManifest<Manifest,Manifest>key - Property's key namevalue - Property's valuepublic java.util.List<Manifest> getChildManifests()
IsManifestgetChildManifests in interface IsManifest<Manifest,Manifest>public int getChildCount()
IsManifestgetChildCount in interface IsManifest<Manifest,Manifest>public void setChildManifests(java.util.List<Manifest> childManifests)
IsManifestThe 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.
setChildManifests in interface IsManifest<Manifest,Manifest>childManifests - A list of child manifestspublic void addChildManifest(Manifest child)
IsManifestaddChildManifest in interface IsManifest<Manifest,Manifest>child - Child manifest to add.IsManifest.setChildManifests(List)public java.lang.String getContentKey()
IsManifestgetContentKey in interface IsManifest<Manifest,Manifest>IsManifest.setContentKey(String),
IsManifest.setContentKey(Persistable),
IsManifest.getContentType(),
Persistablepublic void setContentKey(java.lang.String contentKey)
IsManifestsetContentKey in interface IsManifest<Manifest,Manifest>contentKey - A Persistence KeyIsManifest.setContentKey(Persistable),
IsManifest.getContentKey(),
IsManifest.getContentType(),
Persistablepublic void setContentKey(Persistable content)
IsManifestThis is a convenience method providing an alternative to the following:
this.setContentKey(content.getContentKey()):
setContentKey in interface IsManifest<Manifest,Manifest>content - A Persistable objectIsManifest.setContentKey(String),
IsManifest.getContentKey(),
IsManifest.getContentType(),
Persistablepublic java.lang.String getTutoringKey()
HasTutoringgetTutoringKey in interface HasTutoringHasTutoring.setTutoringKey(String),
HasTutoring.setTutoringKey(Manifest),
IsManifest,
Persistablepublic void setTutoringKey(java.lang.String tutoringKey)
HasTutoringsetTutoringKey in interface HasTutoringtutoringKey - A Persistence Key. It is expected this key references a
a manifest containing assistance content.
content.HasTutoring.setTutoringKey(Manifest),
HasTutoring.getTutoringKey(),
IsManifest,
Persistablepublic void setTutoringKey(Manifest tutoring)
HasTutoringThis is a convenience method providing an alternative to the following:
this.setTutoringKey(tutoring.getKey()):
setTutoringKey in interface HasTutoringtutoring - A Manifest object. It is expected this object is a
Manifest or Manifest subclass containing assistance
content.HasTutoring.setTutoringKey(String),
HasTutoring.getTutoringKey(),
IsManifest,
Persistablepublic java.util.List<java.lang.String> getChildrenContentKeys()
IsManifestgetChildrenContentKeys in interface IsManifest<Manifest,Manifest>public java.util.List<java.lang.String> flatten()
IsManifestflatten in interface IsManifest<Manifest,Manifest>Persistable,
IsManifest.getContentKey(),
HasTutoring.getTutoringKey(),
IsManifest.getChildManifests()public ContentTypeAttributes getContentAttributes()
IsManifestgetContentAttributes in interface IsManifest<Manifest,Manifest>ContentTypeAttributes,
IsManifest.getTutoringAttributes()public java.lang.String getContentType()
IsManifestgetContentType in interface IsManifest<Manifest,Manifest>IsManifest.getContentKey(),
IsManifest.isContentType(String)public boolean isContentType(java.lang.String classType)
IsManifestisContentType in interface IsManifest<Manifest,Manifest>classType - The fully specified name of a Content subclass.IsManifest.getContentType() is identical to
classType; otherwise false.IsManifest.getContentType()public boolean isTutoringType(java.lang.String classType)
IsManifestisTutoringType in interface IsManifest<Manifest,Manifest>classType - The fully specified name of a Persistable subclass.HasTutoring.getTutoringKey() is identical to
classType; otherwise false.HasTutoring.getTutoringKey()public ContentTypeAttributes getTutoringAttributes()
IsManifestgetTutoringAttributes in interface IsManifest<Manifest,Manifest>ContentTypeAttributes,
IsManifest.getContentAttributes()public java.lang.String getTutoringType()
IsManifestgetTutoringType in interface IsManifest<Manifest,Manifest>HasTutoring.getTutoringKey(),
IsManifest.isTutoringType(String)public boolean isProblem()
IsManifestisProblem in interface IsManifest<Manifest,Manifest>IsManifest.isProblemSet(),
IsManifest.isContentType(String),
IsManifest.isTutoringType(String)public boolean isProblemSet()
IsManifestisProblemSet in interface IsManifest<Manifest,Manifest>IsManifest.isProblem(),
IsManifest.isContentType(String),
IsManifest.isTutoringType(String)public boolean isSet()
IsManifestisSet in interface IsManifest<Manifest,Manifest>IsManifest.isProblemSet(),
IsManifest.isTutoringSet()public boolean isTutoringItem()
IsManifestisTutoringItem in interface IsManifest<Manifest,Manifest>IsManifest.isTutoringSet(),
IsManifest.isProblem(),
IsManifest.isProblemSet(),
IsManifest.isContentType(String),
IsManifest.isTutoringType(String)public boolean isTutoringSet()
IsManifestisTutoringSet in interface IsManifest<Manifest,Manifest>IsManifest.isTutoringItem(),
IsManifest.isProblem(),
IsManifest.isProblemSet(),
IsManifest.isContentType(String),
IsManifest.isTutoringType(String)public boolean hasDescendant(Manifest manifest)
IsManifesthasDescendant in interface IsManifest<Manifest,Manifest>manifest - Manifest to check as a child.public java.util.List<Manifest> getAllDescendants()
public java.util.List<Manifest> getAllDescendantProblemManifests()
public int getDescendantProblemCount()
public Manifest getDescendantManifest(java.lang.String manKey)
manKey - public Manifest getChildManifest(java.lang.String manKey)
manKey - public boolean hasDescendantWithTutoringKey(java.lang.String tutoringKey)
tutoringKey - public boolean hasDescendant(java.lang.String manifestKey)
public boolean hasChildManifestWithTutoringKey(java.lang.String tutoringKey)
public boolean hasChildManifestKey(java.lang.String childManifestKey)
childManifestKey - Persistence key of the Manifest to look for as a child of this
Manifest.public java.util.List<java.lang.String> getSkillIds()
public java.lang.String toString()
PersistabletoString in interface IsManifest<Manifest,Manifest>toString in interface IsPersistabletoString in class Persistablepublic java.lang.String toString(java.lang.String indent)
public java.lang.String toStringSummary()
public java.lang.String toStringSummary(java.lang.String indent)
public java.lang.String toStringSummary(java.lang.String indent,
int childLimit)
public int getIntProperty(java.lang.String property,
int defaultValue)
public boolean getBooleanProperty(java.lang.String property,
boolean defaultValue)
public java.lang.String getStringProperty(java.lang.String property,
java.lang.String defaultValue)
public void validate()
throws ValidationException
SelfValidatingvalidate in interface SelfValidatingvalidate in class PersistableValidationException - if the data is invalidpublic java.lang.String getFeedbackKey()
HasFeedbackKeygetFeedbackKey in interface HasFeedbackKeypublic void setFeedbackKey(java.lang.String feedbackKey)
HasFeedbackKeyHasFeedbackKey.feedBackKeyExists()
will return truesetFeedbackKey in interface HasFeedbackKeyfeedbackKey - the new feedback keypublic boolean feedBackKeyExists()
HasFeedbackKeyfeedBackKeyExists in interface HasFeedbackKeypublic boolean isScaffolding()
public java.lang.String getNavigatorClass()
IsManifestgetNavigatorClass in interface IsManifest<Manifest,Manifest>public java.lang.String getTerminatorClass()
IsManifestgetTerminatorClass in interface IsManifest<Manifest,Manifest>public boolean isNavigatorType(java.lang.String shortNameType)
IsManifestNavigator type by name.isNavigatorType in interface IsManifest<Manifest,Manifest>shortNameType - The (not fully specified) Navigator class name. Ex: "LinearNavigator"public boolean isTerminatorType(java.lang.String shortNameType)
IsManifestTerminator type by name.isTerminatorType in interface IsManifest<Manifest,Manifest>shortNameType - The (not fully specified) Terminator class name. Ex: "CompleteNTerminator"public Manifest getParent()
public void setParent(Manifest parent)
public boolean isSkillBuilderProblem()
public ManifestDTO toDTO()