<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.4.2_12) on Tue Dec 25 10:53:36 JST 2007 --> <TITLE> Database (estraier) </TITLE> <META NAME="keywords" CONTENT="estraier.Database class"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { parent.document.title="Database (estraier)"; } </SCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../estraier/Condition.html" title="class in estraier"><B>PREV CLASS</B></A> <A HREF="../estraier/DatabaseInformer.html" title="interface in estraier"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../index.html" target="_top"><B>FRAMES</B></A> <A HREF="Database.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> estraier</FONT> <BR> Class Database</H2> <PRE> java.lang.Object <IMG SRC="../resources/inherit.gif" ALT="extended by"><B>estraier.Database</B> </PRE> <HR> <DL> <DT>public class <B>Database</B><DT>extends java.lang.Object</DL> <P> Abstraction of database <P> <P> <HR> <P> <!-- ======== NESTED CLASS SUMMARY ======== --> <!-- =========== FIELD SUMMARY =========== --> <A NAME="field_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=2><FONT SIZE="+2"> <B>Field Summary</B></FONT></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#DBCHRCAT">DBCHRCAT</A></B></CODE> <BR> open mode: use character category analyzer</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#DBCREAT">DBCREAT</A></B></CODE> <BR> open mode: a writer creating</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#DBHUGE">DBHUGE</A></B></CODE> <BR> open mode: huge tuning</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#DBHUGE2">DBHUGE2</A></B></CODE> <BR> open mode: huge tuning second</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#DBHUGE3">DBHUGE3</A></B></CODE> <BR> open mode: huge tuning third</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#DBLARGE">DBLARGE</A></B></CODE> <BR> open mode: large tuning</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#DBLCKNB">DBLCKNB</A></B></CODE> <BR> open mode: lock without blocking</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#DBNOLCK">DBNOLCK</A></B></CODE> <BR> open mode: open without locking</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#DBPERFNG">DBPERFNG</A></B></CODE> <BR> open mode: use perfect N-gram analyzer</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#DBREADER">DBREADER</A></B></CODE> <BR> open mode: open as a reader</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#DBSCASIS">DBSCASIS</A></B></CODE> <BR> open mode: refrain from adjustment of scores</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#DBSCINT">DBSCINT</A></B></CODE> <BR> open mode: store scores as integer</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#DBSCVOID">DBSCVOID</A></B></CODE> <BR> open mode: store scores as void</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#DBSMALL">DBSMALL</A></B></CODE> <BR> open mode: small tuning</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#DBTRUNC">DBTRUNC</A></B></CODE> <BR> open mode: a writer truncating</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#DBWRITER">DBWRITER</A></B></CODE> <BR> open mode: open as a writer</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#ERRACCES">ERRACCES</A></B></CODE> <BR> error code: access forbidden</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#ERRDB">ERRDB</A></B></CODE> <BR> error code: database problem</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#ERRINVAL">ERRINVAL</A></B></CODE> <BR> error code: invalid argument</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#ERRIO">ERRIO</A></B></CODE> <BR> error code: I/O problem</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#ERRLOCK">ERRLOCK</A></B></CODE> <BR> error code: lock failure</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#ERRMISC">ERRMISC</A></B></CODE> <BR> error code: miscellaneous</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#ERRNOERR">ERRNOERR</A></B></CODE> <BR> error code: no error</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#ERRNOITEM">ERRNOITEM</A></B></CODE> <BR> error code: no item</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#GDNOATTR">GDNOATTR</A></B></CODE> <BR> get_doc option: no attributes</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#GDNOKWD">GDNOKWD</A></B></CODE> <BR> get_doc option: no keywords</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#GDNOTEXT">GDNOTEXT</A></B></CODE> <BR> get_doc option: no text</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#IDXATTRNUM">IDXATTRNUM</A></B></CODE> <BR> attribute index type: for narrowing with attributes as numbers</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#IDXATTRSEQ">IDXATTRSEQ</A></B></CODE> <BR> attribute index type: for multipurpose sequencial access method</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#IDXATTRSTR">IDXATTRSTR</A></B></CODE> <BR> attribute index type: for narrowing with attributes as strings</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#MGCLEAN">MGCLEAN</A></B></CODE> <BR> merge option: clean up dispensable regions</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#ODCLEAN">ODCLEAN</A></B></CODE> <BR> out_doc option: clean up dispensable regions</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#OPTNODBOPT">OPTNODBOPT</A></B></CODE> <BR> optimize option: omit optimization of the database files</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#OPTNOPURGE">OPTNOPURGE</A></B></CODE> <BR> optimize option: omit purging dispensable region of deleted</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#PDCLEAN">PDCLEAN</A></B></CODE> <BR> put_doc option: clean up dispensable regions</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#PDWEIGHT">PDWEIGHT</A></B></CODE> <BR> put_doc option: weight scores statically when indexing</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static java.lang.String</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#VERSION">VERSION</A></B></CODE> <BR> version of Hyper Estraier</TD> </TR> </TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <A NAME="constructor_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=2><FONT SIZE="+2"> <B>Constructor Summary</B></FONT></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../estraier/Database.html#Database()">Database</A></B>()</CODE> <BR> Create a database object.</TD> </TR> </TABLE> <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=2><FONT SIZE="+2"> <B>Method Summary</B></FONT></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#add_attr_index(java.lang.String, int)">add_attr_index</A></B>(java.lang.String name, int type)</CODE> <BR> Add an index for narrowing or sorting with document attributes.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#add_pseudo_index(java.lang.String)">add_pseudo_index</A></B>(java.lang.String path)</CODE> <BR> Add a pseudo index directory.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#close()">close</A></B>()</CODE> <BR> Close the database.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> int</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#doc_num()">doc_num</A></B>()</CODE> <BR> Get the number of documents.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#edit_doc(estraier.Document)">edit_doc</A></B>(<A HREF="../estraier/Document.html" title="class in estraier">Document</A> doc)</CODE> <BR> Edit attributes of a document.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.String</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#err_msg(int)">err_msg</A></B>(int ecode)</CODE> <BR> Get the string of an error code.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> int</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#error()">error</A></B>()</CODE> <BR> Get the last happened error code.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#fatal()">fatal</A></B>()</CODE> <BR> Check whether the database has a fatal error.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected void</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#finalize()">finalize</A></B>()</CODE> <BR> Release resources.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#flush(int)">flush</A></B>(int max)</CODE> <BR> Flush index words in the cache.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.String</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#get_doc_attr(int, java.lang.String)">get_doc_attr</A></B>(int id, java.lang.String name)</CODE> <BR> Retrieve the value of an attribute of a document.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../estraier/Document.html" title="class in estraier">Document</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#get_doc(int, int)">get_doc</A></B>(int id, int options)</CODE> <BR> Retrieve a document.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#merge(java.lang.String, int)">merge</A></B>(java.lang.String name, int options)</CODE> <BR> Merge another database.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.String</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#name()">name</A></B>()</CODE> <BR> Get the name.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#open(java.lang.String, int)">open</A></B>(java.lang.String name, int omode)</CODE> <BR> Open the database.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#optimize(int)">optimize</A></B>(int options)</CODE> <BR> Optimize the database.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#out_doc(int, int)">out_doc</A></B>(int id, int options)</CODE> <BR> Remove a document.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#put_doc(estraier.Document, int)">put_doc</A></B>(<A HREF="../estraier/Document.html" title="class in estraier">Document</A> doc, int options)</CODE> <BR> Add a document.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#scan_doc(estraier.Document, estraier.Condition)">scan_doc</A></B>(<A HREF="../estraier/Document.html" title="class in estraier">Document</A> doc, <A HREF="../estraier/Condition.html" title="class in estraier">Condition</A> cond)</CODE> <BR> Check whether a document object matches the phrase of a search condition object definitely.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static <A HREF="../estraier/Result.html" title="class in estraier">Result</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#search_meta(estraier.Database[], estraier.Condition)">search_meta</A></B>(<A HREF="../estraier/Database.html" title="class in estraier">Database</A>[] dbs, <A HREF="../estraier/Condition.html" title="class in estraier">Condition</A> cond)</CODE> <BR> Search plural databases for documents corresponding a condition.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../estraier/Result.html" title="class in estraier">Result</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#search(estraier.Condition)">search</A></B>(<A HREF="../estraier/Condition.html" title="class in estraier">Condition</A> cond)</CODE> <BR> Search for documents corresponding a condition.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#set_cache_size(double, int, int, int)">set_cache_size</A></B>(double size, int anum, int tnum, int rnum)</CODE> <BR> Set the maximum size of the cache memory.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#set_informer(estraier.DatabaseInformer)">set_informer</A></B>(<A HREF="../estraier/DatabaseInformer.html" title="interface in estraier">DatabaseInformer</A> informer)</CODE> <BR> Set the callback function to inform of database events.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#set_wildmax(int)">set_wildmax</A></B>(int num)</CODE> <BR> Set the maximum number of expansion of wild cards.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> double</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#size()">size</A></B>()</CODE> <BR> Get the size.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#sync()">sync</A></B>()</CODE> <BR> Synchronize updating contents.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> int</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#uri_to_id(java.lang.String)">uri_to_id</A></B>(java.lang.String uri)</CODE> <BR> Get the ID of a document specified by URI.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> int</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Database.html#word_num()">word_num</A></B>()</CODE> <BR> Get the number of unique words.</TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TD><B>Methods inherited from class java.lang.Object</B></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE>clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> </TR> </TABLE> <P> <!-- ============ FIELD DETAIL =========== --> <A NAME="field_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=1><FONT SIZE="+2"> <B>Field Detail</B></FONT></TD> </TR> </TABLE> <A NAME="DBCHRCAT"><!-- --></A><H3> DBCHRCAT</H3> <PRE> public static final int <B>DBCHRCAT</B></PRE> <DL> <DD>open mode: use character category analyzer <P> <DL> <DT><B>See Also:</B><DD><A HREF="../constant-values.html#estraier.Database.DBCHRCAT">Constant Field Values</A></DL> </DL> <HR> <A NAME="DBCREAT"><!-- --></A><H3> DBCREAT</H3> <PRE> public static final int <B>DBCREAT</B></PRE> <DL> <DD>open mode: a writer creating <P> <DL> <DT><B>See Also:</B><DD><A HREF="../constant-values.html#estraier.Database.DBCREAT">Constant Field Values</A></DL> </DL> <HR> <A NAME="DBHUGE"><!-- --></A><H3> DBHUGE</H3> <PRE> public static final int <B>DBHUGE</B></PRE> <DL> <DD>open mode: huge tuning <P> <DL> <DT><B>See Also:</B><DD><A HREF="../constant-values.html#estraier.Database.DBHUGE">Constant Field Values</A></DL> </DL> <HR> <A NAME="DBHUGE2"><!-- --></A><H3> DBHUGE2</H3> <PRE> public static final int <B>DBHUGE2</B></PRE> <DL> <DD>open mode: huge tuning second <P> <DL> <DT><B>See Also:</B><DD><A HREF="../constant-values.html#estraier.Database.DBHUGE2">Constant Field Values</A></DL> </DL> <HR> <A NAME="DBHUGE3"><!-- --></A><H3> DBHUGE3</H3> <PRE> public static final int <B>DBHUGE3</B></PRE> <DL> <DD>open mode: huge tuning third <P> <DL> <DT><B>See Also:</B><DD><A HREF="../constant-values.html#estraier.Database.DBHUGE3">Constant Field Values</A></DL> </DL> <HR> <A NAME="DBLARGE"><!-- --></A><H3> DBLARGE</H3> <PRE> public static final int <B>DBLARGE</B></PRE> <DL> <DD>open mode: large tuning <P> <DL> <DT><B>See Also:</B><DD><A HREF="../constant-values.html#estraier.Database.DBLARGE">Constant Field Values</A></DL> </DL> <HR> <A NAME="DBLCKNB"><!-- --></A><H3> DBLCKNB</H3> <PRE> public static final int <B>DBLCKNB</B></PRE> <DL> <DD>open mode: lock without blocking <P> <DL> <DT><B>See Also:</B><DD><A HREF="../constant-values.html#estraier.Database.DBLCKNB">Constant Field Values</A></DL> </DL> <HR> <A NAME="DBNOLCK"><!-- --></A><H3> DBNOLCK</H3> <PRE> public static final int <B>DBNOLCK</B></PRE> <DL> <DD>open mode: open without locking <P> <DL> <DT><B>See Also:</B><DD><A HREF="../constant-values.html#estraier.Database.DBNOLCK">Constant Field Values</A></DL> </DL> <HR> <A NAME="DBPERFNG"><!-- --></A><H3> DBPERFNG</H3> <PRE> public static final int <B>DBPERFNG</B></PRE> <DL> <DD>open mode: use perfect N-gram analyzer <P> <DL> <DT><B>See Also:</B><DD><A HREF="../constant-values.html#estraier.Database.DBPERFNG">Constant Field Values</A></DL> </DL> <HR> <A NAME="DBREADER"><!-- --></A><H3> DBREADER</H3> <PRE> public static final int <B>DBREADER</B></PRE> <DL> <DD>open mode: open as a reader <P> <DL> <DT><B>See Also:</B><DD><A HREF="../constant-values.html#estraier.Database.DBREADER">Constant Field Values</A></DL> </DL> <HR> <A NAME="DBSCASIS"><!-- --></A><H3> DBSCASIS</H3> <PRE> public static final int <B>DBSCASIS</B></PRE> <DL> <DD>open mode: refrain from adjustment of scores <P> <DL> <DT><B>See Also:</B><DD><A HREF="../constant-values.html#estraier.Database.DBSCASIS">Constant Field Values</A></DL> </DL> <HR> <A NAME="DBSCINT"><!-- --></A><H3> DBSCINT</H3> <PRE> public static final int <B>DBSCINT</B></PRE> <DL> <DD>open mode: store scores as integer <P> <DL> <DT><B>See Also:</B><DD><A HREF="../constant-values.html#estraier.Database.DBSCINT">Constant Field Values</A></DL> </DL> <HR> <A NAME="DBSCVOID"><!-- --></A><H3> DBSCVOID</H3> <PRE> public static final int <B>DBSCVOID</B></PRE> <DL> <DD>open mode: store scores as void <P> <DL> <DT><B>See Also:</B><DD><A HREF="../constant-values.html#estraier.Database.DBSCVOID">Constant Field Values</A></DL> </DL> <HR> <A NAME="DBSMALL"><!-- --></A><H3> DBSMALL</H3> <PRE> public static final int <B>DBSMALL</B></PRE> <DL> <DD>open mode: small tuning <P> <DL> <DT><B>See Also:</B><DD><A HREF="../constant-values.html#estraier.Database.DBSMALL">Constant Field Values</A></DL> </DL> <HR> <A NAME="DBTRUNC"><!-- --></A><H3> DBTRUNC</H3> <PRE> public static final int <B>DBTRUNC</B></PRE> <DL> <DD>open mode: a writer truncating <P> <DL> <DT><B>See Also:</B><DD><A HREF="../constant-values.html#estraier.Database.DBTRUNC">Constant Field Values</A></DL> </DL> <HR> <A NAME="DBWRITER"><!-- --></A><H3> DBWRITER</H3> <PRE> public static final int <B>DBWRITER</B></PRE> <DL> <DD>open mode: open as a writer <P> <DL> <DT><B>See Also:</B><DD><A HREF="../constant-values.html#estraier.Database.DBWRITER">Constant Field Values</A></DL> </DL> <HR> <A NAME="ERRACCES"><!-- --></A><H3> ERRACCES</H3> <PRE> public static final int <B>ERRACCES</B></PRE> <DL> <DD>error code: access forbidden <P> <DL> <DT><B>See Also:</B><DD><A HREF="../constant-values.html#estraier.Database.ERRACCES">Constant Field Values</A></DL> </DL> <HR> <A NAME="ERRDB"><!-- --></A><H3> ERRDB</H3> <PRE> public static final int <B>ERRDB</B></PRE> <DL> <DD>error code: database problem <P> <DL> <DT><B>See Also:</B><DD><A HREF="../constant-values.html#estraier.Database.ERRDB">Constant Field Values</A></DL> </DL> <HR> <A NAME="ERRINVAL"><!-- --></A><H3> ERRINVAL</H3> <PRE> public static final int <B>ERRINVAL</B></PRE> <DL> <DD>error code: invalid argument <P> <DL> <DT><B>See Also:</B><DD><A HREF="../constant-values.html#estraier.Database.ERRINVAL">Constant Field Values</A></DL> </DL> <HR> <A NAME="ERRIO"><!-- --></A><H3> ERRIO</H3> <PRE> public static final int <B>ERRIO</B></PRE> <DL> <DD>error code: I/O problem <P> <DL> <DT><B>See Also:</B><DD><A HREF="../constant-values.html#estraier.Database.ERRIO">Constant Field Values</A></DL> </DL> <HR> <A NAME="ERRLOCK"><!-- --></A><H3> ERRLOCK</H3> <PRE> public static final int <B>ERRLOCK</B></PRE> <DL> <DD>error code: lock failure <P> <DL> <DT><B>See Also:</B><DD><A HREF="../constant-values.html#estraier.Database.ERRLOCK">Constant Field Values</A></DL> </DL> <HR> <A NAME="ERRMISC"><!-- --></A><H3> ERRMISC</H3> <PRE> public static final int <B>ERRMISC</B></PRE> <DL> <DD>error code: miscellaneous <P> <DL> <DT><B>See Also:</B><DD><A HREF="../constant-values.html#estraier.Database.ERRMISC">Constant Field Values</A></DL> </DL> <HR> <A NAME="ERRNOERR"><!-- --></A><H3> ERRNOERR</H3> <PRE> public static final int <B>ERRNOERR</B></PRE> <DL> <DD>error code: no error <P> <DL> <DT><B>See Also:</B><DD><A HREF="../constant-values.html#estraier.Database.ERRNOERR">Constant Field Values</A></DL> </DL> <HR> <A NAME="ERRNOITEM"><!-- --></A><H3> ERRNOITEM</H3> <PRE> public static final int <B>ERRNOITEM</B></PRE> <DL> <DD>error code: no item <P> <DL> <DT><B>See Also:</B><DD><A HREF="../constant-values.html#estraier.Database.ERRNOITEM">Constant Field Values</A></DL> </DL> <HR> <A NAME="GDNOATTR"><!-- --></A><H3> GDNOATTR</H3> <PRE> public static final int <B>GDNOATTR</B></PRE> <DL> <DD>get_doc option: no attributes <P> <DL> <DT><B>See Also:</B><DD><A HREF="../constant-values.html#estraier.Database.GDNOATTR">Constant Field Values</A></DL> </DL> <HR> <A NAME="GDNOKWD"><!-- --></A><H3> GDNOKWD</H3> <PRE> public static final int <B>GDNOKWD</B></PRE> <DL> <DD>get_doc option: no keywords <P> <DL> <DT><B>See Also:</B><DD><A HREF="../constant-values.html#estraier.Database.GDNOKWD">Constant Field Values</A></DL> </DL> <HR> <A NAME="GDNOTEXT"><!-- --></A><H3> GDNOTEXT</H3> <PRE> public static final int <B>GDNOTEXT</B></PRE> <DL> <DD>get_doc option: no text <P> <DL> <DT><B>See Also:</B><DD><A HREF="../constant-values.html#estraier.Database.GDNOTEXT">Constant Field Values</A></DL> </DL> <HR> <A NAME="IDXATTRNUM"><!-- --></A><H3> IDXATTRNUM</H3> <PRE> public static final int <B>IDXATTRNUM</B></PRE> <DL> <DD>attribute index type: for narrowing with attributes as numbers <P> <DL> <DT><B>See Also:</B><DD><A HREF="../constant-values.html#estraier.Database.IDXATTRNUM">Constant Field Values</A></DL> </DL> <HR> <A NAME="IDXATTRSEQ"><!-- --></A><H3> IDXATTRSEQ</H3> <PRE> public static final int <B>IDXATTRSEQ</B></PRE> <DL> <DD>attribute index type: for multipurpose sequencial access method <P> <DL> <DT><B>See Also:</B><DD><A HREF="../constant-values.html#estraier.Database.IDXATTRSEQ">Constant Field Values</A></DL> </DL> <HR> <A NAME="IDXATTRSTR"><!-- --></A><H3> IDXATTRSTR</H3> <PRE> public static final int <B>IDXATTRSTR</B></PRE> <DL> <DD>attribute index type: for narrowing with attributes as strings <P> <DL> <DT><B>See Also:</B><DD><A HREF="../constant-values.html#estraier.Database.IDXATTRSTR">Constant Field Values</A></DL> </DL> <HR> <A NAME="MGCLEAN"><!-- --></A><H3> MGCLEAN</H3> <PRE> public static final int <B>MGCLEAN</B></PRE> <DL> <DD>merge option: clean up dispensable regions <P> <DL> <DT><B>See Also:</B><DD><A HREF="../constant-values.html#estraier.Database.MGCLEAN">Constant Field Values</A></DL> </DL> <HR> <A NAME="ODCLEAN"><!-- --></A><H3> ODCLEAN</H3> <PRE> public static final int <B>ODCLEAN</B></PRE> <DL> <DD>out_doc option: clean up dispensable regions <P> <DL> <DT><B>See Also:</B><DD><A HREF="../constant-values.html#estraier.Database.ODCLEAN">Constant Field Values</A></DL> </DL> <HR> <A NAME="OPTNODBOPT"><!-- --></A><H3> OPTNODBOPT</H3> <PRE> public static final int <B>OPTNODBOPT</B></PRE> <DL> <DD>optimize option: omit optimization of the database files <P> <DL> <DT><B>See Also:</B><DD><A HREF="../constant-values.html#estraier.Database.OPTNODBOPT">Constant Field Values</A></DL> </DL> <HR> <A NAME="OPTNOPURGE"><!-- --></A><H3> OPTNOPURGE</H3> <PRE> public static final int <B>OPTNOPURGE</B></PRE> <DL> <DD>optimize option: omit purging dispensable region of deleted <P> <DL> <DT><B>See Also:</B><DD><A HREF="../constant-values.html#estraier.Database.OPTNOPURGE">Constant Field Values</A></DL> </DL> <HR> <A NAME="PDCLEAN"><!-- --></A><H3> PDCLEAN</H3> <PRE> public static final int <B>PDCLEAN</B></PRE> <DL> <DD>put_doc option: clean up dispensable regions <P> <DL> <DT><B>See Also:</B><DD><A HREF="../constant-values.html#estraier.Database.PDCLEAN">Constant Field Values</A></DL> </DL> <HR> <A NAME="PDWEIGHT"><!-- --></A><H3> PDWEIGHT</H3> <PRE> public static final int <B>PDWEIGHT</B></PRE> <DL> <DD>put_doc option: weight scores statically when indexing <P> <DL> <DT><B>See Also:</B><DD><A HREF="../constant-values.html#estraier.Database.PDWEIGHT">Constant Field Values</A></DL> </DL> <HR> <A NAME="VERSION"><!-- --></A><H3> VERSION</H3> <PRE> public static final java.lang.String <B>VERSION</B></PRE> <DL> <DD>version of Hyper Estraier <P> <DL> </DL> </DL> <!-- ========= CONSTRUCTOR DETAIL ======== --> <A NAME="constructor_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=1><FONT SIZE="+2"> <B>Constructor Detail</B></FONT></TD> </TR> </TABLE> <A NAME="Database()"><!-- --></A><H3> Database</H3> <PRE> public <B>Database</B>()</PRE> <DL> <DD>Create a database object. <P> </DL> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=1><FONT SIZE="+2"> <B>Method Detail</B></FONT></TD> </TR> </TABLE> <A NAME="add_attr_index(java.lang.String, int)"><!-- --></A><H3> add_attr_index</H3> <PRE> public boolean <B>add_attr_index</B>(java.lang.String name, int type)</PRE> <DL> <DD>Add an index for narrowing or sorting with document attributes. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of an attribute.<DD><CODE>type</CODE> - the data type of attribute index; `Database.IDXATTRSEQ' for multipurpose sequencial access method, `Database.IDXATTRSTR' for narrowing with attributes as strings, `Database.IDXATTRNUM' for narrowing with attributes as numbers. <DT><B>Returns:</B><DD>true if success, else it is false.</DL> </DD> </DL> <HR> <A NAME="add_pseudo_index(java.lang.String)"><!-- --></A><H3> add_pseudo_index</H3> <PRE> public boolean <B>add_pseudo_index</B>(java.lang.String path)</PRE> <DL> <DD>Add a pseudo index directory. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>path</CODE> - the path of a pseudo index directory. <DT><B>Returns:</B><DD>true if success, else it is false.</DL> </DD> </DL> <HR> <A NAME="close()"><!-- --></A><H3> close</H3> <PRE> public boolean <B>close</B>()</PRE> <DL> <DD>Close the database. <P> <DD><DL> <DT><B>Returns:</B><DD>true if success, else it is false.</DL> </DD> </DL> <HR> <A NAME="doc_num()"><!-- --></A><H3> doc_num</H3> <PRE> public int <B>doc_num</B>()</PRE> <DL> <DD>Get the number of documents. <P> <DD><DL> <DT><B>Returns:</B><DD>the number of documents in the database.</DL> </DD> </DL> <HR> <A NAME="edit_doc(estraier.Document)"><!-- --></A><H3> edit_doc</H3> <PRE> public boolean <B>edit_doc</B>(<A HREF="../estraier/Document.html" title="class in estraier">Document</A> doc)</PRE> <DL> <DD>Edit attributes of a document. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>doc</CODE> - a document object. <DT><B>Returns:</B><DD>true if success, else it is false.</DL> </DD> </DL> <HR> <A NAME="err_msg(int)"><!-- --></A><H3> err_msg</H3> <PRE> public java.lang.String <B>err_msg</B>(int ecode)</PRE> <DL> <DD>Get the string of an error code. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>ecode</CODE> - an error code. <DT><B>Returns:</B><DD>the string of the error code.</DL> </DD> </DL> <HR> <A NAME="error()"><!-- --></A><H3> error</H3> <PRE> public int <B>error</B>()</PRE> <DL> <DD>Get the last happened error code. <P> <DD><DL> <DT><B>Returns:</B><DD>the last happened error code.</DL> </DD> </DL> <HR> <A NAME="fatal()"><!-- --></A><H3> fatal</H3> <PRE> public boolean <B>fatal</B>()</PRE> <DL> <DD>Check whether the database has a fatal error. <P> <DD><DL> <DT><B>Returns:</B><DD>true if the database has fatal erroor, else it is false.</DL> </DD> </DL> <HR> <A NAME="finalize()"><!-- --></A><H3> finalize</H3> <PRE> protected void <B>finalize</B>()</PRE> <DL> <DD>Release resources. <P> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="flush(int)"><!-- --></A><H3> flush</H3> <PRE> public boolean <B>flush</B>(int max)</PRE> <DL> <DD>Flush index words in the cache. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>max</CODE> - the maximum number of words to be flushed. If it not more than zero, all words are flushed. <DT><B>Returns:</B><DD>true if success, else it is false.</DL> </DD> </DL> <HR> <A NAME="get_doc_attr(int, java.lang.String)"><!-- --></A><H3> get_doc_attr</H3> <PRE> public java.lang.String <B>get_doc_attr</B>(int id, java.lang.String name)</PRE> <DL> <DD>Retrieve the value of an attribute of a document. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>id</CODE> - the ID number of a registered document.<DD><CODE>name</CODE> - the name of an attribute. <DT><B>Returns:</B><DD>the value of the attribute or `null' if it does not exist.</DL> </DD> </DL> <HR> <A NAME="get_doc(int, int)"><!-- --></A><H3> get_doc</H3> <PRE> public <A HREF="../estraier/Document.html" title="class in estraier">Document</A> <B>get_doc</B>(int id, int options)</PRE> <DL> <DD>Retrieve a document. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>id</CODE> - the ID number of a registered document.<DD><CODE>options</CODE> - options: `Database.GDNOATTR' to ignore attributes, `Database.GDNOTEXT' to ignore the body text, `Database.GDNOKWD' to ignore keywords. The three can be specified at # the same time by bitwise or. <DT><B>Returns:</B><DD>a document object. On error, `null' is returned.</DL> </DD> </DL> <HR> <A NAME="merge(java.lang.String, int)"><!-- --></A><H3> merge</H3> <PRE> public boolean <B>merge</B>(java.lang.String name, int options)</PRE> <DL> <DD>Merge another database. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of another database directory.<DD><CODE>options</CODE> - options: `Database.MGCLEAN' to clean up dispensable regions of the deleted document. <DT><B>Returns:</B><DD>true if success, else it is false.</DL> </DD> </DL> <HR> <A NAME="name()"><!-- --></A><H3> name</H3> <PRE> public java.lang.String <B>name</B>()</PRE> <DL> <DD>Get the name. <P> <DD><DL> <DT><B>Returns:</B><DD>the name of the database.</DL> </DD> </DL> <HR> <A NAME="open(java.lang.String, int)"><!-- --></A><H3> open</H3> <PRE> public boolean <B>open</B>(java.lang.String name, int omode)</PRE> <DL> <DD>Open the database. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of a database directory.<DD><CODE>omode</CODE> - open modes: `Database.DBWRITER' as a writer, `Database.DBREADER' as a reader. If the mode is `Database.DBWRITER', the following may be added by bitwise or: `Database.DBCREAT', which means it creates a new database if not exist, `Database.DBTRUNC', which means it creates a new database regardless if one exists. Both of `Database.DBREADER' and `Database.DBWRITER' can be added to by bitwise or: `Database.DBNOLCK', which means it opens a database file without file locking, or `Database.DBLCKNB', which means locking is performed without blocking. If `Database.DBNOLCK' is used, the application is responsible for exclusion control. `Database.DBCREAT' can be added to by bitwise or: `Database.DBPERFNG', which means N-gram analysis is performed against European text also, `Database.DBCHACAT', which means character category analysis is performed instead of N-gram analysis, `Database.DBSMALL', which means the index is tuned to register less than 50000 documents, `Database.DBLARGE', which means the index is tuned to register more than 300000 documents, `Database.DBHUGE', which means the index is tuned to register more than 1000000 documents, `Database.DBHUGE2', which means the index is tuned to register more than 5000000 documents, `Database.DBHUGE3', which means the index is tuned to register more than 10000000 documents, `Database.DBSCVOID', which means scores are stored as void, `Database.DBSCINT', which means scores are stored as 32-bit integer, `Database.DBSCASIS', which means scores are stored as-is and marked not to be tuned when search. <DT><B>Returns:</B><DD>true if success, else it is false.</DL> </DD> </DL> <HR> <A NAME="optimize(int)"><!-- --></A><H3> optimize</H3> <PRE> public boolean <B>optimize</B>(int options)</PRE> <DL> <DD>Optimize the database. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>options</CODE> - options: `Database.OPTNOPURGE' to omit purging dispensable region of deleted documents, `Database.OPTNODBOPT' to omit optimization of the database files. The two can be specified at the same time by bitwise or. <DT><B>Returns:</B><DD>true if success, else it is false.</DL> </DD> </DL> <HR> <A NAME="out_doc(int, int)"><!-- --></A><H3> out_doc</H3> <PRE> public boolean <B>out_doc</B>(int id, int options)</PRE> <DL> <DD>Remove a document. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>id</CODE> - the ID number of a registered document.<DD><CODE>options</CODE> - options: `Database.ODCLEAN' to clean up dispensable regions of the deleted document. <DT><B>Returns:</B><DD>true if success, else it is false.</DL> </DD> </DL> <HR> <A NAME="put_doc(estraier.Document, int)"><!-- --></A><H3> put_doc</H3> <PRE> public boolean <B>put_doc</B>(<A HREF="../estraier/Document.html" title="class in estraier">Document</A> doc, int options)</PRE> <DL> <DD>Add a document. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>doc</CODE> - a document object. The document object should have the URI attribute.<DD><CODE>options</CODE> - options: `Database.PDCLEAN' to clean up dispensable regions of the overwritten document. <DT><B>Returns:</B><DD>true if success, else it is false.</DL> </DD> </DL> <HR> <A NAME="scan_doc(estraier.Document, estraier.Condition)"><!-- --></A><H3> scan_doc</H3> <PRE> public boolean <B>scan_doc</B>(<A HREF="../estraier/Document.html" title="class in estraier">Document</A> doc, <A HREF="../estraier/Condition.html" title="class in estraier">Condition</A> cond)</PRE> <DL> <DD>Check whether a document object matches the phrase of a search condition object definitely. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>doc</CODE> - a document object.<DD><CODE>cond</CODE> - a search condition object. <DT><B>Returns:</B><DD>true if the document matches the phrase of the condition object definitely, else it is false.</DL> </DD> </DL> <HR> <A NAME="search_meta(estraier.Database[], estraier.Condition)"><!-- --></A><H3> search_meta</H3> <PRE> public static <A HREF="../estraier/Result.html" title="class in estraier">Result</A> <B>search_meta</B>(<A HREF="../estraier/Database.html" title="class in estraier">Database</A>[] dbs, <A HREF="../estraier/Condition.html" title="class in estraier">Condition</A> cond)</PRE> <DL> <DD>Search plural databases for documents corresponding a condition. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>dbs</CODE> - an array whose elements are database objects.<DD><CODE>cond</CODE> - a condition object. <DT><B>Returns:</B><DD>a result object. On error, `null' is returned.</DL> </DD> </DL> <HR> <A NAME="search(estraier.Condition)"><!-- --></A><H3> search</H3> <PRE> public <A HREF="../estraier/Result.html" title="class in estraier">Result</A> <B>search</B>(<A HREF="../estraier/Condition.html" title="class in estraier">Condition</A> cond)</PRE> <DL> <DD>Search for documents corresponding a condition. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>cond</CODE> - a condition object. <DT><B>Returns:</B><DD>a result object. On error, `null' is returned.</DL> </DD> </DL> <HR> <A NAME="set_cache_size(double, int, int, int)"><!-- --></A><H3> set_cache_size</H3> <PRE> public void <B>set_cache_size</B>(double size, int anum, int tnum, int rnum)</PRE> <DL> <DD>Set the maximum size of the cache memory. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>size</CODE> - the maximum size of the index cache. By default, it is 64MB. If it is not more than 0, the current size is not changed.<DD><CODE>anum</CODE> - the maximum number of cached records for document attributes. By default, it is 8192. If it is not more than 0, the current size is not changed.<DD><CODE>tnum</CODE> - the maximum number of cached records for document texts. By default, it is 1024. If it is not more than 0, the current size is not changed.<DD><CODE>rnum</CODE> - the maximum number of cached records for occurrence results. By default, it is 256. If it is not more than 0, the current size is not changed.</DL> </DD> </DL> <HR> <A NAME="set_informer(estraier.DatabaseInformer)"><!-- --></A><H3> set_informer</H3> <PRE> public void <B>set_informer</B>(<A HREF="../estraier/DatabaseInformer.html" title="interface in estraier">DatabaseInformer</A> informer)</PRE> <DL> <DD>Set the callback function to inform of database events. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>informer</CODE> - an arbitrary object with a method named as `inform'.</DL> </DD> </DL> <HR> <A NAME="set_wildmax(int)"><!-- --></A><H3> set_wildmax</H3> <PRE> public void <B>set_wildmax</B>(int num)</PRE> <DL> <DD>Set the maximum number of expansion of wild cards. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>num</CODE> - the maximum number of expansion of wild cards.</DL> </DD> </DL> <HR> <A NAME="size()"><!-- --></A><H3> size</H3> <PRE> public double <B>size</B>()</PRE> <DL> <DD>Get the size. <P> <DD><DL> <DT><B>Returns:</B><DD>the size of the database.</DL> </DD> </DL> <HR> <A NAME="sync()"><!-- --></A><H3> sync</H3> <PRE> public boolean <B>sync</B>()</PRE> <DL> <DD>Synchronize updating contents. <P> <DD><DL> <DT><B>Returns:</B><DD>true if success, else it is false.</DL> </DD> </DL> <HR> <A NAME="uri_to_id(java.lang.String)"><!-- --></A><H3> uri_to_id</H3> <PRE> public int <B>uri_to_id</B>(java.lang.String uri)</PRE> <DL> <DD>Get the ID of a document specified by URI. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>uri</CODE> - the URI of a registered document. <DT><B>Returns:</B><DD>the ID of the document. On error, -1 is returned.</DL> </DD> </DL> <HR> <A NAME="word_num()"><!-- --></A><H3> word_num</H3> <PRE> public int <B>word_num</B>()</PRE> <DL> <DD>Get the number of unique words. <P> <DD><DL> <DT><B>Returns:</B><DD>the number of unique words in the database.</DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../estraier/Condition.html" title="class in estraier"><B>PREV CLASS</B></A> <A HREF="../estraier/DatabaseInformer.html" title="interface in estraier"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../index.html" target="_top"><B>FRAMES</B></A> <A HREF="Database.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> </BODY> </HTML>