1 /*
2
3 WSMO Studio - a Semantic Web Service Editor
4
5 Copyright (c) 2004-2006, OntoText Lab. / SIRMA Group
6
7
8
9 This library is free software; you can redistribute it and/or modify it under
10
11 the terms of the GNU Lesser General Public License as published by the Free
12
13 Software Foundation; either version 2.1 of the License, or (at your option)
14
15 any later version.
16
17 This library is distributed in the hope that it will be useful, but WITHOUT
18
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
20
21 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
22
23 details.
24
25 You should have received a copy of the GNU Lesser General Public License along
26
27 with this library; if not, write to the Free Software Foundation, Inc.,
28
29 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30
31 */
32
33
34
35 /***
36
37 * <p>Title: WSMO Studio</p>
38
39 * <p>Description: Semantic Web Service Editor</p>
40
41 * <p>Copyright: Copyright (c) 2004-2006</p>
42
43 * <p>Company: OntoText Lab. / SIRMA </p>
44
45 */
46
47
48
49 package org.wsmostudio.ui.editors.model;
50
51
52
53 import org.wsmo.common.*;
54
55 import org.wsmo.common.exception.InvalidModelException;
56
57 import org.wsmo.mediator.Mediator;
58
59
60
61 public class MediatorModel extends TopEntityModel {
62
63
64
65 public MediatorModel(Mediator delegate) {
66
67 super(delegate);
68
69 }
70
71
72
73 public Mediator getMediator() {
74
75 return (Mediator)getAdapter(Mediator.class);
76
77 }
78
79
80
81 public void addSource(IRI sourceID)
82
83 throws InvalidModelException {
84
85 getMediator().addSource(sourceID);
86
87 setChanged();
88
89 }
90
91
92
93 public void removeSource(IRI sourceID)
94
95 throws InvalidModelException {
96
97 getMediator().removeSource(sourceID);
98
99 setChanged();
100
101 }
102
103
104
105 public void setTarget(IRI targetEntityID)
106
107 throws InvalidModelException {
108
109 getMediator().setTarget(targetEntityID);
110
111 setChanged();
112
113 }
114
115
116
117 public void setMediationService(IRI id)
118
119 throws InvalidModelException {
120
121 getMediator().setMediationService(id);
122
123 setChanged();
124
125 }
126
127 }
128
129
130
131 /*
132
133 * $Log: MediatorModel.java,v $
134 * Revision 1.4 2006/04/06 14:04:25 alex_simov
135 * wsmo-api update: mediators are now referred by IRIs instead of Object handles
136 *
137 * Revision 1.3 2006/01/09 12:51:14 alex_simov
138 * Copyright message in header updated
139 *
140 * Revision 1.2 2005/11/09 16:16:08 alex_simov
141 * UIModels notification improved
142 *
143 * Revision 1.1 2005/11/04 15:54:00 alex_simov
144 * wsmo4j entity UI models created
145 *
146
147 *
148
149 */
150