Mercurial > hg > AnnotationManager
comparison src/main/java/de/mpiwg/itgroup/annotationManager/restlet/AnnotatorResourceImpl.java @ 26:235b91ba8dff
on the way to new annotations...
author | casties |
---|---|
date | Thu, 26 Apr 2012 11:44:57 +0200 |
parents | d9809412b67f |
children | 40846c0b344d |
comparison
equal
deleted
inserted
replaced
25:52dff477e45f | 26:235b91ba8dff |
---|---|
173 JSONObject userObject = new JSONObject(); | 173 JSONObject userObject = new JSONObject(); |
174 // save creator as uri | 174 // save creator as uri |
175 userObject.put("uri", annot.creator); | 175 userObject.put("uri", annot.creator); |
176 // make short user id | 176 // make short user id |
177 String userID = annot.creator; | 177 String userID = annot.creator; |
178 if (userID.startsWith(NS.MPIWG_PERSONS)) { | 178 if (userID.startsWith(NS.MPIWG_PERSONS_URL)) { |
179 userID = userID.replace(NS.MPIWG_PERSONS, ""); // entferne NAMESPACE | 179 userID = userID.replace(NS.MPIWG_PERSONS_URL, ""); // entferne NAMESPACE |
180 } | 180 } |
181 // save as id | 181 // save as id |
182 userObject.put("id", userID); | 182 userObject.put("id", userID); |
183 // get full name | 183 // get full name |
184 RestServer restServer = (RestServer) getApplication(); | 184 RestServer restServer = (RestServer) getApplication(); |
319 // de.mpiwg.itgroup.annotationManager.Constants.NS | 319 // de.mpiwg.itgroup.annotationManager.Constants.NS |
320 if (userUri == null) { | 320 if (userUri == null) { |
321 if (username.startsWith("http")) { | 321 if (username.startsWith("http")) { |
322 userUri = username; | 322 userUri = username; |
323 } else { | 323 } else { |
324 userUri = NS.MPIWG_PERSONS + username; | 324 userUri = NS.MPIWG_PERSONS_URL + username; |
325 } | 325 } |
326 } | 326 } |
327 // TODO: should we overwrite the creator? | 327 // TODO: should we overwrite the creator? |
328 | 328 |
329 // create xpointer | 329 // create xpointer |