|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.histpop.ohpr.frames.ViewFrame
public class ViewFrame
A frame class for generating a view 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 | |
---|---|
ViewFrame()
|
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. |
protected java.lang.String |
generateAssociatedContentLink(java.lang.String frame,
TitleQueryNode titleNode,
ServerContext ctx)
Generate the Associated Content link. |
protected java.lang.String |
generateContent(PageQueryState pagesState)
Retrieve the document content and replace some placeholders in the document with the actual links. |
protected java.lang.String |
replaceLink(java.lang.String linkMarker,
MasterNumber originTitle,
Page originPage)
Replace a linkMarker with a HTML link to an associated target page or an associated document. |
protected java.lang.String |
replaceLinks(java.lang.String content,
MasterNumber originTitle,
Page originPage)
Replace all link markers with HTML links pointing to associated target pages or associated documents. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ViewFrame()
Method Detail |
---|
protected java.lang.String createURL(java.lang.String frame, TitleQueryNode titleNode, ServerContext ctx)
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.
protected java.lang.String generateAssociatedContentLink(java.lang.String frame, TitleQueryNode titleNode, ServerContext ctx)
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.
protected java.lang.String replaceLink(java.lang.String linkMarker, MasterNumber originTitle, Page originPage) throws ServerException
linkMarker
- A link marker in one of the following formats:originTitle
- The peristent object of the current master number item.originPage
- The peristent object of the current page.
ServerException
protected java.lang.String replaceLinks(java.lang.String content, MasterNumber originTitle, Page originPage) throws ServerException
content
- The original document content with link markers.originTitle
- The peristent object of the current master number item.originPage
- The peristent object of the current page.
ServerException
protected java.lang.String generateContent(PageQueryState pagesState) throws ServerException
pagesState
- A session cache with all the page of the master number item.
ServerException
public HTMLHandler display(java.lang.Object result, ServerContext ctx) throws java.lang.Exception
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
display
in interface BasicFrame
result
- The result from a server method, always NULL, unless exception thrown.ctx
- The server context containing the request, response,
and current session objects.
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |