Changeset 1553 for branches


Ignore:
Timestamp:
05/14/14 17:49:13 (11 years ago)
Author:
rkrimmel
Message:

Completly restructured alignment approach classes, it is no longer a plugin.

Location:
branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees
Files:
2 added
5 edited
8 copied

Legend:

Unmodified
Added
Removed
  • branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/Alignment.java

    r1548 r1553  
    1 package de.ugoe.cs.autoquest.plugin.alignment; 
     1package de.ugoe.cs.autoquest.tasktrees.alignment.algorithms; 
    22 
    33import java.util.List; 
  • branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/AlignmentHelpers.java

    r1548 r1553  
    1 package misc; 
     1package de.ugoe.cs.autoquest.tasktrees.alignment.algorithms; 
    22 
    33import java.util.ArrayList; 
  • branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/FengDoolittle.java

    r1548 r1553  
    1 package de.ugoe.cs.autoquest.plugin.alignment; 
     1package de.ugoe.cs.autoquest.tasktrees.alignment.algorithms; 
    22 
    33public class FengDoolittle { 
  • branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/Match.java

    r1548 r1553  
    1 package de.ugoe.cs.autoquest.plugin.alignment; 
     1package de.ugoe.cs.autoquest.tasktrees.alignment.algorithms; 
    22 
    33public class Match { 
  • branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/NumberSequence.java

    r1544 r1553  
    1 package de.ugoe.cs.autoquest.plugin.alignment.seqgen; 
     1package de.ugoe.cs.autoquest.tasktrees.alignment.algorithms; 
    22 
    33import java.io.Serializable; 
  • branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/ProgressiveMultiAlignment.java

    r1548 r1553  
    1 package de.ugoe.cs.autoquest.plugin.alignment; 
     1package de.ugoe.cs.autoquest.tasktrees.alignment.algorithms; 
    22 
    33public class ProgressiveMultiAlignment { 
  • branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/SmithWaterman.java

    r1548 r1553  
    1 package de.ugoe.cs.autoquest.plugin.alignment; 
     1package de.ugoe.cs.autoquest.tasktrees.alignment.algorithms; 
    22 
    33import java.util.ArrayList; 
    44import java.util.List; 
    55 
    6 import de.ugoe.cs.autoquest.plugin.alignment.substitution.SubstitutionMatrix; 
     6import de.ugoe.cs.autoquest.tasktrees.alignment.substitution.SubstitutionMatrix; 
    77 
    88public class SmithWaterman implements Alignment { 
  • branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/substitution/DifferenceSubstitutionMatrix.java

    r1324 r1553  
    22 *  
    33 */ 
    4 package de.ugoe.cs.autoquest.plugin.alignment.substitution; 
     4package de.ugoe.cs.autoquest.tasktrees.alignment.substitution; 
    55 
    66import java.util.Collection; 
     
    88 
    99import de.ugoe.cs.autoquest.eventcore.Event; 
     10import de.ugoe.cs.autoquest.tasktrees.treeifc.IUserSession; 
    1011 
    1112/** 
     
    5758        } 
    5859 
     60 
    5961        @Override 
    60         public void generate(Collection<List<Event>> eventList) { 
     62        public void generate(List<IUserSession> sessions) { 
    6163                // TODO Auto-generated method stub 
    6264                 
  • branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/substitution/NearbySubstitutionMatrix.java

    r1324 r1553  
    22 *  
    33 */ 
    4 package de.ugoe.cs.autoquest.plugin.alignment.substitution; 
     4package de.ugoe.cs.autoquest.tasktrees.alignment.substitution; 
    55 
    66import java.util.Collection; 
     
    88 
    99import de.ugoe.cs.autoquest.eventcore.Event; 
     10import de.ugoe.cs.autoquest.tasktrees.treeifc.IUserSession; 
    1011 
    1112/** 
     
    5051 
    5152        @Override 
    52         public void generate(Collection<List<Event>> eventList) { 
     53        public void generate(List<IUserSession> sessions) { 
    5354                // TODO Auto-generated method stub 
    5455                 
    5556        } 
    5657 
     58         
     59 
    5760} 
  • branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/substitution/ObjectDistanceSubstitionMatrix.java

    r1449 r1553  
    1 package de.ugoe.cs.autoquest.plugin.alignment.substitution; 
     1package de.ugoe.cs.autoquest.tasktrees.alignment.substitution; 
    22 
    33import java.util.ArrayList; 
     
    1010import java.util.List; 
    1111 
    12 import misc.AlignmentHelpers; 
    1312import de.ugoe.cs.autoquest.eventcore.Event; 
     13import de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.AlignmentHelpers; 
     14import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTaskInstance; 
     15import de.ugoe.cs.autoquest.tasktrees.treeifc.IUserSession; 
    1416import de.ugoe.cs.util.console.GlobalDataContainer; 
    1517 
     
    5153 
    5254        @Override 
    53         public void generate(Collection<List<Event>> eventList) { 
     55        public void generate(List<IUserSession> sessions) { 
    5456                 
    55                 for(Iterator<List<Event>> seqs = eventList.iterator(); seqs.hasNext();) { 
    56                         matrix.add(new int[eventList.size()][eventList.size()]); 
    57                         List<Event> tmpList = seqs.next(); 
     57                for(Iterator it = sessions.iterator(); it.hasNext();) { 
     58                        IUserSession session = (IUserSession) it.next(); 
     59                        matrix.add(new int[sessions.size()][sessions.size()]); 
     60                 
    5861                         
    59                         for (int i=0; i < tmpList.size(); i++) { 
    60                                 for (int j=0; j < tmpList.size(); j++) { 
    61                                         IGUIElement first = (IGUIElement) tmpList.get(i).getTarget(); 
    62                                         IGUIElement second =(IGUIElement) tmpList.get(j).getTarget(); 
     62                        for (int i=0; i < session.size(); i++) { 
     63                                for (int j=0; j < session.size(); j++) { 
     64                                        //TODO Check if ITaskInstance is of type IEventTaskInstance  
     65                                        IEventTaskInstance eti1 = (IEventTaskInstance) session.get(i); 
     66                                        IEventTaskInstance eti2 = (IEventTaskInstance) session.get(j); 
     67                                        IGUIElement first = (IGUIElement) eti1.getEvent().getTarget(); 
     68                                        IGUIElement second =(IGUIElement) eti2.getEvent().getTarget(); 
    6369                                        matrix.get(currentSequence)[i][j] = AlignmentHelpers.distanceBetween(first, second); 
    6470                                } 
  • branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/substitution/SubstitutionMatrix.java

    r1324 r1553  
    1 package de.ugoe.cs.autoquest.plugin.alignment.substitution; 
     1package de.ugoe.cs.autoquest.tasktrees.alignment.substitution; 
    22 
    33import java.util.Collection; 
     
    55 
    66import de.ugoe.cs.autoquest.eventcore.Event; 
     7import de.ugoe.cs.autoquest.tasktrees.treeifc.IUserSession; 
     8 
    79 
    810public interface SubstitutionMatrix { 
     
    1416        public double getGapPenalty(); 
    1517 
    16         public void generate(Collection<List<Event>> eventList); 
     18        public void generate(List<IUserSession> sessions); 
     19 
    1720         
    1821} 
  • branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/SequenceForTaskDetectionRuleAlignment.java

    r1552 r1553  
    2525import java.util.logging.Level; 
    2626 
    27 import de.ugoe.cs.autoquest.plugin.alignment.seqgen.NumberSequence; 
     27import de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.NumberSequence; 
    2828import de.ugoe.cs.autoquest.tasktrees.taskequality.TaskEquality; 
    2929import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration; 
     
    9696    private TaskHandlingStrategy identityTaskHandlingStrategy;; 
    9797     
     98     
     99    private ArrayList<NumberSequence> numberseqs; 
     100     
    98101    /** 
    99102     * <p> 
     
    107110     * @param taskBuilder         the task builder to be used for creating substructures 
    108111     */ 
     112     
     113    
    109114    SequenceForTaskDetectionRuleAlignment(TaskEquality minimalTaskEquality, 
    110115                                 ITaskFactory taskFactory, 
     
    116121        this.preparationTaskHandlingStrategy = new TaskHandlingStrategy(minimalTaskEquality); 
    117122        this.identityTaskHandlingStrategy = new TaskHandlingStrategy(TaskEquality.IDENTICAL); 
     123         
    118124    } 
    119125 
     
    132138    public RuleApplicationResult apply(List<IUserSession> sessions) { 
    133139        RuleApplicationData appData = new RuleApplicationData(sessions); 
    134         private ArrayList<NumberSequence> numberseqs; 
     140        numberseqs = new ArrayList<NumberSequence>(); 
    135141         
    136142        // this is the real rule application. Loop while something is replaced. 
    137143        harmonizeEventTaskInstancesModel(appData); 
     144         
     145         
    138146        //Hier mein kram hin 
    139147        /*do { 
     
    195203        for (IUserSession session : sessions) { 
    196204            Console.traceln(Level.FINE, "handling " + (++sessionNo) + ". " + session); 
    197             for (ITaskInstance taskInstance : session) { 
     205                NumberSequence templist = new NumberSequence(session.size()) ; 
     206             
     207            for (int i = 0; i < session.size(); i++) { 
     208                ITaskInstance taskInstance = session.get(i);  
    198209                task = uniqueTasks.getValue(taskInstance); 
    199210                 
    200211                if (task == null) { 
    201212                    uniqueTasks.addSymbol(taskInstance, taskInstance.getTask()); 
     213                    templist.getSequence()[i]=taskInstance.getTask().getId(); 
    202214                } 
    203215                else { 
    204216                    taskBuilder.setTask(taskInstance, task); 
     217                        templist.getSequence()[i]=task.getId(); 
    205218                    unifiedTasks++; 
    206219                } 
Note: See TracChangeset for help on using the changeset viewer.