diff src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/PersonsResource.java @ 65:c0dd5314bada

deal with special characters in urls.
author casties
date Wed, 05 Dec 2012 15:36:43 +0100
parents 64aa756c60cc
children 2b1e6df5e21a
line wrap: on
line diff
--- a/src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/PersonsResource.java	Mon Dec 03 18:42:20 2012 +0100
+++ b/src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/PersonsResource.java	Wed Dec 05 15:36:43 2012 +0100
@@ -56,7 +56,7 @@
         Form f = this.getQuery();
         String form = f.getFirstValue("form");
         if (form != null && form.equals("new_person")) {
-            // output new group form
+            // output new person form
             result = "<html><body>\n";
             result += "<h1>New person</h1>\n";
             result += String.format("<p><a href=\"%s\">All persons</a></p>", this.getReference());
@@ -68,13 +68,13 @@
             result += "<p><input type=\"submit\"/></p>\n";
             result += "</form>\n</body>\n</html>";
         } else {
-            // list all groups
+            // list all persons
             result = "<html><body>\n<h1>Persons</h1>\n<table>";
             result += "<tr><th>id</th><th>name</th><th>uri</th></tr>";
             List<Person> persons = store.getPersons("uri", "*");
             for (Person person : persons) {
                 Reference url = this.getReference().clone();
-                url.addSegment(person.getId());
+                url.addSegment(person.getIdString());
                 result += String.format("<tr><td><a href=\"%s\">%s</a></td><td>%s</td><td>%s</td></tr>\n", url,
                         person.getIdString(), person.getName(), person.getUri());
             }
@@ -86,7 +86,7 @@
     }
 
     /**
-     * POST creates a new Group.
+     * POST creates a new person.
      * 
      * @return
      */