org.mycore.frontend.iview
Class MCRIViewServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.mycore.frontend.servlets.MCRServlet
org.mycore.frontend.iview.MCRIViewServlet
- All Implemented Interfaces:
- Serializable, Servlet, ServletConfig
public class MCRIViewServlet
- extends MCRServlet
- Author:
- Andreas Trappe, Chi Vu Huu
- See Also:
- Serialized Form
|
Method Summary |
void |
doGetPost(MCRServletJob job)
This method should be overwritten by other servlets. |
void |
forwardJDOM(HttpServletRequest request,
HttpServletResponse response,
Element elem)
|
void |
generateLayout(HttpServletRequest request,
HttpServletResponse response)
|
boolean |
getFileSupport(MCRFile file)
|
void |
getFirstSupportedFile(List<MCRFile> list,
String contentType,
MCRDirectory rootNode)
|
void |
getImage(HttpServletRequest request,
HttpServletResponse response)
|
Properties |
getIViewConfig(HttpServletRequest request)
|
MCRFilesystemNode |
getMCRNodeByRequest(HttpServletRequest request,
HttpServletResponse response)
|
void |
getMetadata(HttpServletRequest request,
HttpServletResponse response,
StringTokenizer st)
|
boolean |
getSupport(MCRFilesystemNode node)
|
void |
init()
|
void |
movePOI(HttpServletRequest request,
Properties iViewConfig,
MCRFilesystemNode fsn)
|
void |
prepareErrorPage(HttpServletRequest request,
HttpServletResponse response,
String errorMessage)
|
void |
printIViewConfig(Properties iViewConfig)
|
void |
printRequest(HttpServletRequest request)
|
Properties |
setIViewConfig(HttpServletRequest request)
|
void |
setMetadata(HttpServletRequest request,
HttpServletResponse response)
|
boolean |
stringNotEmpty(String string)
|
void |
updateIViewConfig(Properties iViewConfig,
HttpServletRequest request,
Properties dateUp,
String logMessage)
|
Point |
validatePOI(Point point,
Properties iViewConfig,
MCRFilesystemNode fsn,
boolean log)
Verify if ROI is right and/or below out of image |
| Methods inherited from class org.mycore.frontend.servlets.MCRServlet |
buildRedirectURL, doGet, doGet, doPost, doPost, generateActiveLinkErrorpage, generateErrorPage, getBaseURL, getLastModified, getLayoutService, getProperty, getRemoteAddr, getServletBaseURL, getSession, handleException, initTrustedProxies, render, reportException, think |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MCRIViewServlet
public MCRIViewServlet()
init
public void init()
throws MCRConfigurationException,
ServletException
- Overrides:
init in class MCRServlet
- Throws:
MCRConfigurationException
ServletException
doGetPost
public void doGetPost(MCRServletJob job)
throws IOException,
ServletException,
JDOMException
- Description copied from class:
MCRServlet
- This method should be overwritten by other servlets. As a default
response we indicate the HTTP 1.1 status code 501 (Not Implemented).
- Overrides:
doGetPost in class MCRServlet
- Throws:
IOException
ServletException
JDOMException
setMetadata
public void setMetadata(HttpServletRequest request,
HttpServletResponse response)
throws ServletException,
IOException
- Throws:
ServletException
IOException
generateLayout
public void generateLayout(HttpServletRequest request,
HttpServletResponse response)
throws ServletException,
IOException,
JDOMException
- Throws:
ServletException
IOException
JDOMException
getImage
public void getImage(HttpServletRequest request,
HttpServletResponse response)
throws ServletException,
FileNotFoundException,
IOException
- Throws:
ServletException
FileNotFoundException
IOException
stringNotEmpty
public boolean stringNotEmpty(String string)
prepareErrorPage
public void prepareErrorPage(HttpServletRequest request,
HttpServletResponse response,
String errorMessage)
throws IOException,
ServletException
- Throws:
IOException
ServletException
movePOI
public void movePOI(HttpServletRequest request,
Properties iViewConfig,
MCRFilesystemNode fsn)
validatePOI
public Point validatePOI(Point point,
Properties iViewConfig,
MCRFilesystemNode fsn,
boolean log)
- Verify if ROI is right and/or below out of image
- Parameters:
point -
forwardJDOM
public void forwardJDOM(HttpServletRequest request,
HttpServletResponse response,
Element elem)
throws IOException
- Throws:
IOException
getSupport
public boolean getSupport(MCRFilesystemNode node)
- Parameters:
node - - The MCRFilesystemNode to be verified
- Returns:
- true if module imaging supports this MCRFile or at least one
MCRFile within MCRDirectory, false if no support
getFileSupport
public boolean getFileSupport(MCRFile file)
getFirstSupportedFile
public void getFirstSupportedFile(List<MCRFile> list,
String contentType,
MCRDirectory rootNode)
getMCRNodeByRequest
public MCRFilesystemNode getMCRNodeByRequest(HttpServletRequest request,
HttpServletResponse response)
throws ServletException,
IOException
- Throws:
ServletException
IOException
getMetadata
public void getMetadata(HttpServletRequest request,
HttpServletResponse response,
StringTokenizer st)
throws ServletException,
IOException
- Throws:
ServletException
IOException
getIViewConfig
public Properties getIViewConfig(HttpServletRequest request)
updateIViewConfig
public void updateIViewConfig(Properties iViewConfig,
HttpServletRequest request,
Properties dateUp,
String logMessage)
setIViewConfig
public Properties setIViewConfig(HttpServletRequest request)
throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
printRequest
public void printRequest(HttpServletRequest request)
printIViewConfig
public void printIViewConfig(Properties iViewConfig)