|
Protégé-OWL 3.4.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.smi.protegex.owl.repository.impl.DatabaseRepository
public class DatabaseRepository
Field Summary | |
---|---|
static edu.stanford.smi.protege.storage.database.DatabaseProperty[] |
DATABASE_FIELDS
|
static String |
REPOSITORY_DESCRIPTOR_PREFIX
|
static char |
SEPARATOR_CHAR
|
int |
SQL_GET_TABLE_TYPES_TABLE_TYPE_COL
|
int |
SQL_GET_TABLES_TABLENAME_COL
|
static String |
SQL_TABLE_TYPE
|
static String |
SQL_VIEW_TYPE
|
Constructor Summary | |
---|---|
DatabaseRepository(String repositoryDescriptor)
|
|
DatabaseRepository(String driver,
String url,
String user,
String password)
|
|
DatabaseRepository(String driver,
String url,
String user,
String password,
String table)
|
Method Summary | |
---|---|
boolean |
addTable(String table)
|
void |
connect()
|
boolean |
contains(URI ontologyName)
Determines if the repository contains the specified ontology. |
void |
disconnect()
|
static int |
getDBPropertyIndex(edu.stanford.smi.protege.storage.database.DatabaseProperty property)
|
String |
getDBTable(URI ontologyName)
|
String |
getDriver()
|
Collection<URI> |
getOntologies()
Gets the name of the ontologies that this repository contains. |
String |
getOntologyLocationDescription(URI ontologyName)
Gets a description of where the specified ontology is located. |
OutputStream |
getOutputStream(URI ontologyName)
Gets an output stream which can be used to write changes to the specified ontology. |
String |
getPassword()
|
String |
getRepositoryDescription()
Gets a description of the type of the repository. |
String |
getRepositoryDescriptor()
Gets the descriptor for this repository. |
Map<String,URI> |
getTableToOntologyMap()
|
String |
getUrl()
|
String |
getUser()
|
boolean |
hasOutputStream(URI ontologyName)
Determines if the ontology is writable through an output stream. |
boolean |
isSystem()
Determines if the ontology repository is a system repository. |
boolean |
isWritable(URI ontologyName)
Determines if the specified ontology is writable. |
TripleStore |
loadImportedAssertions(OWLModel owlModel,
URI ontologyName)
|
static List<String> |
parse(String repositoryDescriptor)
|
void |
refresh()
Causes the repository to contain the latest information. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String REPOSITORY_DESCRIPTOR_PREFIX
public static final char SEPARATOR_CHAR
public static final String SQL_TABLE_TYPE
public static final String SQL_VIEW_TYPE
public int SQL_GET_TABLE_TYPES_TABLE_TYPE_COL
public int SQL_GET_TABLES_TABLENAME_COL
public static final edu.stanford.smi.protege.storage.database.DatabaseProperty[] DATABASE_FIELDS
Constructor Detail |
---|
public DatabaseRepository(String driver, String url, String user, String password) throws SQLException, ClassNotFoundException
SQLException
ClassNotFoundException
public DatabaseRepository(String driver, String url, String user, String password, String table) throws SQLException, ClassNotFoundException
SQLException
ClassNotFoundException
public DatabaseRepository(String repositoryDescriptor) throws ClassNotFoundException, SQLException
ClassNotFoundException
SQLException
Method Detail |
---|
public static int getDBPropertyIndex(edu.stanford.smi.protege.storage.database.DatabaseProperty property)
public static List<String> parse(String repositoryDescriptor)
public void connect() throws SQLException
SQLException
public void disconnect() throws SQLException
SQLException
public boolean addTable(String table)
public TripleStore loadImportedAssertions(OWLModel owlModel, URI ontologyName) throws edu.stanford.smi.protege.exception.OntologyLoadException
loadImportedAssertions
in interface Repository
owlModel
- the model to add the import toontologyName
- the ontology name to use to look up the imported ontology.
edu.stanford.smi.protege.exception.OntologyLoadException
public boolean contains(URI ontologyName)
Repository
contains
in interface Repository
ontologyName
- The name of the ontology.public Collection<URI> getOntologies()
Repository
getOntologies
in interface Repository
Collection
containing
URI
s.public String getDBTable(URI ontologyName)
public String getOntologyLocationDescription(URI ontologyName)
Repository
getOntologyLocationDescription
in interface Repository
ontologyName
- The name of the ontology.
String
description of the location of
the ontology, for example, "file:/Users/Blah/Blah/Blah". This
return value will be an empty String
if the repository
does not contain the specified ontology.public OutputStream getOutputStream(URI ontologyName) throws IOException
Repository
getOutputStream
in interface Repository
ontologyName
- The ontology to be written
OutputStream
that can be used to
write changes to the ontology, or null
if the
ontology is not writable.
IOException
public String getRepositoryDescription()
Repository
getRepositoryDescription
in interface Repository
public String getRepositoryDescriptor()
Repository
getRepositoryDescriptor
in interface Repository
public boolean isSystem()
Repository
isSystem
in interface Repository
public boolean isWritable(URI ontologyName)
Repository
isWritable
in interface Repository
true
if the ontology is writable,
or false
if the ontology is not writable.public boolean hasOutputStream(URI ontologyName)
Repository
hasOutputStream
in interface Repository
public void refresh()
Repository
refresh
in interface Repository
public String getDriver()
public String getUrl()
public String getUser()
public String getPassword()
public Map<String,URI> getTableToOntologyMap()
|
Protégé-OWL 3.4.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |