1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
5 <!-- Generated by javadoc (build 1.6.0_30) on Tue Nov 19 11:17:33 CET 2013 -->
6 <META http-equiv="Content-Type" content="text/html; charset=utf-8">
8 TemplateTransformer (Solr 4.6.0 API)
11 <META NAME="date" CONTENT="2013-11-19">
13 <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
15 <SCRIPT type="text/javascript">
16 function windowTitle()
18 if (location.href.indexOf('is-external=true') == -1) {
19 parent.document.title="TemplateTransformer (Solr 4.6.0 API)";
28 <BODY BGCOLOR="white" onload="windowTitle();">
32 <!-- ========= START OF TOP NAVBAR ======= -->
33 <A NAME="navbar_top"><!-- --></A>
34 <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
35 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
37 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
38 <A NAME="navbar_top_firstrow"><!-- --></A>
39 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
40 <TR ALIGN="center" VALIGN="top">
41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
42 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
43 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
44 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/TemplateTransformer.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
45 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
46 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
47 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
51 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
57 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
58 <A HREF="../../../../../org/apache/solr/handler/dataimport/SqlEscapingEvaluator.html" title="class in org.apache.solr.handler.dataimport"><B>PREV CLASS</B></A>
59 <A HREF="../../../../../org/apache/solr/handler/dataimport/Transformer.html" title="class in org.apache.solr.handler.dataimport"><B>NEXT CLASS</B></A></FONT></TD>
60 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
61 <A HREF="../../../../../index.html?org/apache/solr/handler/dataimport/TemplateTransformer.html" target="_top"><B>FRAMES</B></A>
62 <A HREF="TemplateTransformer.html" target="_top"><B>NO FRAMES</B></A>
63 <SCRIPT type="text/javascript">
66 document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
71 <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
78 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
79 SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
80 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
81 DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
84 <A NAME="skip-navbar_top"></A>
85 <!-- ========= END OF TOP NAVBAR ========= -->
88 <!-- ======== START OF CLASS DATA ======== -->
91 org.apache.solr.handler.dataimport</FONT>
93 Class TemplateTransformer</H2>
95 <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
96 <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../org/apache/solr/handler/dataimport/Transformer.html" title="class in org.apache.solr.handler.dataimport">org.apache.solr.handler.dataimport.Transformer</A>
97 <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.solr.handler.dataimport.TemplateTransformer</B>
101 <DT><PRE>public class <B>TemplateTransformer</B><DT>extends <A HREF="../../../../../org/apache/solr/handler/dataimport/Transformer.html" title="class in org.apache.solr.handler.dataimport">Transformer</A></DL>
106 A <A HREF="../../../../../org/apache/solr/handler/dataimport/Transformer.html" title="class in org.apache.solr.handler.dataimport"><CODE>Transformer</CODE></A> which can put values into a column by resolving an expression
107 containing other columns
112 <field column="name" template="${e.lastName}, ${e.firstName}
113 ${e.middleName}" /> will produce the name by combining values from
114 lastName, firstName and middleName fields as given in the template attribute.
119 href="http://wiki.apache.org/solr/DataImportHandler">http://wiki.apache.org/solr/DataImportHandler</a>
123 <b>This API is experimental and may change in the future.</b>
128 <DT><B>Since:</B></DT>
134 <!-- =========== FIELD SUMMARY =========== -->
136 <A NAME="field_summary"><!-- --></A>
137 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
138 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
139 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
140 <B>Field Summary</B></FONT></TH>
142 <TR BGCOLOR="white" CLASS="TableRowColor">
143 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
144 <CODE>static <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
145 <TD><CODE><B><A HREF="../../../../../org/apache/solr/handler/dataimport/TemplateTransformer.html#TEMPLATE">TEMPLATE</A></B></CODE>
148 </TD>
152 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
154 <A NAME="constructor_summary"><!-- --></A>
155 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
156 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
157 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
158 <B>Constructor Summary</B></FONT></TH>
160 <TR BGCOLOR="white" CLASS="TableRowColor">
161 <TD><CODE><B><A HREF="../../../../../org/apache/solr/handler/dataimport/TemplateTransformer.html#TemplateTransformer()">TemplateTransformer</A></B>()</CODE>
164 </TD>
168 <!-- ========== METHOD SUMMARY =========== -->
170 <A NAME="method_summary"><!-- --></A>
171 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
172 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
173 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
174 <B>Method Summary</B></FONT></TH>
176 <TR BGCOLOR="white" CLASS="TableRowColor">
177 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
178 <CODE> <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
179 <TD><CODE><B><A HREF="../../../../../org/apache/solr/handler/dataimport/TemplateTransformer.html#transformRow(java.util.Map, org.apache.solr.handler.dataimport.Context)">transformRow</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A><<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>,<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>> row,
180 <A HREF="../../../../../org/apache/solr/handler/dataimport/Context.html" title="class in org.apache.solr.handler.dataimport">Context</A> context)</CODE>
183 The input is a row of data and the output has to be a new row.</TD>
186 <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
187 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
188 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
189 <TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
191 <TR BGCOLOR="white" CLASS="TableRowColor">
192 <TD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
198 <!-- ============ FIELD DETAIL =========== -->
200 <A NAME="field_detail"><!-- --></A>
201 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
202 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
203 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
204 <B>Field Detail</B></FONT></TH>
208 <A NAME="TEMPLATE"><!-- --></A><H3>
211 public static final <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>TEMPLATE</B></PRE>
214 <DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.solr.handler.dataimport.TemplateTransformer.TEMPLATE">Constant Field Values</A></DL>
217 <!-- ========= CONSTRUCTOR DETAIL ======== -->
219 <A NAME="constructor_detail"><!-- --></A>
220 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
221 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
222 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
223 <B>Constructor Detail</B></FONT></TH>
227 <A NAME="TemplateTransformer()"><!-- --></A><H3>
228 TemplateTransformer</H3>
230 public <B>TemplateTransformer</B>()</PRE>
234 <!-- ============ METHOD DETAIL ========== -->
236 <A NAME="method_detail"><!-- --></A>
237 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
238 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
239 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
240 <B>Method Detail</B></FONT></TH>
244 <A NAME="transformRow(java.util.Map, org.apache.solr.handler.dataimport.Context)"><!-- --></A><H3>
247 public <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> <B>transformRow</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A><<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>,<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>> row,
248 <A HREF="../../../../../org/apache/solr/handler/dataimport/Context.html" title="class in org.apache.solr.handler.dataimport">Context</A> context)</PRE>
250 <DD><B>Description copied from class: <CODE><A HREF="../../../../../org/apache/solr/handler/dataimport/Transformer.html#transformRow(java.util.Map, org.apache.solr.handler.dataimport.Context)">Transformer</A></CODE></B></DD>
251 <DD>The input is a row of data and the output has to be a new row.
254 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/solr/handler/dataimport/Transformer.html#transformRow(java.util.Map, org.apache.solr.handler.dataimport.Context)">transformRow</A></CODE> in class <CODE><A HREF="../../../../../org/apache/solr/handler/dataimport/Transformer.html" title="class in org.apache.solr.handler.dataimport">Transformer</A></CODE></DL>
257 <DT><B>Parameters:</B><DD><CODE>row</CODE> - A row of data<DD><CODE>context</CODE> - The current context
258 <DT><B>Returns:</B><DD>The changed data. It must be a <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><CODE>Map</CODE></A><<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang"><CODE>String</CODE></A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang"><CODE>Object</CODE></A>> if it returns
259 only one row or if there are multiple rows to be returned it must
260 be a <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util"><CODE>List</CODE></A><<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><CODE>Map</CODE></A><<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang"><CODE>String</CODE></A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang"><CODE>Object</CODE></A>>></DL>
263 <!-- ========= END OF CLASS DATA ========= -->
267 <!-- ======= START OF BOTTOM NAVBAR ====== -->
268 <A NAME="navbar_bottom"><!-- --></A>
269 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
270 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
272 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
273 <A NAME="navbar_bottom_firstrow"><!-- --></A>
274 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
275 <TR ALIGN="center" VALIGN="top">
276 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
277 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
278 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
279 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/TemplateTransformer.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
280 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
281 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
282 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
286 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
292 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
293 <A HREF="../../../../../org/apache/solr/handler/dataimport/SqlEscapingEvaluator.html" title="class in org.apache.solr.handler.dataimport"><B>PREV CLASS</B></A>
294 <A HREF="../../../../../org/apache/solr/handler/dataimport/Transformer.html" title="class in org.apache.solr.handler.dataimport"><B>NEXT CLASS</B></A></FONT></TD>
295 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
296 <A HREF="../../../../../index.html?org/apache/solr/handler/dataimport/TemplateTransformer.html" target="_top"><B>FRAMES</B></A>
297 <A HREF="TemplateTransformer.html" target="_top"><B>NO FRAMES</B></A>
298 <SCRIPT type="text/javascript">
301 document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
306 <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
313 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
314 SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
315 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
316 DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
319 <A NAME="skip-navbar_bottom"></A>
320 <!-- ======== END OF BOTTOM NAVBAR ======= -->
324 <i>Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.</i>
325 <script src='../../../../../prettify.js' type='text/javascript'></script>
326 <script type='text/javascript'>
328 var oldonload = window.onload;
329 if (typeof oldonload != 'function') {
330 window.onload = prettyPrint;
332 window.onload = function() {