-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update the recipe to create prefix.ttl
- Loading branch information
Showing
1 changed file
with
5 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,9 @@ | ||
Examples extracted from rdf.metantex.org | ||
`prefix.ttl` was automatically generated as follow: | ||
|
||
```js | ||
var examplesh2= | ||
document.querySelectorAll('#mnx_view ol > li'); | ||
for (var i=0;i< examplesh2.length;i++) { | ||
let q=examplesh2[i].getElementsByTagName('button')[0].attributes['onclick'].nodeValue; | ||
console.log("prefix ex: <https://sparql.metanetx.org/.well-known/sparql-examples/>\nprefix sh: <http://www.w3.org/ns/shacl#>\nprefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\nprefix rdfs:<http://www.w3.org/2000/01/rdf-schema#>\nprefix schema: <https://schema.org/>\nex:"+(i+1)+"\na sh:SPARQLSelectExecutable, sh:SPARQLExecutable ;\n sh:prefixes _:sparql_examples_prefixes, _:metanetx_sparql_examples_prefixes ;\n schema:target <https://rdf.metanetx.org/sparql/> ;\n rdfs:comment '''"+examplesh2[i].firstChild.data.trim()+"''' ; \n sh:select '''"+q.substring(40, q.length -1).trim().replaceAll("\\n","\n")+"'''."); | ||
} | ||
```{bash} | ||
git clone https://github.com/MetaNetX/MNXtools.git MNXtools | ||
cd MNXtools/perl | ||
perl -e 'use lib "."; use Prefix; print Prefix->new()->get_prefix_ontology()' > prefix.ttl | ||
``` | ||
|
||
|