1/*2 wsmo4j - a WSMO API and Reference Implementation34 Copyright (c) 2004-2007, Ontotext Lab. / SIRMA56 This library is free software; you can redistribute it and/or modify it under7 the terms of the GNU Lesser General Public License as published by the Free8 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 WITHOUT11 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS12 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more13 details.14 You should have received a copy of the GNU Lesser General Public License along15 with this library; if not, write to the Free Software Foundation, Inc.,16 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA17 */1819package org.wsmo.grounding.sawsdl;
2021import java.net.URI;
22import java.util.List;
2324import javax.xml.namespace.QName;
2526import org.wsmo.common.IRI;
27import org.wsmo.common.exception.InvalidModelException;
28import org.wsmo.grounding.sawsdl.SchemaMapping;
2930import org.wsmo.grounding.sawsdl.events.GroundingChangeEventListener;
3132/**33 * A grounding object containing all SAWSDL annotations of a single WSDL document. 34 * Each model annotation is represented by a single ModelRef object which can not be35 * shared with other groundings.36 * 37 * The Grounding API offers a set of factory methods for creating the various types of38 * semantic model references.39 *40 */41publicinterfaceGrounding {
4243/**44 * Creates and includes in this grounding object a single model reference from an 45 * XML Schema attribute to a concept in a semantic model.46 * 47 * @param attribute the name of the attribute to be annotated48 * @param target the semantic model id reference 49 * @return A new attribute model reference50 * @throws InvalidModelException if the supplied attribute name is not defined in the51 * current WSDL document52 */53publicAttributeModelRef createAttributeModelRef(QName attribute, IRI target)
54throws InvalidModelException;
5556/**57 * Creates and includes in this grounding object a single model reference from an 58 * XML Schema complexType to a concept in a semantic model.59 * 60 * @param type the name of the complexType to be annotated61 * @param target the semantic model id reference 62 * @return A new complexType model reference63 * @throws InvalidModelException if the supplied complexType name is not defined in the64 * current WSDL document65 */66publicComplexTypeModelRef createComplexTypeModelRef(QName type, IRI target)
67throws InvalidModelException;
6869/**70 * Creates and includes in this grounding object a single model reference from an 71 * XML Schema simpleType to a concept in a semantic model.72 * 73 * @param type the name of the simpleType to be annotated74 * @param target the semantic model id reference 75 * @return A new simpleType model reference76 * @throws InvalidModelException if the supplied simpleType name is not defined in the77 * current WSDL document78 */79publicSimpleTypeModelRef createSimpleTypeModelRef(QName type, IRI target)
80throws InvalidModelException;
8182/**83 * Creates and includes in this grounding object a single model reference from an 84 * XML Schema element to a concept in a semantic model.85 * 86 * @param element the name of the element to be annotated87 * @param target the semantic model id reference 88 * @return A new element model reference89 * @throws InvalidModelException if the supplied element name is not defined in the90 * current WSDL document91 */92publicElementModelRef createElementModelRef(QName element, IRI target)
93throws InvalidModelException;
9495/**96 * Creates and includes in this grounding object a single model reference from a 97 * WSDL interface to a concept in a semantic model. This reference plays role of a98 * classification property.99 * 100 * @param iface the name of the interface to be annotated101 * @param target the semantic model id reference 102 * @return A new interface category reference103 * @throws InvalidModelException if the supplied interface name is not defined in the104 * current WSDL document105 */106publicInterfaceCategory createInterfaceCategory(QName iface, IRI target)
107throws InvalidModelException;
108109/**110 * Creates and includes in this grounding object a single model reference from a 111 * WSDL operation to a concept in a semantic model. 112 * 113 * @param operation the name of the operation to be annotated114 * @param target the semantic model id reference 115 * @return A new operation model reference116 * @throws InvalidModelException if the supplied operation name is not defined in the117 * current WSDL document118 */119publicOperationModelRef createOperationModelRef(QName operation, IRI target)
120throws InvalidModelException;
121122/**123 * Creates and includes in this grounding object a single model reference from a 124 * WSDL operation fault to a concept in a semantic model. 125 * 126 * @param fault the name of the operation fault to be annotated127 * @param target the semantic model id reference 128 * @return A new fault model reference129 * @throws InvalidModelException if the supplied operation fault name is not defined in the130 * current WSDL document131 */132publicFaultModelRef createFaultModelRef(QName fault, IRI target)
133throws InvalidModelException;
134135/**136 * Removes a single model reference from this grounding object.137 * 138 * @param reference the model reference to be removed139 * @throws InvalidModelException if the supplied reference does not belong to this grounding140 * object141 */142publicvoid removeModelRef(ModelRef reference)
143throws InvalidModelException;;
144145/**146 * Lists all (regardless of specific type) model references in this grounding object.147 * Only the declared model references are listed, not the propagated ones.148 * 149 * @return A list of model reference objects150 */151public List<ModelRef> listDeclaredModelRefs();
152153/**154 * Lists all model references for the specified WSDL or XML Schema entity in this grounding155 * object.156 * Only the declared model references are listed, not the propagated ones.157 * @param source the name of the WSDL or XML Schema entity158 * @return A list of model reference objects159 * @throws InvalidModelException if the supplied entity name is not defined in the160 * current WSDL document161 */162public List<ModelRef> listDeclaredModelRefs(QName source) throws InvalidModelException;
163164/**165 * Lists all (regardless of specific type) model references in this grounding object, including the propagated ones.166 * 167 * @return A list of model reference objects168 * @throws InvalidModelException if the model is somehow inconsistent169 */170public List<ModelRef> listModelRefs() throws InvalidModelException;
171172/**173 * Lists all model references for the specified WSDL or XML Schema entity in this grounding174 * object, including the propagated ones.175 * @param source the name of the WSDL or XML Schema entity176 * @return A list of model reference objects177 * @throws InvalidModelException if the supplied entity name is not defined in the178 * current WSDL document179 */180public List<ModelRef> listModelRefs(QName source) throws InvalidModelException;
181182/**183 * Creates and includes in this grounding object a mapping to a transformation schema responsible184 * for the lifting of the source entity to the corresponding semantic model entity.185 * 186 * @param source the name of the XML Schema entity187 * @param schemaRef the identifier of the lifting schema188 * @return A new lifting schema mapping189 * @throws InvalidModelException if the supplied entity name is not defined in the190 * current WSDL document191 */192publicLiftingSchemaMapping createLiftingSchemaMapping(QName source, URI schemaRef)
193throws InvalidModelException;
194195/**196 * Creates and includes in this grounding object a mapping to a transformation schema responsible197 * for the lowering to the source entity from the corresponding semantic model entity.198 * 199 * @param source the name of the XML Schema entity200 * @param schemaRef the identifier of the lowering schema201 * @return A new lowering schema mapping202 * @throws InvalidModelException if the supplied entity name is not defined in the203 * current WSDL document204 */205publicLoweringSchemaMapping createLoweringSchemaMapping(QName source, URI schemaRef)
206throws InvalidModelException;
207208/**209 * Removes a single lifting or lowering schema mapping from this grounding object. 210 * @param mapping the mapping object to be removed211 * @throws InvalidModelException if the mapping object does not belong to this grounding212 * object213 */214publicvoid removeSchemaMapping(SchemaMapping mapping)
215throws InvalidModelException;
216217/**218 * Lists all lifting and lowering schema mappings of this grounding object.219 * Only the declared schema mappings are listed, not the propagated ones.220 * @return A list of schema mappings221 */222public List<SchemaMapping> listDeclaredSchemaMappings();
223224/**225 * Lists all lifting and lowering schema mappings for the source entity belonging to this226 * grounding object.227 * Only the declared schema mappings are listed, not the propagated ones.228 * @return A list of schema mappings229 */230public List<SchemaMapping> listDeclaredSchemaMappings(QName source) throws InvalidModelException;
231232/**233 * Lists all lifting and lowering schema mappings of this grounding object, including the propagated ones.234 * @return A list of schema mappings235 * @throws InvalidModelException if the model is somehow inconsistent236 */237public List<SchemaMapping> listSchemaMappings() throws InvalidModelException;
238239/**240 * Lists all lifting and lowering schema mappings for the source entity belonging to this241 * grounding object, including the propagated ones.242 * @return A list of schema mappings243 */244public List<SchemaMapping> listSchemaMappings(QName source) throws InvalidModelException;
245246/**247 * Registers a grounding change listener to be notified when new model references and248 * schema mappings are created or removed from this grounding object. 249 * @param listener250 */251publicvoid addGroundingChangeListener(GroundingChangeEventListener listener);
252253/**254 * Unregisters a grounding change listener. 255 * @param listener256 */257publicvoid removeGroundingChangeListener(GroundingChangeEventListener listener);
258259 }
260261/*262 * $Log$263 * Revision 1.6 2007/06/18 15:30:51 alex_simov264 * annotation propagation added (on behalf of Jacek)265 *266 * Revision 1.5 2007/04/27 17:46:31 alex_simov267 * javadoc added268 *269 * Revision 1.4 2007/04/27 13:34:07 alex_simov270 * bugfix271 *272 * Revision 1.3 2007/04/26 15:47:13 alex_simov273 * methods might throw InvalidModelExceptions274 *275 * Revision 1.2 2007/04/24 15:32:45 alex_simov276 * imports fix277 *278 * Revision 1.1 2007/04/24 14:09:44 alex_simov279 * new SA-WSDL api280 *281 */