1 package eu.fbk.dkm.pikes.tintop.server;
2
3 import eu.fbk.dkm.pikes.tintop.AnnotationPipeline;
4 import ixa.kaflib.KAFDocument;
5 import org.glassfish.grizzly.http.server.Request;
6 import org.glassfish.grizzly.http.server.Response;
7
8
9
10
11
12
13
14
15
16 public class NafGenerateHandler extends AbstractHandler {
17
18 public NafGenerateHandler(AnnotationPipeline pipeline) {
19 super(pipeline);
20 }
21
22 @Override
23 public void service(Request request, Response response) throws Exception {
24
25 super.service(request, response);
26
27 String text = request.getParameter("text");
28 KAFDocument doc = text2naf(text, meta);
29
30 writeOutput(response, "text/xml", doc.toString());
31 }
32 }