org.histpop.ohpr.frames
Class ViewFrame2

java.lang.Object
  extended by org.histpop.ohpr.frames.ViewFrame
      extended by org.histpop.ohpr.frames.ViewFrame2
All Implemented Interfaces:
BasicFrame

public class ViewFrame2
extends ViewFrame

A frame class for generating a view (Search version) of a target document for an Essay or Legislation. The view is created from a HTML template. The template contains some placeholders which are replaced by dynamically generated HTML-code for the final output.


Constructor Summary
ViewFrame2()
           
 
Method Summary
protected  java.lang.String createURL(java.lang.String frame, TitleQueryNode titleNode, ServerContext ctx)
          Generate an URL for a given target frame for single page documents.
 HTMLHandler display(java.lang.Object result, ServerContext ctx)
          Create an HTML view for browsing requests.
 
Methods inherited from class org.histpop.ohpr.frames.ViewFrame
generateAssociatedContentLink, generateContent, replaceLink, replaceLinks
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ViewFrame2

public ViewFrame2()
Method Detail

createURL

protected java.lang.String createURL(java.lang.String frame,
                                     TitleQueryNode titleNode,
                                     ServerContext ctx)
Generate an URL for a given target frame for single page documents.

Overrides:
createURL in class ViewFrame
Parameters:
frame - The name of a target frame which generates a dynamic HTML view.
titleNode - A master item of a Legislation or Essay document.
ctx - The server context containing the request, response, and current session objects.
Returns:
An escaped URL string.

display

public HTMLHandler display(java.lang.Object result,
                           ServerContext ctx)
                    throws java.lang.Exception
Create an HTML view for browsing requests. It uses an HTML template with placeholders which are replaced by dynamcially generated HTML. The following URL arguments are expected after the '?' character:
ResourceType=Census or Legislation or Essays or Registrar General or TNA

SearchTerms=the actual search terms

SearchContent=All or Metadata

expressionKind=All or Any or Exact or Boolean

Date=the year or year range

Geography=E or W or S or I or C

Sorting=resource-type date geography or resource-type geography date or geography resource-type date
path=path to tree node

treestate=contract or expand or expandnew
(Only used if not a leaf-node)

active=yes or no

titlepos=position of first title to be displayed
(default is zero, not needed here, but used when returning to the browse list)

mno=master number of volume or document

Specified by:
display in interface BasicFrame
Overrides:
display in class ViewFrame
Parameters:
result - The result from a server method, always NULL, unless exception thrown.
ctx - The server context containing the request, response, and current session objects.
Returns:
An HTML handler containing the generated HTML ready to be sent back as a response by the servlet controller.
Throws:
java.lang.Exception