SemanticNote is a project mainly written in C#, it's free.
A plugin for the Mindtouch platform to enable semantic web notation
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. http://www.gnu.org/copyleft/gpl.html
A Plugin For Mindtouch platform to enable semantic web notation by Kyle Ellrott ([email protected])
semantic-config-uri (REQUIRED): The URI to the configuration file plug-name (optional): The user name to the account through which the SemanticNote plugin will access the Deki content plug-pass (optional) : The password to the Deki account sparql-uri (optional) : The URI to the SPARQL endpoint that will be used for accessing Semantic Information
The following samples is taken from www.topsan.org Thisconfiguration file adds several namespace base names, including: GO, PFAM, UNIPROT, and CORE.
<config xmlns:core="http://purl.uniprot.org/core/" xmlns:TPS="http://topsan.org/purl/" xmlns:GO="http://purl.uniprot.org/go/" xmlns:PFAM="http://purl.uniprot.org/pfam/" xmlns:UNIPROT="http://purl.uniprot.org/uniprot/" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:xs="http://www.w3.org/2001/XMLSchema#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:mind="http://mindtouch.com/schema#"
<defaultPredicateNS>core</defaultPredicateNS>
<pageAlias>TPS{0}</pageAlias>
<defaultSubjectNS>TPS</defaultSubjectNS>
<aliasPredicate>core:alias</aliasPredicate>
<altNS>
<sameAs>owl</sameAs>
</altNS>
<clickMap ns="PFAM">http://pfam.janelia.org/family?acc=</clickMap>
<importMap>
<UNIPROT>
<source>
<graph>http://purl.uniprot.org/uniprot/{0}</graph>
<url>http://www.uniprot.org/uniprot/{0}.rdf</url>
</source>
</UNIPROT>
</importMap>
note.this : Get the default subject for the current page.
note.link : Create a link with embedded semantic information
note.idea : Create complex idea by unwrapping dekiscript data
note.import : Request data to be imported into Semantic Database
note.lookup : Change CURIE or URI to full URI
note.lookupClick : Change CURIE or URI to clickable URL
note.query : Make a sparql query to the backend semantic database
note.endpoint : Get the URL for the SPARQL endpoint proxy.
When called from the Deki page 47: {{note.link( 'classifiedWith', 'GO:0030246') }}
Produces the HTML: <span about="http://topsan.org/purl/TPS47" rel="http://purl.uniprot.org/core/classifiedWith" href="http://purl.uniprot.org/go/0030246"> <a rel="external nofollow" href="http://amigo.geneontology.org/cgi-bin/amigo/term-details.cgi?term=GO:0030246" title="http://amigo.geneontology.org/cgi-bin/amigo/term-details.cgi?term=GO:0030246" target="_blank" class=" external">GO:0030246
{{var queryStr="PREFIX core:<http://purl.uniprot.org/core/> PREFIX mind:<http://mindtouch.com/schema#> SELECT * WHERE { ?prot a core:Protein . ?prot mind:pageID ?page_id } LIMIT 10";}}
Page URI | Page Deki ID |
{{tag['prot']}} | {{tag['page_id']}} |
var endpoint = $("#endpoint").val(); var subject = $("#subject").val(); function tableRender() { var queryStr = "SELECT * FROM <" + subject + ".extras> WHERE { ?s ?p ?o }"; $.get( endpoint, { "output":"json", "query" : queryStr }, function(json) { $("#dstTable").empty(); for (var y in json.results.bindings) { var url = json.results.bindings[y]['s']['value']; var obj = json.results.bindings[y]['o']['value']; $("#dstTable").append( url + " " + obj + "<br/>" ); } } ); } function titleInput() { var newTitle = $("#title_text").val(); var queryStr = "INSERT INTO <" + subject + ".extras> { <" + subject + "> <http://purl.uniprot.org/core/title> '" + newTitle + "' } "; $("#dstTable").empty(); $.get( endpoint, { "output":"json", "query" : queryStr }, function(json) { //$("#dstTable").append( json ); tableRender(); } ); } jQuery().ready( tableRender );
RDFa : This provides a lightweight pure XML version of the page, To get the RDFa version of pageID=47 /@api/deki/site/services/=note/proxy/rdfa?id=47
RDF : This provides a pure RDF version of the semantic information embedded in the page To get the RDFa version of pageID=47 /@api/deki/site/services/=note/proxy/rdf?id=47
Sparql Proxy : A proxy to the configured SPARQL endpoint, primarly used as a access point for AJAX based queries. /@api/deki/site/services/=note/proxy/sparql
Working with Virtuoso Authenticated sparql interface:
Note: deki plug interface only supports ‘BASIC’ authentication (not ‘DIGEST’, so the security on the authenitcated sparql page will need to be down graded, see Virtuoso Installation instructions)