gr.forth.ics.rssdb.storage.specreprvar1
Class SpecReprVar1DBStorage

java.lang.Object
  |
  +--gr.forth.ics.rssdb.storage.DBStorage
        |
        +--gr.forth.ics.rssdb.storage.specrepr.SpecReprDBStorage
              |
              +--gr.forth.ics.rssdb.storage.specreprvar1.SpecReprVar1DBStorage

public class SpecReprVar1DBStorage
extends SpecReprDBStorage

Validates and Stores RDF descriptions in SPECIFIC_UNIQUETABLE representation

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

Fields inherited from class gr.forth.ics.rssdb.storage.DBStorage
con, DATA_PROPERTY, EMPTY, ENUMERATION_ELEMENT_PROPERTY, hlabel, RDFSUITE_NS, repr, resourcesIDs, SPECIFIC, SPECIFIC_NOSUBTABLE, SPECIFIC_UNIQUETABLE, stmt, subclass_dag, subproperty_dag, VRPModel
 
Constructor Summary
SpecReprVar1DBStorage()
           
 
Method Summary
protected  void createInitIndexes(java.sql.Statement stmt)
          Indexes are created on the core database tables and on the table where data resources are stored (i.e., Instances table).
protected  boolean existMultipleLevelClassifiedResource()
          Checks if there are resources in the db that are stored both at schema and data level.
protected  void initPreparedStatements()
          Initialize prepared statements used for the storage
 boolean store(java.lang.String input, java.lang.String dbPath)
          Validates and store RDF descriptions
protected  int storeClass(DBValidator dbv)
          Stores classes
protected  void storeClassDescriptions()
          Stores classes data descriptions
protected  void storePrimitiveSchema()
          Stores primitive schema
protected  int storeProperty(DBValidator dbv)
          Stores properties
protected  void storePropertyLinks()
          Stores property data descriptions
protected  void storeResource()
          Stores data resources
 
Methods inherited from class gr.forth.ics.rssdb.storage.specrepr.SpecReprDBStorage
createPrimitiveTableIndexes, createPrimitiveTables, storeMetaClass, storeThesaurus
 
Methods inherited from class gr.forth.ics.rssdb.storage.DBStorage
closeConnection, commitTransaction, getConnection, getCreateIndex, getCurrentNS, getDBMSRepresentation, getDomainRangeTypeIds, getGUI, getMaxLiteralLength, getMaxLpartLength, getMaxPrefixLength, getMaxURILength, getNamespaceID, getNewData, getNewSchema, getNextAnonID, getNextNSID, getNextThesTypeEnumID, getOutFile, getOutput, getPermitSchemaRendundancies, getPropertyTableID, getRepr, getResourceID, getResourceIDs, getResourceLabel, getResourceURI, getStatement, getStatistics, getStoredData, getStoredNS, getStoredSchema, getVerbose, getVRPModel, getXMLSchemaDTID, getXMLSchemaDTRQLID, initResourceIDs, isHierarchyDAG, isJDBCDriverAccessible, isXMLSchemaDTID, openConnection, rollbackTransaction, setAuthentication, setCreateIndex, setDBFunctionsPath, setDomainRangeTypeIds, setGUI, setHierarchyDAG, setMaxLiteralLength, setMaxLpartLength, setMaxPrefixLength, setMaxURILength, setModelStatistics, setModifiedNamespace, setNewData, setNewSchema, setOutFile, setPropertyTableID, setResourceID, setResourceIDs, setResourceURI, setStoredData, setStoredSchema, setTimeStatistics, setVerbose, storePrimitiveFunctions
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpecReprVar1DBStorage

public SpecReprVar1DBStorage()
Method Detail

storePrimitiveSchema

protected void storePrimitiveSchema()
                             throws java.sql.SQLException
Description copied from class: DBStorage
Stores primitive schema
Overrides:
storePrimitiveSchema in class SpecReprDBStorage

createInitIndexes

protected void createInitIndexes(java.sql.Statement stmt)
                          throws java.sql.SQLException
Indexes are created on the core database tables and on the table where data resources are stored (i.e., Instances table).
Overrides:
createInitIndexes in class SpecReprDBStorage

initPreparedStatements

protected void initPreparedStatements()
                               throws java.sql.SQLException
Description copied from class: DBStorage
Initialize prepared statements used for the storage
Overrides:
initPreparedStatements in class SpecReprDBStorage

storeClass

protected int storeClass(DBValidator dbv)
                  throws java.sql.SQLException
Description copied from class: DBStorage
Stores classes
Overrides:
storeClass in class SpecReprDBStorage

storeClassDescriptions

protected void storeClassDescriptions()
                               throws java.sql.SQLException
Description copied from class: DBStorage
Stores classes data descriptions
Overrides:
storeClassDescriptions in class SpecReprDBStorage

storeProperty

protected int storeProperty(DBValidator dbv)
                     throws java.sql.SQLException
Description copied from class: DBStorage
Stores properties
Overrides:
storeProperty in class SpecReprDBStorage

storePropertyLinks

protected void storePropertyLinks()
                           throws java.sql.SQLException
Description copied from class: DBStorage
Stores property data descriptions
Overrides:
storePropertyLinks in class SpecReprDBStorage

storeResource

protected void storeResource()
                      throws java.sql.SQLException
Description copied from class: DBStorage
Stores data resources
Overrides:
storeResource in class SpecReprDBStorage

existMultipleLevelClassifiedResource

protected boolean existMultipleLevelClassifiedResource()
                                                throws java.sql.SQLException
Checks if there are resources in the db that are stored both at schema and data level.
Overrides:
existMultipleLevelClassifiedResource in class SpecReprDBStorage

store

public boolean store(java.lang.String input,
                     java.lang.String dbPath)
Validates and store RDF descriptions
Overrides:
store in class SpecReprDBStorage
Parameters:
input - The file or the URL you want to store (e.g., http://www.ics.forth.gr/isl/RDF/VRP/Examples/cweb.rdf).
dbPath - The database URL. The format is: <postgreSQL server>:<port>/<dbname> postgreSQL server: The machine where postgreSQL server is running. port: The port where postgreSQL server is running. dbname: database name, e.g., athena.ics.forth.gr:8080/testdb
Returns:
True if the file is valid and has been stored in the db, otherwise returns false