Protege 3.0

edu.stanford.smi.protege.storage.jdbc
Interface DatabaseManager

All Superinterfaces:
DatabaseConstants, Disposable
All Known Implementing Classes:
SimpleJdbcDatabaseManager

public interface DatabaseManager
extends DatabaseConstants, Disposable

Interface to a database. All SQL commands are hidden away in the implementation of this interface.

Author:
Ray Fergerson

Field Summary
 
Fields inherited from interface edu.stanford.smi.protege.storage.jdbc.DatabaseConstants
TYPE_BOOLEAN, TYPE_CLASS, TYPE_FACET, TYPE_FLOAT, TYPE_INTEGER, TYPE_INVALID, TYPE_SIMPLE_INSTANCE, TYPE_SLOT, TYPE_STRING
 
Method Summary
 void addValue(Frame frame, Slot slot, Facet facet, boolean isTemplate, Object value)
           
 boolean beginTransaction()
           
 boolean endTransaction(boolean doCommit)
           
 Collection getAllFrameIDs()
           
 Collection getDBReferences(Object o, int maxReferences)
          returns a collection of DBReference objects
 String getDriverName()
           
 int getFrameCount(int type)
           
 Collection getFrameIDs(FrameID slot, FrameID facet, boolean isTemplate, String value)
           
 Collection getFramesWithAnyValue(Slot slot, Facet facet, boolean isTemplate)
          returns a collection of FrameIDs
 Collection getFramesWithValue(Slot slot, Facet facet, boolean isTemplate, Object value)
          returns a collection of FrameIDs
 int getFrameType(FrameID id)
           
 Collection getMatchingFrameIDs(FrameID slot, FrameID facet, boolean isTemplate, String matchString, int maxMatches)
           
 String getTableName()
           
 int getValueCount(FrameID frame, FrameID slot, FrameID facet, boolean isTemplate)
           
 List getValues(FrameID frame, FrameID slot, FrameID facet, boolean isTemplate)
          returns a collection of Objects.
 boolean hasValueAtSomeFrame(Slot slot, Facet facet, boolean isTemplate)
           
 void removeAllReferences(Frame frame)
           
 void removeAllValues(Frame frame, Slot slot, Facet facet, boolean isTemplate)
           
 void removeFramesWithValue(Slot slot, Facet facet, boolean isTemplate)
           
 void removeSingleValue(Frame frame, Slot slot, Facet facet, boolean isTemplate, Object value)
           
 void saveKnowledgeBase(KnowledgeBase kb)
           
 void setTracing(boolean b)
           
 void setValue(Frame frame, Slot slot, Facet facet, boolean isTemplate, Object value)
           
 void setValues(Frame frame, Slot slot, Facet facet, boolean isTemplate, Collection values)
           
 boolean supportsTransactions()
           
 
Methods inherited from interface edu.stanford.smi.protege.util.Disposable
dispose
 

Method Detail

addValue

public void addValue(Frame frame,
                     Slot slot,
                     Facet facet,
                     boolean isTemplate,
                     Object value)
              throws SQLException
Throws:
SQLException

beginTransaction

public boolean beginTransaction()

endTransaction

public boolean endTransaction(boolean doCommit)

getAllFrameIDs

public Collection getAllFrameIDs()
                          throws SQLException
Throws:
SQLException

getFrameCount

public int getFrameCount(int type)
                  throws SQLException
Throws:
SQLException

getDBReferences

public Collection getDBReferences(Object o,
                                  int maxReferences)
                           throws SQLException
returns a collection of DBReference objects

Parameters:
o - Description of Parameter
Returns:
The DBReferences value
Throws:
SQLException - Description of Exception

getDriverName

public String getDriverName()

getFrameIDs

public Collection getFrameIDs(FrameID slot,
                              FrameID facet,
                              boolean isTemplate,
                              String value)
                       throws SQLException
Throws:
SQLException

getFramesWithValue

public Collection getFramesWithValue(Slot slot,
                                     Facet facet,
                                     boolean isTemplate,
                                     Object value)
                              throws SQLException
returns a collection of FrameIDs

Throws:
SQLException

getFramesWithAnyValue

public Collection getFramesWithAnyValue(Slot slot,
                                        Facet facet,
                                        boolean isTemplate)
                                 throws SQLException
returns a collection of FrameIDs

Throws:
SQLException

getFrameType

public int getFrameType(FrameID id)
                 throws SQLException
Throws:
SQLException

getMatchingFrameIDs

public Collection getMatchingFrameIDs(FrameID slot,
                                      FrameID facet,
                                      boolean isTemplate,
                                      String matchString,
                                      int maxMatches)
                               throws SQLException
Throws:
SQLException

getTableName

public String getTableName()

getValueCount

public int getValueCount(FrameID frame,
                         FrameID slot,
                         FrameID facet,
                         boolean isTemplate)
                  throws SQLException
Throws:
SQLException

getValues

public List getValues(FrameID frame,
                      FrameID slot,
                      FrameID facet,
                      boolean isTemplate)
               throws SQLException
returns a collection of Objects. A frame is returned as a frameID

Throws:
SQLException

hasValueAtSomeFrame

public boolean hasValueAtSomeFrame(Slot slot,
                                   Facet facet,
                                   boolean isTemplate)
                            throws SQLException
Throws:
SQLException

removeAllReferences

public void removeAllReferences(Frame frame)
                         throws SQLException
Throws:
SQLException

removeAllValues

public void removeAllValues(Frame frame,
                            Slot slot,
                            Facet facet,
                            boolean isTemplate)
                     throws SQLException
Throws:
SQLException

removeFramesWithValue

public void removeFramesWithValue(Slot slot,
                                  Facet facet,
                                  boolean isTemplate)
                           throws SQLException
Throws:
SQLException

removeSingleValue

public void removeSingleValue(Frame frame,
                              Slot slot,
                              Facet facet,
                              boolean isTemplate,
                              Object value)
                       throws SQLException
Throws:
SQLException

saveKnowledgeBase

public void saveKnowledgeBase(KnowledgeBase kb)
                       throws SQLException
Throws:
SQLException

setTracing

public void setTracing(boolean b)

setValue

public void setValue(Frame frame,
                     Slot slot,
                     Facet facet,
                     boolean isTemplate,
                     Object value)
              throws SQLException
Throws:
SQLException

setValues

public void setValues(Frame frame,
                      Slot slot,
                      Facet facet,
                      boolean isTemplate,
                      Collection values)
               throws SQLException
Throws:
SQLException

supportsTransactions

public boolean supportsTransactions()

Protege 3.0

Submit a bug report or feature request
Protégé is a trademark of Stanford University.
Copyright (c) 1998-2005 Stanford University.