1RDF::Query::Util(3)   User Contributed Perl Documentation  RDF::Query::Util(3)
2
3
4

NAME

6       RDF::Query::Util - Miscellaneous utility functions to support work with
7       RDF::Query.
8

VERSION

10       This document describes RDF::Query::Util version 2.918.
11

SYNOPSIS

13        use RDF::Query::Util;
14        my $query = &RDF::Query::Util::cli_make_query;
15        my $model = &RDF::Query::Util::cli_make_model;
16        $query->execute( $model );
17        ...
18

FUNCTIONS

20       "cli_make_query_and_model"
21           Returns a query object, model, and args HASHref based on the
22           arguments in @ARGV.  These arguments are parsed using
23           "cli_make_query" and "make_model".
24
25       "cli_make_query"
26           Returns a RDF::Query object based on the arguments in @ARGV. These
27           arguments are parsed using &cli_parse_args. If the -e flag is not
28           present, the query will be loaded from a file named by the argument
29           in @ARGV immediately following the final argument parsed by
30           &cli_parse_args.
31
32       "cli_make_model"
33           Calls "make_model" with arguments from @ARGV, returning the
34           constructed model object.
35
36           "cli_make_model" will usually be called after cli_make_query,
37           allowing a typical CLI invocation to look like `prog.pl [flags]
38           [query file] [data files]`.
39
40       "make_model ( @files )"
41           Returns a model object suitable for use in a call to
42           "$query->execute", loaded with RDF from files and/or URLs listed in
43           @files. This model may be any of the supported models, but as
44           currently implemented will be a RDF::Trine::Model object.
45
46       "cli_parse_args"
47           Parses CLI arguments from @ARGV and returns a HASH with the
48           recognized key/values.  The allowable arguments are listed below.
49
50       "start_endpoint ( $model, $port )"
51           Starts an SPARQL endpoint HTTP server on port $port.
52
53           If called in list context, returns the PID and the actual port the
54           server bound to. If called in scalar context, returns only the
55           port.
56

COMMAND LINE ARGUMENTS

58       -e str
59           Specifies the query string str.
60
61       -l lang
62           Specifies the query language lang used. This should be one of:
63           sparql, sparql11, or rdql.
64
65       -O  Turns on optimization.
66
67       -o  Turns off optimization.
68
69       -c class
70           Specifies the perl class used to construct the query object.
71           Defaults to "RDF::Query".
72
73       -f  Implies -c RDF::Query::Federate.
74
75       -F loc
76           Specifies the URL or path to a file loc which contains an RDF
77           service description. The described service is used as an underlying
78           triplestore for query answering. Implies -f.
79
80       -E url
81           Specifies the URL of a remove SPARQL endpoint to be used as a data
82           source. The endpoint is used as an underlying triplestore for query
83           answering. Implies -f.
84
85       -s database-type
86           Specifies the database type to use for the underlying data model.
87
88       -u user
89       -p password
90       -m model
91

AUTHOR

93        Gregory Todd Williams <gwilliams@cpan.org>
94
95
96
97perl v5.32.0                      2020-07-28               RDF::Query::Util(3)
Impressum