@Deprecated public class TiledTemplateSet extends DefaultTemplateSet
Hit.types()
,
see table below for a list of hit types that are needed in order for hits to render properly.Hit types required for proper rendering
XML tag path | Required hit type |
/result/section | A hit group and have a "section" type |
/result/meta | A hit group and have a "meta" type |
/result/meta/provider | A hit that has a "logging" type |
Provider fields formatting options
Field | Formatting | Field type |
provider | name attribute of <provider> tag | Provided by container |
scheme | scheme attribute of <provider> tag | Provided by container |
host | host attribute of <provider> tag | Provided by container |
port | port attribute of <provider> tag | Provided by container |
path | path attribute of <provider> tag | Provided by container |
status | result attribute of <provider> tag | Provided by container |
latency_connect | <latency type="connect"> tag | Provided by container |
latency_start | <latency type="start"> tag | Provided by container |
latency_finish | <latency type="finish"> tag | Provided by container |
query_param_* | <parameter name="..."> tag | Provided by container |
header_* | <header name="..."> tag | Provided by container |
response_header_* | <response-header name="..."> tag | Provided by container |
count_first | <count type="first"> tag | Provided by container |
count_last | <count type="last"> tag | Provided by container |
count_total | <count type="total"> tag | Provided by container |
count_deep | <count type="deep"> tag | Provided by container |
queryattrs_xorronum | <queryattrs name="xorronum"> tag | Provided by YST searcher |
queryattrs_RankFeaturesRewriterAttr | <queryattrs name="RankFeaturesRewriterAttr"> tag | Provided by YST searcher |
queryattrs_intlannotator | <queryattrs name="intlannotator"> tag | Provided by YST searcher |
queryattrs_category | <queryattrs name="category"> tag | Provided by YST searcher |
wordcounts_* | <wordcounts word="..."> tag | Provided by YST searcher |
Modifier and Type | Field and Description |
---|---|
private FormattingOptions |
hitOptions
Deprecated.
|
private FormattingOptions |
hitOptionsForProvider
Deprecated.
|
DEFAULT_ENCODING, DEFAULT_MIMETYPE
Constructor and Description |
---|
TiledTemplateSet()
Deprecated.
|
TiledTemplateSet(String templateName)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
private String |
asXML(Object value)
Deprecated.
|
void |
header(Context context,
com.yahoo.text.XMLWriter writer)
Deprecated.
Render the result set header.
|
void |
hit(Context context,
com.yahoo.text.XMLWriter writer)
Deprecated.
Overrides
UserTemplate.hit(Context, Writer)
to print 'logging' type meta hits as /result/meta/provider tags. |
protected void |
renderField(Context context,
Hit hit,
Map.Entry<String,Object> entry,
com.yahoo.text.XMLWriter writer)
Deprecated.
|
protected void |
renderHitAttributes(Hit hit,
com.yahoo.text.XMLWriter writer)
Deprecated.
Augments default hit attributes rendering with formatting options.
|
protected void |
renderHitFields(Context context,
Hit hit,
com.yahoo.text.XMLWriter writer)
Deprecated.
Renders all fields of the hit
|
protected void |
renderHitGroup(HitGroup hit,
Context context,
com.yahoo.text.XMLWriter writer)
Deprecated.
Overrides
DefaultTemplateSet.renderHitGroup(HitGroup, Context, XMLWriter)
for /result/section and /result/meta hit groups. |
private void |
renderParameters(Map<String,String> parameters,
com.yahoo.text.XMLWriter writer)
Deprecated.
|
protected void |
renderProvider(Context context,
Hit hit,
com.yahoo.text.XMLWriter writer)
Deprecated.
Renders /result/meta/provider.
|
protected void |
renderProviderField(Context context,
Hit hit,
Map.Entry<String,Object> entry,
com.yahoo.text.XMLWriter writer)
Deprecated.
Renders one field under /result/meta/provider.
|
protected void |
renderProviderHitAttributes(Hit hit,
com.yahoo.text.XMLWriter writer)
Deprecated.
Specific hit attributes rendering for 'provider' meta hits under /result/meta.
|
protected void |
renderProviderHitFields(Context context,
Hit hit,
com.yahoo.text.XMLWriter writer)
Deprecated.
Renders fields under /result/meta/provider.
|
protected void |
renderSection(HitGroup hit,
com.yahoo.text.XMLWriter writer)
Deprecated.
Renders /result/section.
|
protected void |
renderSectionContent(HitGroup hit,
com.yahoo.text.XMLWriter writer)
Deprecated.
|
protected boolean |
shouldRenderField(Hit hit,
String fieldName)
Deprecated.
Returns whether a field should be rendered.
|
String |
toString()
Deprecated.
|
com.yahoo.text.XMLWriter |
wrapWriter(Writer writer)
Deprecated.
Uses an XML writer in this template
|
error, footer, hitFooter, noHits, renderCoverageAttributes, renderFieldContent, renderGroup, renderHitGroupOfTypeGroupHit, renderId
createContext, dumpAndXMLQuoteUTF8, dumpBytes, isDefaultTemplateSet, queryContext
getBoldCloseTag, getBoldOpenTag, getEncoding, getMimeType, getName, getRequestedEncoding, getSeparatorTag, getSummaryClass, getTemplate, setHighlightTags, setSummaryClass, setTemplate, setTemplateNotNull
private FormattingOptions hitOptionsForProvider
private FormattingOptions hitOptions
public TiledTemplateSet()
public TiledTemplateSet(String templateName)
public com.yahoo.text.XMLWriter wrapWriter(Writer writer)
DefaultTemplateSet
wrapWriter
in class DefaultTemplateSet
public void header(Context context, com.yahoo.text.XMLWriter writer) throws IOException
UserTemplate
The result set is available in the context object under the name "result".
header
in class DefaultTemplateSet
context
- wrapper which will contain, among other thing, the result
set instancewriter
- the destination for rendering the resultIOException
- may be propagated from the writerprotected void renderHitAttributes(Hit hit, com.yahoo.text.XMLWriter writer) throws IOException
renderHitAttributes
in class DefaultTemplateSet
IOException
protected void renderField(Context context, Hit hit, Map.Entry<String,Object> entry, com.yahoo.text.XMLWriter writer) throws IOException
renderField
in class DefaultTemplateSet
IOException
protected void renderHitFields(Context context, Hit hit, com.yahoo.text.XMLWriter writer) throws IOException
renderHitFields
in class DefaultTemplateSet
IOException
protected boolean shouldRenderField(Hit hit, String fieldName)
DefaultTemplateSet
shouldRenderField
in class DefaultTemplateSet
public void hit(Context context, com.yahoo.text.XMLWriter writer) throws IOException
UserTemplate.hit(Context, Writer)
to print 'logging' type meta hits as /result/meta/provider tags.
Fails back to super.hit(context, writer)
in other cases.hit
in class DefaultTemplateSet
context
- wrapper which will contain, among other thing, the hit
instancewriter
- the destination for rendering the hitIOException
- may be propagated from the writerprotected void renderHitGroup(HitGroup hit, Context context, com.yahoo.text.XMLWriter writer) throws IOException
DefaultTemplateSet.renderHitGroup(HitGroup, Context, XMLWriter)
for /result/section and /result/meta hit groups.
Fails back to super.renderHitGroup(hit, context, writer)
otherwise.renderHitGroup
in class DefaultTemplateSet
IOException
protected void renderSection(HitGroup hit, com.yahoo.text.XMLWriter writer) throws IOException
renderHitAttributes(Hit, XMLWriter)
.IOException
protected void renderSectionContent(HitGroup hit, com.yahoo.text.XMLWriter writer) throws IOException
IOException
private void renderParameters(Map<String,String> parameters, com.yahoo.text.XMLWriter writer) throws IOException
IOException
protected void renderProvider(Context context, Hit hit, com.yahoo.text.XMLWriter writer) throws IOException
renderProviderHitAttributes(Hit, XMLWriter)
instead of the default renderHitAttributes(Hit, XMLWriter)
.protected void renderProviderHitAttributes(Hit hit, com.yahoo.text.XMLWriter writer) throws IOException
IOException
protected void renderProviderHitFields(Context context, Hit hit, com.yahoo.text.XMLWriter writer) throws IOException
IOException
renderProviderField(Context, Hit, java.util.Map.Entry, XMLWriter)
protected void renderProviderField(Context context, Hit hit, Map.Entry<String,Object> entry, com.yahoo.text.XMLWriter writer) throws IOException
IOException
Copyright © 2018. All rights reserved.