Index: /trunk/autoquest-plugin-http/.classpath
===================================================================
--- /trunk/autoquest-plugin-http/.classpath	(revision 1367)
+++ /trunk/autoquest-plugin-http/.classpath	(revision 1367)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" output="target/classes" path="src/main/java">
+		<attributes>
+			<attribute name="optional" value="true"/>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
+		<attributes>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry including="**/*.java" kind="src" output="target/classes" path="target/generated-sources/xjc">
+		<attributes>
+			<attribute name="optional" value="true"/>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="src" output="target/test-classes" path="src/test/java">
+		<attributes>
+			<attribute name="optional" value="true"/>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
+		<attributes>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
+		<attributes>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="output" path="target/classes"/>
+</classpath>
Index: /trunk/autoquest-plugin-http/.project
===================================================================
--- /trunk/autoquest-plugin-http/.project	(revision 1367)
+++ /trunk/autoquest-plugin-http/.project	(revision 1367)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>autoquest-plugin-http</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.m2e.core.maven2Builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.m2e.core.maven2Nature</nature>
+	</natures>
+</projectDescription>
Index: /trunk/autoquest-plugin-http/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- /trunk/autoquest-plugin-http/.settings/org.eclipse.jdt.core.prefs	(revision 1367)
+++ /trunk/autoquest-plugin-http/.settings/org.eclipse.jdt.core.prefs	(revision 1367)
@@ -0,0 +1,5 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.source=1.7
Index: /trunk/autoquest-plugin-http/.settings/org.eclipse.m2e.core.prefs
===================================================================
--- /trunk/autoquest-plugin-http/.settings/org.eclipse.m2e.core.prefs	(revision 1367)
+++ /trunk/autoquest-plugin-http/.settings/org.eclipse.m2e.core.prefs	(revision 1367)
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
Index: /trunk/autoquest-plugin-http/pom.xml
===================================================================
--- /trunk/autoquest-plugin-http/pom.xml	(revision 1367)
+++ /trunk/autoquest-plugin-http/pom.xml	(revision 1367)
@@ -0,0 +1,59 @@
+<project
+    xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+>
+  <parent>
+    <groupId>de.ugoe.cs.autoquest</groupId>
+    <artifactId>autoquest</artifactId>
+    <version>0.0.1-SNAPSHOT</version>
+  </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>autoquest-plugin-http</artifactId>
+    <name>autoquest-plugin-http</name>
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+        </license>
+    </licenses>
+    <scm>
+        <url>${autoquest-scm-trunk-dir}/autoquest-plugin-http</url>
+    </scm>
+    <dependencies>
+        <dependency>
+            <groupId>de.ugoe.cs</groupId>
+            <artifactId>java-utils</artifactId>
+            <version>0.0.1-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>de.ugoe.cs.autoquest</groupId>
+            <artifactId>autoquest-plugin-core</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>de.ugoe.cs.autoquest</groupId>
+            <artifactId>autoquest-core-events</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.jvnet.jaxb2.maven2</groupId>
+                <artifactId>maven-jaxb2-plugin</artifactId>
+                <version>0.8.2</version>
+                <configuration>
+                    <generatePackage>de.ugoe.cs.autoquest.httpmonitor.exchange</generatePackage>
+                </configuration>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>generate</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
Index: /trunk/autoquest-plugin-http/src/main/java/de/ugoe/cs/autoquest/plugin/http/HTTPLogParser.java
===================================================================
--- /trunk/autoquest-plugin-http/src/main/java/de/ugoe/cs/autoquest/plugin/http/HTTPLogParser.java	(revision 1367)
+++ /trunk/autoquest-plugin-http/src/main/java/de/ugoe/cs/autoquest/plugin/http/HTTPLogParser.java	(revision 1367)
@@ -0,0 +1,112 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.autoquest.plugin.http;
+
+import java.io.File;
+import java.util.Collection;
+import java.util.LinkedList;
+import java.util.List;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Unmarshaller;
+import javax.xml.transform.stream.StreamSource;
+
+import org.xml.sax.SAXException;
+
+import de.ugoe.cs.autoquest.eventcore.Event;
+import de.ugoe.cs.autoquest.httpmonitor.exchange.HttpExchange;
+import de.ugoe.cs.autoquest.httpmonitor.exchange.Session;
+import de.ugoe.cs.autoquest.plugin.http.eventcore.HTTPEventType;
+import de.ugoe.cs.autoquest.plugin.http.eventcore.HTTPTarget;
+
+/**
+ * <p>
+ * TODO comment
+ * </p>
+ * 
+ * @author Patrick Harms
+ */
+public class HTTPLogParser {
+
+    /**
+     * <p>
+     * the event sequences parsed by this parser
+     * </p>
+     */
+    private Collection<List<Event>> sequences = new LinkedList<List<Event>>();
+
+    /**
+     * <p>
+     * Parses a log file written by the HTTPMonitor and creates a collection of event sequences.
+     * </p>
+     * 
+     * @param filename
+     *            name and path of the log file
+     *
+     * @throws SAXException in the case, the file could not be parsed
+     */
+    public void parseFile(String filename) throws JAXBException {
+        if (filename == null) {
+            throw new IllegalArgumentException("filename must not be null");
+        }
+
+        parseFile(new File(filename));
+    }
+
+    /**
+     * <p>
+     * Parses a log file written by the HTTPMonitor and creates a collection of event sequences.
+     * </p>
+     * 
+     * @param file
+     *            file to be parsed
+     *
+     * @throws SAXException in the case, the file could not be parsed
+     */
+    public void parseFile(File file) throws JAXBException {
+        if (file == null) {
+            throw new IllegalArgumentException("file must not be null");
+        }
+        
+        JAXBContext jc = JAXBContext.newInstance(Session.class.getPackage().getName());
+        
+        Unmarshaller unmarshaller = jc.createUnmarshaller();
+        StreamSource source = new StreamSource(file);
+        
+        @SuppressWarnings("unchecked")
+        JAXBElement<Session> sessionObj = (JAXBElement<Session>) unmarshaller.unmarshal(source);
+        
+        Session session = sessionObj.getValue();
+
+        if ((session.getHttpExchange() != null) && (session.getHttpExchange().size() > 0)) {
+            List<Event> sequence = new LinkedList<Event>();
+            for (HttpExchange exchange : session.getHttpExchange()) {
+                sequence.add(new Event(new HTTPEventType(exchange),
+                                       new HTTPTarget(exchange.getReceiver())));
+            }
+            sequences.add(sequence);
+        }
+        
+    }
+
+    /**
+     *
+     */
+    public Collection<List<Event>> getSequences() {
+        return sequences;
+    }
+}
Index: /trunk/autoquest-plugin-http/src/main/java/de/ugoe/cs/autoquest/plugin/http/HTTPUtils.java
===================================================================
--- /trunk/autoquest-plugin-http/src/main/java/de/ugoe/cs/autoquest/plugin/http/HTTPUtils.java	(revision 1367)
+++ /trunk/autoquest-plugin-http/src/main/java/de/ugoe/cs/autoquest/plugin/http/HTTPUtils.java	(revision 1367)
@@ -0,0 +1,72 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.autoquest.plugin.http;
+
+import de.ugoe.cs.autoquest.httpmonitor.exchange.Address;
+
+/**
+ * <p>
+ * TODO comment
+ * </p>
+ * 
+ * @author Patrick Harms
+ */
+public class HTTPUtils {
+
+    /**
+     * <p>
+     * converts an address to a simple string containing either host or ip and the port number
+     * if any.
+     * </p>
+     * 
+     * @param address the address to convert
+     * 
+     * @return either "host:port" or "ip:port" or "host" or "ip" or "port" or null
+     */
+    public static String toString(Address address) {
+        if (address != null) {
+            StringBuffer buffer = new StringBuffer();
+            String prefix = "";
+            if (address.getHost() != null) {
+                buffer.append(address.getHost());
+                prefix = ":";
+            }
+            else if (address.getIp() != null) {
+                buffer.append(prefix);
+                buffer.append(address.getIp());
+                prefix = ":";
+            }
+
+            if (address.getPort() != null) {
+                buffer.append(prefix);
+                buffer.append(address.getPort());
+            }
+
+            if (buffer.length() > 0) {
+                return buffer.toString();
+            }
+        }
+
+        return null;
+    }
+    
+    /**
+     * <p>
+     * prevent instantiation
+     * </p>
+     */
+    private HTTPUtils() { }
+    
+}
Index: /trunk/autoquest-plugin-http/src/main/java/de/ugoe/cs/autoquest/plugin/http/commands/CMDparseDirHTTP.java
===================================================================
--- /trunk/autoquest-plugin-http/src/main/java/de/ugoe/cs/autoquest/plugin/http/commands/CMDparseDirHTTP.java	(revision 1367)
+++ /trunk/autoquest-plugin-http/src/main/java/de/ugoe/cs/autoquest/plugin/http/commands/CMDparseDirHTTP.java	(revision 1367)
@@ -0,0 +1,121 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.autoquest.plugin.http.commands;
+
+import java.io.File;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+import java.util.logging.Level;
+
+import de.ugoe.cs.autoquest.CommandHelpers;
+import de.ugoe.cs.autoquest.eventcore.Event;
+import de.ugoe.cs.autoquest.plugin.http.HTTPLogParser;
+import de.ugoe.cs.util.console.Command;
+import de.ugoe.cs.util.console.Console;
+import de.ugoe.cs.util.console.GlobalDataContainer;
+
+/**
+ * <p>
+ * Command that tries to parse all files in a folder as if they were log files generated by the
+ * HTMLMonitor. The result is one set of sequences for all files (not one set of sequences for each
+ * file!).
+ * </p>
+ * 
+ * @author Patrick Harms
+ * @version 1.0
+ */
+public class CMDparseDirHTTP implements Command {
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+     */
+    @Override
+    public void run(List<Object> parameters) {
+        String directory = null;
+        String sequencesName = "sequences";
+
+        try {
+            directory = (String) parameters.get(0);
+            if (parameters.size() >= 2) {
+                sequencesName = (String) parameters.get(1);
+            }
+        }
+        catch (Exception e) {
+            throw new IllegalArgumentException("missing parameter for directory");
+        }
+
+        File folder = new File(directory);
+        if (!folder.isDirectory()) {
+            Console.printerrln(directory + " is not a directory");
+            return;
+        }
+
+        HTTPLogParser parser = new HTTPLogParser();
+
+        parseFile(folder, parser);
+
+        Collection<List<Event>> sequences = parser.getSequences();
+
+        if (GlobalDataContainer.getInstance().addData(sequencesName, sequences)) {
+            CommandHelpers.dataOverwritten(sequencesName);
+        }
+    }
+
+    /**
+     * <p>
+     * recursive method for parsing a directory structures
+     * </p>
+     *
+     * @param file   the file object to be parsed. If the file is a folder, the method calls itself
+     *               for all children
+     * @param parser the parser to use for parsing the files.
+     */
+    private void parseFile(File file, HTTPLogParser parser) {
+        if (file.isDirectory()) {
+            String[] children = file.list();
+            Arrays.sort(children);
+            
+            for (String child : children) {
+                File childFile = new File(file, child);
+                parseFile(childFile, parser);
+            }
+        }
+        else if (file.isFile()) {
+            String source = file.getAbsolutePath();
+            Console.traceln(Level.INFO, "Processing file: " + source);
+
+            try {
+                parser.parseFile(file);
+            }
+            catch (Exception e) {
+                Console.printerrln("Could not parse " + source + ": " + e.getMessage());
+            }
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see de.ugoe.cs.util.console.Command#help()
+     */
+    @Override
+    public String help() {
+        return "parseDirHTTP <directory> [<sequencesName>]";
+    }
+
+}
Index: /trunk/autoquest-plugin-http/src/main/java/de/ugoe/cs/autoquest/plugin/http/commands/CMDparseHTTP.java
===================================================================
--- /trunk/autoquest-plugin-http/src/main/java/de/ugoe/cs/autoquest/plugin/http/commands/CMDparseHTTP.java	(revision 1367)
+++ /trunk/autoquest-plugin-http/src/main/java/de/ugoe/cs/autoquest/plugin/http/commands/CMDparseHTTP.java	(revision 1367)
@@ -0,0 +1,84 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.autoquest.plugin.http.commands;
+
+import java.util.Collection;
+import java.util.List;
+
+import de.ugoe.cs.autoquest.CommandHelpers;
+import de.ugoe.cs.autoquest.eventcore.Event;
+import de.ugoe.cs.autoquest.plugin.http.HTTPLogParser;
+import de.ugoe.cs.util.console.Command;
+import de.ugoe.cs.util.console.Console;
+import de.ugoe.cs.util.console.GlobalDataContainer;
+
+/**
+ * <p>
+ * Command to parse a file with sessions monitored by AutoQUESTs HTTP monitor.
+ * </p>
+ * 
+ * @author Patrick Harms
+ * @version 1.0
+ */
+public class CMDparseHTTP implements Command {
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+     */
+    @Override
+    public void run(List<Object> parameters) {
+        String filename = null;
+        String sequencesName = "sequences";
+
+        try {
+            filename = (String) parameters.get(0);
+            if (parameters.size() >= 2) {
+                sequencesName = (String) parameters.get(1);
+            }
+        }
+        catch (Exception e) {
+            throw new IllegalArgumentException("missing parameter for file name");
+        }
+
+        HTTPLogParser parser = new HTTPLogParser();
+
+        try {
+            parser.parseFile(filename);
+        }
+        catch (Exception e) {
+            Console.printerrln("Could not parse " + filename + ": " + e.getMessage());
+            return;
+        }
+
+        Collection<List<Event>> sequences = parser.getSequences();
+
+        if (GlobalDataContainer.getInstance().addData(sequencesName, sequences)) {
+            CommandHelpers.dataOverwritten(sequencesName);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see de.ugoe.cs.util.console.Command#help()
+     */
+    @Override
+    public String help() {
+        return "parseHTTP <filename> [<sequencesName>]";
+    }
+
+}
Index: /trunk/autoquest-plugin-http/src/main/java/de/ugoe/cs/autoquest/plugin/http/eventcore/HTTPEventType.java
===================================================================
--- /trunk/autoquest-plugin-http/src/main/java/de/ugoe/cs/autoquest/plugin/http/eventcore/HTTPEventType.java	(revision 1367)
+++ /trunk/autoquest-plugin-http/src/main/java/de/ugoe/cs/autoquest/plugin/http/eventcore/HTTPEventType.java	(revision 1367)
@@ -0,0 +1,128 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.autoquest.plugin.http.eventcore;
+
+import de.ugoe.cs.autoquest.eventcore.IEventType;
+import de.ugoe.cs.autoquest.httpmonitor.exchange.HttpExchange;
+import de.ugoe.cs.autoquest.plugin.http.HTTPUtils;
+
+/**
+ * <p>
+ * TODO comment
+ * </p>
+ * 
+ * @author Patrick Harms
+ */
+public class HTTPEventType implements IEventType {
+
+    /**  */
+    private static final long serialVersionUID = 1L;
+
+    /** */
+    private HttpExchange exchange;
+
+    /** */
+    private String name;
+
+    /**
+     *
+     */
+    public HTTPEventType(HttpExchange exchange) {
+        if (exchange == null) {
+            throw new IllegalArgumentException("exchange must not be null");
+        }
+        
+        this.exchange = exchange;
+        
+        StringBuffer nameBuffer = new StringBuffer("HTTPEvent");
+        
+        boolean somethingAdded = false;
+        
+        if ((this.exchange.getRequest() != null) &&
+            (this.exchange.getRequest().getMethod() != null))
+        {
+            nameBuffer.append("(");
+            nameBuffer.append(this.exchange.getRequest().getMethod());
+            somethingAdded = true;
+        }
+        
+        String senderStr = HTTPUtils.toString(this.exchange.getSender());
+        String receiverStr = HTTPUtils.toString(this.exchange.getReceiver());
+        
+        if ((senderStr != null) && (receiverStr != null)) {
+            nameBuffer.append(somethingAdded ? ", " : "(");
+            nameBuffer.append(senderStr);
+            nameBuffer.append(" --> ");
+            nameBuffer.append(receiverStr);
+            somethingAdded = true;
+        }
+        else if (senderStr != null) {
+            nameBuffer.append(somethingAdded ? ", " : "(");
+            nameBuffer.append(senderStr);
+            somethingAdded = true;
+        }
+        else if (receiverStr != null) {
+            nameBuffer.append(somethingAdded ? ", " : "(");
+            nameBuffer.append(receiverStr);
+            somethingAdded = true;
+        }
+        
+        if (somethingAdded) {
+            nameBuffer.append(")");
+        }
+        
+        this.name = nameBuffer.toString();
+    }
+
+    /* (non-Javadoc)
+     * @see de.ugoe.cs.autoquest.eventcore.IEventType#getName()
+     */
+    @Override
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * @return the exchange
+     */
+    public HttpExchange getExchange() {
+        return exchange;
+    }
+
+    /* (non-Javadoc)
+     * @see java.lang.Object#toString()
+     */
+    @Override
+    public String toString() {
+        return name;
+    }
+
+    /* (non-Javadoc)
+     * @see java.lang.Object#equals(java.lang.Object)
+     */
+    @Override
+    public boolean equals(Object obj) {
+        return super.equals(obj);
+    }
+
+    /* (non-Javadoc)
+     * @see java.lang.Object#hashCode()
+     */
+    @Override
+    public int hashCode() {
+        return super.hashCode();
+    }
+
+}
Index: /trunk/autoquest-plugin-http/src/main/java/de/ugoe/cs/autoquest/plugin/http/eventcore/HTTPTarget.java
===================================================================
--- /trunk/autoquest-plugin-http/src/main/java/de/ugoe/cs/autoquest/plugin/http/eventcore/HTTPTarget.java	(revision 1367)
+++ /trunk/autoquest-plugin-http/src/main/java/de/ugoe/cs/autoquest/plugin/http/eventcore/HTTPTarget.java	(revision 1367)
@@ -0,0 +1,87 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.autoquest.plugin.http.eventcore;
+
+import de.ugoe.cs.autoquest.eventcore.IEventTarget;
+import de.ugoe.cs.autoquest.httpmonitor.exchange.Address;
+import de.ugoe.cs.autoquest.plugin.http.HTTPUtils;
+
+/**
+ * <p>
+ * TODO comment
+ * </p>
+ * 
+ * @author Patrick Harms
+ */
+public class HTTPTarget implements IEventTarget {
+
+    /**  */
+    private static final long serialVersionUID = 1L;
+    
+    /** */
+    private Address receiver;
+
+    /** */
+    private String stringIdentifier;
+
+    /**
+     *
+     */
+    public HTTPTarget(Address receiver) {
+        this.receiver = receiver;
+        this.stringIdentifier = HTTPUtils.toString(this.receiver);
+    }
+
+    /* (non-Javadoc)
+     * @see de.ugoe.cs.autoquest.eventcore.IEventTarget#getPlatform()
+     */
+    @Override
+    public String getPlatform() {
+        return "HTTP";
+    }
+
+    /* (non-Javadoc)
+     * @see de.ugoe.cs.autoquest.eventcore.IEventTarget#getStringIdentifier()
+     */
+    @Override
+    public String getStringIdentifier() {
+        return stringIdentifier;
+    }
+
+    /* (non-Javadoc)
+     * @see java.lang.Object#equals(java.lang.Object)
+     */
+    @Override
+    public boolean equals(Object obj) {
+        if (obj == this) {
+            return true;
+        }
+        else if (obj instanceof HTTPTarget) {
+            return stringIdentifier.equals(((HTTPTarget) obj).stringIdentifier);
+        }
+        else {
+            return false;
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see java.lang.Object#hashCode()
+     */
+    @Override
+    public int hashCode() {
+        return stringIdentifier.hashCode();
+    }
+
+}
Index: /trunk/autoquest-plugin-http/src/main/resources/HttpExchangeStructure.xsd
===================================================================
--- /trunk/autoquest-plugin-http/src/main/resources/HttpExchangeStructure.xsd	(revision 1367)
+++ /trunk/autoquest-plugin-http/src/main/resources/HttpExchangeStructure.xsd	(revision 1367)
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema
+  targetNamespace="http://autoquest.informatik.uni-goettingen.de"
+  xmlns:tns="http://autoquest.informatik.uni-goettingen.de"
+  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+  xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
+  jxb:version="2.0"
+  elementFormDefault="qualified">
+  
+  <xsd:element name="httpExchange" type="tns:HttpExchange" />
+
+  <xsd:complexType name="HttpExchange">
+    <xsd:sequence>
+      <xsd:element name="sender" type="tns:Address" />
+      <xsd:element name="receiver" type="tns:Address" />
+      <xsd:element name="request" type="tns:HttpRequest" />
+      <xsd:element name="response" type="tns:HttpResponse" />
+    </xsd:sequence>
+    <xsd:attribute name="status" use="required" type="tns:Status" />
+  </xsd:complexType>
+
+  <xsd:complexType name="HttpRequest">
+    <xsd:sequence>
+      <xsd:element name="headers" type="tns:Headers" minOccurs="0" maxOccurs="1" />
+      <xsd:element name="cookies" type="tns:Cookies" minOccurs="0" maxOccurs="1" />
+      <xsd:element name="authType" type="xsd:string" minOccurs="0" maxOccurs="1" />
+      <xsd:element name="remoteUser" type="xsd:string" minOccurs="0" maxOccurs="1" />
+      <xsd:element name="requestedSessionId" type="xsd:string" minOccurs="0" maxOccurs="1" />
+      <xsd:element name="content" type="tns:Content" minOccurs="0" maxOccurs="1" />
+    </xsd:sequence>
+    <xsd:attribute name="method" use="required" type="tns:Method" />
+    <xsd:attribute name="protocol" use="required" type="tns:Protocol" />
+    <xsd:attribute name="url" use="required" type="xsd:anyURI" />
+    <xsd:attribute name="query" type="xsd:string" />
+  </xsd:complexType>
+
+  <xsd:complexType name="HttpResponse">
+    <xsd:sequence>
+      <xsd:element name="headers" type="tns:Headers" minOccurs="0" maxOccurs="1" />
+      <xsd:element name="content" type="tns:Content" minOccurs="0" maxOccurs="1" />
+    </xsd:sequence>
+    <xsd:attribute name="status" use="required" type="xsd:integer" />
+  </xsd:complexType>
+
+  <xsd:complexType name="Address">
+    <xsd:sequence>
+      <xsd:element name="ip" type="xsd:string" />
+      <xsd:element name="host" type="xsd:string" />
+      <xsd:element name="port" type="xsd:integer" />
+    </xsd:sequence>
+  </xsd:complexType>
+
+  <xsd:complexType name="Cookies">
+    <xsd:sequence>
+      <xsd:element name="cookie" type="tns:Cookie" minOccurs="1" maxOccurs="unbounded" />
+    </xsd:sequence>
+  </xsd:complexType>
+
+  <xsd:complexType name="Cookie">
+    <xsd:attribute name="comment" type="xsd:string" />
+    <xsd:attribute name="domain" type="xsd:string" />
+    <xsd:attribute name="maxAge" type="xsd:integer" />
+    <xsd:attribute name="name" type="xsd:string" />
+    <xsd:attribute name="path" type="xsd:string" />
+    <xsd:attribute name="isHttpOnly" type="xsd:boolean" />
+    <xsd:attribute name="isSecure" type="xsd:boolean" />
+    <xsd:attribute name="value" type="xsd:string" />
+    <xsd:attribute name="version" type="xsd:integer" />
+  </xsd:complexType>
+
+  <xsd:complexType name="Headers">
+    <xsd:sequence>
+      <xsd:element name="header" type="tns:Header" minOccurs="1" maxOccurs="unbounded" />
+    </xsd:sequence>
+  </xsd:complexType>
+
+  <xsd:complexType name="Header">
+    <xsd:attribute name="key" use="required" type="xsd:string" />
+    <xsd:attribute name="value" use="required" type="xsd:string" />
+  </xsd:complexType>
+
+  <xsd:complexType name="Content">
+    <xsd:sequence>
+      <xsd:element name="data" type="xsd:string" />
+    </xsd:sequence>
+    <xsd:attribute name="encoding" use="required" type="xsd:string" />
+    <xsd:attribute name="type" use="required" type="xsd:string" />
+    <xsd:attribute name="length" use="required" type="xsd:long" />
+  </xsd:complexType>
+
+  <xsd:simpleType name="Method">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="OPTIONS"/>
+      <xsd:enumeration value="GET"/>
+      <xsd:enumeration value="HEAD"/>
+      <xsd:enumeration value="POST"/>
+      <xsd:enumeration value="PUT"/>
+      <xsd:enumeration value="DELETE"/>
+      <xsd:enumeration value="TRACE"/>
+      <xsd:enumeration value="CONNECT"/>
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="Protocol">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="HTTP/1.0"/>
+      <xsd:enumeration value="HTTP/1.1"/>
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="Status">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="success"/>
+      <xsd:enumeration value="failure"/>
+      <xsd:enumeration value="timeout"/>
+    </xsd:restriction>
+  </xsd:simpleType>
+
+</xsd:schema>
Index: /trunk/autoquest-plugin-http/src/main/resources/HttpSession.xsd
===================================================================
--- /trunk/autoquest-plugin-http/src/main/resources/HttpSession.xsd	(revision 1367)
+++ /trunk/autoquest-plugin-http/src/main/resources/HttpSession.xsd	(revision 1367)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema
+  targetNamespace="http://autoquest.informatik.uni-goettingen.de"
+  xmlns:tns="http://autoquest.informatik.uni-goettingen.de"
+  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+  xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
+  jxb:version="2.0"
+  elementFormDefault="qualified">
+  
+  <xsd:import
+    namespace="http://autoquest.informatik.uni-goettingen.de"
+    schemaLocation="HttpExchangeStructure.xsd" />
+  
+  <xsd:element name="session" type="tns:Session" />
+
+  <xsd:complexType name="Session">
+    <xsd:sequence>
+      <xsd:element name="httpExchange" type="tns:HttpExchange" minOccurs="0" maxOccurs="unbounded" />
+    </xsd:sequence>
+  </xsd:complexType>
+
+</xsd:schema>
