Xindice API
version 1.2m1

org.apache.xindice.webadmin.viewer
Class HtmlViewerComponent

java.lang.Object
  extended byorg.apache.xindice.webadmin.viewer.HtmlViewerComponent
Direct Known Subclasses:
CollectionConfigurationViewer, CollectionIndexesViewer, ContentResourceViewer, CreateCollectionViewer, DeleteCollectionViewer, DeleteResourceViewer, ListCollectionViewer, ListDatabaseViewer, MetadataCollectionViewer, MetadataResourceViewer, UploadCollectionViewer, XPathSearchCollectionViewer, XUpdateCollectionViewer

public abstract class HtmlViewerComponent
extends Object

Xindice Html Viewer.

Version:
$Revision: 541515 $, $Date: 2007-05-24 22:45:06 -0400 (Thu, 24 May 2007) $
Author:
Jan Metzner

Field Summary
protected static String CREATE_FORM_COMPRESSED_DEFAULT
           
protected static String CREATE_FORM_COMPRESSED_END
           
protected static String CREATE_FORM_FILER
           
protected static String CREATE_FORM_META_DEFAULT
           
protected static String CREATE_FORM_META_END
           
protected static String CREATE_FORM_START
           
protected static String END_CONFIG_FORM
           
protected static String END_HTML_HEADER_SECTION
           
protected static String END_PATH_SECTION
           
protected static String END_SEARCH_FORM
           
protected static String END_TAB
           
protected static String END_TABLE
           
protected static String END_TABLE_BOX
           
protected static String END_TABLE_ROW
           
protected static String END_TABS_SECTION
           
protected static String FOOTER
           
protected static String HTML_HEADER_SECTION
           
protected static String HTML_TAIL_SECTION
           
protected static String LEFT_PATH_SECTION
           
protected static String LOGO_SECTION
           
protected static String RIGHT_PATH_SECTION
           
protected static String SEARCH_FROM_END_HIDDEN_VIEWER
           
protected static String SEARCH_FROM_END_NS_HEADER
           
protected static String SEARCH_FROM_END_NS_HEADER_OPT
           
protected static String SEARCH_FROM_END_NS_PREFIX
           
protected static String SEARCH_FROM_END_NS_URI
           
protected static String SEARCH_FROM_END_QUERY
           
protected static String SEARCH_FROM_MIDDLE_NS_URI
           
protected static String SEARCH_FROM_START_HIDDEN_VIEWER
           
protected static String SEARCH_FROM_START_NS
           
protected static String SEARCH_FROM_START_NS_HEADER
           
protected static String SEARCH_FROM_START_NS_HEADER_OPT
           
protected static String SEARCH_FROM_START_NS_HEADER_OPT_SEL
           
protected static String SEARCH_FROM_START_NS_PREFIX
           
protected static String SEARCH_FROM_START_NS_URI
           
protected static String SEARCH_FROM_START_QUERY
           
protected static String START_CONFIG_FORM
           
protected static String START_SEARCH_FORM
           
protected static String START_TAB
           
protected static String START_TAB_SELECTED
           
protected static String START_TABLE
           
protected static String START_TABLE_BOX
           
protected static String START_TABLE_BOX_TITLE
           
protected static String START_TABLE_ROW
           
protected static String START_TABS_SECTION
           
protected static String TAB_SPACE
           
protected static String TAB_SPACE_SELECTED
           
protected static String UPLOAD_FORM
           
 
Constructor Summary
HtmlViewerComponent()
           
 
Method Summary
protected  void finishViewer(javax.servlet.ServletOutputStream output)
           
protected abstract  String getName()
           
static String htmlescape(String unescaped)
          Turns funky characters into HTML entity equivalents
static String htmlescape(String unescaped, boolean brake)
          Turns funky characters into HTML entity equivalents
protected  void printEndSingleTableBox(javax.servlet.ServletOutputStream output)
           
protected  void printEndTable(javax.servlet.ServletOutputStream output)
           
protected  void printHeader(javax.servlet.ServletOutputStream output, String title)
           
protected  void printSearchFromRow(String viewer, String query, String[] ns, javax.servlet.ServletOutputStream output)
           
protected  void printStartSingleTableBox(javax.servlet.ServletOutputStream output)
           
protected  void printStartTable(String[] titles, javax.servlet.ServletOutputStream output)
           
protected  void printStartTable(String title, javax.servlet.ServletOutputStream output)
           
