From: altaf h. <alt...@ya...> - 2014-03-10 14:25:41
|
Thanks Rob for your prompt response. I have checked based on your suggestion, but as I checked on API documentation, there is no way of adding Owl:Ontology object. The "Ontology" meta-info class has no way of doing so. In addition I have checked to add via underlying ontologyGraph, but only there is ways to add property/resource/class will actually be serialized as owl:Class or Owl:Properties. I have investigated on Protege created ontology, here is how it doing in two cases: 1) <rdf:RDF xmlns="http://www.pz.com/mypizzafactory.owl#" xml:base="http://www.pz.com/mypizzafactory.owl" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:mypizzafactory="http://www.pz.com/mypizzafactory.owl#" xmlns:ace_lexicon="http://attempto.ifi.uzh.ch/ace_lexicon#"> <owl:Ontology rdf:about="http://www.pz.com/mypizzafactory.owl"/> 2) <Ontology xmlns="http://www.w3.org/2002/07/owl#" xml:base="http://altaf.ongology.org/HardwareOntology" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:xml="http://www.w3.org/XML/1998/namespace" ontologyIRI="http://altaf.ongology.org/HardwareOntology"> .... Clearly, OWLApi handled these specially. I have no idea for a work around. May be from these two case, you might find something (Just hoping). Thank you so much for your support. Kind Regards, Altaf Hussain On Monday, March 10, 2014 6:15 AM, Rob Vesse <rv...@do...> wrote: The Base URI is simply the URI used for resolving relative URIs it is not the ontology URI and is not necessarily serialized depending on the RDF syntax used. From what I understand of OWL the Ontology IRI is the one declared in the actual triples typically by adding a foo rdf:type owl:Ontology triple to your ontology where foo is your desired ontology IRI But I don't know OWL very well and have never used Protégé so no guarantees that this will resolve your problem Rob From: altaf hussain <alt...@ya...> Reply-To: altaf hussain <alt...@ya...>, dotNetRDF User Help and Support <dot...@li...> Date: Monday, 10 March 2014 03:50 To: "dot...@li..." <dot...@li...> Subject: [dotNetRDF-Support] Protege Ontology IRI for DotNetRdf Created ontology Hello, > > >I am crating an ontology using the framework. > > >I have set the Base URI for the ontology but when I open it from Protege, it doesn't show the IRI. Isn't the Base Uri supposed to be the Ontology Iri in protege? (FYI, all crated classes and properties are well read and recognized by protege. > > >My Code is like this: > > > public static OntologyGraph ontologyGraph = new OntologyGraph(); > > > public static void InitializeOntologyGraph() > { > ontologyGraph.BaseUri = new Uri("http://altaf.cli.com/PatientOntology.owl#"); > ontologyGraph.NamespaceMap.AddNamespace("PO", new Uri("http://altaf.cli.com/PatientOntology.owl#")); > ontologyGraph.NamespaceMap.AddNamespace("OWL", new Uri(NamespaceMapper.OWL)); > } > > >My Ontology first few lines are like this: (Thought, would be relevant). Please let me know what I am doing wrong or there is other ways of specifying such. > > ><?xml version="1.0" encoding="utf-8"?> ><!DOCTYPE rdf:RDF [ > <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'> > <!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#'> > <!ENTITY xsd 'http://www.w3.org/2001/XMLSchema#'> > <!ENTITY owl 'http://www.w3.org/2002/07/owl#'> > <!ENTITY PO 'http://altaf.cli.com/PatientOntology.owl#'> > <!ENTITY OWL 'http://www.w3.org/2002/07/owl#'> >]> ><rdf:RDF xml:base="http://altaf.cli.com/PatientOntology.owl#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:PO="http://altaf.cli.com/PatientOntology.owl#" xmlns:OWL="http://www.w3.org/2002/07/owl#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> > <OWL:Class rdf:about="&PO;ClinicalTest"> > <rdf:type rdf:resource="&OWL;Class" /> > </OWL:Class> >.............................. > > > >Kind Regards, > > >Altaf Hussain >Graduate Student Researcher >Centre for Logic and Information > > >Graduate Student (CS) and Teaching Assistant >St. Francis Xavier University >Alumni' 02 Batch, Dept. of Computer Science and Engineering >Shah Jalal University of Science and Technology >Blog: http://altafhussainbd.wordpress.com > >------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech_______________________________________________ dotNetRDF-Support mailing list dot...@li... https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support |