org.mycore.services.urn
Class MCRURNResolver

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.mycore.frontend.servlets.MCRServlet
              extended by org.mycore.services.urn.MCRURNResolver
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public class MCRURNResolver
extends MCRServlet

This servlet resolves a given URN (urn:nbn:de) from a HTTP request and redirects the client to the document that is registered for this URN. The URN can be either given as the query string or as the request path. If the URN is assigned to a local document, the request is redirected to the frontpage that displays the document's metadata, as specified by the configuration property MCR.URN.Resolver.DocumentURL. If the URN is not local, the request is redirected to another URN resolver, as specified by the configuration property MCR.URN.Resolver.MasterURL.

Version:
$Revision: 13085 $ $Date: 2008-02-06 18:27:24 +0100 (Mi, 06 Feb 2008) $
Author:
Frank Lützenkirchen
See Also:
Serialized Form

Field Summary
protected  String documentURL
           
protected  String masterURL
           
 
Fields inherited from class org.mycore.frontend.servlets.MCRServlet
BASE_URL_ATTRIBUTE, trustedProxies
 
Constructor Summary
MCRURNResolver()
           
 
Method Summary
 void doGetPost(MCRServletJob job)
          This method should be overwritten by other servlets.
 void init()
           
 
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 javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

masterURL

protected String masterURL

documentURL

protected String documentURL
Constructor Detail

MCRURNResolver

public MCRURNResolver()
Method Detail

init

public void init()
          throws ServletException
Overrides:
init in class MCRServlet
Throws:
ServletException

doGetPost

public void doGetPost(MCRServletJob job)
               throws Exception
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:
Exception