On 01/09/14 13:46, Vinicios Binsfeld wrote:
Hi Cris.
I believe I still do not have the Model.
This is what Chris is referring to:
> Model model = SDBFactory.connectDefaultModel(store) ;
You can add triples to that.
The ontology that a will use is:
https://code.google.com/p/vital-sign-ontology/
See
http://mail-archives.apache.org/mod_mbox/jena-users/201408.mbox/%3C53FF0959.6020802%40apache.org%3E
for working with an existing (non-RDF) DB schema.
Do you have an existing data in a MySQL database or do you wish to
create a new RDF database with your own data?
Andy
Sorry for the basic questions. I am starting now to work with ontologies.
The code I have now is this:
final String className = "com.mysql.jdbc.Driver";
final String DB_URL = "jdbc:mysql://localhost:3306/rdfplay";
final String DB_USER = "root";
final String DB_PASSWD = "admin";
StoreDesc storeDesc = new StoreDesc(LayoutType.LayoutTripleNodesHash,
DatabaseType.MySQL) ;
JDBC.loadDriverMySQL();
//String jdbcURL = "jdbc:derby:DB/SDB2";
SDBConnection conn = new SDBConnection(DB_URL, DB_USER, DB_PASSWD) ;
Store store = SDBFactory.connectStore(conn, storeDesc) ;
store.getTableFormatter().create();
Dataset ds = SDBFactory.connectDataset(store) ;
Model model = SDBFactory.connectDefaultModel(store) ;
2014-09-01 9:37 GMT-03:00 Chris Dollin <[email protected]>:
On Monday, September 01, 2014 09:06:10 AM Vinicios Binsfeld wrote:
Someone has any examples of how popular one with OWL ontology data using
SDB?
I'm using MySQL and SDB data. The connection with the database is working
well. Now I need an example of how populate the ontology and how to
manipulate, fetch data, update data, and create new records.
You've got an SDB model, yes?
It's a Jena model. Use the Model and Resource and Literal APIs.
Chris
(who wonders if he's missing something)
--
"The process will be long and ... unreliable." Box, /Star
Cops/
Epimorphics Ltd, http://www.epimorphics.com
Registered address: Court Lodge, 105 High Street, Portishead, Bristol BS20
6PT
Epimorphics Ltd. is a limited company registered in England (number
7016688)