// @SERVICE_NAME@Skel.java
//

package @PACKAGE_NAME@;

import org.biomoby.service.BaseService;
import org.biomoby.shared.parser.MobyJob;
import org.biomoby.shared.parser.MobyPackage;
import org.biomoby.shared.datatypes.*;

/**
 * <b>Service name:</b> @SERVICE_NAME@. <br>
 * <b>Authority:</b> @AUTHORITY@ <br>
 * <b>Email contact:</b> @EMAIL_CONTACT@ <br>
 * <b>Service type:</b> @SERVICE_TYPE@ <br>
 * <b>Service endpoint:</b> @SERVICE_URL@ <br>
 * <b>Service RDF resource:</b> <a href="@SERVICE_RDF@">@SERVICE_RDF@</a> <p>
 *
 * @IOTABLE@ <p>
 *
 * @DESCRIPTION@ <p>
 *
 * @IMAGESTART@ Here is a picture of this service in the context of other services that can be connected with this one because they have compatible data types: <p> @IMAGEEND@
 * @IMAGESTART@ <img src="doc-files/@SERVICE_NAME@.png" border=0 alt="Service Neighbourhood graph"/> <p> @IMAGEEND@
 *
 * Source code for this object was generated: @DATE@ (by @USER_OS@). <p>
 *
 * @see <a href="http://biomoby.org/" target="_top">Biomoby project</a>
 * @see <a href="http://biomoby.org/moby-live/Java/docs/" target="_top">jMoby: Supporting Biomoby in Java</a>
 * @see <a href="http://biomoby.org/moby-live/Java/docs/Moses.html" target="_top">MoSeS generators</a>
 */

abstract public class @SERVICE_NAME@Skel
    extends BaseService {

    /**************************************************************************
     * Default constructor.
     *************************************************************************/
    public @SERVICE_NAME@Skel() {
	super();
    }

    /**************************************************************************
     * <b>The main method (available as a Web Service). </b> <p>
     *************************************************************************/
    public String @SERVICE_NAME@ (Object data) {

	MobyPackage mobyOutput = null;
	try {

            @FALLBACK_CODE@
	    // reading the whole input
	    MobyPackage mobyInput = MobyPackage.createFromXML (data, fallback);

	    // prepare an output object
	    mobyOutput = prepareOutput (mobyInput);

	    // do the main job
	    processIt (mobyInput, mobyOutput);

	    // and return an XML back
	    return mobyOutput.toXML();

	} catch (Throwable e) {
	    boolean mobyException = (e instanceof org.biomoby.shared.MobyException);
	    java.io.StringWriter sw = new java.io.StringWriter (500);
	    if (e.getCause() != null ||	(! mobyException))
		e.printStackTrace (new java.io.PrintWriter (sw));
	    return error (e.getMessage() + "\n" + sw.toString(), mobyOutput);
	}
    }

@METHODS@
}
