| 
 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectestraier.pure.Node
Abstraction of connection to P2P node.
| Constructor Summary | |
| Node()Create a node connection object. | |
| Method Summary | |
|  java.util.List | admins()Get a list of names of administrators. | 
|  double | cache_usage()Get the usage ratio of the cache. | 
|  int | doc_num()Get the number of documents. | 
|  boolean | edit_doc(Document doc)Edit attributes of a document. | 
|  java.util.Map | etch_doc_by_uri(java.lang.String uri)Extract keywords of a document specified by URI. | 
|  java.util.Map | etch_doc(int id)Extract keywords of a document. | 
|  java.lang.String | get_doc_attr_by_uri(java.lang.String uri,
                    java.lang.String name)Retrieve the value of an attribute of a document specified by URI | 
|  java.lang.String | get_doc_attr(int id,
             java.lang.String name)Retrieve the value of an attribute of a document. | 
|  Document | get_doc_by_uri(java.lang.String uri)Retrieve a document specified by URI. | 
|  Document | get_doc(int id)Retrieve a document. | 
|  java.lang.String | label()Get the label. | 
|  java.util.List | links()Get a list of expressions of links. | 
|  java.lang.String | name()Get the name. | 
|  boolean | optimize()Optimize the database. | 
|  boolean | out_doc_by_uri(java.lang.String uri)Remove a document specified by URI. | 
|  boolean | out_doc(int id)Remove a document. | 
|  boolean | put_doc(Document doc)Add a document. | 
|  NodeResult | search(Condition cond,
       int depth)Search for documents corresponding a condition. | 
|  void | set_auth(java.lang.String name,
         java.lang.String password)Set the authentication information. | 
|  boolean | set_link(java.lang.String url,
         java.lang.String label,
         int credit)Manage a link. | 
|  void | set_proxy(java.lang.String host,
          int port)Set the proxy information. | 
|  void | set_snippet_width(int wwidth,
                  int hwidth,
                  int awidth)Set width of snippet in the result. | 
|  void | set_timeout(int sec)Set timeout. | 
|  void | set_url(java.lang.String url)Set the URL of a node server. | 
|  boolean | set_user(java.lang.String name,
         int mode)Manage a user account. | 
|  double | size()Get the size of the datbase. | 
|  int | status()Get the status code of the last request. | 
|  boolean | sync()Synchronize updating contents of the database. | 
|  int | uri_to_id(java.lang.String uri)Get the ID of a document specified by URI. | 
|  java.util.List | users()Get a list of names of users. | 
|  int | word_num()Get the number of unique words. | 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
public Node()
| Method Detail | 
public java.util.List admins()
public double cache_usage()
public int doc_num()
public boolean edit_doc(Document doc)
doc - a document object.
public java.util.Map etch_doc_by_uri(java.lang.String uri)
uri - the URI of a registered document.
public java.util.Map etch_doc(int id)
id - the ID number of a registered document.
public java.lang.String get_doc_attr_by_uri(java.lang.String uri,
                                            java.lang.String name)
uri - the URI of a registered document.name - the name of an attribute.
public java.lang.String get_doc_attr(int id,
                                     java.lang.String name)
id - the ID number of a registered document.name - the name of an attribute.
public Document get_doc_by_uri(java.lang.String uri)
uri - the URI of a registered document.
public Document get_doc(int id)
id - the ID number of a registered document.
public java.lang.String label()
public java.util.List links()
public java.lang.String name()
public boolean optimize()
public boolean out_doc_by_uri(java.lang.String uri)
uri - the URI of a registered document.
public boolean out_doc(int id)
id - the ID number of a registered document.
public boolean put_doc(Document doc)
doc - a document object to register.
public NodeResult search(Condition cond,
                         int depth)
cond - a condition object.depth - the depth of meta search.
public void set_auth(java.lang.String name,
                     java.lang.String password)
name - the name of authentication.password - the password of the authentication.
public boolean set_link(java.lang.String url,
                        java.lang.String label,
                        int credit)
url - the URL of the target node of a link.label - the label of the link.credit - the credit of the link.  If it is negative, the link is removed.
public void set_proxy(java.lang.String host,
                      int port)
host - the host name of a proxy server.port - the port number of the proxy server.
public void set_snippet_width(int wwidth,
                              int hwidth,
                              int awidth)
wwidth - whole width of a snippet.  By default, it is 480.  If it is 0, no snippet is
 sent. If it is negative, whole body text is sent instead of snippet.hwidth - width of strings picked up from the beginning of the text.  By default, it
 is 96.  If it is negative 0, the current setting is not changed.awidth - width of strings picked up around each highlighted word. By default, it is
 96.  If it is negative, the current setting is not changed.public void set_timeout(int sec)
sec - timeout in seconds.public void set_url(java.lang.String url)
url - the URL of a node server.
public boolean set_user(java.lang.String name,
                        int mode)
name - the name of a user.mode - the operation mode.  0 means to delete the account.  1 means to set the
 account as an administrator.  2 means to set the account as a guest.
public double size()
public int status()
public boolean sync()
public int uri_to_id(java.lang.String uri)
uri - the URI of a registered document.
public java.util.List users()
public int word_num()
| 
 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||