|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjitas.core.Domain
public class Domain
A domain stores all the material related to a particular tutor subject, that is not specific to a subdomain. Note: Problems are specific to a subdomain.
Constructor Summary | |
---|---|
Domain(java.lang.String name,
java.lang.String longName,
java.lang.String description,
boolean userCreation,
java.lang.String type,
java.lang.String subdomainTerm,
java.util.Set<Subdomain> subdomains)
Constructor -This is called from DOMDomainParser to set all of the variables |
Method Summary | |
---|---|
static void |
addDomain(Domain domain)
Add a domain to the global domains list in XML |
void |
addSubdomain(java.lang.String name,
java.lang.String desc)
Creates a new Subdomain and adds this to the Set of Subdomains |
int |
compareTo(java.lang.Object object)
Standard compareTo override, based on the Domain name |
boolean |
equals(java.lang.Object object)
Standard equals override, based on the Domain name |
java.lang.String |
getDescription()
Allows read only access to the description of the domain |
static java.util.Set<java.lang.String> |
getDomainNames()
Get all the domain names from the XML file |
Feedback |
getFeedbackObject()
Return the custom feedback object for this domain. |
java.lang.String |
getLongName()
Get the long name for the domain |
java.lang.String |
getName()
Get the name of the domain |
Problem |
getNextProblem(Student student,
Domain domain,
java.util.SortedMap<java.lang.Integer,Problem> problems,
java.lang.String subdomainName)
Get the next problem (as selected by the system) from a subdomain |
java.util.SortedMap<java.lang.Integer,Problem> |
getProblems(java.lang.String subdomainName)
Get all the problems for a given subdomain |
jess.Rete |
getRules()
Get the RuleBase for this domain |
ProblemSelectionAlgorithm |
getSelectionAlgorithm()
Return custom problem selection algorithm. |
Solution |
getSolution(java.lang.String subdomainName,
java.lang.Integer problemID)
Get the Solution of a problem, given the subdomain name and problem ID |
Subdomain |
getSubdomain(java.lang.String name)
Get the specific subdomain by its name |
java.util.Set<java.lang.String> |
getSubdomainNames()
Gets the set of subdomain names for this domain |
java.util.Set<Subdomain> |
getSubdomains()
Get all the subdomains related to this domain |
java.lang.String |
getSubdomainTerm()
Get a description of each subdomains |
java.lang.String |
getType()
Get the type of this domain |
int |
hashCode()
Standard hashCode override, based on the Domain name |
static Domain |
loadDomain(java.lang.String domainName)
Load a domain from XML |
void |
loadSpecificAlgorithm(java.lang.String className)
Loads a domain-specific problem-selection algorithm |
void |
loadSpecificFeedback(java.lang.String className)
Loads a domain-specific feedback object |
void |
loadSubdomains()
Load all the subdomains for this domain. |
void |
readRules()
Read the rules for this domain in from clp files. |
void |
setLongName(java.lang.String longName)
Set the long name for the domain |
void |
setRules(jess.Rete rules)
Set the RuleBase for the domain |
boolean |
userCreationAllowed()
Returns whether or not we are allowed to add users to this domain. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Domain(java.lang.String name, java.lang.String longName, java.lang.String description, boolean userCreation, java.lang.String type, java.lang.String subdomainTerm, java.util.Set<Subdomain> subdomains)
name
- The name of the domainlongName
- The more detailed name of the domaindescription
- The description of the domainuserCreation
- Indicate whether the user is allowed to be created in the domaintype
- The type of domainsubdomainTerm
- The term used to describe the nature of each subdomainsubdomains
- A Set of subdomains contained within this DomainMethod Detail |
---|
public void addSubdomain(java.lang.String name, java.lang.String desc)
name
- The name of the new subdomaindesc
- Description for the new Subdomainpublic java.lang.String getDescription()
public java.lang.String getName()
public java.util.Set<Subdomain> getSubdomains()
public Subdomain getSubdomain(java.lang.String name) throws SubdomainNotFoundException
name
- The name of the subdomain to be searched for
SubdomainNotFound
ProblemsNotFoundException
SubdomainNotFoundException
public java.lang.String getSubdomainTerm()
public java.lang.String getType()
public jess.Rete getRules()
public void setRules(jess.Rete rules)
rules
- The RuleBasepublic void loadSpecificAlgorithm(java.lang.String className)
public ProblemSelectionAlgorithm getSelectionAlgorithm()
public void loadSpecificFeedback(java.lang.String className)
public Feedback getFeedbackObject()
public boolean userCreationAllowed()
public void readRules() throws jess.JessException
jess.JessException
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public int compareTo(java.lang.Object object) throws java.lang.ClassCastException
object
- the Object to be compared
java.lang.ClassCastException
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String getLongName()
public void setLongName(java.lang.String longName)
longName
- The new long namepublic java.util.Set<java.lang.String> getSubdomainNames()
public void loadSubdomains() throws ProblemsNotFoundException
ProblemsNotFoundException
- If some problems cannot be found for a subdomainpublic java.util.SortedMap<java.lang.Integer,Problem> getProblems(java.lang.String subdomainName) throws SubdomainNotFoundException
subdomainName
- The name of the subdomain
SubdomainNotFoundException
public Solution getSolution(java.lang.String subdomainName, java.lang.Integer problemID) throws SubdomainNotFoundException
subdomainName
- The name of the subdomain the problem belongs toproblemID
- The ID of the problem for which the solution is required
SubdomainNotFoundException
- If no subdomain exists with the given namepublic Problem getNextProblem(Student student, Domain domain, java.util.SortedMap<java.lang.Integer,Problem> problems, java.lang.String subdomainName)
student
- The Student who wants the problemdomain
- The domainproblems
- A sollection of problems to select a problem fromsubdomainName
- The name of the subdomain
public static void addDomain(Domain domain)
domain
- public static java.util.Set<java.lang.String> getDomainNames() throws java.io.IOException
java.io.IOException
- If an IO exception occurs while trying to read the XML filepublic static Domain loadDomain(java.lang.String domainName) throws DomainNotFoundException
domainName
- The name of the domain to laod
DomainNotFoundException
- If a Domain with the given name cannot be found
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |