|
From: Rob V. <rv...@do...> - 2014-12-11 10:04:30
|
Hi
We never create rdf:type triples in the Ontology API unless you explicitly
ask for them because the API doesn't know/care whether your ontology is
written in RDFS/OWL/something else entirely and so has no idea what rdf:type
would be appropriate.
It is the rdf:type triple that is used to select the QNames for tags in XML
output and rdf:Description is used only where there is no appropriate type
to use. If you want something to be an OWL class then you need to
explicitly call AddType() method as well with an appropriate type in order
to create the necessary triple in your graph e.g.
INode owlClass = graph.CreateUriNode("owl:Class");
class.AddType(owlClass);
Hope this helps
Rob
From: <c.c...@gm...>
Reply-To: dotNetRDF User Help and Support
<dot...@li...>
Date: Thursday, 11 December 2014 09:58
To: dotNetRdfSupport <dot...@li...>
Subject: [dotNetRDF-Support] Creating a class bug
> Hy,
> i am building an ontolotgy. I would like create some classe inside.
> this is my ontology
>
> <?xml version="1.0"?>
>
>
> <!DOCTYPE rdf:RDF [
> <!ENTITY owl "http://www.w3.org/2002/07/owl#" >
> <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" >
> <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" >
> <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
> <!ENTITY RiconoscimentoDocumenti
> "http://www.semanticweb.org/Ac2/RiconoscimentoDocumenti#" >
> ]>
>
>
> <rdf:RDF xmlns="http://www.w3.org/2002/07/owl#"
> xml:base="http://www.w3.org/2002/07/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:RiconoscimentoDocumenti="http://www.semanticweb.org/Ac2/RiconoscimentoDo
> cumenti#">
> <Ontology
> rdf:about="http://www.semanticweb.org/Ac2/RiconoscimentoDocumenti"/>
>
>
>
>
>
>
>
> <!-- http://www.semanticweb.org/Ac2/RiconoscimentoDocumenti#Categoria -->
>
> <Class rdf:about="&RiconoscimentoDocumenti;Categoria">
> <rdfs:subClassOf rdf:resource="&RiconoscimentoDocumenti;Documenti"/>
> </Class>
>
>
>
> <!-- http://www.semanticweb.org/Ac2/RiconoscimentoDocumenti#Dictionary -->
>
> <Class rdf:about="&RiconoscimentoDocumenti;Dictionary"/>
>
>
>
> <!--
> http://www.semanticweb.org/Ac2/RiconoscimentoDocumenti#DocumentToReconize -->
>
> <Class rdf:about="&RiconoscimentoDocumenti;DocumentToReconize">
> <rdfs:subClassOf rdf:resource="&RiconoscimentoDocumenti;Documenti"/>
> </Class>
>
>
>
> <!-- http://www.semanticweb.org/Ac2/RiconoscimentoDocumenti#Documenti -->
>
> <Class rdf:about="&RiconoscimentoDocumenti;Documenti"/>
> </rdf:RDF>
>
>
>
> <!-- Generated by the OWL API (version 3.4.2) http://owlapi.sourceforge.net –>
>
> when i use the sintax to create a class
>
> OntologyGraph graph = new OntologyGraph();
> OntologyClass class = graph.CreateOntologyClass(new Uri(string uriClass));
>
> Instead to obtain the tags of a class i get the tags of a rdf description .
> is there someone to know how to resolve this bug?
>
> thanks to all.
>
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from
> Actuate! Instantly Supercharge Your Business Reports and Dashboards with
> Interactivity, Sharing, Native Excel Exports, App Integration & more Get
> technology previously reserved for billion-dollar corporations, FREE
> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk__
> _____________________________________________ dotNetRDF-Support mailing list
> dot...@li...
> https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support
|