Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 938b78a08597a8fe68765a6ff2f69936 > files > 25

hyperestraier-java-1.4.13-7.fc14.x86_64.rpm

<!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>
Overview (estraier)
</TITLE>

<META NAME="keywords" CONTENT="Overview">

<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    parent.document.title="Overview (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="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Overview</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <FONT CLASS="NavBarFont1">Package</FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV&nbsp;
&nbsp;NEXT</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="index.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="overview-summary.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<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>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
Java Binding of Hyper Estraier.
<P>
<B>See:</B>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="#overview_description"><B>Description</B></A>
<P>

<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Packages</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="20%"><B><A HREF="estraier/package-summary.html">estraier</A></B></TD>
<TD>&nbsp;</TD>
</TR>
</TABLE>

<P>
&nbsp;<A NAME="overview_description"><!-- --></A>
<P>
<h1>Java Binding of Hyper Estraier.</h1>

<div>Hyper Estraier is a full-text search system for communities.</div>

<h2>Introduction</h2>

<p>This is a package implementing the core API of <a href="http://hyperestraier.sourceforge.net/">Hyper Estraier</a>, including native codes based on JNI.  As it works on Linux, Mac OS X, Windows, and so on, native libraries for each environment are required to run programs.  This package requires JRE 1.4.2 or later versions.</p>

<h2>Setting</h2>

<p>Install the latest version of Hyper Estraier.</p>

<p>Enter the sub directory `javanative' in the extracted package then perform installation.</p>

<pre style="margin: 0.5em 0.5em; padding: 0.1em 0.3em; border: 1pt solid #aaaaaa;">cd javanative
./configure
make
su
make install
</pre>

<p>`estraiernative.jar' should be included in the class path.  By default, the JAR file is installed in `/usr/local/lib'.</p>

<p>`estraier.*' should be imported in each source file of application programs.</p>

<p>Some native libraries should be found in the library search path.</p>

<ul>
<li>On Linux and other UNIX systems: set the environment variable LD_LIBRARY_PATH to find libraries; "libestraier.so" and "libjestraier.so".</li>
<li>On Mac OS X: set the environment variable DYLD_LIBRARY_PATH to find libraries; "libestraier.dylib" and "libjestraier.dylib".</li>
<li>On Windows: set the environment variable PATH to find libraries; "estraier.dll" and "jestraier.dll".</li>
</ul>

<h2>Example of Gatherer</h2>

<p>The following is the simplest implementation of a gatherer.</p>

<pre style="margin: 0.5em 0.5em; padding: 0.1em 0.3em; border: 1pt solid #aaaaaa;">import estraier.*;

public class Example001 {
  public static void main(String[] args){

    // create the database object
    Database db = new Database();

    // open the database
    if(!db.open("casket", Database.DBWRITER | Database.DBCREAT)){
      System.err.println("error: " + db.err_msg(db.error()));
      return;
    }

    // create a document object
    Document doc = new Document();

    // add attributes to the document object
    doc.add_attr("@uri", "http://estraier.gov/example.txt");
    doc.add_attr("@title", "Over the Rainbow");

    // add the body text to the document object
    doc.add_text("Somewhere over the rainbow.  Way up high.");
    doc.add_text("There's a land that I heard of once in a lullaby.");

    // register the document object to the database
    if(!db.put_doc(doc, Database.PDCLEAN))
      System.err.println("error: " + db.err_msg(db.error()));

    // close the database
    if(!db.close())
      System.err.println("error: " + db.err_msg(db.error()));

  }
}
</pre>

<h2>Example of Searcher</h2>

<p>The following is the simplest implementation of a searcher.</p>

<pre style="margin: 0.5em 0.5em; padding: 0.1em 0.3em; border: 1pt solid #aaaaaa;">import estraier.*;
import java.util.*;

public class Example002 {
  public static void main(String[] args){

    // create the database object
    Database db = new Database();

    // open the database
    if(!db.open("casket", Database.DBREADER)){
      System.err.println("error: " + db.err_msg(db.error()));
      return;
    }

    // create a search condition object
    Condition cond = new Condition();

    // set the search phrase to the search condition object
    cond.set_phrase("rainbow AND lullaby");

    // get the result of search
    Result result = db.search(cond);

    // for each document in the result
    for(int i = 0; i &lt; result.doc_num(); i++){
      // retrieve the document object
      Document doc = db.get_doc(result.get_doc_id(i), 0);
      if(doc == null) continue;
      // display attributes
      String uri = doc.attr("@uri");
      if(uri != null) System.out.println("URI: " + uri);
      String title = doc.attr("@title");
      if(title != null) System.out.println("Title: " + title);
      // display the body text
      Iterator it = doc.texts().iterator();
      while(it.hasNext()){
        System.out.println((String)it.next());
      }
    }

    // close the database
    if(!db.close())
      System.err.println("error: " + db.err_msg(db.error()));

  }
}
</pre>

<h2>License</h2>

<div>Copyright (C) 2004-2006 Mikio Hirabayashi</div>

<p>The Java binding of Hyper Estraier is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License or any later version.  The Java binding of Hyper Estraier is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.  You should have received a copy of the GNU Lesser General Public License along with the Java binding of Hyper Estraier; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.</p>
<P>

<P>
<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="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Overview</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <FONT CLASS="NavBarFont1">Package</FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV&nbsp;
&nbsp;NEXT</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="index.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="overview-summary.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<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>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>

</BODY>
</HTML>