source: sandbox/expresso-solr/solr/docs/api/org/apache/solr/internal/csv/CSVUtils.html @ 7588

Revision 7588, 17.6 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:24 EDT 2012 -->
6<META http-equiv="Content-Type" content="text/html; charset=utf-8">
7<TITLE>
8CSVUtils (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="CSVUtils (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/CSVUtils.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/internal/csv/CSVStrategy.html" title="class in org.apache.solr.internal.csv"><B>PREV CLASS</B></A>&nbsp;
59&nbsp;NEXT CLASS</FONT></TD>
60<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
61  <A HREF="../../../../../index.html?org/apache/solr/internal/csv/CSVUtils.html" target="_top"><B>FRAMES</B></A>  &nbsp;
62&nbsp;<A HREF="CSVUtils.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.internal.csv</FONT>
92<BR>
93Class CSVUtils</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.internal.csv.CSVUtils</B>
97</PRE>
98<HR>
99<DL>
100<DT><PRE>public class <B>CSVUtils</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>
101</PRE>
102
103<P>
104Utility methods for dealing with CSV files
105<P>
106
107<P>
108<HR>
109
110<P>
111
112<!-- ======== CONSTRUCTOR SUMMARY ======== -->
113
114<A NAME="constructor_summary"><!-- --></A>
115<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
116<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
117<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
118<B>Constructor Summary</B></FONT></TH>
119</TR>
120<TR BGCOLOR="white" CLASS="TableRowColor">
121<TD><CODE><B><A HREF="../../../../../org/apache/solr/internal/csv/CSVUtils.html#CSVUtils()">CSVUtils</A></B>()</CODE>
122
123<BR>
124&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<code>CSVUtils</code> instances should NOT be constructed in
125 standard programming.</TD>
126</TR>
127</TABLE>
128&nbsp;
129<!-- ========== METHOD SUMMARY =========== -->
130
131<A NAME="method_summary"><!-- --></A>
132<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
133<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
134<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
135<B>Method Summary</B></FONT></TH>
136</TR>
137<TR BGCOLOR="white" CLASS="TableRowColor">
138<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
139<CODE>static&nbsp;<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>
140<TD><CODE><B><A HREF="../../../../../org/apache/solr/internal/csv/CSVUtils.html#parse(java.lang.String)">parse</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;s)</CODE>
141
142<BR>
143&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Parses the given String according to the default <A HREF="../../../../../org/apache/solr/internal/csv/CSVStrategy.html" title="class in org.apache.solr.internal.csv"><CODE>CSVStrategy</CODE></A>.</TD>
144</TR>
145<TR BGCOLOR="white" CLASS="TableRowColor">
146<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
147<CODE>static&nbsp;<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>
148<TD><CODE><B><A HREF="../../../../../org/apache/solr/internal/csv/CSVUtils.html#parseLine(java.lang.String)">parseLine</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;s)</CODE>
149
150<BR>
151&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Parses the first line only according to the default <A HREF="../../../../../org/apache/solr/internal/csv/CSVStrategy.html" title="class in org.apache.solr.internal.csv"><CODE>CSVStrategy</CODE></A>.</TD>
152</TR>
153<TR BGCOLOR="white" CLASS="TableRowColor">
154<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
155<CODE>static&nbsp;<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>
156<TD><CODE><B><A HREF="../../../../../org/apache/solr/internal/csv/CSVUtils.html#printLine(java.lang.String[], org.apache.solr.internal.csv.CSVStrategy)">printLine</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;values,
157          <A HREF="../../../../../org/apache/solr/internal/csv/CSVStrategy.html" title="class in org.apache.solr.internal.csv">CSVStrategy</A>&nbsp;strategy)</CODE>
158
159<BR>
160&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Converts an array of string values into a single CSV line.</TD>
161</TR>
162</TABLE>
163&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
164<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
165<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
166<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>
167</TR>
168<TR BGCOLOR="white" CLASS="TableRowColor">
169<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>
170</TR>
171</TABLE>
172&nbsp;
173<P>
174
175<!-- ========= CONSTRUCTOR DETAIL ======== -->
176
177<A NAME="constructor_detail"><!-- --></A>
178<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
179<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
180<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
181<B>Constructor Detail</B></FONT></TH>
182</TR>
183</TABLE>
184
185<A NAME="CSVUtils()"><!-- --></A><H3>
186CSVUtils</H3>
187<PRE>
188public <B>CSVUtils</B>()</PRE>
189<DL>
190<DD><p><code>CSVUtils</code> instances should NOT be constructed in
191 standard programming.
192
193 <p>This constructor is public to permit tools that require a JavaBean
194 instance to operate.</p>
195<P>
196</DL>
197
198<!-- ============ METHOD DETAIL ========== -->
199
200<A NAME="method_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>Method Detail</B></FONT></TH>
205</TR>
206</TABLE>
207
208<A NAME="printLine(java.lang.String[], org.apache.solr.internal.csv.CSVStrategy)"><!-- --></A><H3>
209printLine</H3>
210<PRE>
211public 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> <B>printLine</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;values,
212                               <A HREF="../../../../../org/apache/solr/internal/csv/CSVStrategy.html" title="class in org.apache.solr.internal.csv">CSVStrategy</A>&nbsp;strategy)</PRE>
213<DL>
214<DD>Converts an array of string values into a single CSV line. All
215 <code>null</code> values are converted to the string <code>"null"</code>,
216 all strings equal to <code>"null"</code> will additionally get quotes
217 around.
218<P>
219<DD><DL>
220<DT><B>Parameters:</B><DD><CODE>values</CODE> - the value array
221<DT><B>Returns:</B><DD>the CSV string, will be an empty string if the length of the
222 value array is 0</DL>
223</DD>
224</DL>
225<HR>
226
227<A NAME="parse(java.lang.String)"><!-- --></A><H3>
228parse</H3>
229<PRE>
230public 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>[][] <B>parse</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;s)
231                        throws <A HREF="http://download.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
232<DL>
233<DD>Parses the given String according to the default <A HREF="../../../../../org/apache/solr/internal/csv/CSVStrategy.html" title="class in org.apache.solr.internal.csv"><CODE>CSVStrategy</CODE></A>.
234<P>
235<DD><DL>
236<DT><B>Parameters:</B><DD><CODE>s</CODE> - CSV String to be parsed.
237<DT><B>Returns:</B><DD>parsed String matrix (which is never null)
238<DT><B>Throws:</B>
239<DD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> - in case of error</DL>
240</DD>
241</DL>
242<HR>
243
244<A NAME="parseLine(java.lang.String)"><!-- --></A><H3>
245parseLine</H3>
246<PRE>
247public 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>[] <B>parseLine</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;s)
248                          throws <A HREF="http://download.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
249<DL>
250<DD>Parses the first line only according to the default <A HREF="../../../../../org/apache/solr/internal/csv/CSVStrategy.html" title="class in org.apache.solr.internal.csv"><CODE>CSVStrategy</CODE></A>.
251 
252 Parsing empty string will be handled as valid records containing zero
253 elements, so the following property holds: parseLine("").length == 0.
254<P>
255<DD><DL>
256<DT><B>Parameters:</B><DD><CODE>s</CODE> - CSV String to be parsed.
257<DT><B>Returns:</B><DD>parsed String vector (which is never null)
258<DT><B>Throws:</B>
259<DD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> - in case of error</DL>
260</DD>
261</DL>
262<!-- ========= END OF CLASS DATA ========= -->
263<HR>
264
265
266<!-- ======= START OF BOTTOM NAVBAR ====== -->
267<A NAME="navbar_bottom"><!-- --></A>
268<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
269<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
270<TR>
271<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
272<A NAME="navbar_bottom_firstrow"><!-- --></A>
273<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
274  <TR ALIGN="center" VALIGN="top">
275  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
276  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
277  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
278  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/CSVUtils.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
279  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
280  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
281  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
282  </TR>
283</TABLE>
284</TD>
285<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
286</EM>
287</TD>
288</TR>
289
290<TR>
291<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
292&nbsp;<A HREF="../../../../../org/apache/solr/internal/csv/CSVStrategy.html" title="class in org.apache.solr.internal.csv"><B>PREV CLASS</B></A>&nbsp;
293&nbsp;NEXT CLASS</FONT></TD>
294<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
295  <A HREF="../../../../../index.html?org/apache/solr/internal/csv/CSVUtils.html" target="_top"><B>FRAMES</B></A>  &nbsp;
296&nbsp;<A HREF="CSVUtils.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
297&nbsp;<SCRIPT type="text/javascript">
298  <!--
299  if(window==top) {
300    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
301  }
302  //-->
303</SCRIPT>
304<NOSCRIPT>
305  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
306</NOSCRIPT>
307
308
309</FONT></TD>
310</TR>
311<TR>
312<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
313  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
314<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
315DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
316</TR>
317</TABLE>
318<A NAME="skip-navbar_bottom"></A>
319<!-- ======== END OF BOTTOM NAVBAR ======= -->
320
321<HR>
322
323          <address>Copyright &copy; 2000-2012 Apache Software Foundation.  All Rights Reserved.</address>
324          <script src='../../../../../prettify.js' type='text/javascript'></script>
325          <script type='text/javascript'>
326            (function(){
327              var oldonload = window.onload;
328              if (typeof oldonload != 'function') {
329                window.onload = prettyPrint;
330              } else {
331                window.onload = function() {
332                  oldonload();
333                  prettyPrint();
334                }
335              }
336            })();
337          </script>
338       
339</BODY>
340</HTML>
Note: See TracBrowser for help on using the repository browser.