|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.histpop.ohpr.frames.SearchFrame
public class SearchFrame
A frame class for generating a dymamic view for listing search results. 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.
Field Summary | |
---|---|
static java.lang.String |
DATE
URL argument name for the 'Date' parameter |
static java.lang.String |
DEFAULT_SORTING
|
static java.lang.String |
EXPRESSION_KIND
URL argument name for the 'expressionKind' parameter |
static java.lang.String |
GEOGRAPHY
URL argument name for the 'Geography' parameter |
static java.lang.String |
RANGE
URL argument name for the 'range' parameter |
static java.lang.String |
RESOURCE_TYPE
URL argument name for the 'ResourceType' parameter |
static java.lang.String |
SEARCH
URL argument name for the 'search' parameter |
static java.lang.String |
SEARCH_CONTENT
URL argument name for the 'SearchContent' parameter |
static java.lang.String |
SEARCH_TERMS
URL argument name for the 'SearchTerms' parameter |
static java.lang.String |
SIMPLE
URL argument name for the 'simple' parameter |
static java.lang.String |
SORTING
URL argument name for the 'Sorting' parameter |
Constructor Summary | |
---|---|
SearchFrame()
|
Method Summary | |
---|---|
static java.lang.String[] |
adjustedGeography(java.lang.String[] geography)
Adjust the submitted geographies. |
static java.lang.String |
createBrowseTreeView(SearchNode node,
SearchNode activeNode,
ServerContext ctx)
Create the XHTML browse tree starting starting from a given node. |
static java.lang.String |
createBrowseTreeViewGraphical(SearchNode node,
SearchNode activeNode,
ServerContext ctx)
Create the XHTML browse tree starting starting from a given node (Graphical version). |
protected java.lang.String |
createDocURL(BrowseNode treeNode,
MasterNumber title,
ServerContext ctx)
Create a URL for the target document (Search version) viewer. |
protected static java.lang.String |
createIndentationGraphical(BrowseNode node)
Create an indentation according to the browse tree node's level |
protected java.lang.String |
createNavigatorView(TitleQueryState titlesState,
ServerContext ctx)
Create a titles navigator view. |
protected static java.lang.String |
createPageURL(BrowseNode treeNode,
MasterNumber title,
java.lang.Integer firstHit,
ServerContext ctx)
Create a URL for the target page (Search version) viewer. |
protected static java.lang.String |
createPageURL(BrowseNode treeNode,
MasterNumber title,
ServerContext ctx)
Create a URL for the target page (Search version) viewer. |
protected static java.lang.String |
createSectionTreeURL(SectionQueryNode sectionNode,
java.lang.String tocState,
ServerContext ctx)
Create a URL for the search results list including the arguments for a specific master number and its section tree. |
protected static java.lang.String |
createSectionTreeURL(TitleQueryNode titleNode,
java.lang.String tocSeq,
java.lang.String tocState,
ServerContext ctx)
Create a URL for the search results list including the arguments for a specific master number and its section tree. |
protected java.lang.String |
createTitlesView(TitleQueryState titlesState,
ServerContext ctx)
Create a view of the current block of titles. |
protected java.lang.String |
createTitlesViewGraphical(TitleQueryState titlesState,
ServerContext ctx)
Create a view of the current block of titles. |
protected static java.lang.String |
createURL(BrowseNode node,
boolean active,
java.lang.String treestate,
java.lang.Integer titlepos,
ServerContext ctx)
Create the URL to be used for a LH menu browse tree node. |
HTMLHandler |
display(java.lang.Object result,
ServerContext ctx)
Create an HTML view for search results requests. |
protected static java.lang.String |
generateFilterExpr(java.lang.String[] resourceType,
java.lang.String[] geography,
java.lang.String date)
generate a SQL filter expression from the submitted resource types, dates, and geographies. |
protected static java.lang.String |
generateOrderExpr(java.lang.String sorting)
Generate the SQL order list from the submitted sorting value. |
protected static java.lang.String |
generateRange(java.lang.String url,
int titlesCount,
ServerContext ctx)
|
protected static java.lang.String |
generateRefineLink(java.lang.String url,
ServerContext ctx)
|
protected static java.lang.String[] |
generateSearchExpr(java.lang.String searchTerms,
java.lang.String searchContent,
java.lang.String expressionKind,
boolean simple)
Generate SQL expressions from the submitted search terms, search content, and expression kind. |
protected java.lang.String |
generateSectionsView(TitleQueryNode titleNode,
ServerContext ctx)
Generate a sections tree view for a master number volume. |
protected static java.lang.String |
removedArg(java.lang.String url,
java.lang.String argName)
|
static void |
validate(java.lang.String[] resourceType,
java.lang.String searchContent,
java.lang.String expressionKind,
java.lang.String[] geography,
java.lang.String sorting)
Validate some URL arguments. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String RESOURCE_TYPE
public static final java.lang.String SEARCH_TERMS
public static final java.lang.String SEARCH_CONTENT
public static final java.lang.String EXPRESSION_KIND
public static final java.lang.String DATE
public static final java.lang.String GEOGRAPHY
public static final java.lang.String SORTING
public static final java.lang.String SIMPLE
public static final java.lang.String RANGE
public static final java.lang.String SEARCH
public static final java.lang.String DEFAULT_SORTING
Constructor Detail |
---|
public SearchFrame()
Method Detail |
---|
protected static java.lang.String createURL(BrowseNode node, boolean active, java.lang.String treestate, java.lang.Integer titlepos, ServerContext ctx)
node
- The browse tree node for which to create a URL.active
- TRUE if tree node is to become an active onetreestate
- Only needed if active=TRUE.
Values can be one of 'contract', 'expand', 'expandnew'.titlepos
- The cardinal position of the first title to be displayed
in the main content pane. Default is zero.ctx
- The server context with HTTP request, URL arguments, and HTTP responseprotected static java.lang.String createIndentationGraphical(BrowseNode node)
public static java.lang.String createBrowseTreeViewGraphical(SearchNode node, SearchNode activeNode, ServerContext ctx)
node
- The starting tree nodeactiveNode
- The new active tree nodectx
- Server context with HTTP request, URL arguments, HTTP response etc.
public static java.lang.String createBrowseTreeView(SearchNode node, SearchNode activeNode, ServerContext ctx)
node
- The starting tree nodeactiveNode
- The new active tree nodectx
- Server context with HTTP request, URL arguments, HTTP response etc.
public static void validate(java.lang.String[] resourceType, java.lang.String searchContent, java.lang.String expressionKind, java.lang.String[] geography, java.lang.String sorting) throws java.lang.Exception
java.lang.Exception
protected static java.lang.String[] generateSearchExpr(java.lang.String searchTerms, java.lang.String searchContent, java.lang.String expressionKind, boolean simple) throws java.lang.Exception
searchTerms
- The submitted search terms value.searchContent
- The submitted search content. Possible values are
All or MetadataexpressionKind
- The expression kind of the submitted search terms value. Possible values are
All or Any or Boolean or Exactsimple
- true if simple search, false if advanced search
java.lang.Exception
protected static java.lang.String generateFilterExpr(java.lang.String[] resourceType, java.lang.String[] geography, java.lang.String date) throws java.lang.Exception
resourceType
- A validated array of resource type names.date
- A validated date expression.geography
- A validated array of geography codes.
java.lang.Exception
protected static java.lang.String generateOrderExpr(java.lang.String sorting)
sorting
- The submitted sorting value.
protected java.lang.String createNavigatorView(TitleQueryState titlesState, ServerContext ctx)
titlesState
- All the titles associated with the owning tree node.ctx
- The server context with HTTP request, URL arguments, and HTTP response
protected static java.lang.String createPageURL(BrowseNode treeNode, MasterNumber title, ServerContext ctx) throws ServerException
treeNode
- The browse tree node for which to create a URL.title
- The master number title.ctx
- The server context with HTTP request, URL arguments, and HTTP response
ServerException
protected static java.lang.String createPageURL(BrowseNode treeNode, MasterNumber title, java.lang.Integer firstHit, ServerContext ctx) throws ServerException
treeNode
- The browse tree node for which to create a URL.title
- The master number title.firstHit
- The page sequence number for the first hit.ctx
- The server context with HTTP request, URL arguments, and HTTP response
ServerException
protected java.lang.String createDocURL(BrowseNode treeNode, MasterNumber title, ServerContext ctx) throws ServerException
treeNode
- The browse tree node for which to create a URL.title
- The master number title.ctx
- The server context with HTTP request, URL arguments, and HTTP response
ServerException
protected static java.lang.String createSectionTreeURL(SectionQueryNode sectionNode, java.lang.String tocState, ServerContext ctx) throws ServerException
sectionNode
- A section tree node.tocState
- The type of update to be applied to the sections tree.
Must be one of expand, expandnew,
close, or expandall.
If the value is expandnew or expandall
than the the whole sections tree is reset to its default state
or is fully expanded.ctx
- The server context with HTTP request, URL arguments, and HTTP response
ServerException
protected static java.lang.String createSectionTreeURL(TitleQueryNode titleNode, java.lang.String tocSeq, java.lang.String tocState, ServerContext ctx) throws ServerException
titleNode
- A volume item containing the persistent object
of the master number item and the sections state.tocSeq
- Section sequence number.tocState
- The type of update to be applied to the sections tree.
Must be one of expand, expandnew,
close, or expandall.
If the value is expandnew or expandall
than the the whole sections tree is reset to its default state
or is fully expanded.ctx
- The server context with HTTP request, URL arguments, and HTTP response
ServerException
protected java.lang.String generateSectionsView(TitleQueryNode titleNode, ServerContext ctx) throws ServerException
titleNode
- A volume item containing the persistent object
of the master number item and the sections state.
ServerException
protected java.lang.String createTitlesView(TitleQueryState titlesState, ServerContext ctx) throws ServerException
titlesState
- All the titles associated with the owning tree node.ctx
- The server context with HTTP request, URL arguments, and HTTP response
ServerException
protected java.lang.String createTitlesViewGraphical(TitleQueryState titlesState, ServerContext ctx) throws ServerException
titlesState
- All the titles associated with the owning tree node.ctx
- The server context with HTTP request, URL arguments, and HTTP response
ServerException
protected static java.lang.String generateRefineLink(java.lang.String url, ServerContext ctx)
protected static java.lang.String removedArg(java.lang.String url, java.lang.String argName)
protected static java.lang.String generateRange(java.lang.String url, int titlesCount, ServerContext ctx)
public static java.lang.String[] adjustedGeography(java.lang.String[] geography)
public HTMLHandler display(java.lang.Object result, ServerContext ctx) throws java.lang.Exception
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 |