org.activemath.webapp.tools.data
Class Gap

java.lang.Object
  extended by org.activemath.webapp.tools.data.Gap

public class Gap
extends Object

Interface class for content gaps


Nested Class Summary
 class Gap.StructuralErrors
          Nested class for storing structural errors
 class Gap.SupportStatistics
          Nested static inner class for storing SupportStatistics of gaps
 
Field Summary
static int DERBYID_DEFAULT
           
static String KEY_DEFAULT_COMPETENCY
           
static String KEY_DEFAULT_MASTERY
           
static String KEY_GD_ENABLED
           
static String KEY_LEARNING_DEVELOPEMENT
           
static String KEY_OLDLM
           
static String KEY_TUTOR_PRESET
           
protected static Logger log
          The logger for this class
static HashSet<String> validClasses
           
static HashSet<String> validClassTypesForCourseGeneration
           
static HashSet<String> validValuesForCompetency
           
static HashSet<String> validValuesForCompetencyLevel
           
static HashSet<String> validValuesForDifficulty
           
static HashSet<String> validValuesForField
           
static HashSet<String> validValuesForLearningContext
           
 
Constructor Summary
Gap(String MBaseId)
          Constructor
 
Method Summary
 boolean accepts(Gap gapToAccept)
          Method which checks if a filter gap 'accepts' a gap.
 void addMissingPropertiesForClass(String className, String propName, String[] propValuesStrings)
          Method add an entry to missing properties
 void appendGapData(Gap gap2store)
          Appends the data of a gap to the current object
 String getClassName()
           
 String getCleanMBaseId()
           
 KBQuery getCourseGenerationErrors()
           
 Timestamp getCreation()
           
 int getDerbyId()
           
 Timestamp getLastModified()
           
 String getMBaseId()
          Bean accessors for Gap
 Set<String> getMissingContentLanguages()
           
 HashSet<String> getMissingTitleLanguages()
           
 Gap.SupportStatistics getStats()
           
 Gap.StructuralErrors getStructErrors()
           
static HashSet<String> getValidClasses()
           
static HashSet<String> getValidProperties()
           
static HashSet<String> getValidValuesForCompetency()
           
static HashSet<String> getValidValuesForCompetencyLevel()
           
static HashSet<String> getValidValuesForDifficulty()
           
static HashSet<String> getValidValuesForField()
           
static HashSet<String> getValidValuesForLearningContext()
           
 String getXStreamXML()
          Creates an XML-representation of the current object, which is then stored in the database-field 'data'.
 boolean hasCourseGenerationErrors()
           
 Boolean isIgnore()
           
 boolean isIgnoreFiltered()
           
 Boolean isImportant()
           
 boolean isImportantFiltered()
           
 void setClassName(String className)
           
 void setCourseGenerationErrors(KBQuery courseGenerationErrors)
           
 void setCreation(Timestamp creation)
           
 void setDerbyId(int derbyId)
           
 void setIgnore(Boolean ignore)
           
 void setImportant(Boolean important)
           
 void setLastModified(Timestamp lastModified)
           
 void setMBaseId(String baseId)
           
 void setMissingContentLanguages(HashSet<String> missingLanguages)
           
 void setMissingTitleLanguages(HashSet<String> missingTitleLanguages)
           
 void setStats(Gap.SupportStatistics stats)
           
 void setStructErrors(Gap.StructuralErrors structErrors)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static Logger log
The logger for this class


DERBYID_DEFAULT

public static int DERBYID_DEFAULT

KEY_GD_ENABLED

public static String KEY_GD_ENABLED

KEY_TUTOR_PRESET

public static String KEY_TUTOR_PRESET

KEY_OLDLM

public static String KEY_OLDLM

KEY_DEFAULT_MASTERY

public static String KEY_DEFAULT_MASTERY

KEY_LEARNING_DEVELOPEMENT

public static String KEY_LEARNING_DEVELOPEMENT

KEY_DEFAULT_COMPETENCY

public static String KEY_DEFAULT_COMPETENCY

