gr.forth.ics.rssdb.storage
Class DBResource

java.lang.Object
  |
  +--gr.forth.ics.rssdb.storage.DBResource
All Implemented Interfaces:
PersistentResource
Direct Known Subclasses:
SpecReprResource

public abstract class DBResource
extends java.lang.Object
implements PersistentResource

Defines the methods required for the persistent storage of an resource

Version:
2.0 (23 July 2003)
Author:
Sofia Alexaki

Constructor Summary
DBResource(gr.forth.ics.vrp.corevrp.model.Resource res, DBStorage storage)
           
 
Method Summary
abstract  void deleteUnClassifiedResource()
          Deletes the instantiation link between this Resource and the class rdfs:Resource.
 gr.forth.ics.vrp.corevrp.model.Resource getResourceReference()
          Returns the reference of the VRP Resource object that is going to be stored in the DBMS.
 DBStorage getStorage()
          Returns the storage reference.
abstract  boolean isDirectInstanceOf(int clsid)
          Tests if the Resource has been directly classified in the class with id the method parameter clsid.
abstract  boolean isInstanceOf(int[] clslabel)
          Tests if the Resource has been classifed in the class with id the method parameter clsid.
abstract  boolean isStoredClass()
          Tests if the Resource has been stored in the database as a class.
abstract  boolean isStoredProperty()
          Tests if the Resource has been stored in the database as a property.
 void setResourceReference(gr.forth.ics.vrp.corevrp.model.Resource res)
          Sets the reference of the VRP Resource object that is going to be stored in the DBMS.
 void setStorage(DBStorage storage)
          Sets the storage reference.
abstract  void store()
          Stores, if it doesn't exist, an instantiation link between the Resource and the class rdfs:Resource.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBResource

public DBResource(gr.forth.ics.vrp.corevrp.model.Resource res,
                  DBStorage storage)
Method Detail

getResourceReference

public gr.forth.ics.vrp.corevrp.model.Resource getResourceReference()
Returns the reference of the VRP Resource object that is going to be stored in the DBMS.

setResourceReference

public void setResourceReference(gr.forth.ics.vrp.corevrp.model.Resource res)
Sets the reference of the VRP Resource object that is going to be stored in the DBMS.

getStorage

public DBStorage getStorage()
Returns the storage reference.

setStorage

public void setStorage(DBStorage storage)
Sets the storage reference.

isInstanceOf

public abstract boolean isInstanceOf(int[] clslabel)
                              throws java.sql.SQLException
Tests if the Resource has been classifed in the class with id the method parameter clsid.
Specified by:
isInstanceOf in interface PersistentResource

isDirectInstanceOf

public abstract boolean isDirectInstanceOf(int clsid)
                                    throws java.sql.SQLException
Tests if the Resource has been directly classified in the class with id the method parameter clsid.
Specified by:
isDirectInstanceOf in interface PersistentResource

isStoredClass

public abstract boolean isStoredClass()
                               throws java.sql.SQLException
Tests if the Resource has been stored in the database as a class.
Specified by:
isStoredClass in interface PersistentResource

isStoredProperty

public abstract boolean isStoredProperty()
                                  throws java.sql.SQLException
Tests if the Resource has been stored in the database as a property.
Specified by:
isStoredProperty in interface PersistentResource

store

public abstract void store()
                    throws java.sql.SQLException
Stores, if it doesn't exist, an instantiation link between the Resource and the class rdfs:Resource.
Specified by:
store in interface PersistentResource

deleteUnClassifiedResource

public abstract void deleteUnClassifiedResource()
                                         throws java.sql.SQLException
Deletes the instantiation link between this Resource and the class rdfs:Resource.
Specified by:
deleteUnClassifiedResource in interface PersistentResource