View Javadoc

1   package com.ontotext.ordi.wsmo4rdf.remote.server;
2   
3   import javax.jws.WebParam;
4   import javax.jws.WebService;
5   
6   import com.ontotext.ordi.wsmo4rdf.WsmoSource;
7   import com.ontotext.ordi.wsmo4rdf.remote.exception.IllegalSourceNameException;
8   import com.ontotext.ordi.wsmo4rdf.remote.exception.ServiceLimitExceededException;
9   
10  /**
11   * Provides for creation and destruction of local
12   * {@link com.ontotext.ordi.wsmo4rdf.WsmoSource WsmoSource} instances and their
13   * management by integer identifier.
14   * 
15   * @author mihail.konstantinov@ontotex.com
16   * 
17   */
18  @WebService
19  public interface RemoteFactory {
20  
21      /**
22       * Creates locally a new {@link WsmoSource} with an integer identifier to
23       * access it later.
24       * 
25       * @param sourceName
26       *                an alphanumeric name of the WsmoSource by which the client identifies
27       *                sources persisted between 2 executions of ORDI-WS
28       * @return integer identifier of the created WsmoSource
29       * @throws ServiceLimitExceededException
30       *                 if no more <code>WsmoSource</code>s could be handled
31       * @throws IllegalSourceNameException
32       * 			if <code>sourceName</code> is not an alphanumeric string 
33       */
34      public int getNewWsmoSource(@WebParam(name = "sourceName")
35      final String sourceName) throws ServiceLimitExceededException, IllegalSourceNameException;
36  
37      /**
38       * Destroys the local {@link WsmoSource} corresponding to the provided
39       * identifier.
40       * 
41       * @param wsmoSourceId
42       *                integer identifier of a <code>WsmoSource</code> to be
43       *                destroyed.
44       * @return <b>true</b> if a <code>WsmoSource</code> of the given
45       *         identifier exists and was destroyed and <b>false</b> otherwise
46       */
47      public boolean destroyWsmoSource(@WebParam(name = "wsmoSourceId")
48      final int wsmoSourceId);
49  }