org.semwebcentral.sweetrules.infrastructure
Class SweetStringKBDescriptor

java.lang.Object
  extended byorg.semwebcentral.sweetrules.infrastructure.AbstractSweetKBDescriptor
      extended byorg.semwebcentral.sweetrules.infrastructure.SweetStringKBDescriptor
All Implemented Interfaces:
java.lang.Cloneable, ISweetKBDescriptor

public class SweetStringKBDescriptor
extends AbstractSweetKBDescriptor

Author:
Owner TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates

Field Summary
private  java.lang.String kbData
          The KB data
 
Fields inherited from class org.semwebcentral.sweetrules.infrastructure.AbstractSweetKBDescriptor
kbLocation, krDescriptor
 
Constructor Summary
SweetStringKBDescriptor(java.lang.String data, ISweetKRDescriptor descriptor)
          Constructor for the KB descriptor
 
Method Summary
 java.lang.String readData()
          Reads the data from the KB and returns it
 void writeData(java.lang.String data)
          Writes the data to the specified KB
 
Methods inherited from class org.semwebcentral.sweetrules.infrastructure.AbstractSweetKBDescriptor
clone, equals, getKBLocation, getKRDescriptor, haveSameLocation, setKBLocation, setKRDescriptor
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

kbData

private java.lang.String kbData
The KB data

Constructor Detail

SweetStringKBDescriptor

public SweetStringKBDescriptor(java.lang.String data,
                               ISweetKRDescriptor descriptor)
Constructor for the KB descriptor

Parameters:
data - The knowledge base data as a string
descriptor - The KR descriptor of the KB
Method Detail

readData

public java.lang.String readData()
                          throws SweetException
Description copied from interface: ISweetKBDescriptor
Reads the data from the KB and returns it

Returns:
The data from the KB
Throws:
SweetException - if read fails

writeData

public void writeData(java.lang.String data)
               throws SweetException
Description copied from interface: ISweetKBDescriptor
Writes the data to the specified KB

Parameters:
data - The data to be written
Throws:
SweetException - if an error occurs