1 /*
2 wsmo4j - a WSMO API and Reference Implementation
3
4 Copyright (c) 2004-2005, OntoText Lab. / SIRMA
5
6 This library is free software; you can redistribute it and/or modify it under
7 the terms of the GNU Lesser General Public License as published by the Free
8 Software Foundation; either version 2.1 of the License, or (at your option)
9 any later version.
10 This library is distributed in the hope that it will be useful, but WITHOUT
11 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13 details.
14 You should have received a copy of the GNU Lesser General Public License along
15 with this library; if not, write to the Free Software Foundation, Inc.,
16 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
18
19 /**
20 * <p>Title: WSMO4J</p>
21 * <p>Description: WSMO API and a Reference Implementation</p>
22 * <p>Copyright: Copyright (c) 2004-2005</p>
23 * <p>Company: OntoText Lab. / SIRMA </p>
24 */
25
26 package org.wsmo.service;
27
28
29 import java.util.*;
30
31 import org.omwg.ontology.*;
32 import org.wsmo.common.*;
33 import org.wsmo.common.exception.*;
34
35
36 /**
37 * An interface representing a web service
38 * capability.
39 *
40 * @author not attributable
41 * @version $Revision: 1946 $ $Date: 2007-04-02 15:13:28 +0300 (Mon, 02 Apr 2007) $
42 */
43
44 public interface Capability
45 extends TopEntity {
46
47 /**
48 * Adds a new shared variable to the list of
49 * variables used by the logical expressions of this capability.
50 * @param var The variable to be added
51 * @throws org.wsmo.common.exception.SynchronisationException
52 * @throws org.wsmo.common.exception.InvalidModelException
53 * @see #removeSharedVariable(Variable var)
54 * @see #removeSharedVariable(String name)
55 */
56 void addSharedVariable(Variable var)
57 throws SynchronisationException, InvalidModelException;
58
59 /**
60 * Removes a shared variable from the list of
61 * variables used by the logical expressions of this capability.
62 * @param var The variable to be removed.
63 * @throws org.wsmo.common.exception.SynchronisationException
64 * @throws org.wsmo.common.exception.InvalidModelException
65 * @see #removeSharedVariable(String name)
66 */
67 void removeSharedVariable(Variable var)
68 throws SynchronisationException, InvalidModelException;
69
70 /**
71 * Removes a shared variable from the list of
72 * variables used by the logical expressions of this capability.
73 * @param name The name of the variable to be removed.
74 * @throws org.wsmo.common.exception.SynchronisationException
75 * @throws org.wsmo.common.exception.InvalidModelException
76 * @see #removeSharedVariable(Variable var)
77 */
78 void removeSharedVariable(String name)
79 throws SynchronisationException, InvalidModelException;
80
81 /**
82 * returns the set of shared variables used by the logical expressions of this capability.
83 * @return The set of shared variables
84 * @throws org.wsmo.common.exception.SynchronisationException
85 * @see org.omwg.ontology.Variable
86 */
87 Set <Variable> listSharedVariables()
88 throws SynchronisationException;
89
90 /**
91 * Adds a new post-condition to the list of
92 * post-conditions associated with this capability.
93 * @param axiom The new post-condition to be added
94 * to the lsit of post-conditions associated with this
95 * capability.
96 * @throws org.wsmo.common.exception.SynchronisationException
97 * @throws org.wsmo.common.exception.InvalidModelException
98 * @see #removePostCondition(Axiom axiom)
99 * @see #removePostCondition(Identifier id)
100 */
101 void addPostCondition(Axiom axiom)
102 throws SynchronisationException, InvalidModelException;
103
104 /**
105 * Removes a post-condition from the list of
106 * post-conditions associated with this capability.
107 * @param axiom The post-condition to be removed.
108 * @throws org.wsmo.common.exception.SynchronisationException
109 * @throws org.wsmo.common.exception.InvalidModelException
110 * @see #removePostCondition(Identifier id)
111 */
112 void removePostCondition(Axiom axiom)
113 throws SynchronisationException, InvalidModelException;
114
115 /**
116 * Removes a post-condition from the list of
117 * post-conditions associated with this capability.
118 * @param id The ID of post-condition to be removed.
119 * @throws org.wsmo.common.exception.SynchronisationException
120 * @throws org.wsmo.common.exception.InvalidModelException
121 * @see #removePostCondition(Axiom axiom)
122 */
123 void removePostCondition(Identifier id)
124 throws SynchronisationException, InvalidModelException;
125
126 /**
127 * Returns the list of post-conditions associated
128 * with this capability.
129 * @return The set of post-conditions
130 * associated with this capability.
131 * @throws org.wsmo.common.exception.SynchronisationException
132 * @see org.omwg.ontology.Axiom
133 */
134 Set <Axiom> listPostConditions()
135 throws SynchronisationException;
136
137 /**
138 * Adds a pre-condition to the list of pre-conditions
139 * of this capability.
140 * @param axiom The pre-condition to be added
141 * to the list of pre-conditions of this capability.
142 * @throws org.wsmo.common.exception.SynchronisationException
143 * @throws org.wsmo.common.exception.InvalidModelException
144 * @see #removePreCondition(Axiom axiom)
145 * @see #removePreCondition(Identifier id)
146 */
147 void addPreCondition(Axiom axiom)
148 throws SynchronisationException, InvalidModelException;
149
150 /**
151 * Removes a pre-condition from the list of pre-conditions
152 * associated with this capability.
153 * @param axiom The pre-condition to be removed
154 * from the list.
155 * @throws org.wsmo.common.exception.SynchronisationException
156 * @throws org.wsmo.common.exception.InvalidModelException
157 * @see #removePreCondition(Identifier id)
158 */
159 void removePreCondition(Axiom axiom)
160 throws SynchronisationException, InvalidModelException;
161
162 /**
163 * Removes a pre-condition from the list of pre-conditions
164 * associated with this capability.
165 * @param id The ID of the pre-condition to be removed
166 * from the list.
167 * @throws org.wsmo.common.exception.SynchronisationException
168 * @throws org.wsmo.common.exception.InvalidModelException
169 * @see #removePreCondition(Axiom axiom)
170 */
171 void removePreCondition(Identifier id)
172 throws SynchronisationException, InvalidModelException;
173
174 /**
175 * Lists the pre-conditions of this capability.
176 * @return The list of pre-conditions of this
177 * capability.
178 * @throws org.wsmo.common.exception.SynchronisationException
179 * @see org.omwg.ontology.Axiom
180 */
181 Set <Axiom> listPreConditions()
182 throws SynchronisationException;
183
184 /**
185 * Adds an effect to the list of effects of this
186 * capability.
187 * @param axiom The effect to be added to the list
188 * of effects of this capability.
189 * @throws org.wsmo.common.exception.SynchronisationException
190 * @throws org.wsmo.common.exception.InvalidModelException
191 * @see #removeEffect(Axiom axiom)
192 * @see #removeEffect(Identifier id)
193 */
194 void addEffect(Axiom axiom)
195 throws SynchronisationException, InvalidModelException;
196
197 /**
198 * Removes an effect from the list of effects
199 * associated with this capability.
200 * @param axiom The effect to be removed from
201 * the list.
202 * @throws org.wsmo.common.exception.SynchronisationException
203 * @throws org.wsmo.common.exception.InvalidModelException
204 * @see #removeEffect(Identifier id)
205 */
206 void removeEffect(Axiom axiom)
207 throws SynchronisationException, InvalidModelException;
208
209 /**
210 * Removes an effect from the list of effects
211 * associated with this capability.
212 * @param id The ID of the effect to be removed from
213 * the list.
214 * @throws org.wsmo.common.exception.SynchronisationException
215 * @throws org.wsmo.common.exception.InvalidModelException
216 * @see #removeEffect(Axiom axiom)
217 */
218 void removeEffect(Identifier id)
219 throws SynchronisationException, InvalidModelException;
220
221 /**
222 * Lists the effects of this capability.
223 * @return The list of effects that this capability
224 * produces.
225 * @throws org.wsmo.common.exception.SynchronisationException
226 * @see org.omwg.ontology.Axiom
227 */
228 Set <Axiom> listEffects()
229 throws SynchronisationException;
230
231 /**
232 * Adds an assumption to the list of assumptions
233 * associated with this capability.
234 * @param axiom The new assumption to be added
235 * to the list.
236 * @throws org.wsmo.common.exception.SynchronisationException
237 * @throws org.wsmo.common.exception.InvalidModelException
238 * @see #removeAssumption(Axiom axiom)
239 * @see #removeAssumption(Identifier id)
240 */
241 void addAssumption(Axiom axiom)
242 throws SynchronisationException, InvalidModelException;
243
244 /**
245 * Removes an assumption from the list of assumptions associated with this capability.
246 * @param axiom The assumption to be removed from the list of assumtions.
247 * @throws org.wsmo.common.exception.SynchronisationException
248 * @throws org.wsmo.common.exception.InvalidModelException
249 * @see #removeAssumption(Identifier id)
250 */
251 void removeAssumption(Axiom axiom)
252 throws SynchronisationException, InvalidModelException;
253
254 /**
255 * Removes an assumption from the list of assumptions
256 * associated with this capability.
257 * @param id The ID of the assumption to be removed
258 * from the list of assumtions.
259 * @throws org.wsmo.common.exception.SynchronisationException
260 * @throws org.wsmo.common.exception.InvalidModelException
261 * @see #removeAssumption(Axiom axiom)
262 */
263 void removeAssumption(Identifier id)
264 throws SynchronisationException, InvalidModelException;
265
266 /**
267 * Lists the assumptions associated with
268 * this capability.
269 * @return The list of assumptions associated
270 * with this capability.
271 * @throws org.wsmo.common.exception.SynchronisationException
272 * @see org.omwg.ontology.Axiom
273 */
274 Set <Axiom> listAssumptions()
275 throws SynchronisationException;
276 }
277
278 /*
279 * $Log$
280 * Revision 1.10 2007/04/02 12:13:14 morcen
281 * Generics support added to wsmo-api, wsmo4j and wsmo-test
282 *
283 * Revision 1.9 2005/06/01 10:59:58 marin_dimitrov
284 * v0.4.0
285 *
286 * Revision 1.8 2005/05/13 12:47:06 marin
287 * more @see tags
288 *
289 * Revision 1.7 2005/05/13 09:24:38 alex
290 * listSharedVariables() does not throw InvalidModelException anymore
291 *
292 * Revision 1.6 2005/05/12 14:43:43 marin
293 * added @see links
294 *
295 * Revision 1.5 2005/05/12 10:11:05 marin
296 * added javadocs, proper formatting, etc
297 *
298 */