.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35) .\" .\" 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" '' . ds C` . ds C' '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 >0, 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. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "RDF::Trine 3pm" .TH RDF::Trine 3pm "2018-11-03" "perl v5.28.0" "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::Trine \- An RDF Framework for Perl .SH "VERSION" .IX Header "VERSION" This document describes RDF::Trine version 1.019 .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use RDF::Trine; \& \& my $store = RDF::Trine::Store::Memory\->new(); \& my $model = RDF::Trine::Model\->new($store); \& \& # parse some web data into the model, and print the count of resulting RDF statements \& RDF::Trine::Parser\->parse_url_into_model( \*(Aqhttp://kasei.us/about/foaf.xrdf\*(Aq, $model ); \& print $model\->size . " RDF statements parsed\en"; \& \& # Create a namespace object for the foaf vocabulary \& my $foaf = RDF::Trine::Namespace\->new( \*(Aqhttp://xmlns.com/foaf/0.1/\*(Aq ); \& \& # Create a node object for the FOAF name property \& my $pred = $foaf\->name; \& # alternatively: \& # my $pred = RDF::Trine::Node::Resource\->new(\*(Aqhttp://xmlns.com/foaf/0.1/name\*(Aq); \& \& # Create an iterator for all the statements in the model with foaf:name as the predicate \& my $iter = $model\->get_statements(undef, $pred, undef); \& \& # Now print the results \& print "Names of things:\en"; \& while (my $st = $iter\->next) { \& my $s = $st\->subject; \& my $name = $st\->object; \& \& # $s and $name have string overloading, so will print correctly \& print "The name of $s is $name\en"; \& } .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" RDF::Trine provides an Resource Descriptive Framework (\s-1RDF\s0) with an emphasis on extensibility, \s-1API\s0 stability, and the presence of a test suite. The package consists of several components: .IP "\(bu" 4 RDF::Trine::Model \- \s-1RDF\s0 model providing access to a triple store. This module would typically be used to access an existing store by a developer looking to \*(L"Just get stuff done.\*(R" .IP "\(bu" 4 RDF::Trine::Parser \- \s-1RDF\s0 parsers for various serialization formats including \s-1RDF/XML,\s0 Turtle, RDFa, and \s-1RDF/JSON.\s0 .IP "\(bu" 4 RDF::Trine::Store::Memory \- An in-memory, non-persistant triple store. Typically used for temporary data. .IP "\(bu" 4 RDF::Trine::Store::DBI \- A triple store for MySQL, PostgreSQL, and SQLite, based on the relational schema used by Redland. Typically used to for large, persistent data. .IP "\(bu" 4 RDF::Trine::Iterator \- Iterator classes for variable bindings and \s-1RDF\s0 statements, used by RDF::Trine::Store, RDF::Trine::Model, and RDF::Query. .IP "\(bu" 4 RDF::Trine::Namespace \- A convenience class for easily constructing RDF::Trine::Node::Resource objects from \s-1URI\s0 namespaces. .SH "FUNCTIONS" .IX Header "FUNCTIONS" .ie n .IP """iri ( $iri )""" 4 .el .IP "\f(CWiri ( $iri )\fR" 4 .IX Item "iri ( $iri )" Returns a RDF::Trine::Node::Resource object with the given \s-1IRI\s0 value. .ie n .IP """blank ( $id )""" 4 .el .IP "\f(CWblank ( $id )\fR" 4 .IX Item "blank ( $id )" Returns a RDF::Trine::Node::Blank object with the given identifier. .ie n .IP """literal ( $value, $lang, $dt )""" 4 .el .IP "\f(CWliteral ( $value, $lang, $dt )\fR" 4 .IX Item "literal ( $value, $lang, $dt )" Returns a RDF::Trine::Node::Literal object with the given value and optional language/datatype. .ie n .IP """variable ( $name )""" 4 .el .IP "\f(CWvariable ( $name )\fR" 4 .IX Item "variable ( $name )" Returns a RDF::Trine::Node::Variable object with the given variable name. .ie n .IP """statement ( @nodes )""" 4 .el .IP "\f(CWstatement ( @nodes )\fR" 4 .IX Item "statement ( @nodes )" Returns a RDF::Trine::Statement object with the supplied node objects. .ie n .IP """store ( $config )""" 4 .el .IP "\f(CWstore ( $config )\fR" 4 .IX Item "store ( $config )" Returns a RDF::Trine::Store object based on the supplied configuration string. .ie n .IP """default_useragent ( [ $ua ] )""" 4 .el .IP "\f(CWdefault_useragent ( [ $ua ] )\fR" 4 .IX Item "default_useragent ( [ $ua ] )" Returns the LWP::UserAgent object used by default for any operation requiring network requests. Ordinarily, the calling code will obtain the default user agent, and clone it before further configuring it for a specific request, thus leaving the default object untouched. .Sp If \f(CW$ua\fR is passed as an argument, sets the global default user agent to this object. .SH "BUGS" .IX Header "BUGS" Please report any bugs or feature requests to through the GitHub web interface at . .SH "SEE ALSO" .IX Header "SEE ALSO" .SH "AUTHOR" .IX Header "AUTHOR" Gregory Todd Williams \f(CW\*(C`\*(C'\fR .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (c) 2006\-2012 Gregory Todd Williams. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.