// Copyright 2015 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.genericevents; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStreamWriter; import java.io.PrintWriter; import java.util.HashMap; import java.util.HashSet; import java.util.LinkedList; import java.util.List; import java.util.ListIterator; import java.util.Map; import java.util.Set; import org.apache.commons.io.FileUtils; import org.xml.sax.Attributes; import org.xml.sax.SAXException; import de.ugoe.cs.util.StringTools; import de.ugoe.cs.util.console.Console; /** *
* TODO comment *
* * @author Patrick Harms */ public class GenericEventLogSplitter extends AbstractDefaultLogParser { /** */ private Attributes sessionAttributes = null; /** */ private Map* TODO: comment *
* * @param event * @param out */ private void logEvent(Event event, PrintWriter out) { out.print("* TODO: comment *
* * @param targetId * @param out */ private void logTarget(String targetId, PrintWriter out) { Map* TODO: comment *
* * @param key * @param value * @param out */ private void logParam(String key, String value, PrintWriter out) { out.print(" "); } /* (non-Javadoc) * @see de.ugoe.cs.autoquest.plugin.genericevents.AbstractDefaultLogParser#startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes) */ @Override public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException { super.startElement(uri, localName, qName, atts); if (qName.equals("session")) { sessionAttributes = atts; } } /* (non-Javadoc) * @see de.ugoe.cs.autoquest.plugin.genericevents.AbstractDefaultLogParser#handleTarget(java.lang.String, java.util.Map) */ @Override protected boolean handleTarget(String id, Map* TODO comment *
* * @author Patrick Harms */ public class Event { private String type; private Map* TODO: comment *
* * @param type * @param parameters */ public Event(String type, Map* TODO: comment *
* */ public long getTimestamp() { return Long.parseLong(parameters.get("timestamp")); } /** ** TODO: comment *
* */ public Map* TODO: comment *
* */ public String getType() { return type; } /** ** TODO: comment *
* * @param key */ public String getParameter(String key) { return parameters.get(key); } } }