- Timestamp:
- 08/16/12 16:08:48 (12 years ago)
- Location:
- trunk
- Files:
-
- 1 deleted
- 17 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/java-utils-test/.classpath
r482 r553 2 2 <classpath> 3 3 <classpathentry kind="src" output="target/test-classes" path="src/test/java"> 4 <attributes> 5 <attribute name="optional" value="true"/> 6 <attribute name="maven.pomderived" value="true"/> 7 </attributes> 8 </classpathentry> 9 <classpathentry kind="src" output="target/classes" path="src/main/java"> 4 10 <attributes> 5 11 <attribute name="optional" value="true"/> -
trunk/quest-core-coverage-test/src/test/java/de/ugoe/cs/quest/coverage/CoverageCalculatorObservedTest.java
r548 r553 5 5 import de.ugoe.cs.quest.coverage.CoverageCalculatorObserved; 6 6 import de.ugoe.cs.quest.eventcore.Event; 7 import de.ugoe.cs.quest.eventcore.StringEventType; 7 8 import de.ugoe.cs.quest.usageprofiles.MockTrieBasedModel; 8 import de.ugoe.cs.quest.usageprofiles.mock.StringEventType;9 9 10 10 import java.util.LinkedHashSet; -
trunk/quest-core-coverage-test/src/test/java/de/ugoe/cs/quest/coverage/CoverageCalculatorProcessTest.java
r548 r553 11 11 import de.ugoe.cs.quest.coverage.CoverageCalculatorProcess; 12 12 import de.ugoe.cs.quest.eventcore.Event; 13 import de.ugoe.cs.quest.eventcore.StringEventType; 13 14 import de.ugoe.cs.quest.usageprofiles.MockTrieBasedModel; 14 import de.ugoe.cs.quest.usageprofiles.mock.StringEventType;15 15 16 16 import org.junit.*; -
trunk/quest-core-coverage-test/src/test/java/de/ugoe/cs/quest/coverage/SequenceToolsTest.java
r548 r553 12 12 import de.ugoe.cs.quest.coverage.SequenceTools; 13 13 import de.ugoe.cs.quest.eventcore.Event; 14 import de.ugoe.cs.quest.eventcore.StringEventType; 14 15 import de.ugoe.cs.quest.usageprofiles.FirstOrderMarkovModel; 15 16 import de.ugoe.cs.quest.usageprofiles.IStochasticProcess; 16 17 import de.ugoe.cs.quest.usageprofiles.MockTrieBasedModel; 17 import de.ugoe.cs.quest.usageprofiles.mock.StringEventType;18 18 19 19 import org.junit.*; -
trunk/quest-core-events-test/.classpath
r481 r553 2 2 <classpath> 3 3 <classpathentry kind="src" output="target/test-classes" path="src/test/java"> 4 <attributes> 5 <attribute name="optional" value="true"/> 6 <attribute name="maven.pomderived" value="true"/> 7 </attributes> 8 </classpathentry> 9 <classpathentry kind="src" output="target/classes" path="src/main/java"> 4 10 <attributes> 5 11 <attribute name="optional" value="true"/> -
trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/Event.java
r551 r553 30 30 * </p> 31 31 */ 32 public static final Event STARTEVENT = new Event(new DummyEventType());32 public static final Event STARTEVENT = new Event(new StringEventType("START")); 33 33 34 34 /** … … 36 36 * Global end event that can be used to indicate the end of a sequence. 37 37 */ 38 public static final Event ENDEVENT = new Event(new DummyEventType());38 public static final Event ENDEVENT = new Event(new StringEventType("END")); 39 39 40 40 /** … … 160 160 */ 161 161 public String getId() { 162 return "(" + type.toString() + ";" + target.toString() + ")"; 162 String id = type.toString(); 163 if( target!=null ) { 164 id += "." + target.toString(); 165 } 166 return id; 163 167 } 164 168 -
trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/StringEventType.java
r549 r553 1 package de.ugoe.cs.quest.usageprofiles.mock;2 1 3 import de.ugoe.cs.quest.eventcore.IEventType;2 package de.ugoe.cs.quest.eventcore; 4 3 4 import java.security.InvalidParameterException; 5 6 /** 7 * <p> 8 * A simple event type that is identified by a string. 9 * </p> 10 * 11 * @version $Revision: $ $Date: Aug 16, 2012$ 12 * @author 2012, last modified by $Author: sherbold$ 13 */ 5 14 public class StringEventType implements IEventType { 6 /** */ 15 16 /** 17 * <p> 18 * Id for object serialization. 19 * </p> 20 */ 7 21 private static final long serialVersionUID = 1L; 8 String str;9 22 10 public StringEventType(String str) { 23 /** 24 * <p> 25 * String that identifies the event type. 26 * </p> 27 */ 28 private String str; 29 30 /** 31 * <p> 32 * Constructor. Creates a new StringEventType. str must not be null. 33 * </p> 34 * 35 * @param str 36 * string that identifies the event type 37 * @throws InvalidParameterException 38 * thrown if str is null 39 */ 40 public StringEventType(String str) throws InvalidParameterException { 11 41 if (str == null) { 12 throw new AssertionError( 13 "illegal use of mock StringEventType: str must nut be null"); 42 throw new InvalidParameterException("str must not be null"); 14 43 } 15 44 this.str = str; 16 45 } 17 46 47 /* 48 * (non-Javadoc) 49 * 50 * @see de.ugoe.cs.quest.eventcore.IEventType#getName() 51 */ 52 @Override 18 53 public String getName() { 19 54 return "StringEventType"; 20 55 } 21 56 57 /* 58 * (non-Javadoc) 59 * 60 * @see java.lang.Object#toString() 61 */ 62 @Override 63 public String toString() { 64 return str; 65 } 66 67 /* 68 * (non-Javadoc) 69 * 70 * @see java.lang.Object#hashCode() 71 */ 72 @Override 73 public int hashCode() { 74 return str.hashCode(); 75 } 76 77 /* 78 * (non-Javadoc) 79 * 80 * @see java.lang.Object#equals(java.lang.Object) 81 */ 22 82 @Override 23 83 public boolean equals(Object other) { -
trunk/quest-core-tasktrees-test/.classpath
r506 r553 2 2 <classpath> 3 3 <classpathentry kind="src" output="target/test-classes" path="src/test/java"> 4 <attributes> 5 <attribute name="optional" value="true"/> 6 <attribute name="maven.pomderived" value="true"/> 7 </attributes> 8 </classpathentry> 9 <classpathentry kind="src" output="target/classes" path="src/main/java"> 4 10 <attributes> 5 11 <attribute name="optional" value="true"/> -
trunk/quest-core-usageprofiles-test/.classpath
r518 r553 2 2 <classpath> 3 3 <classpathentry kind="src" output="target/test-classes" path="src/test/java"> 4 <attributes> 5 <attribute name="optional" value="true"/> 6 <attribute name="maven.pomderived" value="true"/> 7 </attributes> 8 </classpathentry> 9 <classpathentry kind="src" output="target/classes" path="src/main/java"> 4 10 <attributes> 5 11 <attribute name="optional" value="true"/> -
trunk/quest-core-usageprofiles-test/src/test/java/de/ugoe/cs/quest/usageprofiles/DeterministicFiniteAutomatonTest.java
r548 r553 6 6 7 7 import de.ugoe.cs.quest.eventcore.Event; 8 import de.ugoe.cs.quest.eventcore.StringEventType; 8 9 import de.ugoe.cs.quest.usageprofiles.DeterministicFiniteAutomaton; 9 import de.ugoe.cs.quest.usageprofiles.mock.StringEventType;10 10 11 11 import java.util.Random; -
trunk/quest-core-usageprofiles-test/src/test/java/de/ugoe/cs/quest/usageprofiles/FirstOrderMarkovModelTest.java
r548 r553 8 8 9 9 import de.ugoe.cs.quest.eventcore.Event; 10 import de.ugoe.cs.quest.eventcore.StringEventType; 10 11 import de.ugoe.cs.quest.usageprofiles.FirstOrderMarkovModel; 11 12 import de.ugoe.cs.quest.usageprofiles.FirstOrderMarkovModel.MarkovEdge; 12 import de.ugoe.cs.quest.usageprofiles.mock.StringEventType;13 13 import static org.junit.Assert.*; 14 14 -
trunk/quest-core-usageprofiles-test/src/test/java/de/ugoe/cs/quest/usageprofiles/HighOrderMarkovModelTest.java
r548 r553 6 6 7 7 import de.ugoe.cs.quest.eventcore.Event; 8 import de.ugoe.cs.quest.eventcore.StringEventType; 8 9 import de.ugoe.cs.quest.usageprofiles.HighOrderMarkovModel; 9 import de.ugoe.cs.quest.usageprofiles.mock.StringEventType;10 10 11 11 import java.util.Random; -
trunk/quest-core-usageprofiles-test/src/test/java/de/ugoe/cs/quest/usageprofiles/ModelFlattenerTest.java
r548 r553 10 10 11 11 import de.ugoe.cs.quest.eventcore.Event; 12 import de.ugoe.cs.quest.eventcore.StringEventType; 12 13 import de.ugoe.cs.quest.usageprofiles.FirstOrderMarkovModel; 13 14 import de.ugoe.cs.quest.usageprofiles.HighOrderMarkovModel; … … 15 16 import de.ugoe.cs.quest.usageprofiles.PredictionByPartialMatch; 16 17 import de.ugoe.cs.quest.usageprofiles.TrieNode; 17 import de.ugoe.cs.quest.usageprofiles.mock.StringEventType;18 18 import static org.junit.Assert.*; 19 19 -
trunk/quest-core-usageprofiles-test/src/test/java/de/ugoe/cs/quest/usageprofiles/PredictionByPartialMatchTest.java
r548 r553 6 6 7 7 import de.ugoe.cs.quest.eventcore.Event; 8 import de.ugoe.cs.quest.eventcore.StringEventType; 8 9 import de.ugoe.cs.quest.usageprofiles.PredictionByPartialMatch; 9 import de.ugoe.cs.quest.usageprofiles.mock.StringEventType;10 10 11 11 import java.util.Random; -
trunk/quest-core-usageprofiles-test/src/test/java/de/ugoe/cs/quest/usageprofiles/TrieBasedModelTest.java
r548 r553 8 8 9 9 import de.ugoe.cs.quest.eventcore.Event; 10 import de.ugoe.cs.quest.eventcore.StringEventType; 10 11 import de.ugoe.cs.quest.usageprofiles.Trie; 11 12 import de.ugoe.cs.quest.usageprofiles.TrieBasedModel; 12 13 import de.ugoe.cs.quest.usageprofiles.TrieNode; 13 import de.ugoe.cs.quest.usageprofiles.mock.StringEventType;14 14 15 15 import org.junit.*; -
trunk/quest-core-usageprofiles/src/main/java/de/ugoe/cs/quest/usageprofiles/FirstOrderMarkovModel.java
r547 r553 103 103 List<Integer> endIndexList = new LinkedList<Integer>(); 104 104 for( int i=0 ; i<knownSymbols.size() ; i++ ) { 105 String id = knownSymbols.get(i).get StandardId();106 if( id.equals(Event.STARTEVENT.get StandardId()) || id.contains(Event.STARTEVENT.getStandardId()+"-=-") ) {105 String id = knownSymbols.get(i).getId(); 106 if( id.equals(Event.STARTEVENT.getId()) || id.contains(Event.STARTEVENT.getId()+"-=-") ) { 107 107 startIndexList.add(i); 108 108 } 109 if( id.equals(Event.ENDEVENT.get StandardId()) || id.contains("-=-"+Event.ENDEVENT.getStandardId()) ) {109 if( id.equals(Event.ENDEVENT.getId()) || id.contains("-=-"+Event.ENDEVENT.getId()) ) { 110 110 endIndexList.add(i); 111 111 } … … 176 176 trie.getKnownSymbols()); 177 177 for (Event symbol : knownSymbols) { 178 final String thisSaneId = symbol.get ShortId().replace("\"", "\\\"")178 final String thisSaneId = symbol.getId().replace("\"", "\\\"") 179 179 .replaceAll("[\r\n]", ""); 180 180 stringBuilder.append(" " + knownSymbols.indexOf(symbol) + " [label=\"" … … 210 210 211 211 for (Event symbol : knownSymbols) { 212 String from = symbol.get ShortId();212 String from = symbol.getId(); 213 213 List<Event> context = new ArrayList<Event>(); 214 214 context.add(symbol); … … 217 217 218 218 for (Event follower : followers) { 219 String to = follower.get ShortId();219 String to = follower.getId(); 220 220 MarkovEdge prob = new MarkovEdge(getProbability(context, 221 221 follower)); -
trunk/quest-core-usageprofiles/src/main/java/de/ugoe/cs/quest/usageprofiles/ModelFlattener.java
r547 r553 6 6 7 7 import de.ugoe.cs.quest.eventcore.Event; 8 import de.ugoe.cs.quest.eventcore. ReplayableEvent;8 import de.ugoe.cs.quest.eventcore.StringEventType; 9 9 10 10 /** … … 101 101 List<String> parentIDs, int depth) { 102 102 for (TrieNode<Event> child : currentNode.getChildren()) { 103 String currentId = child.getSymbol().get StandardId();103 String currentId = child.getSymbol().getId(); 104 104 if (depth > 1) { 105 105 List<String> childParentIDs = new LinkedList<String>(parentIDs); … … 114 114 firstOrderID.append(currentId); 115 115 TrieNode<Event> firstOrderNode = firstOrderTrie 116 .getChildCreate(new Event <Object>(firstOrderID117 .toString())) ;116 .getChildCreate(new Event(new StringEventType(firstOrderID 117 .toString()))); 118 118 firstOrderNode.setCount(child.getCount()); 119 119 for (TrieNode<Event> transitionChild : child.getChildren()) { … … 125 125 transitionID.append(currentId + EVENT_SEPARATOR); 126 126 transitionID.append(transitionChild.getSymbol() 127 .get StandardId());127 .getId()); 128 128 TrieNode<Event> firstOrderTransitionChild = firstOrderNode 129 .getChildCreate(new Event <Object>(transitionID130 .toString())) ;129 .getChildCreate(new Event(new StringEventType(transitionID 130 .toString()))); 131 131 firstOrderTransitionChild.setCount(transitionChild 132 132 .getCount()); -
trunk/quest-ui-core-test/.classpath
r494 r553 2 2 <classpath> 3 3 <classpathentry kind="src" output="target/test-classes" path="src/test/java"> 4 <attributes> 5 <attribute name="optional" value="true"/> 6 <attribute name="maven.pomderived" value="true"/> 7 </attributes> 8 </classpathentry> 9 <classpathentry kind="src" output="target/classes" path="src/main/java"> 4 10 <attributes> 5 11 <attribute name="optional" value="true"/>
Note: See TracChangeset
for help on using the changeset viewer.