source: trunk/autoquest-plugin-jfc/src/main/java/de/ugoe/cs/autoquest/plugin/jfc/commands/CMDcorrectOldJFC.java @ 927

Last change on this file since 927 was 927, checked in by sherbold, 12 years ago
  • added copyright under the Apache License, Version 2.0
File size: 1.9 KB
Line 
1//   Copyright 2012 Georg-August-Universität Göttingen, Germany
2//
3//   Licensed under the Apache License, Version 2.0 (the "License");
4//   you may not use this file except in compliance with the License.
5//   You may obtain a copy of the License at
6//
7//       http://www.apache.org/licenses/LICENSE-2.0
8//
9//   Unless required by applicable law or agreed to in writing, software
10//   distributed under the License is distributed on an "AS IS" BASIS,
11//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12//   See the License for the specific language governing permissions and
13//   limitations under the License.
14
15package de.ugoe.cs.autoquest.plugin.jfc.commands;
16
17import java.util.List;
18
19import de.ugoe.cs.autoquest.plugin.jfc.JFCTraceCorrector;
20import de.ugoe.cs.util.console.Command;
21
22/**
23 * <p>
24 * Command to correct an XML file with sessions monitored by the older version of the
25 * EventBench's JFCMonitor which sometimes do not include correct event sources.
26 * </p>
27 *
28 * @author Patrick Harms
29 * @version 1.0
30 */
31public class CMDcorrectOldJFC implements Command {
32
33    /*
34     * (non-Javadoc)
35     *
36     * @see de.ugoe.cs.util.console.Command#run(java.util.List)
37     */
38    @Override
39    public void run(List<Object> parameters) {
40        String inputfilename;
41        String outputfilename;
42
43        try {
44            inputfilename = (String) parameters.get(0);
45            outputfilename = (String) parameters.get(1);
46        }
47        catch (Exception e) {
48            throw new IllegalArgumentException();
49        }
50
51        JFCTraceCorrector corrector = new JFCTraceCorrector();
52
53        corrector.correctFile(inputfilename, outputfilename);
54    }
55
56    /*
57     * (non-Javadoc)
58     *
59     * @see de.ugoe.cs.util.console.Command#help()
60     */
61    @Override
62    public String help() {
63        return "correctOldJFC <inputfilename> <outputfilename>";
64    }
65
66}
Note: See TracBrowser for help on using the repository browser.