iitb.con.net
Class ConStore

java.lang.Object
  extended by iitb.con.net.ConStore

public class ConStore
extends java.lang.Object

ConStore provides the high level system operations such as create, open, and deletion of ConceptNet.

See Also:
ConceptNet

Constructor Summary
ConStore()
           
 
Method Summary
static ConceptNet create(java.lang.String name)
          Creates new concept-net and opens in the specified mode.
The opening mode can read (r) or read-write (rw).
static boolean delete(java.lang.String conceptNetDir)
          Deletes the existing concept-net.
static boolean isExists(java.lang.String name)
          Returns true if concept-net of specified name exists
static ConceptNet open(java.lang.String name, java.lang.String mode)
          Opens the existing concept-net in the specified mode.
The opening mode can read (r) or read-write (rw).
If Concept-Net does not exists then it throws exception.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConStore

public ConStore()
Method Detail

create

public static ConceptNet create(java.lang.String name)
                         throws java.io.IOException
Creates new concept-net and opens in the specified mode.
The opening mode can read (r) or read-write (rw).

Parameters:
name - concept-net name
Throws:
java.io.IOException - if the file operations fails.

delete

public static boolean delete(java.lang.String conceptNetDir)
Deletes the existing concept-net.

Parameters:
conceptNetDir - Concept-Net Directory
Returns:
true on success

isExists

public static boolean isExists(java.lang.String name)
Returns true if concept-net of specified name exists

Parameters:
name - concept-net name
Returns:
true if concept-net exists

open

public static ConceptNet open(java.lang.String name,
                              java.lang.String mode)
                       throws java.io.FileNotFoundException,
                              java.io.IOException
Opens the existing concept-net in the specified mode.
The opening mode can read (r) or read-write (rw).
If Concept-Net does not exists then it throws exception.

Parameters:
name - concept-net name
mode - opening mode
Throws:
java.io.FileNotFoundException - if the specified concept-net file is not found
java.io.IOException - if file operation fails