From: Rob V. <rv...@do...> - 2013-03-12 16:46:03
|
Hi Sura Apologies but this appears to be a bug in how the API finds DatatypeProperties, this has been filed as CORE-339 [1]. The bug is that there is a typo in the constant for the URI for datatype properties meaning it doesn't correctly match datatype properties. We will get a fix made shortly and this will be available in the next release, in the meantime you can use the following code to retrieve DatatypeProperties: foreach (OntologyProperty prop in ontologyGraph.GetProperties(ontologyGraph.CreateUriNode(new Uri(NamespaceMapper.OWL + "DatatypeProperty")))) { Console.WriteLine(prop); } Apologies for the inconvenience, Rob [1] http://dotnetrdf.org/tracker/Issues/IssueDetail.aspx?id=339 From: Sura Monday <sur...@ya...> Reply-To: Sura Monday <sur...@ya...>, dotNetRDF User Help and Support <dot...@li...> Date: Monday, March 11, 2013 2:54 PM To: "dot...@li..." <dot...@li...> Subject: [dotNetRDF-Support] ontologyGraph.AllProperties does not retrieve DatatypeProperties > Hi, > I am using dotnetrdf 0.9.0, and am trying to retrieve the DatatypeProperties > in my ontology. > My ontology has DatatypeProperties, as well as ObjectProperties as shown > below: > > <owl:DatatypeProperty rdf:about="&ve;toName"> > <rdfs:label xml:lang="en">toName</rdfs:label> > <rdfs:domain rdf:resource="&ve;CommunicationMessage"/> > <rdfs:range rdf:resource="&xsd;string"/> > </owl:DatatypeProperty> > > > <owl:ObjectProperty rdf:about="&ve;isSituationOf"> > <rdfs:label xml:lang="en">isSituationOf</rdfs:label> > <rdfs:domain rdf:resource="&ve;Situation"/> > <rdfs:subPropertyOf rdf:resource="&ve;isSnapshotPartOf"/> > </owl:ObjectProperty> > > However, the below code fragment returns only ObjectProperties: > ontologyGraph = new OntologyGraph(); > FileLoader.Load(ontologyGraph, "ve-ontology.owl"); > > foreach (OntologyProperty prop in ontologyGraph.AllProperties) > Console.WriteLine(prop); > > Can someone please point me out the way to retrieve the DatatypeProeprties in > my ontology? > > Thanks in advance > /Sura > ------------------------------------------------------------------------------ > Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester > Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the > endpoint security space. For insight on selecting the right partner to tackle > endpoint security challenges, access the full report. > http://p.sf.net/sfu/symantec-dev2dev__________________________________________ > _____ dotNetRDF-Support mailing list dot...@li... > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support |