.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "RDF::Endpoint 3pm" .TH RDF::Endpoint 3pm "2012-06-12" "perl v5.14.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" RDF::Endpoint \- A SPARQL Protocol Endpoint implementation .SH "VERSION" .IX Header "VERSION" This document describes RDF::Endpoint version 0.05. .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& plackup /usr/local/bin/endpoint.psgi .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This modules implements the \s-1SPARQL\s0 Protocol for \s-1RDF\s0 using the \s-1PSGI\s0 interface provided by Plack. It may be run with any Plack handler. See Plack::Handler for more details. .PP When this module is used to create a \s-1SPARQL\s0 endpoint, configuration variables are loaded using Config::JFDI. An example configuration file rdf_endpoint.json is included with this package. Valid top-level configuration keys include: .IP "store" 4 .IX Item "store" This is used to define the underlying RDF::Trine::Store for the endpoint. It can be a hashref of the type that can be passed to RDF::Trine::Store\->new_with_config, but a simple string can also be used. .IP "endpoint" 4 .IX Item "endpoint" A hash of endpoint-specific configuration variables. Valid keys for this hash include: .RS 4 .IP "update" 8 .IX Item "update" A boolean value indicating whether Update operations should be allowed to be executed by the endpoint. .IP "load_data" 8 .IX Item "load_data" A boolean value indicating whether the endpoint should use URLs that appear in \&\s-1FROM\s0 and \s-1FROM\s0 \s-1NAMED\s0 clauses to construct a \s-1SPARQL\s0 dataset by dereferencing the URLs and loading the retrieved \s-1RDF\s0 content. .IP "service_description" 8 .IX Item "service_description" An associative array (hash) containing details on which and how much information to include in the service description provided by the endpoint if no query is included for execution. The boolean values 'default' and 'named_graphs' indicate that the respective \s-1SPARQL\s0 dataset graphs should be described by the service description. .IP "html" 8 .IX Item "html" An associative array (hash) containing details on how results should be serialized when the output media type is \s-1HTML\s0. The boolean value 'resource_links' specifies whether \s-1URI\s0 values should be serialized as \s-1HTML\s0 anchors (links). The boolean value 'embed_images' specifies whether \s-1URI\s0 values that are typed as foaf:Image should be serialized as \s-1HTML\s0 images. If 'embed_images' is true, the integer value 'image_width' specifies the image width to be used in the \s-1HTML\s0 markup (letting the image height scale appropriately). .RE .RS 4 .RE .SH "EXAMPLE CONFIGURATIONS" .IX Header "EXAMPLE CONFIGURATIONS" .SS "Using Plack::Handler::Apache2" .IX Subsection "Using Plack::Handler::Apache2" Using Plack::Handler::Apache2, mod_perl2 can be configured to serve and endpoint using the following configuration: .PP .Vb 6 \& \& SetHandler perl\-script \& PerlResponseHandler Plack::Handler::Apache2 \& PerlSetVar psgi_app /path/to/endpoint.psgi \& PerlSetEnv RDF_ENDPOINT_CONFIG /path/to/rdf_endpoint.json \& .Ve .PP To get syntax highlighting and other pretty features, in the VirtualHost section of your server, add three aliases: .PP .Vb 3 \& Alias /js/ /path/to/share/www/js/ \& Alias /favicon.ico /path/to/share/www/favicon.ico \& Alias /css/ /path/to/share/www/css/ .Ve .PP The exact location can be determined by finding where the file \f(CW\*(C`sparql_form.js\*(C'\fR. .SH "METHODS" .IX Header "METHODS" .ie n .IP """new ( \e%conf )""" 4 .el .IP "\f(CWnew ( \e%conf )\fR" 4 .IX Item "new ( %conf )" .PD 0 .ie n .IP """new ( $model, \e%conf )""" 4 .el .IP "\f(CWnew ( $model, \e%conf )\fR" 4 .IX Item "new ( $model, %conf )" .PD Returns a new Endpoint object. \f(CW\*(C`\e%conf\*(C'\fR should be a \s-1HASH\s0 reference with configuration settings. .ie n .IP """run ( $req )""" 4 .el .IP "\f(CWrun ( $req )\fR" 4 .IX Item "run ( $req )" Handles the request specified by the supplied Plack::Request object, returning an appropriate Plack::Response object. .ie n .IP """run_tag""" 4 .el .IP "\f(CWrun_tag\fR" 4 .IX Item "run_tag" Returns a unique key for each instantiation of this service. .ie n .IP """service_description ( $request, $model )""" 4 .el .IP "\f(CWservice_description ( $request, $model )\fR" 4 .IX Item "service_description ( $request, $model )" Returns a new RDF::Trine::Model object containing a service description of this endpoint, generating dataset statistics from \f(CW$model\fR. .SH "SEE ALSO" .IX Header "SEE ALSO" .IP "\(bu" 4 http://www.w3.org/TR/sparql11\-protocol/ .IP "\(bu" 4 .IP "\(bu" 4 .IP "\(bu" 4 .SH "AUTHOR" .IX Header "AUTHOR" .Vb 1 \& Gregory Todd Williams .Ve .SH "LICENSE AND COPYRIGHT" .IX Header "LICENSE AND COPYRIGHT" Copyright (c) 2010\-2012 Gregory Todd Williams. .PP This software is provided 'as\-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. .PP Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: .PP 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. .PP 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. .PP 3. This notice may not be removed or altered from any source distribution. .PP With the exception of the CodeMirror files, the files in this package may also be redistributed and/or modified under the same terms as Perl itself. .PP The CodeMirror (Javascript and \s-1CSS\s0) files contained in this package are copyright (c) 2007\-2010 Marijn Haverbeke, and licensed under the terms of the same zlib license as this code.