validClasses

public static HashSet<String> validClasses

validClassTypesForCourseGeneration

public static HashSet<String> validClassTypesForCourseGeneration

validValuesForDifficulty

public static HashSet<String> validValuesForDifficulty

validValuesForLearningContext

public static HashSet<String> validValuesForLearningContext

validValuesForCompetencyLevel

public static HashSet<String> validValuesForCompetencyLevel

validValuesForField

public static HashSet<String> validValuesForField

validValuesForCompetency

public static HashSet<String> validValuesForCompetency
Constructor Detail

Gap

public Gap(String MBaseId)
Constructor

Parameters:
MBaseId - this is the identifying part of the gap; can be left null only if the gap is only used for filtering
Method Detail

getXStreamXML

public String getXStreamXML()
Creates an XML-representation of the current object, which is then stored in the database-field 'data'. This is by far more convenient than mapping all data to relational tables.

Returns:
XML-Representation of the current object

appendGapData

public void appendGapData(Gap gap2store)
Appends the data of a gap to the current object

Parameters:
gap2store - gap which should be appended to the current object

accepts

public boolean accepts(Gap gapToAccept)
Method which checks if a filter gap 'accepts' a gap. This is Called from within a filterGap and defines the way gaps shall be filtered.

Parameters:
gapToAccept - gap which should be checked
Returns:
whether the gap is accepted or not

addMissingPropertiesForClass

public void addMissingPropertiesForClass(String className,
                                         String propName,
                                         String[] propValuesStrings)
Method add an entry to missing properties

Parameters:
className - one of this.validClassTypesForCourseGeneration
propName - one of this.validProperties
propValuesStrings - array of strings of valid property values

getMBaseId

public String getMBaseId()
Bean accessors for Gap


setMBaseId

public void setMBaseId(String baseId)

getCleanMBaseId

public String getCleanMBaseId()

isIgnoreFiltered

public boolean isIgnoreFiltered()

isImportantFiltered

public boolean isImportantFiltered()

getDerbyId

public int getDerbyId()

setDerbyId

public void setDerbyId(int derbyId)

getClassName

public String getClassName()

setClassName

public void setClassName(String className)

getStructErrors

public Gap.StructuralErrors getStructErrors()

setStructErrors

public void setStructErrors(Gap.StructuralErrors structErrors)

getMissingContentLanguages

public Set<String> getMissingContentLanguages()

setMissingContentLanguages

public void setMissingContentLanguages(HashSet<String> missingLanguages)

getStats

public Gap.SupportStatistics getStats()

setStats

public void setStats(Gap.SupportStatistics stats)

getLastModified

public Timestamp getLastModified()

setLastModified

public void setLastModified(Timestamp lastModified)

getCreation

public Timestamp getCreation()

setCreation

public void setCreation(Timestamp creation)

isIgnore

public Boolean isIgnore()

setIgnore

public void setIgnore(Boolean ignore)

isImportant

public Boolean isImportant()

setImportant

public void setImportant(Boolean important)

getMissingTitleLanguages

public HashSet<String> getMissingTitleLanguages()

setMissingTitleLanguages

public void setMissingTitleLanguages(HashSet<String> missingTitleLanguages)

hasCourseGenerationErrors

public boolean hasCourseGenerationErrors()

getCourseGenerationErrors

public KBQuery getCourseGenerationErrors()

setCourseGenerationErrors

public void setCourseGenerationErrors(KBQuery courseGenerationErrors)

getValidProperties

public static HashSet<String> getValidProperties()

getValidClasses

public static HashSet<String> getValidClasses()

getValidValuesForDifficulty

public static HashSet<String> getValidValuesForDifficulty()

getValidValuesForLearningContext

public static HashSet<String> getValidValuesForLearningContext()

getValidValuesForCompetencyLevel

public static HashSet<String> getValidValuesForCompetencyLevel()

getValidValuesForField

public static HashSet<String> getValidValuesForField()

getValidValuesForCompetency

public static HashSet<String> getValidValuesForCompetency()