protected  void printTableRow(String[] contents, javax.servlet.ServletOutputStream output)
           
protected  void printTableRow(String content, javax.servlet.ServletOutputStream output)
           
protected  void printTabs(javax.servlet.ServletOutputStream output, String path)
           
protected  javax.servlet.ServletOutputStream startViewer(String title, String path, javax.servlet.http.HttpServletResponse res)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HTML_HEADER_SECTION

protected static final String HTML_HEADER_SECTION
See Also:
Constant Field Values

END_HTML_HEADER_SECTION

protected static final String END_HTML_HEADER_SECTION
See Also:
Constant Field Values

LOGO_SECTION

protected static final String LOGO_SECTION
See Also:
Constant Field Values

START_TABS_SECTION

protected static final String START_TABS_SECTION
See Also:
Constant Field Values

END_TABS_SECTION

protected static final String END_TABS_SECTION
See Also:
Constant Field Values

START_TAB

protected static final String START_TAB
See Also:
Constant Field Values

START_TAB_SELECTED

protected static final String START_TAB_SELECTED
See Also:
Constant Field Values

TAB_SPACE

protected static final String TAB_SPACE
See Also:
Constant Field Values

TAB_SPACE_SELECTED

protected static final String TAB_SPACE_SELECTED
See Also:
Constant Field Values

END_TAB

protected static final String END_TAB
See Also:
Constant Field Values

LEFT_PATH_SECTION

protected static final String LEFT_PATH_SECTION
See Also:
Constant Field Values

RIGHT_PATH_SECTION

protected static final String RIGHT_PATH_SECTION
See Also:
Constant Field Values

END_PATH_SECTION

protected static final String END_PATH_SECTION
See Also:
Constant Field Values

START_TABLE

protected static final String START_TABLE
See Also:
Constant Field Values

END_TABLE

protected static final String END_TABLE
See Also:
Constant Field Values

START_TABLE_ROW

protected static final String START_TABLE_ROW
See Also:
Constant Field Values

END_TABLE_ROW

protected static final String END_TABLE_ROW
See Also:
Constant Field Values

START_TABLE_BOX

protected static final String START_TABLE_BOX
See Also:
Constant Field Values

END_TABLE_BOX

protected static final String END_TABLE_BOX
See Also:
Constant Field Values

START_TABLE_BOX_TITLE

protected static final String START_TABLE_BOX_TITLE
See Also:
Constant Field Values

FOOTER

protected static final String FOOTER
See Also:
Constant Field Values

HTML_TAIL_SECTION

protected static final String HTML_TAIL_SECTION
See Also:
Constant Field Values

START_SEARCH_FORM

protected static final String START_SEARCH_FORM
See Also:
Constant Field Values

SEARCH_FROM_START_HIDDEN_VIEWER

protected static final String SEARCH_FROM_START_HIDDEN_VIEWER
See Also:
Constant Field Values

SEARCH_FROM_END_HIDDEN_VIEWER

protected static final String SEARCH_FROM_END_HIDDEN_VIEWER
See Also:
Constant Field Values

SEARCH_FROM_START_QUERY

protected static final String SEARCH_FROM_START_QUERY
See Also:
Constant Field Values

SEARCH_FROM_END_QUERY

protected static final String SEARCH_FROM_END_QUERY
See Also:
Constant Field Values

SEARCH_FROM_START_NS_HEADER

protected static final String SEARCH_FROM_START_NS_HEADER
See Also:
Constant Field Values

SEARCH_FROM_START_NS_HEADER_OPT

protected static final String SEARCH_FROM_START_NS_HEADER_OPT
See Also:
Constant Field Values

SEARCH_FROM_START_NS_HEADER_OPT_SEL

protected static final String SEARCH_FROM_START_NS_HEADER_OPT_SEL
See Also:
Constant Field Values

SEARCH_FROM_END_NS_HEADER_OPT

protected static final String SEARCH_FROM_END_NS_HEADER_OPT
See Also:
Constant Field Values

SEARCH_FROM_END_NS_HEADER

protected static final String SEARCH_FROM_END_NS_HEADER
See Also:
Constant Field Values

SEARCH_FROM_START_NS

protected static final String SEARCH_FROM_START_NS
See Also:
Constant Field Values

SEARCH_FROM_START_NS_PREFIX

protected static final String SEARCH_FROM_START_NS_PREFIX
See Also:
Constant Field Values

SEARCH_FROM_END_NS_PREFIX

protected static final String SEARCH_FROM_END_NS_PREFIX
See Also:
Constant Field Values

SEARCH_FROM_START_NS_URI

protected static final String SEARCH_FROM_START_NS_URI
See Also:
Constant Field Values

SEARCH_FROM_MIDDLE_NS_URI

protected static final String SEARCH_FROM_MIDDLE_NS_URI
See Also:
Constant Field Values

SEARCH_FROM_END_NS_URI

protected static final String SEARCH_FROM_END_NS_URI
See Also:
Constant Field Values

END_SEARCH_FORM

protected static final String END_SEARCH_FORM
See Also:
Constant Field Values

START_CONFIG_FORM

protected static final String START_CONFIG_FORM
See Also:
Constant Field Values

END_CONFIG_FORM

protected static final String END_CONFIG_FORM
See Also:
Constant Field Values

CREATE_FORM_START

protected static final String CREATE_FORM_START
See Also:
Constant Field Values

CREATE_FORM_META_DEFAULT

protected static final String CREATE_FORM_META_DEFAULT
See Also:
Constant Field Values

CREATE_FORM_META_END

protected static final String CREATE_FORM_META_END
See Also:
Constant Field Values

CREATE_FORM_COMPRESSED_DEFAULT

protected static final String CREATE_FORM_COMPRESSED_DEFAULT
See Also:
Constant Field Values

CREATE_FORM_COMPRESSED_END

protected static final String CREATE_FORM_COMPRESSED_END
See Also:
Constant Field Values

CREATE_FORM_FILER

protected static final String CREATE_FORM_FILER
See Also:
Constant Field Values

UPLOAD_FORM

protected static final String UPLOAD_FORM
See Also:
Constant Field Values
Constructor Detail

HtmlViewerComponent

public HtmlViewerComponent()
Method Detail

htmlescape

public static String htmlescape(String unescaped)
Turns funky characters into HTML entity equivalents

Parameters:
unescaped - unescaped String.
Returns:
escaped String.

htmlescape

public static String htmlescape(String unescaped,
                                boolean brake)
Turns funky characters into HTML entity equivalents

Parameters:
unescaped - unescaped String.
brake - if true a new line will be inserted after every closing tag.
Returns:
escaped String.

getName

protected abstract String getName()

startViewer

protected javax.servlet.ServletOutputStream startViewer(String title,
                                                        String path,
                                                        javax.servlet.http.HttpServletResponse res)
                                                 throws javax.servlet.ServletException,
                                                        IOException
Throws:
javax.servlet.ServletException
IOException

finishViewer

protected void finishViewer(javax.servlet.ServletOutputStream output)
                     throws IOException
Throws:
IOException

printHeader

protected void printHeader(javax.servlet.ServletOutputStream output,
                           String title)
                    throws IOException
Throws:
IOException

printTabs

protected void printTabs(javax.servlet.ServletOutputStream output,
                         String path)
                  throws IOException
Throws:
IOException

printStartTable

protected void printStartTable(String title,
                               javax.servlet.ServletOutputStream output)
                        throws IOException
Throws:
IOException

printStartTable

protected void printStartTable(String[] titles,
                               javax.servlet.ServletOutputStream output)
                        throws IOException
Throws:
IOException

printEndTable

protected void printEndTable(javax.servlet.ServletOutputStream output)
                      throws IOException
Throws:
IOException

printTableRow

protected void printTableRow(String content,
                             javax.servlet.ServletOutputStream output)
                      throws IOException
Throws:
IOException

printTableRow

protected void printTableRow(String[] contents,
                             javax.servlet.ServletOutputStream output)
                      throws IOException
Throws:
IOException

printStartSingleTableBox

protected void printStartSingleTableBox(javax.servlet.ServletOutputStream output)
                                 throws IOException
Throws:
IOException

printEndSingleTableBox

protected void printEndSingleTableBox(javax.servlet.ServletOutputStream output)
                               throws IOException
Throws:
IOException

printSearchFromRow

protected void printSearchFromRow(String viewer,
                                  String query,
                                  String[] ns,
                                  javax.servlet.ServletOutputStream output)
                           throws IOException
Throws:
IOException

Xindice API
version 1.2m1

Copyright (c) 1999-2007 The Apache Software Foundation. All Rights Reserved.