All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.lappsgrid.api.WebService Maven / Gradle / Ivy

There is a newer version: 2.5.0
Show newest version
/*-
 * Copyright 2014 The Language Application Grid
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */
package org.lappsgrid.api;

import jp.go.nict.langrid.commons.rpc.intf.Service;

/**
 * Interface for all services deployed to the LAPPS grid.
 * 

* A service accepts a JSON object as input and produces a JSON object * as output. The JSON objects must use the LAPPS Interchange Format (LIF) * with the discriminator set to one of the LAPPS URI. *

* See http://vocab.lappsgrid.org/discriminators.html * for a list of all URI used by LAPPS services. * * @author Keith Suderman */ @Service(namespace = "lapps:service") public interface WebService { /** * Entry point for a Lappsgrid service. *

* Each service on the Lappsgrid will accept {@code org.lappsgrid.serialization.Data} object * and return a {@code Data} object with a {@code org.lappsgrid.serialization.lif.Container} * payload. *

* Errors and exceptions the occur during processing should be wrapped in a {@code Data} * object with the discriminator set to http://vocab.lappsgrid.org/ns/error *

* See org.lappsgrid.serialization.lif.Container
* * * @param input A JSON string representing a Data object * @return A JSON string containing a Data object with a Container payload. */ String execute(String input); /** * Returns a JSON string containing metadata describing the service. The * JSON must conform to the json-schema at * http://vocab.lappsgrid.org/schema/service-schema.json * (processing services) or * http://vocab.lappsgrid.org/schema/datasource-schema.json * (datasources). * */ String getMetadata(); }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy