How to import/read an owl ontology created by protege in Jena - jena

I created an owl ontology in Protege (ontologyEx.owl). I also have rdf triples created by r2rml engine (file name is example.ttl). Is it possible to import/read ontologyEx.owl in Jena and do reasoning with my model that reads rdf triples (i.e. Model model = ModelFactory.createDefaultModel(); model.read( "example.ttl" );) ?
Thanks!

Related

how to import data (instances) into an existing ontology in protoge

Can anyone tell me the steps that are required to populate an Ontology?
I have created a domain-specific Ontology (TBox = Terminological knowledge) which consists of defined classes and relations.
On the other hand, I have an IFC file (The Industry Foundation Classes) which has the instances.
I have converted the IFC file to IFC OWL and have understood that I need to map the classes into the newly created ontology.
However, I don't understand how I can get the instances of the associated classes and relations into my created ontology.
You have created two ontology files, one with the tbox and one with the abox. Usually, in this scenario the abox would use an owl:imports annotation to refer to the tbox, and would not, itself, need class declarations - it would use the IRIs for the classes already declared in the tbox. In protégé, creating an imports is straightforward.
A common issue is incorrect IRIs: if you've created your abox without initially importing the tbox, it's possible the classes you used do not match the tbox classes (e.g., the abox classes use the abox IRI as their base IRI instead of the tbox).

Creating knowledge graphs in Neo4j

1.Can Neo4j store RDF directly? we understand it can import RDF and export RDF but how is the data stored internally.
We also understand in Neo4j we can create property graphs and make it as a KG using APOC procedures and algorithms available,is that the case or are we missing anything?
2. We would like to understand, how an entity will be tagged against an ontology in Neo4j KG implementation.
You can import RDF data into Neo4j, however it will not be exactly in that format. Using Neosemantics, the triples will be converted into a property graph.
Neosematics can reconvert the property graph data back into triples should that be required.

Retrieving "when" a property was added to an ontology

I was wondering if it was possible to get the exact time stamp in a dateTime format for when a particular property, object or data, was added to the ontology. For example if I have three owl individuals A, B and C and through my code in either OWL API or Apache Jena I add a property relatedTo to the ontology and create the assertions A relatedTo B and A relatedTo C, is there some function I can call on A to see that A relatedTo B was asserted at some hh:mm:ss dd:mm:yyyy?
Thanks in advance for any help.
Not in any API that I'm familiar with - by default, OWL does not record any such information. You could build a pattern to add a timestamp to each axiom (adding an axiom annotation to each axiom) but it would only be available for data you produce.
Some OWL storage systems might have that information internally, but I'm not aware of any of them exposing this for SPARQL interrogation.

How to add instances in ontology from CSV file

I tried to add instances in ontology using WebProtege. But the problem is that data is not assigned as data/object property instead it is in the 'type' the heading under the 'Description'. Is there any other quick way to add indvisuals from CSV file.
Steps:
Using Jena to read the ontology into Model X
Write small java code that will read each row of CSV file and convert it according the ontology vocabulary in the form of RDF statement.
RDF Statements can then be stored into the same Model X.
So at the end you will have both your ontology and data instances in the same model X. Then print your model X into some file with extension of saved file as "RDF/XML".
If using the Protégé Ontology editor environment you can use the plugin called "Cellfie" A Protégé Desktop plugin for mapping spreadsheets to OWL ontologies. The plugin is available in the menu item "Tools > Create axioms from Excel workbook..."

Reusing Dublin Core Ontology

I'm new in ontology and i'm using protege to create my own. I have imported the Dublin core ontology (http://purl.org/dc/elements/1.1) into my own ontology using protege but only annotations were included. Upon reading the documentation of Dublin core there were classes and properties defined. how will i include these classes and properties in my ontology with the use of protege?
I think your problem is that you don't look inside the files. Dublin Core has many files. The one that you are referring to (elements) only contains annotations. You need to find the appropriate file. The DC terms contains some properties and classes. You need to read the documentation and then import the file with the modelling elements that you require.

Resources