edu.stanford.smi.protege.storage.database
Class DatabaseFrameDb
java.lang.Object
edu.stanford.smi.protege.storage.database.DatabaseFrameDb
- All Implemented Interfaces:
- BasicFrameStore
- public class DatabaseFrameDb
- extends Object
- implements BasicFrameStore
Method Summary |
void |
addValues(Frame frame,
Slot slot,
Facet facet,
boolean isTemplate,
Collection values)
|
boolean |
beginTransaction(String name)
|
void |
close()
|
boolean |
commitTransaction()
|
void |
createNewTableAndIndices()
|
void |
deleteFrame(Frame frame)
|
Set |
executeQuery(Query query)
|
FrameID |
generateFrameID()
|
Set |
getClosure(Frame frame,
Slot slot,
Facet facet)
|
Set |
getClosure(Frame frame,
Slot slot,
Facet facet,
boolean isTemplate)
|
int |
getClsCount()
|
BasicFrameStore |
getDelegate()
|
int |
getFacetCount()
|
Frame |
getFrame(FrameID id)
|
int |
getFrameCount()
|
Set |
getFrames(Slot slot,
Facet facet,
boolean isTemplate,
Object value)
|
Set |
getFramesWithAnyValue(Slot slot,
Facet facet,
boolean isTemplate)
|
Map |
getFrameValues(Frame frame)
|
Set |
getMatchingFrames(Slot slot,
Facet facet,
boolean isTemplate,
String value,
int maxMatches)
|
Set |
getMatchingReferences(String value,
int maxMatches)
|
Set |
getReferences(Object value)
|
int |
getSimpleInstanceCount()
|
int |
getSlotCount()
|
String |
getTableName()
|
List |
getValues(Frame frame,
Slot slot,
Facet facet,
boolean isTemplate)
|
int |
getValuesCount(Frame frame,
Slot slot,
Facet facet,
boolean isTemplate)
|
void |
moveValue(Frame frame,
Slot slot,
Facet facet,
boolean isTemplate,
int from,
int index)
|
void |
removeValue(Frame frame,
Slot slot,
Facet facet,
boolean isTemplate,
Object value)
|
void |
removeValues(Frame frame,
Slot slot,
Facet facet,
boolean isTemplate)
|
void |
replaceFrame(Frame frame)
A complete hack to work around problems with the java packages feature |
boolean |
rollbackTransaction()
|
void |
saveKnowledgeBase(KnowledgeBase kb)
|
void |
setModifiable(boolean modifiable)
|
void |
setValues(Frame frame,
Slot slot,
Facet facet,
boolean isTemplate,
Collection values)
|
boolean |
tableExists()
|
String |
toString()
|
DatabaseFrameDb
public DatabaseFrameDb(FrameFactory factory,
String driver,
String url,
String user,
String pass,
String table)
getClosure
public Set getClosure(Frame frame,
Slot slot,
Facet facet,
boolean isTemplate)
- Specified by:
getClosure
in interface BasicFrameStore
close
public void close()
- Specified by:
close
in interface BasicFrameStore
setModifiable
public void setModifiable(boolean modifiable)
getTableName
public String getTableName()
tableExists
public boolean tableExists()
throws SQLException
- Throws:
SQLException
createNewTableAndIndices
public void createNewTableAndIndices()
deleteFrame
public void deleteFrame(Frame frame)
- Specified by:
deleteFrame
in interface BasicFrameStore
getReferences
public Set getReferences(Object value)
- Specified by:
getReferences
in interface BasicFrameStore
getMatchingReferences
public Set getMatchingReferences(String value,
int maxMatches)
- Specified by:
getMatchingReferences
in interface BasicFrameStore
removeValue
public void removeValue(Frame frame,
Slot slot,
Facet facet,
boolean isTemplate,
Object value)
- Specified by:
removeValue
in interface BasicFrameStore
removeValues
public void removeValues(Frame frame,
Slot slot,
Facet facet,
boolean isTemplate)
addValues
public void addValues(Frame frame,
Slot slot,
Facet facet,
boolean isTemplate,
Collection values)
- Specified by:
addValues
in interface BasicFrameStore
moveValue
public void moveValue(Frame frame,
Slot slot,
Facet facet,
boolean isTemplate,
int from,
int index)
- Specified by:
moveValue
in interface BasicFrameStore
executeQuery
public Set executeQuery(Query query)
- Specified by:
executeQuery
in interface BasicFrameStore
getMatchingFrames
public Set getMatchingFrames(Slot slot,
Facet facet,
boolean isTemplate,
String value,
int maxMatches)
- Specified by:
getMatchingFrames
in interface BasicFrameStore
getFrames
public Set getFrames(Slot slot,
Facet facet,
boolean isTemplate,
Object value)
- Specified by:
getFrames
in interface BasicFrameStore
getFramesWithAnyValue
public Set getFramesWithAnyValue(Slot slot,
Facet facet,
boolean isTemplate)
- Specified by:
getFramesWithAnyValue
in interface BasicFrameStore
setValues
public void setValues(Frame frame,
Slot slot,
Facet facet,
boolean isTemplate,
Collection values)
- Specified by:
setValues
in interface BasicFrameStore
getValues
public List getValues(Frame frame,
Slot slot,
Facet facet,
boolean isTemplate)
- Specified by:
getValues
in interface BasicFrameStore
getValuesCount
public int getValuesCount(Frame frame,
Slot slot,
Facet facet,
boolean isTemplate)
- Specified by:
getValuesCount
in interface BasicFrameStore
getFrameValues
public Map getFrameValues(Frame frame)
saveKnowledgeBase
public void saveKnowledgeBase(KnowledgeBase kb)
throws SQLException
- Throws:
SQLException
beginTransaction
public boolean beginTransaction(String name)
- Specified by:
beginTransaction
in interface BasicFrameStore
commitTransaction
public boolean commitTransaction()
- Specified by:
commitTransaction
in interface BasicFrameStore
rollbackTransaction
public boolean rollbackTransaction()
- Specified by:
rollbackTransaction
in interface BasicFrameStore
replaceFrame
public void replaceFrame(Frame frame)
- Description copied from interface:
BasicFrameStore
- A complete hack to work around problems with the java packages feature
- Specified by:
replaceFrame
in interface BasicFrameStore
toString
public String toString()
getClsCount
public int getClsCount()
- Specified by:
getClsCount
in interface BasicFrameStore
getSlotCount
public int getSlotCount()
- Specified by:
getSlotCount
in interface BasicFrameStore
getFacetCount
public int getFacetCount()
- Specified by:
getFacetCount
in interface BasicFrameStore
getFrameCount
public int getFrameCount()
- Specified by:
getFrameCount
in interface BasicFrameStore
getSimpleInstanceCount
public int getSimpleInstanceCount()
- Specified by:
getSimpleInstanceCount
in interface BasicFrameStore
getFrame
public Frame getFrame(FrameID id)
- Specified by:
getFrame
in interface BasicFrameStore
generateFrameID
public FrameID generateFrameID()
- Specified by:
generateFrameID
in interface BasicFrameStore
getClosure
public Set getClosure(Frame frame,
Slot slot,
Facet facet)
getDelegate
public BasicFrameStore getDelegate()
- Specified by:
getDelegate
in interface BasicFrameStore
Submit a bug report or feature request
Protégé is a trademark of Stanford University.
Copyright (c) 1998-2004 Stanford University.