gr.forth.ics.rdfsuite.rssdb.storage
Class StorageMetaData

java.lang.Object
  extended by gr.forth.ics.rdfsuite.rssdb.storage.StorageMetaData

public class StorageMetaData
extends java.lang.Object


Field Summary
 HierarchyLabel hlabel
           
protected static org.apache.log4j.Logger log
           
 java.util.ArrayList nsInMemory
           
 java.util.ArrayList storedNS
           
 
Constructor Summary
StorageMetaData(RDFDB_Model model)
           
 
Method Summary
 int getAnonID()
           
 java.util.HashMap getDataIDs()
           
 int[] getDomainRangeTypeIds(IRDF_Property rdf_property)
          Returns an array
 int[] getDomainRangeTypeIdsNoValidation(IRDF_Property rdf_property)
           
 int getGraphspaceID(java.lang.String gs)
          Returns the dbid of the graphspace if exists else 0
 HierarchyLabel getHlabel()
           
 int getNamespaceID(IRDFDB_Model model, java.lang.String ns)
          Retrieves the dbid of the namespace if it exists else returns -1
 java.lang.String getNamespaceUriFromDBID(IRDFDB_Model model, int dbid)
          Given a namespace db id it returns the namespace uri it belongs to
 int getNextAnonID()
           
 int getNextGSID()
           
 int getNextNSID()
           
 int getNextThesTypeEnumID()
           
 int getNextTripleID()
           
 int getNSID()
           
 int getOrCreateGraphspaceID(java.lang.String gs)
          Returns the db id of the graphspace Graphspace is the name of the table that corresponds to the NameSpace table for graphspaces Returns -1 if the graphspace uri is DEFAULT# that is the default graphspace that is not stored
 int getOrCreateNamespaceID(IRDFDB_Model model, java.lang.String ns)
          Returns the db id of the namespace if it exists or else creates one
 java.lang.String getPropertyTableID(java.lang.String rdf_property_uri)
           
 java.util.HashMap getPropertyTableIDS()
           
 java.util.HashMap getSchemaIDs()
          Returns the DBMS identifier of the resource.
 RDF_DAG getSubclass_dag()
           
 RDF_DAG getSubproperty_dag()
           
 int getThesTypeEnumID()
           
 int getXMLSchemaDTID(java.lang.String xmlSchemaDT_uri)
          Returns the DBMS identifier of the xml datatype.
 int getXMLSchemaDTRQLID(java.lang.String xmlSchemaDT_uri)
           
 void initResourceIDs()
           
 void initStoredNS()
           
 boolean isXMLSchemaDTID(int id)
           
 void setDataIDs(java.util.HashMap dataIDs)
           
 void setDomainRangeTypeIds(IRDF_Property rdf_property, int[] dRType)
           
 void setHlabel(HierarchyLabel hlabel)
           
 void setNextAnonID(int nextAnonID)
           
 void setNextNSID(int nextNSID)
           
 void setNextThesTypeEnumID(int nextThesTypeEnumID)
           
 void setPropertyTableID(java.lang.String rdf_property_uri, java.lang.String tableID)
           
 void setResourceIDs(java.util.HashMap hm)
          Sets the DBMS identifier of the resource
 void setSchemaIDs(java.util.HashMap hm)
           
 void setSubclass_dag(RDF_DAG subclass_dag)
           
 void setSubproperty_dag(RDF_DAG subproperty_dag)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final org.apache.log4j.Logger log

hlabel

public HierarchyLabel hlabel

storedNS

public java.util.ArrayList storedNS

nsInMemory

public java.util.ArrayList nsInMemory
Constructor Detail

StorageMetaData

public StorageMetaData(RDFDB_Model model)
Method Detail

getSchemaIDs

public java.util.HashMap getSchemaIDs()
Returns the DBMS identifier of the resource.


setResourceIDs

public void setResourceIDs(java.util.HashMap hm)
Sets the DBMS identifier of the resource


setSchemaIDs

public void setSchemaIDs(java.util.HashMap hm)

getXMLSchemaDTID

public int getXMLSchemaDTID(java.lang.String xmlSchemaDT_uri)
Returns the DBMS identifier of the xml datatype.


isXMLSchemaDTID

public boolean isXMLSchemaDTID(int id)

getXMLSchemaDTRQLID

public int getXMLSchemaDTRQLID(java.lang.String xmlSchemaDT_uri)

getOrCreateNamespaceID

public int getOrCreateNamespaceID(IRDFDB_Model model,
                                  java.lang.String ns)
                           throws java.sql.SQLException
Returns the db id of the namespace if it exists or else creates one

Throws:
java.sql.SQLException - In case a query aborts

getNamespaceID

public int getNamespaceID(IRDFDB_Model model,
                          java.lang.String ns)
                   throws java.sql.SQLException
Retrieves the dbid of the namespace if it exists else returns -1

Throws:
java.sql.SQLException - In case a query aborts

getNamespaceUriFromDBID

public java.lang.String getNamespaceUriFromDBID(IRDFDB_Model model,
                                                int dbid)
                                         throws java.sql.SQLException
Given a namespace db id it returns the namespace uri it belongs to

Parameters:
model -
dbid -
Returns:
Throws:
java.sql.SQLException

getOrCreateGraphspaceID

public int getOrCreateGraphspaceID(java.lang.String gs)
                            throws java.sql.SQLException
Returns the db id of the graphspace Graphspace is the name of the table that corresponds to the NameSpace table for graphspaces Returns -1 if the graphspace uri is DEFAULT# that is the default graphspace that is not stored

Throws:
java.sql.SQLException - In case a query aborts

getGraphspaceID

public int getGraphspaceID(java.lang.String gs)
                    throws java.sql.SQLException
Returns the dbid of the graphspace if exists else 0

Throws:
java.sql.SQLException - In case a query aborts

getNextNSID

public int getNextNSID()
                throws java.sql.SQLException
Throws:
java.sql.SQLException - In case a query aborts

getNSID

public int getNSID()

getNextGSID

public int getNextGSID()
                throws java.sql.SQLException
Throws:
java.sql.SQLException - In case a query aborts

getNextAnonID

public int getNextAnonID()
                  throws java.sql.SQLException
Throws:
java.sql.SQLException - In case a query aborts

getAnonID

public int getAnonID()

getNextTripleID

public int getNextTripleID()
                    throws java.sql.SQLException
Throws:
java.sql.SQLException - In case a query aborts

getDomainRangeTypeIds

public int[] getDomainRangeTypeIds(IRDF_Property rdf_property)
Returns an array

Parameters:
rdf_property -
Returns:

getDomainRangeTypeIdsNoValidation

public int[] getDomainRangeTypeIdsNoValidation(IRDF_Property rdf_property)
                                        throws java.sql.SQLException
Parameters:
rdf_property -
Returns:
Throws:
java.sql.SQLException - In case a query aborts

setDomainRangeTypeIds

public void setDomainRangeTypeIds(IRDF_Property rdf_property,
                                  int[] dRType)

setPropertyTableID

public void setPropertyTableID(java.lang.String rdf_property_uri,
                               java.lang.String tableID)

getPropertyTableID

public java.lang.String getPropertyTableID(java.lang.String rdf_property_uri)

getPropertyTableIDS

public java.util.HashMap getPropertyTableIDS()

getNextThesTypeEnumID

public int getNextThesTypeEnumID()

getThesTypeEnumID

public int getThesTypeEnumID()

setNextThesTypeEnumID

public void setNextThesTypeEnumID(int nextThesTypeEnumID)

setNextNSID

public void setNextNSID(int nextNSID)

setNextAnonID

public void setNextAnonID(int nextAnonID)

getSubclass_dag

public RDF_DAG getSubclass_dag()

setSubclass_dag

public void setSubclass_dag(RDF_DAG subclass_dag)

getSubproperty_dag

public RDF_DAG getSubproperty_dag()

setSubproperty_dag

public void setSubproperty_dag(RDF_DAG subproperty_dag)

getHlabel

public HierarchyLabel getHlabel()

setHlabel

public void setHlabel(HierarchyLabel hlabel)

getDataIDs

public java.util.HashMap getDataIDs()

setDataIDs

public void setDataIDs(java.util.HashMap dataIDs)

initStoredNS

public void initStoredNS()

initResourceIDs

public void initResourceIDs()