<!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> Document (estraier) </TITLE> <META NAME="keywords" CONTENT="estraier.Document class"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { parent.document.title="Document (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/DatabaseInformer.html" title="interface in estraier"><B>PREV CLASS</B></A> <A HREF="../estraier/Result.html" title="class 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="Document.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 | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | <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 Document</H2> <PRE> java.lang.Object <IMG SRC="../resources/inherit.gif" ALT="extended by"><B>estraier.Document</B> </PRE> <HR> <DL> <DT>public class <B>Document</B><DT>extends java.lang.Object</DL> <P> Abstraction of document. <P> <P> <HR> <P> <!-- ======== NESTED CLASS SUMMARY ======== --> <!-- =========== FIELD SUMMARY =========== --> <!-- ======== 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/Document.html#Document()">Document</A></B>()</CODE> <BR> Create a document object.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../estraier/Document.html#Document(java.lang.String)">Document</A></B>(java.lang.String draft)</CODE> <BR> Create a document object made from draft data.</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> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Document.html#add_attr(java.lang.String, java.lang.String)">add_attr</A></B>(java.lang.String name, java.lang.String value)</CODE> <BR> Add an attribute.</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/Document.html#add_hidden_text(java.lang.String)">add_hidden_text</A></B>(java.lang.String text)</CODE> <BR> Add a hidden sentence.</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/Document.html#add_text(java.lang.String)">add_text</A></B>(java.lang.String text)</CODE> <BR> Add a sentence of text.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.util.List</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Document.html#attr_names()">attr_names</A></B>()</CODE> <BR> Get a list of attribute names.</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/Document.html#attr(java.lang.String)">attr</A></B>(java.lang.String name)</CODE> <BR> Get the value of an attribute.</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/Document.html#cat_texts()">cat_texts</A></B>()</CODE> <BR> Concatenate sentences of the text.</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/Document.html#dump_draft()">dump_draft</A></B>()</CODE> <BR> Dump draft data.</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/Document.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> int</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Document.html#id()">id</A></B>()</CODE> <BR> Get the ID number.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.util.Map</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Document.html#keywords()">keywords</A></B>()</CODE> <BR> Get attached keywords.</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/Document.html#make_snippet(java.util.List, int, int, int)">make_snippet</A></B>(java.util.List words, int wwidth, int hwidth, int awidth)</CODE> <BR> Make a snippet of the body text.</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/Document.html#score()">score</A></B>()</CODE> <BR> Get the substitute score.</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/Document.html#set_keywords(java.util.Map)">set_keywords</A></B>(java.util.Map kwords)</CODE> <BR> Attach keywords.</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/Document.html#set_score(int)">set_score</A></B>(int score)</CODE> <BR> Set the substitute score.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.util.List</CODE></FONT></TD> <TD><CODE><B><A HREF="../estraier/Document.html#texts()">texts</A></B>()</CODE> <BR> Get a list of sentences of the text.</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 =========== --> <!-- ========= 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="Document()"><!-- --></A><H3> Document</H3> <PRE> public <B>Document</B>()</PRE> <DL> <DD>Create a document object. <P> </DL> <HR> <A NAME="Document(java.lang.String)"><!-- --></A><H3> Document</H3> <PRE> public <B>Document</B>(java.lang.String draft)</PRE> <DL> <DD>Create a document object made from draft data. <P> <DT><B>Parameters:</B><DD><CODE>draft</CODE> - a string of draft data.</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(java.lang.String, java.lang.String)"><!-- --></A><H3> add_attr</H3> <PRE> public void <B>add_attr</B>(java.lang.String name, java.lang.String value)</PRE> <DL> <DD>Add an attribute. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of an attribute.<DD><CODE>value</CODE> - the value of the attribute. If it is `null', the attribute is removed.</DL> </DD> </DL> <HR> <A NAME="add_hidden_text(java.lang.String)"><!-- --></A><H3> add_hidden_text</H3> <PRE> public void <B>add_hidden_text</B>(java.lang.String text)</PRE> <DL> <DD>Add a hidden sentence. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>text</CODE> - a hidden sentence.</DL> </DD> </DL> <HR> <A NAME="add_text(java.lang.String)"><!-- --></A><H3> add_text</H3> <PRE> public void <B>add_text</B>(java.lang.String text)</PRE> <DL> <DD>Add a sentence of text. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>text</CODE> - sentence of text.</DL> </DD> </DL> <HR> <A NAME="attr_names()"><!-- --></A><H3> attr_names</H3> <PRE> public java.util.List <B>attr_names</B>()</PRE> <DL> <DD>Get a list of attribute names. <P> <DD><DL> <DT><B>Returns:</B><DD>a list object of attribute names.</DL> </DD> </DL> <HR> <A NAME="attr(java.lang.String)"><!-- --></A><H3> attr</H3> <PRE> public java.lang.String <B>attr</B>(java.lang.String name)</PRE> <DL> <DD>Get the value of an attribute. <P> <DD><DL> <DT><B>Parameters:</B><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="cat_texts()"><!-- --></A><H3> cat_texts</H3> <PRE> public java.lang.String <B>cat_texts</B>()</PRE> <DL> <DD>Concatenate sentences of the text. <P> <DD><DL> <DT><B>Returns:</B><DD>concatenated sentences.</DL> </DD> </DL> <HR> <A NAME="dump_draft()"><!-- --></A><H3> dump_draft</H3> <PRE> public java.lang.String <B>dump_draft</B>()</PRE> <DL> <DD>Dump draft data. <P> <DD><DL> <DT><B>Returns:</B><DD>draft data.</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="id()"><!-- --></A><H3> id</H3> <PRE> public int <B>id</B>()</PRE> <DL> <DD>Get the ID number. <P> <DD><DL> <DT><B>Returns:</B><DD>the ID number. If this object has never been registered, -1 is returned.</DL> </DD> </DL> <HR> <A NAME="keywords()"><!-- --></A><H3> keywords</H3> <PRE> public java.util.Map <B>keywords</B>()</PRE> <DL> <DD>Get attached keywords. <P> <DD><DL> <DT><B>Returns:</B><DD>a map object of keywords and their scores in decimal string. If no keyword is attached, `null' is returned.</DL> </DD> </DL> <HR> <A NAME="make_snippet(java.util.List, int, int, int)"><!-- --></A><H3> make_snippet</H3> <PRE> public java.lang.String <B>make_snippet</B>(java.util.List words, int wwidth, int hwidth, int awidth)</PRE> <DL> <DD>Make a snippet of the body text. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>words</CODE> - a list object of words to be highlight.<DD><CODE>wwidth</CODE> - whole width of the result.<DD><CODE>hwidth</CODE> - width of strings picked up from the beginning of the text.<DD><CODE>awidth</CODE> - width of strings picked up around each highlighted word. <DT><B>Returns:</B><DD>a snippet string of the body text. There are tab separated values. Each line is a string to be shown. Though most lines have only one field, some lines have two fields. If the second field exists, the first field is to be shown with highlighted, and the second field means its normalized form.</DL> </DD> </DL> <HR> <A NAME="score()"><!-- --></A><H3> score</H3> <PRE> public int <B>score</B>()</PRE> <DL> <DD>Get the substitute score. <P> <DD><DL> <DT><B>Returns:</B><DD>the substitute score or -1 if it is not set.</DL> </DD> </DL> <HR> <A NAME="set_keywords(java.util.Map)"><!-- --></A><H3> set_keywords</H3> <PRE> public void <B>set_keywords</B>(java.util.Map kwords)</PRE> <DL> <DD>Attach keywords. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>kwords</CODE> - a map object of keywords. Keys of the map should be keywords of the document and values should be their scores in decimal string.</DL> </DD> </DL> <HR> <A NAME="set_score(int)"><!-- --></A><H3> set_score</H3> <PRE> public void <B>set_score</B>(int score)</PRE> <DL> <DD>Set the substitute score. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>score</CODE> - the substitute score. It it is negative, the substitute score setting is nullified.</DL> </DD> </DL> <HR> <A NAME="texts()"><!-- --></A><H3> texts</H3> <PRE> public java.util.List <B>texts</B>()</PRE> <DL> <DD>Get a list of sentences of the text. <P> <DD><DL> <DT><B>Returns:</B><DD>a list object of sentences of the text.</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/DatabaseInformer.html" title="interface in estraier"><B>PREV CLASS</B></A> <A HREF="../estraier/Result.html" title="class 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="Document.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 | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | <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>