Not logged in : Login
(Sponging disallowed)

About: RDF Cartridges     Goto   Sponge   NotDistinct   Permalink

An Entity of Type : foaf:Document, within Data Space : linkeddata.uriburner.com:28898 associated with source document(s)

AttributesValues
type
Title
  • RDF Cartridges
content
  • Setting up server This tutorial explain steps to use the Python language to extend the Virtuoso Sponger. The server must have installed latest Python hosting plugin. When it is installed and registered in the configuration file a new function python_exec will be available for developers. Setup the Virtuoso server INI to include python module [Plugins] LoadPath = ../lib Load1 = Hosting, hosting_python.so ... The python_exec takes following arguments: code - a string containing the Python code function_name - a string containing the name of Python function to be executed param1 : a string containing first parameter param2 : a string containing second parameter as many parameters as Python function has The Python based function must return a single string value. Setting up environment Before to write cartridge you need to setup Python environment. To do this you need to download and install rdflib, pyRDFa. Read the pyRDFa paper for what additional libraries are needed. If your Python installation have Zope support, you should disable the zope interfaces in rdflib. This is needed because Python C-API expirence problems when using sub modules within C code. In order to disable you can comment out following lines in [rdflib_home]/rdflib/__init__.py : 36 #from rdflib.interfaces import IIdentifier, classImplements 37 #classImplements(URIRef, IIdentifier) 38 #classImplements(BNode, IIdentifier) 39 #classImplements(Literal, IIdentifier) then do: perl setup.py build perl setup.py --user install RDF Cartridge implementation notes The implementation consist of two steps: Make a copy of the localRDFa.py and use as template to run pyRDFa extractor over single string stream. The details can be seen in source of pyRDFa.py code attached to this tutorial. Make a Virtuoso/PL based stored procedure to call the Pyhton based extractor. The source of this function can be seen in rdf_cartridge.sql script. The stored procedure is used to do two main operations: to call 'processString' Python function inside pyRDFa.py script and to load the result in the Virtuoso RDF store. Another important item is to register the cartridge with Sponger. this is done by insert statement into DB.DBA.SYS_RDF_MAPPERS table. Note that in this example the new cartridge will be disabled if you run that code, if you want to enable and test the cartridge the flag in RM_ENABLED column must be 1. or enable the crtridge via conductor.
has container
description
  • This article explains how to implement a Python based RDFa Cartridge based on pyRDFa library.
dcterms:created_at
  • Fri, 27 Dec 2019 14:12:53 GMT
content:encoded
  • Setting up server This tutorial explain steps to use the Python language to extend the Virtuoso Sponger. The server must have installed latest Python hosting plugin. When it is installed and registered in the configuration file a new function python_exec will be available for developers. Setup the Virtuoso server INI to include python module [Plugins] LoadPath = ../lib Load1 = Hosting, hosting_python.so ... The python_exec takes following arguments: code - a string containing the Python code function_name - a string containing the name of Python function to be executed param1 : a string containing first parameter param2 : a string containing second parameter as many parameters as Python function has The Python based function must return a single string value. Setting up environment Before to write cartridge you need to setup Python environment. To do this you need to download and install rdflib, pyRDFa. Read the pyRDFa paper for what additional libraries are needed. If your Python installation have Zope support, you should disable the zope interfaces in rdflib. This is needed because Python C-API expirence problems when using sub modules within C code. In order to disable you can comment out following lines in [rdflib_home]/rdflib/__init__.py : 36 #from rdflib.interfaces import IIdentifier, classImplements 37 #classImplements(URIRef, IIdentifier) 38 #classImplements(BNode, IIdentifier) 39 #classImplements(Literal, IIdentifier) then do: perl setup.py build perl setup.py --user install RDF Cartridge implementation notes The implementation consist of two steps: Make a copy of the localRDFa.py and use as template to run pyRDFa extractor over single string stream. The details can be seen in source of pyRDFa.py code attached to this tutorial. Make a Virtuoso/PL based stored procedure to call the Pyhton based extractor. The source of this function can be seen in rdf_cartridge.sql script. The stored procedure is used to do two main operations: to call 'processString' Python function inside pyRDFa.py script and to load the result in the Virtuoso RDF store. Another important item is to register the cartridge with Sponger. this is done by insert statement into DB.DBA.SYS_RDF_MAPPERS table. Note that in this example the new cartridge will be disabled if you run that code, if you want to enable and test the cartridge the flag in RM_ENABLED column must be 1. or enable the crtridge via conductor.
is container of of
Faceted Search & Find service v1.17_git144 as of Jul 26 2024


Alternative Linked Data Documents: iSPARQL | ODE     Content Formats:   [cxml] [csv]     RDF   [text] [turtle] [ld+json] [rdf+json] [rdf+xml]     ODATA   [atom+xml] [odata+json]     Microdata   [microdata+json] [html]    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 08.03.3331 as of Aug 25 2024, on Linux (x86_64-ubuntu_noble-linux-glibc2.38-64), Single-Server Edition (378 GB total memory, 62 GB memory in use)
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2024 OpenLink Software