org.semwebcentral.sweetrules.infrastructure
Class SweetURIKBDescriptor

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

public class SweetURIKBDescriptor
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.net.URI kbURI
          The KB URI
 
Fields inherited from class org.semwebcentral.sweetrules.infrastructure.AbstractSweetKBDescriptor
kbLocation, krDescriptor
 
Constructor Summary
SweetURIKBDescriptor(java.net.URI uri, ISweetKRDescriptor descriptor)
          Constructor for the KB descriptor
 
Method Summary
 java.net.URI getURI()
          Returns the KB URI
 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

kbURI

private java.net.URI kbURI
The KB URI

Constructor Detail

SweetURIKBDescriptor

public SweetURIKBDescriptor(java.net.URI uri,
                            ISweetKRDescriptor descriptor)
Constructor for the KB descriptor

Parameters:
uri - The URI of the knowledge base
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

getURI

public java.net.URI getURI()
Returns the KB URI

Returns:
The KB URI