|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object lib.DotLapWriter
public class DotLapWriter
DotLapWriter is responsible for exporting our learnable action pattern object as a .lap file.
Constructor Summary | |
---|---|
DotLapWriter()
|
Method Summary | |
---|---|
private java.lang.String |
generateLispFromActionElement(ActionElement element)
Convert an action element into lisp |
private java.lang.String |
generateLispFromActionPattern(ActionPattern pattern)
Convert an ActionPattern object into lisp |
private java.lang.String |
generateLispFromCompetence(Competence competence)
Convert a competence into lisp form |
private java.lang.String |
generateLispFromCompetenceElement(CompetenceElement compElement)
Convert a competence element into it's lisp representation |
private java.lang.String |
generateLispFromDriveCollection(DriveCollection driveCollection)
Convert a drive collection into it's lisp representation |
private java.lang.String |
generateLispFromDriveElement(DriveElement driveElement)
Generate a block of lisp from a drive element |
private java.lang.String |
generateLispFromGoal(java.util.ArrayList goal)
A Goal is stored as an arraylist of actionelements, so parse that into a lispy-format |
java.lang.String |
generateLispFromLAP(LearnableActionPattern data)
Process the learnableactionpattern object |
private java.lang.String |
generateLispFromTimeUnit(TimeUnit timeUnit)
Convert a timeunit into a lisp element |
private java.lang.String |
generateLispFromTrigger(java.util.ArrayList trigger)
A trigger is stored as an arraylist of actionelements |
void |
save(java.lang.String fileName,
LearnableActionPattern data)
Save data to a file |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DotLapWriter()
Method Detail |
---|
public void save(java.lang.String fileName, LearnableActionPattern data)
fileName
- Path to file to save to.data
- Object model of this filepublic java.lang.String generateLispFromLAP(LearnableActionPattern data)
data
- The object model
private java.lang.String generateLispFromDriveCollection(DriveCollection driveCollection)
private java.lang.String generateLispFromDriveElement(DriveElement driveElement)
driveElement
- A Drive Element
private java.lang.String generateLispFromCompetence(Competence competence)
competence
- A Competence
private java.lang.String generateLispFromCompetenceElement(CompetenceElement compElement)
compElement
- Competence Element
private java.lang.String generateLispFromTrigger(java.util.ArrayList trigger)
trigger
- Arraylist of action elements comprising the trigger
private java.lang.String generateLispFromGoal(java.util.ArrayList goal)
goal
- Arraylist represetnation of goal, which is really just the
same as an arraylist of action elements
private java.lang.String generateLispFromActionPattern(ActionPattern pattern)
pattern
- Action pattern construct
private java.lang.String generateLispFromActionElement(ActionElement element)
element
- Action Element object
private java.lang.String generateLispFromTimeUnit(TimeUnit timeUnit)
timeUnit
- A measure of time
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |