Package org.appng.search.searcher
Class SearchFormatter
- java.lang.Object
-
- org.appng.search.searcher.SearchFormatter
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_DATE_PATTERN
static int
DEFAULT_PAGE
static String
DEFAULT_PAGE_PARAM
static String
DEFAULT_PAGE_SIZE_PARAM
static int
DEFAULT_PAGESIZE
static String
DEFAULT_QUERY_PARAM
static String
FORMAT_JSON
static String
FORMAT_XML
-
Constructor Summary
Constructors Constructor Description SearchFormatter(DocumentBuilderFactory documentBuilderFactory, TransformerFactory transformerFactory)
-
Method Summary
-
-
-
Field Detail
-
DEFAULT_PAGE
public static final int DEFAULT_PAGE
- See Also:
- Constant Field Values
-
DEFAULT_PAGE_PARAM
public static final String DEFAULT_PAGE_PARAM
- See Also:
- Constant Field Values
-
DEFAULT_PAGESIZE
public static final int DEFAULT_PAGESIZE
- See Also:
- Constant Field Values
-
DEFAULT_PAGE_SIZE_PARAM
public static final String DEFAULT_PAGE_SIZE_PARAM
- See Also:
- Constant Field Values
-
DEFAULT_QUERY_PARAM
public static final String DEFAULT_QUERY_PARAM
- See Also:
- Constant Field Values
-
DEFAULT_DATE_PATTERN
public static final String DEFAULT_DATE_PATTERN
- See Also:
- Constant Field Values
-
FORMAT_JSON
public static final String FORMAT_JSON
- See Also:
- Constant Field Values
-
FORMAT_XML
public static final String FORMAT_XML
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SearchFormatter
public SearchFormatter(DocumentBuilderFactory documentBuilderFactory, TransformerFactory transformerFactory)
-
-
Method Detail
-
write
public void write(OutputStream out) throws IOException
- Throws:
IOException
-
write
public void write(Writer writer) throws IOException
- Throws:
IOException
-
processXML
protected void processXML(Writer writer, List<Result> sortedDocs, DateFormat dateFormat) throws IOException
- Throws:
IOException
-
paginate
protected Search<SearchFilter> paginate(List<Result> sortedDocs)
-
getPage
public int getPage()
-
setPage
public void setPage(int page)
-
getPageParamName
public String getPageParamName()
-
setPageParamName
public void setPageParamName(String pageParamName)
-
getPageSize
public int getPageSize()
-
setPageSize
public void setPageSize(int pageSize)
-
getPageSizeParamName
public String getPageSizeParamName()
-
setPageSizeParamName
public void setPageSizeParamName(String pageSizeParamName)
-
getQueryParamName
public String getQueryParamName()
-
setQueryParamName
public void setQueryParamName(String queryParamName)
-
isPretty
public boolean isPretty()
-
setPretty
public void setPretty(boolean pretty)
-
getFormat
public String getFormat()
-
setFormat
public void setFormat(String format)
-
isUseParts
public boolean isUseParts()
-
setUseParts
public void setUseParts(boolean useParts)
-
getDateFormat
public String getDateFormat()
-
setDateFormat
public void setDateFormat(String dateFormat)
-
getQueryParam
public String getQueryParam()
-
setQueryParam
public void setQueryParam(String queryParam)
-
getXslStylesheet
public File getXslStylesheet()
-
setXslStylesheet
public void setXslStylesheet(File xslStylesheet)
-
getTime
public long getTime()
-
setTime
public void setTime(long time)
-
isDoXsl
public boolean isDoXsl()
-
setDoXsl
public void setDoXsl(boolean doXsl)
-
-