Protege 3.4.5

edu.stanford.smi.protege.storage.database
Class DatabaseKnowledgeBaseFactory

java.lang.Object
  extended by edu.stanford.smi.protege.storage.database.DatabaseKnowledgeBaseFactory
All Implemented Interfaces:
KnowledgeBaseFactory, KnowledgeBaseFactory2

public class DatabaseKnowledgeBaseFactory
extends Object
implements KnowledgeBaseFactory2

Description of the class

Author:
Ray Fergerson

Field Summary
static String DESCRIPTION
           
 
Fields inherited from interface edu.stanford.smi.protege.model.KnowledgeBaseFactory
FACTORY_CLASS_NAME
 
Constructor Summary
DatabaseKnowledgeBaseFactory()
           
 
Method Summary
 KnowledgeBase createKnowledgeBase(Collection errors)
           
 KnowledgeBaseSourcesEditor createKnowledgeBaseSourcesEditor(String projectName, PropertyList sources)
          Note that this method should really take a URI for a param rather than a string.
 NarrowFrameStore createNarrowFrameStore(String name)
           
protected static DatabaseFrameDb getDatabaseFrameDb(KnowledgeBase kb)
           
 Class<? extends DatabaseFrameDb> getDatabaseFrameDbClass()
           
 String getDescription()
           
static String getDriver(PropertyList sources)
           
static String getPassword(PropertyList sources)
           
 String getProjectFilePath()
           
static String getTableName(PropertyList sources)
           
static String getURL(PropertyList sources)
           
static String getUsername(PropertyList sources)
           
 void includeKnowledgeBase(KnowledgeBase kb, PropertyList sources, Collection errors)
           
 void includeKnowledgeBase(KnowledgeBase kb, String driver, String url, String user, String password, String table, Collection errors)
           
protected  void initializeKB(KnowledgeBase kb, String driver, String url, String user, String password, String table, boolean isInclude)
           
 boolean isComplete(PropertyList sources)
           
 void loadKnowledgeBase(KnowledgeBase kb, PropertyList sources, Collection errors)
           
 void loadKnowledgeBase(KnowledgeBase kb, String driver, String url, String user, String password, String table, Collection errors)
           
 boolean owlMode()
           
 void prepareToSaveInFormat(KnowledgeBase kb, KnowledgeBaseFactory factory, Collection errors)
           
 void saveKnowledgeBase(KnowledgeBase kb, PropertyList sources, Collection errors)
           
static void setDriver(PropertyList sources, String driver)
           
protected  void setOwlMode(boolean owlMode)
           
static void setPassword(PropertyList sources, String password)
           
static void setSources(PropertyList sources, String driver, String url, String table, String user, String password)
           
static void setTablename(PropertyList sources, String tablename)
           
static void setURL(PropertyList sources, String url)
           
static void setUsername(PropertyList sources, String username)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DESCRIPTION

public static final String DESCRIPTION
Constructor Detail

DatabaseKnowledgeBaseFactory

public DatabaseKnowledgeBaseFactory()
Method Detail

createKnowledgeBase

public KnowledgeBase createKnowledgeBase(Collection errors)
Specified by:
createKnowledgeBase in interface KnowledgeBaseFactory

getDatabaseFrameDbClass

public Class<? extends DatabaseFrameDb> getDatabaseFrameDbClass()

createKnowledgeBaseSourcesEditor

public KnowledgeBaseSourcesEditor createKnowledgeBaseSourcesEditor(String projectName,
                                                                   PropertyList sources)
Description copied from interface: KnowledgeBaseFactory
Note that this method should really take a URI for a param rather than a string. I maintain the string for backwards compatibility

Specified by:
createKnowledgeBaseSourcesEditor in interface KnowledgeBaseFactory

getDescription

public String getDescription()
Specified by:
getDescription in interface KnowledgeBaseFactory

getDriver

public static String getDriver(PropertyList sources)

getPassword

public static String getPassword(PropertyList sources)

getProjectFilePath

public String getProjectFilePath()
Specified by:
getProjectFilePath in interface KnowledgeBaseFactory

getTableName

public static String getTableName(PropertyList sources)

getURL

public static String getURL(PropertyList sources)

getUsername

public static String getUsername(PropertyList sources)

includeKnowledgeBase

public void includeKnowledgeBase(KnowledgeBase kb,
                                 PropertyList sources,
                                 Collection errors)
Specified by:
includeKnowledgeBase in interface KnowledgeBaseFactory

isComplete

public boolean isComplete(PropertyList sources)
Specified by:
isComplete in interface KnowledgeBaseFactory

loadKnowledgeBase

public void loadKnowledgeBase(KnowledgeBase kb,
                              PropertyList sources,
                              Collection errors)
Specified by:
loadKnowledgeBase in interface KnowledgeBaseFactory

includeKnowledgeBase

public void includeKnowledgeBase(KnowledgeBase kb,
                                 String driver,
                                 String url,
                                 String user,
                                 String password,
                                 String table,
                                 Collection errors)

loadKnowledgeBase

public void loadKnowledgeBase(KnowledgeBase kb,
                              String driver,
                              String url,
                              String user,
                              String password,
                              String table,
                              Collection errors)

saveKnowledgeBase

public void saveKnowledgeBase(KnowledgeBase kb,
                              PropertyList sources,
                              Collection errors)
Specified by:
saveKnowledgeBase in interface KnowledgeBaseFactory

getDatabaseFrameDb

protected static DatabaseFrameDb getDatabaseFrameDb(KnowledgeBase kb)

setDriver

public static void setDriver(PropertyList sources,
                             String driver)

setPassword

public static void setPassword(PropertyList sources,
                               String password)

setTablename

public static void setTablename(PropertyList sources,
                                String tablename)

setURL

public static void setURL(PropertyList sources,
                          String url)

setUsername

public static void setUsername(PropertyList sources,
                               String username)

setSources

public static void setSources(PropertyList sources,
                              String driver,
                              String url,
                              String table,
                              String user,
                              String password)

prepareToSaveInFormat

public void prepareToSaveInFormat(KnowledgeBase kb,
                                  KnowledgeBaseFactory factory,
                                  Collection errors)
Specified by:
prepareToSaveInFormat in interface KnowledgeBaseFactory2

createNarrowFrameStore

public NarrowFrameStore createNarrowFrameStore(String name)
Specified by:
createNarrowFrameStore in interface KnowledgeBaseFactory2

initializeKB

protected void initializeKB(KnowledgeBase kb,
                            String driver,
                            String url,
                            String user,
                            String password,
                            String table,
                            boolean isInclude)

setOwlMode

protected void setOwlMode(boolean owlMode)

owlMode

public boolean owlMode()

Protege 3.4.5

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