Mercurial > hg > AnnotationManagerN4J
comparison src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/PersonsResource.java @ 45:707902d468f6
store reads and sends annotations resources now.
author | casties |
---|---|
date | Wed, 26 Sep 2012 17:28:31 +0200 |
parents | 0731c4549065 |
children | 64aa756c60cc |
comparison
equal
deleted
inserted
replaced
44:5e9d90461929 | 45:707902d468f6 |
---|---|
70 result += "</form>\n</body>\n</html>"; | 70 result += "</form>\n</body>\n</html>"; |
71 } else { | 71 } else { |
72 // list all groups | 72 // list all groups |
73 result = "<html><body>\n<h1>Persons</h1>\n<table>"; | 73 result = "<html><body>\n<h1>Persons</h1>\n<table>"; |
74 result += "<tr><th>id</th><th>name</th><th>uri</th></tr>"; | 74 result += "<tr><th>id</th><th>name</th><th>uri</th></tr>"; |
75 List<Actor> persons = store.getActors("uri", "*", NodeTypes.PERSON); | 75 List<Person> persons = store.getPersons("uri", "*"); |
76 for (Actor person : persons) { | 76 for (Person person : persons) { |
77 Reference url = this.getReference().clone(); | 77 Reference url = this.getReference().clone(); |
78 url.addSegment(person.getId()); | 78 url.addSegment(person.getId()); |
79 result += String.format("<tr><td><a href=\"%s\">%s</a></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></tr>\n", url, |
80 person.getIdString(), person.getName(), person.getUri()); | 80 person.getIdString(), person.getName(), person.getUri()); |
81 } | 81 } |