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

NAME

6       RDF::Redland - Redland RDF Class
7

SYNOPSIS

9         use RDF::Redland;
10         my $storage=new RDF::Redland::Storage("hashes", "test", "new='yes',hash-type='memory'");
11         my $model=new RDF::Redland::Model($storage, "");
12
13         ...
14

DESCRIPTION

16       This class initialises the Redland RDF classes.
17
18       See the main classes for full detail: RDF::Redland::Node,
19       RDF::Redland::BlankNode, RDF::Redland::URINode,
20       RDF::Redland::LiteralNode, RDF::Redland::XMLLiteralNode,
21       RDF::Redland::URI, RDF::Redland::Statement, RDF::Redland::Model,
22       RDF::Redland::Storage, RDF::Redland::Parser, RDF::Redland::Query,
23       RDF::Redland::QueryResults, RDF::Redland::Iterator,
24       RDF::Redland::Stream and RDF::Redland::RSS.
25

STATIC METHODS

27       set_log_handler SUB
28           Set SUB as the subroutine to be called on any Redland error,
29           warning or log message.  The subroutine must have the followign
30           signature:
31
32             sub handler ($$$$$$$$$) {
33               my($code, $level, $facility, $message, $line, $column, $byte, $file, $uri)=@_;
34               # int error code
35               # int log level
36               # int facility causing the error (parsing, serializing, ...)
37               # string error message
38               # int line number (<0 if not relevant)
39               # int column number (<0 if not relevant)
40               # int byte number (<0 if not relevant)
41               # string file name or undef
42               # string URI or undef
43
44               # ...do something with the information ...
45             };
46
47             RDF::Redland::set_log_handler(\&handler);
48
49       reset_log_handler
50           Reset redland to use the default logging handler, typically
51           printing the message to stdout or stderr and exiting on a fatal
52           error.
53
54       set_error_handler SUB
55           The method set_log_handler is much more flexible than this and
56           includes this functionality.
57
58           Set SUB as the subroutine to be called on a Redland error with the
59           error message as the single argument.  For example:
60
61             RDF::Redland::set_error_handler(sub {
62               my $msg=shift;
63               # Do something with $msg
64             });
65
66           The default if this is not set, is to run die $msg
67
68       set_warning_handler SUB
69           The method set_log_handler is much more flexible than this and
70           includes this functionality.
71
72           Set SUB as the subroutine to be called on a Redland warning with
73           the warning message as the single argument.  For example:
74
75             RDF::Redland::set_warning_handler(sub {
76               my $msg=shift;
77               # Do something with $msg
78             });
79
80           The default if this is not set, is to run warn $msg
81

SEE ALSO

83       RDF::Redland::Node, RDF::Redland::BlankNode, RDF::Redland::URINode,
84       RDF::Redland::LiteralNode, RDF::Redland::XMLLiteralNode,
85       RDF::Redland::URI, RDF::Redland::Statement, RDF::Redland::Model,
86       RDF::Redland::Storage, RDF::Redland::Parser, RDF::Redland::Query,
87       RDF::Redland::QueryResults, RDF::Redland::Iterator,
88       RDF::Redland::Stream and RDF::Redland::RSS.
89

AUTHOR

91       Dave Beckett - http://www.dajobe.org/
92
93
94
95perl v5.28.0                      2018-06-27                   RDF::Redland(3)
Impressum