gr.forth.ics.rssdb.storage.specrepr
Class SpecReprResource

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

public class SpecReprResource
extends DBResource
implements PersistentResource

Stores a resource that have not attributed properties

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

Field Summary
protected static java.sql.PreparedStatement addResource
           
protected static java.sql.PreparedStatement deleteResource
           
 
Constructor Summary
SpecReprResource(gr.forth.ics.vrp.corevrp.model.Resource res, DBStorage storage)
           
 
Method Summary
 void deleteUnClassifiedResource()
          Deletes the instantiation link between Resource and the class rdfs:Resource.
static void initPreparedStatements(DBStorage storage)
          Initializes the Prepared Statements required for adding/deleting an Resource object in the database.
 boolean isDirectInstanceOf(int clsid)
          Tests if the Resource has been directly classified in the class with id the method parameter clsid.
 boolean isInstanceOf(int[] clslabel)
          Tests if the Resource has been classified in the class with id the method parameter clsid.
 boolean isStoredClass()
          Tests if the Resource has been stored in the database as a class.
 boolean isStoredMetaClass(int meta_kind)
          Tests if the resource has been stored in the database as a metaclass of classes, properties, thesaurus or enumerations.
 boolean isStoredProperty()
          Tests if the Resource has been stored in the database as a property.
 void store()
          Creates an instantiation link between the Resource and the class rdfs:Resource.
 
Methods inherited from class gr.forth.ics.rssdb.storage.DBResource
getResourceReference, getStorage, setResourceReference, setStorage
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

addResource

protected static java.sql.PreparedStatement addResource

deleteResource

protected static java.sql.PreparedStatement deleteResource
Constructor Detail

SpecReprResource

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

initPreparedStatements

public static void initPreparedStatements(DBStorage storage)
                                   throws java.sql.SQLException
Initializes the Prepared Statements required for adding/deleting an Resource object in the database.

isInstanceOf

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

isDirectInstanceOf

public 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
Overrides:
isDirectInstanceOf in class DBResource

store

public void store()
           throws java.sql.SQLException
Creates an instantiation link between the Resource and the class rdfs:Resource.
Specified by:
store in interface PersistentResource
Overrides:
store in class DBResource

isStoredClass

public 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
Overrides:
isStoredClass in class DBResource

deleteUnClassifiedResource

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

isStoredProperty

public 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
Overrides:
isStoredProperty in class DBResource

isStoredMetaClass

public boolean isStoredMetaClass(int meta_kind)
                          throws java.sql.SQLException
Tests if the resource has been stored in the database as a metaclass of classes, properties, thesaurus or enumerations.
Parameters:
meta_kind - indicates the kind of the metaclass