comparison src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/AnnotationsResource.java @ 93:3d1a00418b42 admin_ui_rel_links

starting web admin ui with relative links. doesn't fully work yet.
author casties
date Mon, 09 Feb 2015 12:55:51 +0100
parents 25eb2e1df106
children
comparison
equal deleted inserted replaced
92:aadf8760216d 93:3d1a00418b42
73 // list all annotations 73 // list all annotations
74 result = "<html><body>\n<h1>Annotations</h1>\n<table>"; 74 result = "<html><body>\n<h1>Annotations</h1>\n<table>";
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 String url = 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, 79 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,
81 annotation.getUri(), annotation.getBodyText(), annotation.getTargetBaseUri(), annotation.getTargetFragment(), 80 annotation.getUri(), annotation.getBodyText(), annotation.getTargetBaseUri(), annotation.getTargetFragment(),
82 annotation.getCreatorName()); 81 annotation.getCreatorName());
83 } 82 }
84 result += "</table>\n"; 83 result += "</table>\n";