01: /*
02: * Jacareto Copyright (c) 2002-2005
03: * Applied Computer Science Research Group, Darmstadt University of
04: * Technology, Institute of Mathematics & Computer Science,
05: * Ludwigsburg University of Education, and Computer Based
06: * Learning Research Group, Aachen University. All rights reserved.
07: *
08: * Jacareto is free software; you can redistribute it and/or
09: * modify it under the terms of the GNU General Public
10: * License as published by the Free Software Foundation; either
11: * version 2 of the License, or (at your option) any later version.
12: *
13: * Jacareto is distributed in the hope that it will be useful,
14: * but WITHOUT ANY WARRANTY; without even the implied warranty of
15: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16: * General Public License for more details.
17: *
18: * You should have received a copy of the GNU General Public
19: * License along with Jacareto; if not, write to the Free
20: * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21: *
22: */
23:
24: package jacareto.interactionmodel;
25:
26: import jacareto.struct.DialogStep;
27: import jacareto.struct.StructureElement;
28: import jacareto.system.Environment;
29:
30: /**
31: * The interaction-model elment that represents a "dialog-step "
32: *
33: * @author <a href="mailto:markus.bois@web.de">Markus Bois</a>
34: * @version 1.0
35: */
36: public class DialogStepElement extends InteractionModelElement {
37: /**
38: * Creates a new "dialog-step" interaction-model element.
39: *
40: * @param env the environment
41: */
42: public DialogStepElement(Environment env) {
43: this (env, "", null, "");
44: }
45:
46: /**
47: * Creates a new "dialog-step" interaction-model element.
48: *
49: * @param env the environment
50: * @param name the name of the interaction-model element
51: * @param children the child interaction-model elements
52: * @param id the id in the interaction-model
53: */
54: public DialogStepElement(Environment env, String name,
55: InteractionModelElement[] children, String id) {
56: super (env, name, children, id);
57: }
58:
59: /**
60: * Returns the name of the element.
61: *
62: * @return the name
63: */
64: public String getElementName() {
65: return language.getString("InteractionModel.DialogStep.Name");
66: }
67:
68: /**
69: * Returns a description of the element.
70: *
71: * @return the description
72: */
73: public String getElementDescription() {
74: return language
75: .getString("InteractionModel.DialogStep.Description");
76: }
77:
78: /**
79: * Returns a String which describes the content of the element shortly.
80: *
81: * @return a string with a short description of the element
82: */
83: public String toShortString() {
84: return getName() + " (" + getElementName() + ")";
85: }
86:
87: /**
88: * Returns the interaction model element of the struct element representation
89: *
90: * @return a {@link jacareto.struct.StructureElement} that is a interaction-model structure
91: */
92: public StructureElement getStructElement() {
93: return new DialogStep(getEnvironment(), null, getName(),
94: getID());
95: }
96: }
|