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

java.lang.Object
  |
  +--gr.forth.ics.rssdb.storage.specrepr.SpecReprThesaurus

public class SpecReprThesaurus
extends java.lang.Object

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

Field Summary
protected static java.sql.PreparedStatement addThesaurusType
          PreparedStatement for adding thesaurus types
 
Constructor Summary
SpecReprThesaurus()
           
 
Method Summary
static int[] getThesaurusTypeCompIDs(int thesTypeId, DBStorage storage)
          Returns the thesaurus id and the root term id of the thesaurus type
static java.lang.String getURI(java.sql.Connection con, int id, DBStorage storage)
           
static void initPreparedStatements(java.sql.Connection con)
           
static boolean isValidThesaurusType(java.lang.String URI, DBStorage storage)
          Tests if the thesaurus has been stored and if the root term is a term of the thesaurus.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

addThesaurusType

protected static java.sql.PreparedStatement addThesaurusType
PreparedStatement for adding thesaurus types
Constructor Detail

SpecReprThesaurus

public SpecReprThesaurus()
Method Detail

initPreparedStatements

public static void initPreparedStatements(java.sql.Connection con)
                                   throws java.sql.SQLException

isValidThesaurusType

public static boolean isValidThesaurusType(java.lang.String URI,
                                           DBStorage storage)
                                    throws java.sql.SQLException
Tests if the thesaurus has been stored and if the root term is a term of the thesaurus. If the thesaurus + term type has already been classified in the thesaurus types table, assign the old id otherwise assign a new id
Parameters:
URI - thesaurus root URI
property_uri - Property URI having as range the theasurus term
Returns:
True if the thesaurus and the root term are stored in the db and adds the (thesaurus + term, id) in the hashmap, otherwise returns false

getThesaurusTypeCompIDs

public static int[] getThesaurusTypeCompIDs(int thesTypeId,
                                            DBStorage storage)
                                     throws java.sql.SQLException
Returns the thesaurus id and the root term id of the thesaurus type
Parameters:
thesTypeId - Thesaurus type id
storage -  
Throws:
java.sql.SQLException -  

getURI

public static java.lang.String getURI(java.sql.Connection con,
                                      int id,
                                      DBStorage storage)
                               throws java.sql.SQLException
Parameters:
con - SQL Connection object
id - The id of the thesaurus type
storage - A storage object
Returns:
The URI of the thesaurus type with id
Throws:
java.sql.SQLException -