Changeset 4752
- Timestamp:
- 03/18/14 17:09:43 (11 years ago)
- Location:
- DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/rest/CachedRepresentationResource.java
r4735 r4752 100 100 101 101 @GET 102 @Produces({"text/plain", "text/html", "text/xml" })102 @Produces({"text/plain", "text/html", "text/xml", "application/zip"}) 103 103 @Path("{cachedid: " + BackendConstants.regExpIdentifier + "}/stream") 104 104 @Transactional(readOnly = true) -
DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/rest/ResourceResource.java
r4671 r4752 18 18 package eu.dasish.annotation.backend.rest; 19 19 20 import eu.dasish.annotation.backend.BackendConstants; 21 import eu.dasish.annotation.backend.Resource; 20 22 import eu.dasish.annotation.backend.dao.DBIntegrityService; 21 23 import java.io.IOException; 24 import java.io.InputStream; 25 import java.sql.SQLException; 26 import java.util.UUID; 22 27 import javax.servlet.ServletContext; 23 28 import javax.servlet.http.HttpServletRequest; 24 29 import javax.servlet.http.HttpServletResponse; 30 import javax.ws.rs.GET; 31 import javax.ws.rs.Path; 32 import javax.ws.rs.PathParam; 33 import javax.ws.rs.Produces; 25 34 import javax.ws.rs.core.Context; 26 35 import javax.ws.rs.core.UriInfo; … … 29 38 import org.slf4j.LoggerFactory; 30 39 import org.springframework.beans.factory.annotation.Autowired; 40 import org.springframework.stereotype.Component; 41 import org.springframework.transaction.annotation.Transactional; 31 42 32 43 /** … … 34 45 * @author olhsha 35 46 */ 47 @Component 48 @Path("") 49 @Transactional(rollbackFor = {Exception.class}) 36 50 public class ResourceResource { 37 51 … … 72 86 73 87 } 88 89 @GET 90 @Produces({"text/html"}) 91 @Path("") 92 @Transactional(readOnly = true) 93 public String welcome() throws IOException { 94 Number remoteUserID = this.getUserID(); 95 if (remoteUserID != null) { 96 String welcome = "<!DOCTYPE html><body>" 97 + "<h3>Welcome to DASISH Webannotator (DWAN)</h3><br>" 98 +"<a href=\"../\"> to DWAN's test jsp page</a>" 99 + "</body>"; 100 return welcome; 101 } 102 return null; 103 } 74 104 } -
DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/webapp/index.jsp
r4689 r4752 25 25 26 26 <br> 27 new: <a href="api/authentication/login">api/authentication/login (Login/check)</a> <br>27 <a href="api/authentication/login"> login (Login/check)</a> <br> 28 28 <br> 29 new: <a href="api/authentication/logout"> api/authentication/logout</a> <br>29 <a href="api/authentication/logout"> logout</a> <br> 30 30 <br> 31 <a href="api/"> Bienvenue </a> <br> 32 <br> 31 33 32 34 <b>Test URI-s</b><br> 33 35 <b>All output xml-s are valid w.r.t. the schema</b><br> 34 new: GET <a href="api/authentication/user">api/authentication/user</a> ticket 500<br>35 new: GET <a href="api/users/admin">api/users/admin ticket 501</a><br>36 GET <a href="api/authentication/user">api/authentication/user</a> <br> 37 GET <a href="api/users/admin">api/users/admin</a><br> 36 38 GET <a href="api/users/00000000-0000-0000-0000-0000000000112">api/users/00000000-0000-0000-0000-0000000000112</a> <br> 37 39 GET <a href="api/users/00000000-0000-0000-0000-0000000000112/current">api/users/00000000-0000-0000-0000-0000000000112/current</a> !Problem: how to ask the servlet if the given user is logged in, may be by some other running somewhere client<br> … … 39 41 GET <a href="api/annotations?link=Sagrada">api/annotations/info?link=Sagrada</a> <br> 40 42 GET <a href="api/annotations?link=Gaud">api/annotations/info?link=Gaud</a> <br> 41 GET <a href="api/annotations?after=2014-02-04 15:57:58.046908&before=2014-02-06 10:08:16.213186">api/annotations?after=2014-02-04 15:57:58.046908&before=2014-0 2-06 10:08:16.213186</a> <br>43 GET <a href="api/annotations?after=2014-02-04 15:57:58.046908&before=2014-02-06 10:08:16.213186">api/annotations?after=2014-02-04 15:57:58.046908&before=2014-04-06 10:08:16.213186</a> 42 44 !Comment: What is "namespace" query parameter? Must be implemented and tested <br> 43 45 GET <a href="api/annotations/00000000-0000-0000-0000-000000000021">api/annotations/00000000-0000-0000-0000-000000000021</a> </br> … … 47 49 GET <a href="api/targets/00000000-0000-0000-0000-000000000032/versions">api/targets/00000000-0000-0000-0000-000000000032/versions</a> <br> 48 50 GET <a href="api/cached/00000000-0000-0000-0000-000000000051/metadata">api/cached/00000000-0000-0000-0000-000000000051/metadata</a><br> 49 GET <a href="api/cached/00000000-0000-0000-0000-000000000051/content">api/cached/00000000-0000-0000-0000-000000000051/content</a> !Problem: works only on image.jpeg, end maps png-blobs to jpegs.<br> 50 updated (Stephanie's request): POST annotation with arbitrary temporary id-s for targets.<br> 51 GET <a href="api/cached/00000000-0000-0000-0000-000000000051/content">api/cached/00000000-0000-0000-0000-000000000051/content</a><br> 52 GET <a href="api/cached/00000000-0000-0000-0000-000000000511/stream">api/cached/00000000-0000-0000-0000-000000000511/stream</a> 53 51 54 <br> 52 55 <br>
Note: See TracChangeset
for help on using the changeset viewer.