comparison src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/AnnotationsResource.java @ 99:199143c669e4

added links to admin interface.
author casties
date Wed, 11 Feb 2015 19:09:17 +0100
parents fcb6fe10e08c
children 7268c3ca025b
comparison
equal deleted inserted replaced
98:5a764c625290 99:199143c669e4
75 result += "<tr><th>uri</th><th>text</th><th>target</th><th>fragment</th><th>creator</th></tr>"; 75 result += "<tr><th>uri</th><th>text</th><th>target</th><th>fragment</th><th>creator</th></tr>";
76 List<Annotation> annotations = store.getAnnotations("id", "*"); 76 List<Annotation> annotations = store.getAnnotations("id", "*");
77 for (Annotation annotation : annotations) { 77 for (Annotation annotation : annotations) {
78 Reference url = this.getReference().clone(); 78 Reference url = this.getReference().clone();
79 url.addSegment(annotation.getUrlId()); 79 url.addSegment(annotation.getUrlId());
80 result += String.format("<tr><td><a href=\"%s\">%s</a></td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>\n", url, 80 result += String.format("<tr><td><a href=\"%s\">%s</a></td><td>%s</td><td><a href=\"%s\">%s</a></td><td>%s</td><td>%s</td></tr>\n", url,
81 annotation.getUri(), annotation.getBodyText(), annotation.getTargetBaseUri(), annotation.getTargetFragment(), 81 annotation.getUri(), annotation.getBodyText(), annotation.getTargetBaseUri(), annotation.getTargetBaseUri(),
82 annotation.getCreatorName()); 82 annotation.getTargetFragment(), annotation.getCreatorName());
83 } 83 }
84 result += "</table>\n"; 84 result += "</table>\n";
85 result += "</body>\n</html>"; 85 result += "</body>\n</html>";
86 return new StringRepresentation(result, MediaType.TEXT_HTML); 86 return new StringRepresentation(result, MediaType.TEXT_HTML);
87 } 87 }