[927] | 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 |
|
---|
[922] | 15 | package de.ugoe.cs.autoquest.plugin.guitar;
|
---|
[204] | 16 |
|
---|
[922] | 17 | import de.ugoe.cs.autoquest.IReplayDecorator;
|
---|
[204] | 18 | import de.ugoe.cs.util.StringTools;
|
---|
| 19 |
|
---|
| 20 | /**
|
---|
| 21 | * <p>
|
---|
| 22 | * {@link IReplayDecorator} for replays generated for the GUITAR suite.
|
---|
| 23 | * </p>
|
---|
| 24 | *
|
---|
| 25 | * @author Steffen Herbold
|
---|
| 26 | * @version 1.0
|
---|
| 27 | */
|
---|
| 28 | public class EFGReplayDecorator implements IReplayDecorator {
|
---|
| 29 |
|
---|
| 30 | /**
|
---|
| 31 | * <p>
|
---|
| 32 | * Id for object serialization.
|
---|
| 33 | * </p>
|
---|
| 34 | */
|
---|
| 35 | private static final long serialVersionUID = 1L;
|
---|
| 36 |
|
---|
| 37 | /**
|
---|
| 38 | * <p>
|
---|
| 39 | * The instance of the {@link EFGReplayDecorator} (implemented as
|
---|
| 40 | * singleton).
|
---|
| 41 | * </p>
|
---|
| 42 | */
|
---|
| 43 | transient private static EFGReplayDecorator theInstance;
|
---|
| 44 |
|
---|
| 45 | /**
|
---|
| 46 | * <p>
|
---|
| 47 | * Constructor. Private to guarantee that only one instance of the replay
|
---|
| 48 | * generator exists.
|
---|
| 49 | * </p>
|
---|
| 50 | */
|
---|
| 51 | private EFGReplayDecorator() {
|
---|
| 52 | };
|
---|
| 53 |
|
---|
| 54 | /**
|
---|
| 55 | * <p>
|
---|
| 56 | * Returns the instance of the MFCReplayDecorator.
|
---|
| 57 | * </p>
|
---|
| 58 | *
|
---|
| 59 | * @return instance of the MFCReplayDecorator.
|
---|
| 60 | */
|
---|
| 61 | public static EFGReplayDecorator getInstance() {
|
---|
| 62 | if (theInstance == null) {
|
---|
| 63 | theInstance = new EFGReplayDecorator();
|
---|
| 64 | }
|
---|
| 65 | return theInstance;
|
---|
| 66 | }
|
---|
| 67 |
|
---|
| 68 | /*
|
---|
| 69 | * (non-Javadoc)
|
---|
| 70 | *
|
---|
[922] | 71 | * @see de.ugoe.cs.autoquest.IReplayDecorator#getHeader()
|
---|
[204] | 72 | */
|
---|
| 73 | @Override
|
---|
| 74 | public String getHeader() {
|
---|
| 75 | return "<?xml version=\"1.0\" encoding=\"UTF-16\"?>"
|
---|
| 76 | + StringTools.ENDLINE + "<TestCase>" + StringTools.ENDLINE;
|
---|
| 77 | }
|
---|
| 78 |
|
---|
| 79 | /*
|
---|
| 80 | * (non-Javadoc)
|
---|
| 81 | *
|
---|
[922] | 82 | * @see de.ugoe.cs.autoquest.IReplayDecorator#getFooter()
|
---|
[204] | 83 | */
|
---|
| 84 | @Override
|
---|
| 85 | public String getFooter() {
|
---|
| 86 | return "</TestCase>";
|
---|
| 87 | }
|
---|
| 88 |
|
---|
| 89 | /*
|
---|
| 90 | * (non-Javadoc)
|
---|
| 91 | *
|
---|
[922] | 92 | * @see de.ugoe.cs.autoquest.IReplayDecorator#getSessionHeader(int)
|
---|
[204] | 93 | */
|
---|
| 94 | @Override
|
---|
| 95 | public String getSessionHeader(int sessionId) {
|
---|
| 96 | return "";
|
---|
| 97 | }
|
---|
| 98 |
|
---|
| 99 | /*
|
---|
| 100 | * (non-Javadoc)
|
---|
| 101 | *
|
---|
[922] | 102 | * @see de.ugoe.cs.autoquest.IReplayDecorator#getSessionFooter(int)
|
---|
[204] | 103 | */
|
---|
| 104 | @Override
|
---|
| 105 | public String getSessionFooter(int sessionId) {
|
---|
| 106 | return "";
|
---|
| 107 | }
|
---|
| 108 |
|
---|
| 109 | }
|
---|