Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## kr.ac.kaist.swrc.jhannanum.share
Class JSONReader

    java.lang.Object
      kr.ac.kaist.swrc.jhannanum.share.JSONReader

    public class JSONReader

extends java.lang.Object

`JSONReader` is for reading data from the configuration files for each plug-in.

Author:
  Sangwon Park (hudoni@world.kaist.ac.kr), CILab, SWRC, KAIST
See Also:
  http://json.org

Field Summary
`private java.lang.String` | `filePath` the path of the json file
`private JSONObject` | `json` json object

Constructor Summary
`JSONReader(java.lang.String filePath)` Constructor.

Method Summary
`java.lang.String` | `getAuthor()` Returns the author of the plug-in
`java.lang.String` | `getDescription()` Returns the description of the plug-in
`java.lang.String` | `getFilePath()` Returns the file path of the configuration file.
`java.lang.String` | `getName()` Returns the name of the plug-in.
`java.lang.String` | `getType()` Returns the type of the plug-in
`java.lang.String` | `getValue(java.lang.String key)` Returns the value mapped with the specified key.
`java.lang.String` | `getVersion()` Returns the version of the plug-in.
`void` | `setFilePath(java.lang.String filePath)` Sets the configuration file for a plug-in.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### filePath

    private java.lang.String filePath

  the path of the json file

### json

    private JSONObject json

  json object

Constructor Detail

### JSONReader

    public JSONReader(java.lang.String filePath)
               throws JSONException,
                      java.io.IOException

  Constructor.

  Parameters:
    `filePath` - - the file path of the plug-in configuration file
  Throws:
    `JSONException`
    `java.io.IOException`

Method Detail

### getName

    public java.lang.String getName()
                             throws JSONException

  Returns the name of the plug-in.

  Returns:
    the name of the plug-in
  Throws:
    `JSONException`

### getVersion

    public java.lang.String getVersion()
                                throws JSONException

  Returns the version of the plug-in.

  Returns:
    the version of the plug-in
  Throws:
    `JSONException`

### getAuthor

    public java.lang.String getAuthor()
                               throws JSONException

  Returns the author of the plug-in

  Returns:
    the author of the plug-in
  Throws:
    `JSONException`

### getDescription

    public java.lang.String getDescription()
                                    throws JSONException

  Returns the description of the plug-in

  Returns:
    the description of the plug-in
  Throws:
    `JSONException`

### getType

    public java.lang.String getType()
                             throws JSONException

  Returns the type of the plug-in

  Returns:
    the type of the plug-in
  Throws:
    `JSONException`

### getValue

    public java.lang.String getValue(java.lang.String key)
                              throws JSONException

  Returns the value mapped with the specified key.

  Returns:
    the value mapped with the specified key
  Throws:
    `JSONException`

### getFilePath

    public java.lang.String getFilePath()

  Returns the file path of the configuration file.

  Returns:
    the file path of the configuration file

### setFilePath

    public void setFilePath(java.lang.String filePath)

  Sets the configuration file for a plug-in.

  Parameters:
    `filePath` - - the configuration file path

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD