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.5.0_04) on Sun Feb 19 05:15:30 PST 2006 --> 6<TITLE> 7PostalRetrievalStrategy (JPostal API) 8</TITLE> 9 10<META NAME="keywords" CONTENT="org.ahmadsoft.postal.PostalRetrievalStrategy interface"> 11 12<LINK REL ="stylesheet" TYPE="text/css" HREF="/stylesheet.css" TITLE="Style"> 13 14<SCRIPT type="text/javascript"> 15function windowTitle() 16{ 17 parent.document.title="PostalRetrievalStrategy (JPostal API)"; 18} 19</SCRIPT> 20<NOSCRIPT> 21</NOSCRIPT> 22 23</HEAD> 24 25<BODY BGCOLOR="white" onload="windowTitle();"> 26 27 28<!-- ========= START OF TOP NAVBAR ======= --> 29<A NAME="navbar_top"><!-- --></A> 30<A HREF="#skip-navbar_top" title="Skip navigation links"></A> 31<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> 32<TR> 33<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> 34<A NAME="navbar_top_firstrow"><!-- --></A> 35<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> 36 <TR ALIGN="center" VALIGN="top"> 37 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="/org/ahmadsoft/postal/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> 38 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> 39 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/PostalRetrievalStrategy.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> 40 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> 41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="/deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> 42 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="/index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> 43 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="/help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> 44 </TR> 45</TABLE> 46</TD> 47<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> 48</EM> 49</TD> 50</TR> 51 52<TR> 53<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 54 <A HREF="/org/ahmadsoft/postal/PostalCodeEntry.html" title="class in org.ahmadsoft.postal"><B>PREV CLASS</B></A> 55 <A HREF="/org/ahmadsoft/postal/ReadOnceStrategy.html" title="class in org.ahmadsoft.postal"><B>NEXT CLASS</B></A></FONT></TD> 56<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 57 <A HREF="/index.html?org/ahmadsoft/postal/PostalRetrievalStrategy.html" target="_top"><B>FRAMES</B></A> 58 <A HREF="PostalRetrievalStrategy.html" target="_top"><B>NO FRAMES</B></A> 59 <SCRIPT type="text/javascript"> 60 <!-- 61 if(window==top) { 62 document.writeln('<A HREF="/allclasses-noframe.html"><B>All Classes</B></A>'); 63 } 64 //--> 65</SCRIPT> 66<NOSCRIPT> 67 <A HREF="/allclasses-noframe.html"><B>All Classes</B></A> 68</NOSCRIPT> 69 70 71</FONT></TD> 72</TR> 73<TR> 74<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 75 SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> 76<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 77DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> 78</TR> 79</TABLE> 80<A NAME="skip-navbar_top"></A> 81<!-- ========= END OF TOP NAVBAR ========= --> 82 83<HR> 84<!-- ======== START OF CLASS DATA ======== --> 85<H2> 86<FONT SIZE="-1"> 87org.ahmadsoft.postal</FONT> 88<BR> 89Interface PostalRetrievalStrategy</H2> 90<DL> 91<DT><B>All Known Implementing Classes:</B> <DD><A HREF="/org/ahmadsoft/postal/DiskStrategy.html" title="class in org.ahmadsoft.postal">DiskStrategy</A>, <A HREF="/org/ahmadsoft/postal/InMemoryStrategy.html" title="class in org.ahmadsoft.postal">InMemoryStrategy</A>, <A HREF="/org/ahmadsoft/postal/ReadOnceStrategy.html" title="class in org.ahmadsoft.postal">ReadOnceStrategy</A></DD> 92</DL> 93<HR> 94<DL> 95<DT><PRE>public interface <B>PostalRetrievalStrategy</B></DL> 96</PRE> 97 98<P> 99Encapsulates a strategy for retrieving postal 100 codes. 101<P> 102 103<P> 104<DL> 105<DT><B>Author:</B></DT> 106 <DD>Amin Ahmad</DD> 107</DL> 108<HR> 109 110<P> 111 112<!-- ========== METHOD SUMMARY =========== --> 113 114<A NAME="method_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>Method Summary</B></FONT></TH> 119</TR> 120<TR BGCOLOR="white" CLASS="TableRowColor"> 121<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 122<CODE> void</CODE></FONT></TD> 123<TD><CODE><B><A HREF="/org/ahmadsoft/postal/PostalRetrievalStrategy.html#dispose()">dispose</A></B>()</CODE> 124 125<BR> 126 </TD> 127</TR> 128<TR BGCOLOR="white" CLASS="TableRowColor"> 129<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 130<CODE> java.util.List</CODE></FONT></TD> 131<TD><CODE><B><A HREF="/org/ahmadsoft/postal/PostalRetrievalStrategy.html#getCandidates(int)">getCandidates</A></B>(int postalCode)</CODE> 132 133<BR> 134 Retrieves a list of candidate cities for a 135 specified postal code.</TD> 136</TR> 137<TR BGCOLOR="white" CLASS="TableRowColor"> 138<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 139<CODE> void</CODE></FONT></TD> 140<TD><CODE><B><A HREF="/org/ahmadsoft/postal/PostalRetrievalStrategy.html#initialize(java.io.File, java.io.File)">initialize</A></B>(java.io.File indexFile, 141 java.io.File dataFile)</CODE> 142 143<BR> 144 Initializes the retrieval strategy with the 145 postal code index and data files.</TD> 146</TR> 147</TABLE> 148 149<P> 150 151<!-- ============ METHOD DETAIL ========== --> 152 153<A NAME="method_detail"><!-- --></A> 154<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 155<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 156<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> 157<B>Method Detail</B></FONT></TH> 158</TR> 159</TABLE> 160 161<A NAME="initialize(java.io.File, java.io.File)"><!-- --></A><H3> 162initialize</H3> 163<PRE> 164void <B>initialize</B>(java.io.File indexFile, 165 java.io.File dataFile) 166 throws java.lang.Exception</PRE> 167<DL> 168<DD>Initializes the retrieval strategy with the 169 postal code index and data files. 170<P> 171<DD><DL> 172<DT><B>Parameters:</B><DD><CODE>indexFile</CODE> - <DD><CODE>dataFile</CODE> - 173<DT><B>Throws:</B> 174<DD><CODE>java.lang.Exception</CODE></DL> 175</DD> 176</DL> 177<HR> 178 179<A NAME="dispose()"><!-- --></A><H3> 180dispose</H3> 181<PRE> 182void <B>dispose</B>() 183 throws java.lang.Exception</PRE> 184<DL> 185<DD><DL> 186 187<DT><B>Throws:</B> 188<DD><CODE>java.lang.Exception</CODE></DL> 189</DD> 190</DL> 191<HR> 192 193<A NAME="getCandidates(int)"><!-- --></A><H3> 194getCandidates</H3> 195<PRE> 196java.util.List <B>getCandidates</B>(int postalCode)</PRE> 197<DL> 198<DD>Retrieves a list of candidate cities for a 199 specified postal code. 200<P> 201<DD><DL> 202<DT><B>Parameters:</B><DD><CODE>postalCode</CODE> - the postal code. 203<DT><B>Returns:</B><DD>a list of candidate cities.</DL> 204</DD> 205</DL> 206<!-- ========= END OF CLASS DATA ========= --> 207<HR> 208 209 210<!-- ======= START OF BOTTOM NAVBAR ====== --> 211<A NAME="navbar_bottom"><!-- --></A> 212<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> 213<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> 214<TR> 215<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> 216<A NAME="navbar_bottom_firstrow"><!-- --></A> 217<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> 218 <TR ALIGN="center" VALIGN="top"> 219 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="/org/ahmadsoft/postal/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> 220 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> 221 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/PostalRetrievalStrategy.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> 222 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> 223 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="/deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> 224 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="/index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> 225 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="/help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> 226 </TR> 227</TABLE> 228</TD> 229<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> 230</EM> 231</TD> 232</TR> 233 234<TR> 235<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 236 <A HREF="/org/ahmadsoft/postal/PostalCodeEntry.html" title="class in org.ahmadsoft.postal"><B>PREV CLASS</B></A> 237 <A HREF="/org/ahmadsoft/postal/ReadOnceStrategy.html" title="class in org.ahmadsoft.postal"><B>NEXT CLASS</B></A></FONT></TD> 238<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 239 <A HREF="/index.html?org/ahmadsoft/postal/PostalRetrievalStrategy.html" target="_top"><B>FRAMES</B></A> 240 <A HREF="PostalRetrievalStrategy.html" target="_top"><B>NO FRAMES</B></A> 241 <SCRIPT type="text/javascript"> 242 <!-- 243 if(window==top) { 244 document.writeln('<A HREF="/allclasses-noframe.html"><B>All Classes</B></A>'); 245 } 246 //--> 247</SCRIPT> 248<NOSCRIPT> 249 <A HREF="/allclasses-noframe.html"><B>All Classes</B></A> 250</NOSCRIPT> 251 252 253</FONT></TD> 254</TR> 255<TR> 256<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 257 SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> 258<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 259DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> 260</TR> 261</TABLE> 262<A NAME="skip-navbar_bottom"></A> 263<!-- ======== END OF BOTTOM NAVBAR ======= --> 264 265<HR> 266<i>Copyright © 2006 Ahmadsoft. All Rights Reserved.</i> 267</BODY> 268</HTML> 269