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 |
import java.util.*; |
33 |
import java.io.*; |
34 |
import java.net.*; |
35 |
|
36 |
|
37 |
|
38 |
/** |
39 |
* Implementation of database. |
40 |
* @note This class have never been implemented yet. |
41 |
*/ |
42 |
class DatabaseImpl implements Database { |
43 |
//---------------------------------------------------------------- |
44 |
// public methods |
45 |
//---------------------------------------------------------------- |
46 |
public synchronized native String err_msg(int ecode); |
47 |
public synchronized native boolean open(String name, int omode); |
48 |
public synchronized native boolean close(); |
49 |
public synchronized native int error(); |
50 |
public synchronized native boolean fatal(); |
51 |
public synchronized native boolean flush(int max); |
52 |
public synchronized native boolean sync(); |
53 |
public synchronized native boolean optimize(int options); |
54 |
public synchronized native boolean put_doc(Document doc, int options); |
55 |
public synchronized native boolean out_doc(int id, int options); |
56 |
public synchronized native Document get_doc(int id, int options); |
57 |
public synchronized native String get_doc_attr(int id, String name); |
58 |
public synchronized native int uri_to_id(String uri); |
59 |
public synchronized native java.util.Map etch_doc(Document doc, int max); |
60 |
public synchronized native boolean iter_init(); |
61 |
public synchronized native int iter_next(); |
62 |
public synchronized native String name(); |
63 |
public synchronized native int doc_num(); |
64 |
public synchronized native int word_num(); |
65 |
public synchronized native double size(); |
66 |
public synchronized native DatabaseResult search(Condition cond); |
67 |
public synchronized native void set_cache_size(double size, int anum, int tnum); |
68 |
public synchronized native void set_special_cache(String name, int num); |
69 |
} |
70 |
|
71 |
|
72 |
|
73 |
/* END OF FILE */ |