Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
GroundingChangeEvent |
|
| 1.0;1 |
1 | /* | |
2 | wsmo4j - a WSMO API and Reference Implementation | |
3 | ||
4 | Copyright (c) 2004-2007, 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 | package org.wsmo.grounding.sawsdl.events; | |
20 | ||
21 | import javax.xml.namespace.QName; | |
22 | ||
23 | /** | |
24 | * An event indicating an addition or removal of semantic model annotations. | |
25 | * | |
26 | */ | |
27 | public class GroundingChangeEvent { | |
28 | ||
29 | public static final int ADD_ACTION = 1; | |
30 | public static final int REMOVE_ACTION = 2; | |
31 | ||
32 | public static final int MODEL_REF = 101; | |
33 | public static final int LOWERING_REF = 102; | |
34 | public static final int LIFTING_REF = 102; | |
35 | ||
36 | /** | |
37 | * @uml.property name="action" | |
38 | */ | |
39 | 0 | private int action = -1; |
40 | /** | |
41 | * @uml.property name="type" | |
42 | */ | |
43 | 0 | private int type = -1; |
44 | /** | |
45 | * @uml.property name="wsdlName" | |
46 | */ | |
47 | 0 | private QName wsdlName = null; |
48 | /** | |
49 | * @uml.property name="modelRef" | |
50 | */ | |
51 | 0 | private Object modelRef = null; |
52 | ||
53 | 0 | private GroundingChangeEvent() { |
54 | 0 | } |
55 | ||
56 | 0 | public GroundingChangeEvent(int action, int type, QName wsdlName, Object ref) { |
57 | 0 | this.action = action; |
58 | 0 | this.type = type; |
59 | 0 | this.wsdlName = wsdlName; |
60 | 0 | this.modelRef = ref; |
61 | 0 | } |
62 | ||
63 | /** | |
64 | * The type of the performed action (ADD_ACTION or REMOVE_ACTION). | |
65 | * @return Returns the action type. | |
66 | */ | |
67 | public int getAction() { | |
68 | 0 | return action; |
69 | } | |
70 | ||
71 | ||
72 | /** | |
73 | * The type of the grounding element which has been added or removed | |
74 | * (MODEL_REF, LOWERING_REF or LIFTING_REF). | |
75 | * @return Returns the type of the grounding element | |
76 | */ | |
77 | public int getType() { | |
78 | 0 | return type; |
79 | } | |
80 | ||
81 | /** | |
82 | * The WSDL or XML Schema element to which the grounding element belongs. | |
83 | * @return Returns the WSDL or XML Schema element name | |
84 | * @uml.property name="wsdlName" | |
85 | */ | |
86 | public QName getWsdlName() { | |
87 | 0 | return wsdlName; |
88 | } | |
89 | ||
90 | /** | |
91 | * The target of grounding element which has been changed. | |
92 | * @return Returns reference id (IRI) or schema reference (URI) | |
93 | * @uml.property name="modelRef" | |
94 | */ | |
95 | public Object getModelRef() { | |
96 | 0 | return modelRef; |
97 | } | |
98 | ||
99 | } | |
100 | ||
101 | /* | |
102 | * $Log$ | |
103 | * Revision 1.2 2007/04/27 17:46:31 alex_simov | |
104 | * javadoc added | |
105 | * | |
106 | * Revision 1.1 2007/04/24 14:09:44 alex_simov | |
107 | * new SA-WSDL api | |
108 | * | |
109 | */ |