|
Protege 3.3.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.smi.protege.storage.database.DatabaseFrameDb
public class DatabaseFrameDb
Nested Class Summary | |
---|---|
static class |
DatabaseFrameDb.Column
|
Constructor Summary | |
---|---|
DatabaseFrameDb()
|
Method Summary | |
---|---|
void |
addValues(Frame frame,
Slot slot,
Facet facet,
boolean isTemplate,
Collection values)
|
protected void |
beginBatch()
|
boolean |
beginTransaction(String name)
|
boolean |
checkMySQLBug()
This routine checks for a bug in mysql. |
void |
close()
|
boolean |
commitTransaction()
|
void |
createNewTableAndIndices()
|
void |
deleteFrame(Frame frame)
|
protected void |
endBatch()
|
void |
executeQuery(Query query,
QueryCallback callback)
The executeQuery method allows for complex queries. |
FrameID |
generateFrameID()
|
Set |
getClosure(Frame frame,
Slot slot,
Facet facet,
boolean isTemplate)
|
int |
getClsCount()
|
protected RobustConnection |
getCurrentConnection()
|
NarrowFrameStore |
getDelegate()
|
int |
getFacetCount()
|
Frame |
getFrame(FrameID id)
|
int |
getFrameCount()
|
FrameFactory |
getFrameFactory()
|
Set |
getFrames()
|
Set |
getFrames(Slot slot,
Facet facet,
boolean isTemplate,
Object value)
|
Set |
getFramesWithAnyValue(Slot slot,
Facet facet,
boolean isTemplate)
|
CacheMap<Frame,Map<Sft,List>> |
getFrameValues()
|
Map<Sft,List> |
getFrameValues(Frame frame)
|
Set |
getMatchingFrames(Slot slot,
Facet facet,
boolean isTemplate,
String value,
int maxMatches)
|
Set<Reference> |
getMatchingReferences(String value,
int maxMatches)
|
String |
getName()
The Narrow Frame store has a standard set/get name interface. |
Set<Reference> |
getReferences(Object value)
|
int |
getSimpleInstanceCount()
|
int |
getSlotCount()
|
String |
getTable()
|
String |
getTableName()
|
TransactionMonitor |
getTransactionStatusMonitor()
Retrieves a transaction status monitor for transactions. |
List |
getValues(Frame frame,
Slot slot,
Facet facet,
boolean isTemplate)
Obtains the values of a slot/facet to a frame. |
int |
getValuesCount(Frame frame,
Slot slot,
Facet facet,
boolean isTemplate)
|
void |
initialize(FrameFactory factory,
String driver,
String url,
String user,
String pass,
String table,
boolean isInclude)
|
void |
moveValue(Frame frame,
Slot slot,
Facet facet,
boolean isTemplate,
int from,
int index)
Retrieves the list of values associated with the (frame, slot, facet, isTemplate) combination and moves the item at the position from to the position to. |
void |
overwriteKB(KnowledgeBase kb,
boolean saveFrames)
|
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()
|
protected void |
saveFrames(KnowledgeBase kb)
|
protected void |
saveValues(Frame frame,
Slot slot,
Facet facet,
boolean isTemplate,
Collection values)
|
protected void |
setMemoryProjectId(int memoryProjectId)
|
static void |
setModifiable(boolean modifiable)
|
void |
setName(String name)
The Narrow Frame store has a standard set/get name interface. |
void |
setValues(Frame frame,
Slot slot,
Facet facet,
boolean isTemplate,
Collection values)
|
boolean |
tableExists()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DatabaseFrameDb()
Method Detail |
---|
public String getName()
NarrowFrameStore
getName
in interface NarrowFrameStore
public void setName(String name)
NarrowFrameStore
setName
in interface NarrowFrameStore
name
- - the name of the Narrow Frame Store.public Set getClosure(Frame frame, Slot slot, Facet facet, boolean isTemplate)
getClosure
in interface NarrowFrameStore
protected RobustConnection getCurrentConnection() throws SQLException
SQLException
public void close()
close
in interface NarrowFrameStore
protected void setMemoryProjectId(int memoryProjectId)
public void initialize(FrameFactory factory, String driver, String url, String user, String pass, String table, boolean isInclude)
public FrameFactory getFrameFactory()
public String getTable()
public static void setModifiable(boolean modifiable)
public String getTableName()
public boolean tableExists()
public void createNewTableAndIndices()
public boolean checkMySQLBug()
public void deleteFrame(Frame frame)
deleteFrame
in interface NarrowFrameStore
public Set<Reference> getReferences(Object value)
getReferences
in interface NarrowFrameStore
public Set<Reference> getMatchingReferences(String value, int maxMatches)
getMatchingReferences
in interface NarrowFrameStore
public void removeValue(Frame frame, Slot slot, Facet facet, boolean isTemplate, Object value)
removeValue
in interface NarrowFrameStore
public void removeValues(Frame frame, Slot slot, Facet facet, boolean isTemplate)
public void addValues(Frame frame, Slot slot, Facet facet, boolean isTemplate, Collection values)
addValues
in interface NarrowFrameStore
public void moveValue(Frame frame, Slot slot, Facet facet, boolean isTemplate, int from, int index)
NarrowFrameStore
moveValue
in interface NarrowFrameStore
frame
- the frame (as used in getValues)slot
- the slot (as used in getValues)facet
- the facet (as used in getValues)isTemplate
- whether it is a template (as used in getValues)from
- the starting position of a valueindex
- the position of the value after this callpublic void executeQuery(Query query, QueryCallback callback)
NarrowFrameStore
executeQuery
in interface NarrowFrameStore
public Set getMatchingFrames(Slot slot, Facet facet, boolean isTemplate, String value, int maxMatches)
getMatchingFrames
in interface NarrowFrameStore
slot
- the slotfacet
- the facetisTemplate
- whether we are looking at template valuesvalue
- the regexp to use for matchingmaxMatches
- the max number of matches (-1 for get all)
KnowledgeBase.getMatchingFrames
public Set getFrames(Slot slot, Facet facet, boolean isTemplate, Object value)
getFrames
in interface NarrowFrameStore
public Set getFramesWithAnyValue(Slot slot, Facet facet, boolean isTemplate)
getFramesWithAnyValue
in interface NarrowFrameStore
public void setValues(Frame frame, Slot slot, Facet facet, boolean isTemplate, Collection values)
setValues
in interface NarrowFrameStore
public List getValues(Frame frame, Slot slot, Facet facet, boolean isTemplate)
NarrowFrameStore
getValues
in interface NarrowFrameStore
frame
- - the frameslot
- the slotfacet
- the facet. If this is non-null then we are looking at a facet value.isTemplate
- to be determined
public int getValuesCount(Frame frame, Slot slot, Facet facet, boolean isTemplate)
getValuesCount
in interface NarrowFrameStore
public CacheMap<Frame,Map<Sft,List>> getFrameValues()
public Map<Sft,List> getFrameValues(Frame frame)
protected void beginBatch() throws SQLException
SQLException
protected void endBatch() throws SQLException
SQLException
public void overwriteKB(KnowledgeBase kb, boolean saveFrames) throws SQLException
SQLException
protected void saveFrames(KnowledgeBase kb) throws SQLException
SQLException
protected void saveValues(Frame frame, Slot slot, Facet facet, boolean isTemplate, Collection values) throws SQLException
SQLException
public boolean beginTransaction(String name)
beginTransaction
in interface NarrowFrameStore
public boolean commitTransaction()
commitTransaction
in interface NarrowFrameStore
public boolean rollbackTransaction()
rollbackTransaction
in interface NarrowFrameStore
public TransactionMonitor getTransactionStatusMonitor()
NarrowFrameStore
getTransactionStatusMonitor
in interface NarrowFrameStore
public void replaceFrame(Frame frame)
NarrowFrameStore
replaceFrame
in interface NarrowFrameStore
public String toString()
toString
in class Object
public int getClsCount()
getClsCount
in interface NarrowFrameStore
public int getSlotCount()
getSlotCount
in interface NarrowFrameStore
public int getFacetCount()
getFacetCount
in interface NarrowFrameStore
public int getFrameCount()
getFrameCount
in interface NarrowFrameStore
public Set getFrames()
getFrames
in interface NarrowFrameStore
public int getSimpleInstanceCount()
getSimpleInstanceCount
in interface NarrowFrameStore
public Frame getFrame(FrameID id)
getFrame
in interface NarrowFrameStore
public FrameID generateFrameID()
generateFrameID
in interface NarrowFrameStore
public NarrowFrameStore getDelegate()
getDelegate
in interface NarrowFrameStore
|
Protege 3.3.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |