From: Bryan T. <br...@sy...> - 2015-04-28 12:04:16
|
Blazegraph does not support owl out of the box. Jim Balhoff (cc) has an ELK reasoner integration that you could use for this. @jim: can you provide some pointers to your work? Thanks, Bryan On Tuesday, April 28, 2015, Kaushik Chakraborty <kay...@gm...> wrote: > Hi Brad, > > Thanks a lot for the clarification, it worked as I followed your steps. > However, I'm stuck at a simple OWL reasoning as I extend the same instance > data. > > - Here's my updated instance data > > *@prefix : <http://kg.cts.com/ <http://kg.cts.com/>> .* > *@prefix foaf: <http://xmlns.com/foaf/0.1/ <http://xmlns.com/foaf/0.1/>> .* > *@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns# > <http://www.w3.org/1999/02/22-rdf-syntax-ns#>> .* > *@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema# > <http://www.w3.org/2000/01/rdf-schema#>> .* > *@prefix owl: <http://www.w3.org/2002/07/owl# > <http://www.w3.org/2002/07/owl#>> .* > > *@prefix org: <http://www.w3.org/ns/org# <http://www.w3.org/ns/org#>> .* > > > *:A rdf:type org:Organization .* > > *:LeadershipRoles a org:Role .* > *:AdminRoles a org:Role .* > > *:ROLE1 a :LeadershipRoles .* > *:ROLE2 a :LeadershipRoles .* > *:ROLE3 a :AdminRoles .* > > *:CEOType a org:Membership ; * > * owl:equivalentClass [* > > * a owl:Restriction ;* > * owl:onProperty org:role ;* > * owl:someValuesFrom :LeadershipRoles* > * ] .* > > > *:139137 rdf:type foaf:Agent ;* > * rdfs:label "139137" ;* > * org:memberOf :A ;* > * org:hasMembership [a org:Membership; org:role :ROLE1,:ROLE3] .* > > *:139138 rdf:type foaf:Agent ;* > * rdfs:label "139138" ;* > * org:memberOf :A ;* > * org:hasMembership [a org:Membership; org:role :ROLE3] .* > > > > *- *As per the above assertions, I should get :139137 to have :CEOType > membership if I make this SPARQL query. But I'm not > > *prefix : <http://kg.cts.com/ <http://kg.cts.com/>>* > *prefix foaf: <http://xmlns.com/foaf/0.1/ <http://xmlns.com/foaf/0.1/>>* > *prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns# > <http://www.w3.org/1999/02/22-rdf-syntax-ns#>>* > *prefix rdfs: <http://www.w3.org/2000/01/rdf-schema# > <http://www.w3.org/2000/01/rdf-schema#>>* > *prefix owl: <http://www.w3.org/2002/07/owl# > <http://www.w3.org/2002/07/owl#>>* > *prefix org: <http://www.w3.org/ns/org# <http://www.w3.org/ns/org#>>* > > *select distinct ?who* > *where* > *{* > * ?who org:hasMembership :CEOType .* > *}* > > > - However, I am getting right result if I search for exact type i.e. > > *prefix : <http://kg.cts.com/ <http://kg.cts.com/>>* > *prefix foaf: <http://xmlns.com/foaf/0.1/ <http://xmlns.com/foaf/0.1/>>* > *prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns# > <http://www.w3.org/1999/02/22-rdf-syntax-ns#>>* > *prefix rdfs: <http://www.w3.org/2000/01/rdf-schema# > <http://www.w3.org/2000/01/rdf-schema#>>* > *prefix owl: <http://www.w3.org/2002/07/owl# > <http://www.w3.org/2002/07/owl#>>* > *prefix org: <http://www.w3.org/ns/org# <http://www.w3.org/ns/org#>>* > > *select distinct ?who* > *where* > *{* > > * ?who org:hasMembership/org:role/rdf:type :LeadershipRoles.* > *}* > > *RESULT: * > who<http://kg.cts.com/139137> > <http://localhost:9999/bigdata/#explore:namespace2:%3Chttp://kg.cts.com/139137%3E> > > > > What am I doing wrong ? > Thanks again for your help and patience. > > On Tue, Apr 28, 2015 at 10:14 AM, Brad Bebee <be...@sy... > <javascript:_e(%7B%7D,'cvml','be...@sy...');>> wrote: > >> Kaushik, >> >> I was able to get your example working using the following steps. I >> suspect the issue may have been that you had not loaded the ontology data >> prior to loading the instance data. Please give it a try and let us know >> if that works. >> >> Thanks, --Brad >> >> 1. Create a properties file with your properties >> (owl_test/test.properties) and started a blazegraph workbench instance. >> >> java -Xmx2g -Dbigdata.propertyFile=owl_test/test.properties -jar >> bigdata-bundled-1.5.1.jar >> >> 2. Loaded the ontology data in the workbench ( >> http://localhost:9999/bigdata/). Under the "Update" tab, I selected >> "File Path or URL" and pasted in http://www.w3.org/ns/org.n3. >> >> 3. Loaded the instance data. Also in the workbench "Update" tab, I >> selected "RDF Data" with the format "Turtle". >> >> @prefix : <http://kg.cts.com/> . >> @prefix foaf: <http://xmlns.com/foaf/0.1/> . >> @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . >> @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . >> @prefix owl: <http://www.w3.org/2002/07/owl#> . >> >> @prefix org: <http://www.w3.org/ns/org#> . >> >> >> :A rdf:type org:Organization . >> >> :139137 rdf:type foaf:Agent ; >> rdfs:label "139137" ; >> org:memberOf :A . >> >> 4. Issued the SPARQL Query in the workbench. >> >> prefix : <http://kg.cts.com/> >> prefix foaf: <http://xmlns.com/foaf/0.1/> >> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> >> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> >> prefix owl: <http://www.w3.org/2002/07/owl#> >> prefix org: <http://www.w3.org/ns/org#> >> >> select distinct ?s ?w >> where >> { >> ?s org:hasMember ?w . >> } >> >> with the expected results. >> >> <http://kg.cts.com/A> >> <http://localhost:9999/bigdata/#explore:kb:%3Chttp://kg.cts.com/A%3E> >> <http://kg.cts.com/139137> >> <http://localhost:9999/bigdata/#explore:kb:%3Chttp://kg.cts.com/139137%3E> >> >> >> >> On Mon, Apr 27, 2015 at 9:33 PM, Bryan Thompson <br...@sy... >> <javascript:_e(%7B%7D,'cvml','br...@sy...');>> wrote: >> >>> Ontologies are just data. Use any approach you would use to load the >>> data. >>> >>> Bryan >>> On Apr 27, 2015 11:04 AM, "Kaushik Chakraborty" <kay...@gm... >>> <javascript:_e(%7B%7D,'cvml','kay...@gm...');>> wrote: >>> >>>> Hi, >>>> >>>> If I put this RDF data in the Updata panel of NanoSparqlServer: >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> *@prefix : <http://kg.cts.com/ <http://kg.cts.com/>> .@prefix foaf: >>>> <http://xmlns.com/foaf/0.1/ <http://xmlns.com/foaf/0.1/>> .@prefix rdf: >>>> <http://www.w3.org/1999/02/22-rdf-syntax-ns# >>>> <http://www.w3.org/1999/02/22-rdf-syntax-ns#>> .@prefix rdfs: >>>> <http://www.w3.org/2000/01/rdf-schema# >>>> <http://www.w3.org/2000/01/rdf-schema#>> .@prefix owl: >>>> <http://www.w3.org/2002/07/owl# <http://www.w3.org/2002/07/owl#>> .@prefix >>>> org: <http://www.w3.org/ns/org# <http://www.w3.org/ns/org#>> .:A rdf:type >>>> org:Organization .:139137 rdf:type foaf:Agent ; rdfs:label "139137" ; >>>> org:memberOf :A .* >>>> >>>> And then if I make a query like this >>>> >>>> *prefix : <http://kg.cts.com/ <http://kg.cts.com/>>* >>>> *prefix foaf: <http://xmlns.com/foaf/0.1/ <http://xmlns.com/foaf/0.1/>>* >>>> *prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns# >>>> <http://www.w3.org/1999/02/22-rdf-syntax-ns#>>* >>>> *prefix rdfs: <http://www.w3.org/2000/01/rdf-schema# >>>> <http://www.w3.org/2000/01/rdf-schema#>>* >>>> *prefix owl: <http://www.w3.org/2002/07/owl# >>>> <http://www.w3.org/2002/07/owl#>>* >>>> *prefix org: <http://www.w3.org/ns/org# <http://www.w3.org/ns/org#>>* >>>> >>>> *select distinct ?s ?w* >>>> *where* >>>> *{* >>>> * ?s org:hasMember ?w .* >>>> *}* >>>> >>>> It should list <http://kg.cts.com/A> and <http://kg.cts.com/139137> >>>> respectively as ?s and ?w as per the Organization Ontology ( >>>> http://www.w3.org/TR/vocab-org/#org:Organization) >>>> >>>> But that's not happening. Clearly the inferencing is not working for >>>> Org Ontology. >>>> >>>> Here're my namespace properties: >>>> >>>> com.bigdata.namespace.kb.spo.com.bigdata.btree.BTree.branchingFactor >>>> 1024com.bigdata.relation.containertest-import >>>> com.bigdata.journal.AbstractJournal.bufferModeDiskRW >>>> com.bigdata.journal.AbstractJournal.filebigdata.jnl >>>> com.bigdata.journal.AbstractJournal.initialExtent209715200 >>>> com.bigdata.rdf.store.AbstractTripleStore.vocabularyClass >>>> com.bigdata.rdf.vocab.DefaultBigdataVocabulary >>>> com.bigdata.rdf.store.AbstractTripleStore.textIndexfalse >>>> com.bigdata.btree.BTree.branchingFactor128 >>>> com.bigdata.namespace.kb.lex.com.bigdata.btree.BTree.branchingFactor400 >>>> com.bigdata.rdf.store.AbstractTripleStore.axiomsClass >>>> com.bigdata.rdf.axioms.OwlAxioms >>>> com.bigdata.service.AbstractTransactionService.minReleaseAge1 >>>> com.bigdata.rdf.sail.truthMaintenancetrue >>>> com.bigdata.journal.AbstractJournal.maximumExtent209715200 >>>> com.bigdata.rdf.sail.namespacetest-importcom.bigdata.relation.class >>>> com.bigdata.rdf.store.LocalTripleStore >>>> com.bigdata.rdf.store.AbstractTripleStore.quadsfalse >>>> com.bigdata.relation.namespacetest-import >>>> com.bigdata.btree.writeRetentionQueue.capacity4000 >>>> com.bigdata.rdf.store.AbstractTripleStore.statementIdentifiersfalse >>>> What am I missing here ? >>>> >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> One dashboard for servers and applications across Physical-Virtual-Cloud >>>> Widest out-of-the-box monitoring support with 50+ applications >>>> Performance metrics, stats and reports that give you Actionable Insights >>>> Deep dive visibility with transaction tracing using APM Insight. >>>> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y >>>> _______________________________________________ >>>> Bigdata-developers mailing list >>>> Big...@li... >>>> <javascript:_e(%7B%7D,'cvml','Big...@li...');> >>>> https://lists.sourceforge.net/lists/listinfo/bigdata-developers >>>> >>>> >>> >>> ------------------------------------------------------------------------------ >>> One dashboard for servers and applications across Physical-Virtual-Cloud >>> Widest out-of-the-box monitoring support with 50+ applications >>> Performance metrics, stats and reports that give you Actionable Insights >>> Deep dive visibility with transaction tracing using APM Insight. >>> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y >>> _______________________________________________ >>> Bigdata-developers mailing list >>> Big...@li... >>> <javascript:_e(%7B%7D,'cvml','Big...@li...');> >>> https://lists.sourceforge.net/lists/listinfo/bigdata-developers >>> >>> >> >> >> -- >> _______________ >> Brad Bebee >> Managing Partner >> SYSTAP, LLC >> e: be...@sy... <javascript:_e(%7B%7D,'cvml','be...@sy...');> >> m: 202.642.7961 >> f: 571.367.5000 >> w: www.systap.com >> >> Blazegraph™ <http://www.blazegraph.com> is our ultra high-performance >> graph database that supports both RDF/SPARQL and Tinkerpop/Blueprints >> APIs. MapGraph™ <http://www.systap.com/mapgraph> is our disruptive new >> technology to use GPUs to accelerate data-parallel graph analytics. >> >> CONFIDENTIALITY NOTICE: This email and its contents and attachments are >> for the sole use of the intended recipient(s) and are confidential or >> proprietary to SYSTAP, LLC. Any unauthorized review, use, disclosure, >> dissemination or copying of this email or its contents or attachments is >> prohibited. If you have received this communication in error, please notify >> the sender by reply email and permanently delete all copies of the email >> and its contents and attachments. >> > > > > -- > Thanks, > Kaushik > -- ---- Bryan Thompson Chief Scientist & Founder SYSTAP, LLC 4501 Tower Road Greensboro, NC 27410 br...@sy... http://blazegraph.com http://blog.bigdata.com <http://bigdata.com> http://mapgraph.io Blazegraph™ <http://www.blazegraph.com/> is our ultra high-performance graph database that supports both RDF/SPARQL and Tinkerpop/Blueprints APIs. MapGraph™ <http://www.systap.com/mapgraph> is our disruptive new technology to use GPUs to accelerate data-parallel graph analytics. CONFIDENTIALITY NOTICE: This email and its contents and attachments are for the sole use of the intended recipient(s) and are confidential or proprietary to SYSTAP. Any unauthorized review, use, disclosure, dissemination or copying of this email or its contents or attachments is prohibited. If you have received this communication in error, please notify the sender by reply email and permanently delete all copies of the email and its contents and attachments. |