@WebServlet(value="/composer") public class JsonComposerServlet extends AbstractJsonDiscoverer
JsonComposer
Answers to POST HTTP calls. Receives as input a set JSON documents
representing several JSON-based Web APIs (see paramsPattern
to
know the pattern the param has to follow).
Discovers a graph representing the different APIs (as subgraphs) where nodes represents concepts/attributes and edges link concepts with their attributes. Additionally, extra edges are added to represent similar concepts and therefore potential composition links
Graphs are encoded as GEXF.
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
paramsPattern
This pattern is used to analyze the params
The format is sources[JSON_SOURCE_NAME][SOMETHING]([])?
|
private static long |
serialVersionUID |
dotExePath, jsonParam, properties, serverURL, version, workingDir
Constructor and Description |
---|
JsonComposerServlet() |
Modifier and Type | Method and Description |
---|---|
protected java.util.List<JsonSourceSet> |
digestSources(javax.servlet.http.HttpServletRequest request)
Digest the received sources according to the pattern
|
protected void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Performs a POST call to this servlet.
|
addResponseOptions, digestExceptionMessage, doOptions, drawModel, drawModel, drawObjectModel, encodeToString, encodeToString, encodeToString, init
doDelete, doGet, doHead, doPut, doTrace, getLastModified, service, service
private static final long serialVersionUID
private static java.lang.String paramsPattern
protected java.util.List<JsonSourceSet> digestSources(javax.servlet.http.HttpServletRequest request)
request
- The HTTP requestJsonSourceSet
protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
Receives a set of JSON documents representing different JSON-based Web services.
Discovers a graph representing the different APIs (as subgraphs) where nodes represents concepts/attributes and edges link concepts with their attributes. Additionally, extra edges are added to represent similar concepts and therefore potential composition links
Returns graph encoded as GEXF.
doPost
in class javax.servlet.http.HttpServlet
request
- The Request of the callresponse
- The Response to the calljavax.servlet.ServletException
java.io.IOException
HttpServlet.doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)