Mercurial > hg > AnnotationManager
comparison src/de/mpiwg/itgroup/annotationManager/restlet/AddAndSearchAnnotations.java @ 4:c32080f364c6
minor bugs
author | dwinter |
---|---|
date | Fri, 02 Dec 2011 09:25:37 +0100 |
parents | e5f0906c107c |
children | 0be9d53a6967 |
comparison
equal
deleted
inserted
replaced
3:e5f0906c107c | 4:c32080f364c6 |
---|---|
370 // } | 370 // } |
371 // | 371 // |
372 | 372 |
373 try { | 373 try { |
374 JSONObject jo = jrep.getJsonObject(); | 374 JSONObject jo = jrep.getJsonObject(); |
375 String mode = jo.getString("mode"); // hole modus | 375 if(jo==null){ |
376 setStatus(Status.SERVER_ERROR_INTERNAL); | |
377 return null; | |
378 } | |
379 | |
380 String mode=null; | |
381 if(jo.has("mode")){ | |
382 mode = jo.getString("mode"); // hole modus | |
383 } | |
376 if (mode==null || mode.equals("")) | 384 if (mode==null || mode.equals("")) |
377 mode="annotea"; // default mode (annotea) TODO make this configurable | 385 mode="annotea"; // default mode (annotea) TODO make this configurable |
378 | 386 |
379 if (mode.equals("annotator") ) { // annotator format | 387 if (mode.equals("annotator") ) { // annotator format |
380 annot = handleAnnotatorSchema(jo, entity); | 388 annot = handleAnnotatorSchema(jo, entity); |