public class DBOntologyWriter
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
nl
New line.
|
Constructor and Description |
---|
DBOntologyWriter(java.lang.String pathFileNameOntology)
Constructor: a full path and a file name is required.
|
Modifier and Type | Method and Description |
---|---|
void |
connectToDatabase(java.lang.String ip,
java.lang.String port,
java.lang.String user,
java.lang.String password,
java.lang.String databaseName)
Initializes the connection to the database
|
static void |
main(java.lang.String[] args) |
void |
saveOntologyTriplesToDB(boolean createDB,
boolean createTable,
boolean deleteData)
Method takes all triples from an Ontology and stores them in DB, as a row in 3-columns table.
|
boolean |
saveOntologyTriplesToFile(java.lang.String fileNamePath,
boolean createDB,
boolean createTable,
boolean deleteData)
Method takes all triples from an Ontology and stores them in DB, as a row in 3-columns table.
|
public DBOntologyWriter(java.lang.String pathFileNameOntology)
pathFileNameOntology
- public void connectToDatabase(java.lang.String ip, java.lang.String port, java.lang.String user, java.lang.String password, java.lang.String databaseName)
IP
- the IP of the serverPort
- port of the serveruser
- the userpassword
- the passworddatabaseName
- the database name - it can be null. In that case the connection is established with the database server.public static void main(java.lang.String[] args)
public void saveOntologyTriplesToDB(boolean createDB, boolean createTable, boolean deleteData)
public boolean saveOntologyTriplesToFile(java.lang.String fileNamePath, boolean createDB, boolean createTable, boolean deleteData)