This HTML5 document contains 32 embedded RDF statements represented using HTML+Microdata notation.

The embedded RDF content will be recognized by any processor of HTML5 Microdata.

PrefixNamespace IRI
dctermshttp://purl.org/dc/terms/
n19http://vos.openlinksw.com/dataspace/owiki/wiki/VOS/VirtRdfGraphDumpInfRule/sioc.
atomhttp://atomowl.org/ontologies/atomrdf#
foafhttp://xmlns.com/foaf/0.1/
n16http://vos.openlinksw.com/dataspace/services/wiki/
n6http://www.ontologyportal.org/
oplhttp://www.openlinksw.com/schema/attribution#
n2http://vos.openlinksw.com/dataspace/owiki/wiki/VOS/
n13http://dbpedia.org/
dchttp://purl.org/dc/elements/1.1/
n11http://vos.openlinksw.com/dataspace/dav#
rdfshttp://www.w3.org/2000/01/rdf-schema#
n17http://rdfs.org/sioc/services#
siocthttp://rdfs.org/sioc/types#
n9http://vos.openlinksw.com/dataspace/person/dav#
n4http://vos.openlinksw.com/dataspace/owiki/wiki/
rdfhttp://www.w3.org/1999/02/22-rdf-syntax-ns#
n8http://vos.openlinksw.com/dataspace/owiki#
xsdhhttp://www.w3.org/2001/XMLSchema#
n12http://vos.openlinksw.com/dataspace/person/owiki#
siochttp://rdfs.org/sioc/ns#
Subject Item
n9:this
foaf:made
n2:VirtRdfGraphDumpInfRule
Subject Item
n11:this
sioc:creator_of
n2:VirtRdfGraphDumpInfRule
Subject Item
n16:item
n17:services_of
n2:VirtRdfGraphDumpInfRule
Subject Item
n8:this
sioc:creator_of
n2:VirtRdfGraphDumpInfRule
Subject Item
n4:VOS
sioc:container_of
n2:VirtRdfGraphDumpInfRule
atom:entry
n2:VirtRdfGraphDumpInfRule
atom:contains
n2:VirtRdfGraphDumpInfRule
Subject Item
n2:VOSIndex
sioc:links_to
n2:VirtRdfGraphDumpInfRule
Subject Item
n2:VirtRdfGraphDumpInfRule
rdf:type
sioct:Comment atom:Entry
dcterms:created
2017-06-13T05:41:56.315653
dcterms:modified
2017-06-29T07:39:56.366989
rdfs:label
VirtRdfGraphDumpInfRule
foaf:maker
n12:this n9:this
dc:title
VirtRdfGraphDumpInfRule
opl:isDescribedUsing
n19:rdf
sioc:has_creator
n8:this n11:this
sioc:content
---++Virtuoso RDF Graph Dump based on Inference Rule Utility The <nowiki>graph_dump</nowiki> procedure below can be used to export triples from Named RDF Graphs in N3 triple format to file, filtering based on the specified Inference rule and predicate/property URI: Params: * in <b>srcgraph</b> varchar - source graph * in <b>format</b> varchar - output format N3 is supported for now * in <b>inf</b> varchar - inference name * in <b>pred</b> varchar - predicate to filter * in <b>out_file</b> varchar - output file prefix * in <b>file&#95llength&#95llimit</b> := 1000000000 - maximum size of files data is dumped in <verbatim> create procedure graph_dump (in srcgraph varchar, in format varchar := 'N3', in inf varchar := null, in pred varchar := null, in out_file varchar, in file_length_limit integer := 1000000000) { declare qr, file_name varchar; declare env, ses, meta, data, h any; declare ses_len, max_ses_len, file_len, file_idx integer; set isolation = 'uncommitted'; max_ses_len := 10000000; file_len := 0; file_idx := 1; if (format <> 'N3') signal ('22023', 'The output format is not supported'); file_name := sprintf ('%s%06d.ttl', out_file, file_idx); string_to_file (file_name || '.graph', srcgraph, -2); string_to_file (file_name, sprintf ('# Dump of graph <%s>, as of %s\n', srcgraph, cast (now() as varchar)), -2); --env := vector (dict_new (16000), 0, '', '', '', 0, 0); env := vector (dict_new (16000), 0, '', '', '', 0, 0, 0, 0); ses := string_output (); if (inf is not null) inf := sprintf ('define input:inference "%s"', inf); else inf := ''; if (pred is not null) pred := sprintf ('<%s>', pred); else pred := '?p'; qr := sprintf ('select * from (sparql define input:storage "" %s select ?s %s as ?p ?o { graph <%S> { ?s %s ?o } } ) as sub option (loop)', inf, pred, srcgraph, pred); exec (qr, null, null, vector (), 0, null, null, h); while (0 = exec_next (h, null, null, data)) { declare "s", "p", "o" any; "s" := data[0]; "p" := data[1]; "o" := data[2]; http_ttl_triple (env, "s", "p", "o", ses); ses_len := length (ses); if (ses_len > max_ses_len) { file_len := file_len + ses_len; if (file_len > file_length_limit) { http (' .\n', ses); string_to_file (file_name, ses, -1); file_len := 0; file_idx := file_idx + 1; file_name := sprintf ('%s%06d.ttl', out_file, file_idx); string_to_file (file_name, sprintf ('# Dump of graph <%s>, as of %s (part %d)\n', srcgraph, cast (now() as varchar), file_idx), -2); env := vector (dict_new (16000), 0, '', '', '', 0, 0); } else string_to_file (file_name, ses, -1); ses := string_output (); } } exec_close (h); if (length (ses)) { http (' .\n', ses); string_to_file (file_name, ses, -1); } } ; </verbatim> ---+++Example [[http://www.ontologyportal.org/][SUMO ontology]] was recently mapped to DBpedia by its creators using RDF/XML and loaded into the [[http://dbpedia.org/sparql][DBpedia SPARQL Endpoint]]. <b>Issues</b>: * To add to DBpedia data sets, N3 is preferred format. * Cross Links needed i.e. mapping <#<nop>dbpediaURI> owl:sameAs <#<nop>SumoURI> in addition to the authors links which are solely, <#<nop>SumoURI> owl:sameAs <#<nop>DBpediaURI> <b>Solution</b>: * Make an inference rules graph where <nowiki>owl:sameAs</nowiki> is explicitly asserted to be an <nowiki><nop>owl:SymmetricalProperty</nowiki> type. <verbatim> ttlp('owl:sameAs a owl:SymmetricalProperty .', '', 'rule_graph'); </verbatim> * Make a Named Rule that's associated the the Named Graph in step above. <verbatim> rdfs_rule_set ('sas', 'rule_graph'); </verbatim> * Run the <nowiki>graph_dump</b> export procedure with the inference rule parameter and predicate/property filter option to export the data to file, in N3 format and with necessary <nowiki>owl:sameas</nowiki> cross links. <verbatim> graph_dump ('http://www.ontologyportal.org/SUMO#', 'N3', 'sas', 'http://www.w3.org/2002/07/owl#sameAs', 'sumo_'); </verbatim>
sioc:id
32f95300ba5175930fda9bcdd6a344c1
sioc:link
n2:VirtRdfGraphDumpInfRule
sioc:has_container
n4:VOS
n17:has_services
n16:item
atom:title
VirtRdfGraphDumpInfRule
sioc:links_to
n6: n13:sparql
atom:source
n4:VOS
atom:author
n9:this
atom:published
2017-06-13T05:41:56Z
atom:updated
2017-06-29T07:39:56Z
sioc:topic
n4:VOS