info.bliki.api.creator
Class WikiDB

java.lang.Object
  extended by info.bliki.api.creator.WikiDB

public class WikiDB
extends java.lang.Object

A simple Apache Derby Database to store the retrieved Wiki contents


Constructor Summary
WikiDB(java.lang.String directory, java.lang.String databaseSubdirectoryName)
          The Wiki database constructor.
 
Method Summary
 void insertImage(ImageData imageData)
           
 void insertTopic(TopicData topic)
           
 ImageData selectImage(java.lang.String imageName)
          Select the image data from the database
 TopicData selectTopic(java.lang.String name)
          Select the topic data from the database
 void setUp()
           
 void tearDown()
           
 void updateImage(ImageData imageData)
           
 void updateTopic(TopicData topic)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WikiDB

public WikiDB(java.lang.String directory,
              java.lang.String databaseSubdirectoryName)
       throws java.lang.Exception
The Wiki database constructor. Creates a new Derby Wiki database, if it doesn't already exists.

Parameters:
directory - the main directory name where the database subdirectory should be created
databaseSubdirectoryName - the subdirectory name where the database files should be stored. This directory should not exist if you would like to create a completely new database.
Throws:
java.lang.Exception
Method Detail

setUp

public void setUp()
           throws java.lang.Exception
Throws:
java.lang.Exception

tearDown

public void tearDown()
              throws java.lang.Exception
Throws:
java.lang.Exception

selectTopic

public TopicData selectTopic(java.lang.String name)
                      throws java.lang.Exception
Select the topic data from the database

Parameters:
name - the name of the topic
Returns:
null if no data was found
Throws:
java.lang.Exception

insertTopic

public void insertTopic(TopicData topic)
                 throws java.lang.Exception
Throws:
java.lang.Exception

updateTopic

public void updateTopic(TopicData topic)
                 throws java.lang.Exception
Throws:
java.lang.Exception

selectImage

public ImageData selectImage(java.lang.String imageName)
                      throws java.lang.Exception
Select the image data from the database

Parameters:
imageName - the name of the image
Returns:
null if no data was found
Throws:
java.lang.Exception

insertImage

public void insertImage(ImageData imageData)
                 throws java.lang.Exception
Throws:
java.lang.Exception

updateImage

public void updateImage(ImageData imageData)
                 throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2012 Java Wikipedia API (Bliki engine). All Rights Reserved.