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
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 |
getFramesWithValue(Slot slot,
Facet facet,
boolean isTemplate)
returns a collection of Objects. |
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()
|
addValue
public void addValue(Frame frame,
Slot slot,
Facet facet,
boolean isTemplate,
Object value)
throws SQLException
beginTransaction
public boolean beginTransaction()
endTransaction
public boolean endTransaction(boolean doCommit)
getAllFrameIDs
public Collection getAllFrameIDs()
throws SQLException
getFrameCount
public int getFrameCount(int type)
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
getFramesWithValue
public Collection getFramesWithValue(Slot slot,
Facet facet,
boolean isTemplate)
throws SQLException
- returns a collection of Objects. A frame is returned as a frameID
getFrameType
public int getFrameType(FrameID id)
throws SQLException
getMatchingFrameIDs
public Collection getMatchingFrameIDs(FrameID slot,
FrameID facet,
boolean isTemplate,
String matchString,
int maxMatches)
throws SQLException
getTableName
public String getTableName()
getValueCount
public int getValueCount(FrameID frame,
FrameID slot,
FrameID facet,
boolean isTemplate)
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
hasValueAtSomeFrame
public boolean hasValueAtSomeFrame(Slot slot,
Facet facet,
boolean isTemplate)
throws SQLException
removeAllReferences
public void removeAllReferences(Frame frame)
throws SQLException
removeAllValues
public void removeAllValues(Frame frame,
Slot slot,
Facet facet,
boolean isTemplate)
throws SQLException
removeFramesWithValue
public void removeFramesWithValue(Slot slot,
Facet facet,
boolean isTemplate)
throws SQLException
removeSingleValue
public void removeSingleValue(Frame frame,
Slot slot,
Facet facet,
boolean isTemplate,
Object value)
throws SQLException
saveKnowledgeBase
public void saveKnowledgeBase(KnowledgeBase kb)
throws SQLException
setTracing
public void setTracing(boolean b)
setValue
public void setValue(Frame frame,
Slot slot,
Facet facet,
boolean isTemplate,
Object value)
throws SQLException
setValues
public void setValues(Frame frame,
Slot slot,
Facet facet,
boolean isTemplate,
Collection values)
throws SQLException
supportsTransactions
public boolean supportsTransactions()
Submit a bug report or feature request
Protege-2000 is a trademark of Stanford University.
Copyright (c) 1998-2002 Stanford University.