/[hyperestraier]/upstream/0.5.2/java/Database.java
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /upstream/0.5.2/java/Database.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9 - (show annotations)
Wed Aug 3 15:21:15 2005 UTC (18 years, 10 months ago) by dpavlin
File size: 3581 byte(s)
import upstream version 0.5.2

1 /*************************************************************************************************
2 * Java interface of Hyper Estraier
3 * Copyright (C) 2004-2005 Mikio Hirabayashi
4 * All rights reserved.
5 * This file is part of Hyper Estraier.
6 * Redistribution and use in source and binary forms, with or without modification, are
7 * permitted provided that the following conditions are met:
8 *
9 * * Redistributions of source code must retain the above copyright notice, this list of
10 * conditions and the following disclaimer.
11 * * Redistributions in binary form must reproduce the above copyright notice, this list of
12 * conditions and the following disclaimer in the documentation and/or other materials
13 * provided with the distribution.
14 * * Neither the name of Mikio Hirabayashi nor the names of its contributors may be used to
15 * endorse or promote products derived from this software without specific prior written
16 * permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
19 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
20 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
21 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
22 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
23 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
25 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
26 * OF THE POSSIBILITY OF SUCH DAMAGE.
27 *************************************************************************************************/
28
29
30 package estraier;
31
32
33
34 /**
35 * Abstraction of database
36 */
37 interface Database {
38 //----------------------------------------------------------------
39 // public constants
40 //----------------------------------------------------------------
41 int ERRNOERR = 0;
42 int ERRINVAL = 1;
43 int ERRACCES = 2;
44 int ERRLOCK = 3;
45 int ERRDB = 4;
46 int ERRIO = 5;
47 int ERRNOITEM = 6;
48 int ERRMISC = 9999;
49 int DBREADER = 1 << 0;
50 int DBWRITER = 1 << 1;
51 int DBCREAT = 1 << 2;
52 int DBTRUNC = 1 << 3;
53 int DBNOLCK = 1 << 4;
54 int DBLCKNB = 1 << 5;
55 int DBPERFNG = 1 << 6;
56 int PDCLEAN = 1 << 0;
57 int ODCLEAN = 1 << 0;
58 int OPTNOPURGE = 1 << 0;
59 int OPTNODBOPT = 1 << 1;
60 int GDNOATTR = 1 << 0;
61 int GDNOTEXT = 1 << 1;
62 //----------------------------------------------------------------
63 // public methods
64 //----------------------------------------------------------------
65 String err_msg(int ecode);
66 boolean open(String name, int omode);
67 boolean close();
68 int error();
69 boolean fatal();
70 boolean flush(int max);
71 boolean sync();
72 boolean optimize(int options);
73 boolean put_doc(Document doc, int options);
74 boolean out_doc(int id, int options);
75 Document get_doc(int id, int options);
76 String get_doc_attr(int id, String name);
77 int uri_to_id(String uri);
78 java.util.Map etch_doc(Document doc, int max);
79 boolean iter_init();
80 int iter_next();
81 String name();
82 int doc_num();
83 int word_num();
84 double size();
85 DatabaseResult search(Condition cond);
86 void set_cache_size(double size, int anum, int tnum);
87 void set_special_cache(String name, int num);
88 };
89
90
91
92 /* END OF FILE */

  ViewVC Help
Powered by ViewVC 1.1.26