source: sandbox/expresso-solr/solr/docs/api/org/apache/solr/handler/dataimport/DataSource.html @ 7588

Revision 7588, 17.5 KB checked in by adir, 11 years ago (diff)

Ticket #000 - Adicionando a integracao de buscas com Solr na base a ser isnerida na comunidade

Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<!--NewPage-->
3<HTML>
4<HEAD>
5<!-- Generated by javadoc (build 1.6.0_24) on Mon Jun 25 15:26:26 EDT 2012 -->
6<META http-equiv="Content-Type" content="text/html; charset=utf-8">
7<TITLE>
8DataSource (Solr 4.0.0-ALPHA API)
9</TITLE>
10
11<META NAME="date" CONTENT="2012-06-25">
12
13<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
14
15<SCRIPT type="text/javascript">
16function windowTitle()
17{
18    if (location.href.indexOf('is-external=true') == -1) {
19        parent.document.title="DataSource (Solr 4.0.0-ALPHA API)";
20    }
21}
22</SCRIPT>
23<NOSCRIPT>
24</NOSCRIPT>
25
26</HEAD>
27
28<BODY BGCOLOR="white" onload="windowTitle();">
29<HR>
30
31
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="">
36<TR>
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>&nbsp;</TD>
42  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
43  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
44  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/DataSource.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
45  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
46  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
47  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
48  </TR>
49</TABLE>
50</TD>
51<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
52</EM>
53</TD>
54</TR>
55
56<TR>
57<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
58&nbsp;<A HREF="../../../../../org/apache/solr/handler/dataimport/DataImportHandlerException.html" title="class in org.apache.solr.handler.dataimport"><B>PREV CLASS</B></A>&nbsp;
59&nbsp;<A HREF="../../../../../org/apache/solr/handler/dataimport/DateFormatTransformer.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/DataSource.html" target="_top"><B>FRAMES</B></A>  &nbsp;
62&nbsp;<A HREF="DataSource.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
63&nbsp;<SCRIPT type="text/javascript">
64  <!--
65  if(window==top) {
66    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
67  }
68  //-->
69</SCRIPT>
70<NOSCRIPT>
71  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
72</NOSCRIPT>
73
74
75</FONT></TD>
76</TR>
77<TR>
78<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
79  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
80<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
81DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
82</TR>
83</TABLE>
84<A NAME="skip-navbar_top"></A>
85<!-- ========= END OF TOP NAVBAR ========= -->
86
87<HR>
88<!-- ======== START OF CLASS DATA ======== -->
89<H2>
90<FONT SIZE="-1">
91org.apache.solr.handler.dataimport</FONT>
92<BR>
93Class DataSource&lt;T&gt;</H2>
94<PRE>
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 "><B>org.apache.solr.handler.dataimport.DataSource&lt;T&gt;</B>
97</PRE>
98<DL>
99<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../../org/apache/solr/handler/dataimport/BinContentStreamDataSource.html" title="class in org.apache.solr.handler.dataimport">BinContentStreamDataSource</A>, <A HREF="../../../../../org/apache/solr/handler/dataimport/BinFileDataSource.html" title="class in org.apache.solr.handler.dataimport">BinFileDataSource</A>, <A HREF="../../../../../org/apache/solr/handler/dataimport/BinURLDataSource.html" title="class in org.apache.solr.handler.dataimport">BinURLDataSource</A>, <A HREF="../../../../../org/apache/solr/handler/dataimport/ContentStreamDataSource.html" title="class in org.apache.solr.handler.dataimport">ContentStreamDataSource</A>, <A HREF="../../../../../org/apache/solr/handler/dataimport/FieldReaderDataSource.html" title="class in org.apache.solr.handler.dataimport">FieldReaderDataSource</A>, <A HREF="../../../../../org/apache/solr/handler/dataimport/FieldStreamDataSource.html" title="class in org.apache.solr.handler.dataimport">FieldStreamDataSource</A>, <A HREF="../../../../../org/apache/solr/handler/dataimport/FileDataSource.html" title="class in org.apache.solr.handler.dataimport">FileDataSource</A>, <A HREF="../../../../../org/apache/solr/handler/dataimport/JdbcDataSource.html" title="class in org.apache.solr.handler.dataimport">JdbcDataSource</A>, <A HREF="../../../../../org/apache/solr/handler/dataimport/MockDataSource.html" title="class in org.apache.solr.handler.dataimport">MockDataSource</A>, <A HREF="../../../../../org/apache/solr/handler/dataimport/URLDataSource.html" title="class in org.apache.solr.handler.dataimport">URLDataSource</A></DD>
100</DL>
101<HR>
102<DL>
103<DT><PRE>public abstract class <B>DataSource&lt;T&gt;</B><DT>extends <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></DL>
104</PRE>
105
106<P>
107<p>
108 Provides data from a source with a given query.
109 </p>
110 <p/>
111 <p>
112 Implementation of this abstract class must provide a default no-arg constructor
113 </p>
114 <p/>
115 <p>
116 Refer to <a
117 href="http://wiki.apache.org/solr/DataImportHandler">http://wiki.apache.org/solr/DataImportHandler</a>
118 for more details.
119 </p>
120 <p/>
121 <b>This API is experimental and may change in the future.</b>
122<P>
123
124<P>
125<DL>
126<DT><B>Since:</B></DT>
127  <DD>solr 1.3</DD>
128</DL>
129<HR>
130
131<P>
132
133<!-- ======== CONSTRUCTOR SUMMARY ======== -->
134
135<A NAME="constructor_summary"><!-- --></A>
136<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
137<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
138<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
139<B>Constructor Summary</B></FONT></TH>
140</TR>
141<TR BGCOLOR="white" CLASS="TableRowColor">
142<TD><CODE><B><A HREF="../../../../../org/apache/solr/handler/dataimport/DataSource.html#DataSource()">DataSource</A></B>()</CODE>
143
144<BR>
145&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
146</TR>
147</TABLE>
148&nbsp;
149<!-- ========== METHOD SUMMARY =========== -->
150
151<A NAME="method_summary"><!-- --></A>
152<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
153<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
154<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
155<B>Method Summary</B></FONT></TH>
156</TR>
157<TR BGCOLOR="white" CLASS="TableRowColor">
158<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
159<CODE>abstract &nbsp;void</CODE></FONT></TD>
160<TD><CODE><B><A HREF="../../../../../org/apache/solr/handler/dataimport/DataSource.html#close()">close</A></B>()</CODE>
161
162<BR>
163&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Cleans up resources of this DataSource after use.</TD>
164</TR>
165<TR BGCOLOR="white" CLASS="TableRowColor">
166<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
167<CODE>abstract &nbsp;<A HREF="../../../../../org/apache/solr/handler/dataimport/DataSource.html" title="type parameter in DataSource">T</A></CODE></FONT></TD>
168<TD><CODE><B><A HREF="../../../../../org/apache/solr/handler/dataimport/DataSource.html#getData(java.lang.String)">getData</A></B>(<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>&nbsp;query)</CODE>
169
170<BR>
171&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get records for the given query.The return type depends on the
172 implementation .</TD>
173</TR>
174<TR BGCOLOR="white" CLASS="TableRowColor">
175<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
176<CODE>abstract &nbsp;void</CODE></FONT></TD>
177<TD><CODE><B><A HREF="../../../../../org/apache/solr/handler/dataimport/DataSource.html#init(org.apache.solr.handler.dataimport.Context, java.util.Properties)">init</A></B>(<A HREF="../../../../../org/apache/solr/handler/dataimport/Context.html" title="class in org.apache.solr.handler.dataimport">Context</A>&nbsp;context,
178     <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</A>&nbsp;initProps)</CODE>
179
180<BR>
181&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Initializes the DataSource with the <code>Context</code> and
182 initialization properties.</TD>
183</TR>
184</TABLE>
185&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
186<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
187<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
188<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>
189</TR>
190<TR BGCOLOR="white" CLASS="TableRowColor">
191<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>
192</TR>
193</TABLE>
194&nbsp;
195<P>
196
197<!-- ========= CONSTRUCTOR DETAIL ======== -->
198
199<A NAME="constructor_detail"><!-- --></A>
200<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
201<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
202<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
203<B>Constructor Detail</B></FONT></TH>
204</TR>
205</TABLE>
206
207<A NAME="DataSource()"><!-- --></A><H3>
208DataSource</H3>
209<PRE>
210public <B>DataSource</B>()</PRE>
211<DL>
212</DL>
213
214<!-- ============ METHOD DETAIL ========== -->
215
216<A NAME="method_detail"><!-- --></A>
217<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
218<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
219<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
220<B>Method Detail</B></FONT></TH>
221</TR>
222</TABLE>
223
224<A NAME="init(org.apache.solr.handler.dataimport.Context, java.util.Properties)"><!-- --></A><H3>
225init</H3>
226<PRE>
227public abstract void <B>init</B>(<A HREF="../../../../../org/apache/solr/handler/dataimport/Context.html" title="class in org.apache.solr.handler.dataimport">Context</A>&nbsp;context,
228                          <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</A>&nbsp;initProps)</PRE>
229<DL>
230<DD>Initializes the DataSource with the <code>Context</code> and
231 initialization properties.
232 <p/>
233 This is invoked by the <code>DataImporter</code> after creating an
234 instance of this class.
235<P>
236<DD><DL>
237<DT><B>Parameters:</B><DD><CODE>context</CODE> - <DD><CODE>initProps</CODE> - </DL>
238</DD>
239</DL>
240<HR>
241
242<A NAME="getData(java.lang.String)"><!-- --></A><H3>
243getData</H3>
244<PRE>
245public abstract <A HREF="../../../../../org/apache/solr/handler/dataimport/DataSource.html" title="type parameter in DataSource">T</A> <B>getData</B>(<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>&nbsp;query)</PRE>
246<DL>
247<DD>Get records for the given query.The return type depends on the
248 implementation .
249<P>
250<DD><DL>
251<DT><B>Parameters:</B><DD><CODE>query</CODE> - The query string. It can be a SQL for JdbcDataSource or a URL
252              for HttpDataSource or a file location for FileDataSource or a custom
253              format for your own custom DataSource.
254<DT><B>Returns:</B><DD>Depends on the implementation. For instance JdbcDataSource returns
255         an Iterator&lt;Map &lt;String,Object&gt;&gt;</DL>
256</DD>
257</DL>
258<HR>
259
260<A NAME="close()"><!-- --></A><H3>
261close</H3>
262<PRE>
263public abstract void <B>close</B>()</PRE>
264<DL>
265<DD>Cleans up resources of this DataSource after use.
266<P>
267<DD><DL>
268</DL>
269</DD>
270</DL>
271<!-- ========= END OF CLASS DATA ========= -->
272<HR>
273
274
275<!-- ======= START OF BOTTOM NAVBAR ====== -->
276<A NAME="navbar_bottom"><!-- --></A>
277<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
278<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
279<TR>
280<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
281<A NAME="navbar_bottom_firstrow"><!-- --></A>
282<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
283  <TR ALIGN="center" VALIGN="top">
284  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
285  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
286  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
287  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/DataSource.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
288  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
289  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
290  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
291  </TR>
292</TABLE>
293</TD>
294<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
295</EM>
296</TD>
297</TR>
298
299<TR>
300<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
301&nbsp;<A HREF="../../../../../org/apache/solr/handler/dataimport/DataImportHandlerException.html" title="class in org.apache.solr.handler.dataimport"><B>PREV CLASS</B></A>&nbsp;
302&nbsp;<A HREF="../../../../../org/apache/solr/handler/dataimport/DateFormatTransformer.html" title="class in org.apache.solr.handler.dataimport"><B>NEXT CLASS</B></A></FONT></TD>
303<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
304  <A HREF="../../../../../index.html?org/apache/solr/handler/dataimport/DataSource.html" target="_top"><B>FRAMES</B></A>  &nbsp;
305&nbsp;<A HREF="DataSource.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
306&nbsp;<SCRIPT type="text/javascript">
307  <!--
308  if(window==top) {
309    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
310  }
311  //-->
312</SCRIPT>
313<NOSCRIPT>
314  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
315</NOSCRIPT>
316
317
318</FONT></TD>
319</TR>
320<TR>
321<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
322  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
323<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
324DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
325</TR>
326</TABLE>
327<A NAME="skip-navbar_bottom"></A>
328<!-- ======== END OF BOTTOM NAVBAR ======= -->
329
330<HR>
331
332          <address>Copyright &copy; 2000-2012 Apache Software Foundation.  All Rights Reserved.</address>
333          <script src='../../../../../prettify.js' type='text/javascript'></script>
334          <script type='text/javascript'>
335            (function(){
336              var oldonload = window.onload;
337              if (typeof oldonload != 'function') {
338                window.onload = prettyPrint;
339              } else {
340                window.onload = function() {
341                  oldonload();
342                  prettyPrint();
343                }
344              }
345            })();
346          </script>
347       
348</BODY>
349</HTML>
Note: See TracBrowser for help on using the repository browser.