Skip to content

A Framework for integrating ontologies and relational databases

License

Notifications You must be signed in to change notification settings

sword-ufpe/GryphonFramework

 
 

Repository files navigation

Gryphon is a lightweight framework for integrating ontologies and relational databases in really simple way.

Paper coming soon...

Supported ontology formats:

  • OWL
  • RDF

Supported databases:

  • MySQL
  • PostgreSQL

How to Use

1. Configure

// Where the alignments and mappings will be saved? Want to see logs?
GryphonConfig.setWorkingDirectory(new File("integrationExample"));
GryphonConfig.setLogEnabled(true);
GryphonConfig.setShowGryphonLogoOnConsole(true);

// Init Gryphon
Gryphon.init();

// Where are the sources?
Ontology globalOntBibtex = new Ontology("globalOntology", uriToGlobalOntology);
Ontology localOnt1 = new Ontology("localOntology1", uriToLocalOntology1);
Ontology localOnt2 = new Ontology("localOntology2", uriToLocalOntology2);
Database localDB1 = new Database("localhost", 3306, "username", "password", "localDatabase1", Database.DBMS.MySQL);
Database localDB1 = new Database("localhost", 3306, "username", "password", "localDatabase2", Database.DBMS.PostgreSQL);

Gryphon.setGlobalOntology(globalOntBibtex);
Gryphon.addLocalOntology(localOnt1);
Gryphon.addLocalOntology(localOnt2);
Gryphon.addLocalDatabase(localDB1);

2. Align (and Map) the Sources

// Simple like that (this may take a while)
Gryphon.align();

3. Query Using SPARQL

// Query must be based on *Global Ontology*
String strQuery = 
	 "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> "
	+"SELECT ?x ?y "
	+"WHERE { ?x rdf:type ?y }";
Gryphon.query(strQuery);

4. Save Result

// TODO

Supported formats:

  • TODO

Practical Example

Check out Example.java for a complete example.

You'll find ontologies and databases used on examples in examples folder.

Developed By

Acknowledgements

CIn-UFPE UFPE

This project was founded by FACEPE (IBPG-0342-1.03/13).

Special thanks to:

License

The MIT License (MIT)

Copyright (c) 2015 Adriel Café, Filipe Santana, Fred Freitas

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

About

A Framework for integrating ontologies and relational databases

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Web Ontology Language 100.0%