Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

rdf::helper::object(3pm) [debian man page]

RDF::Helper::Object(3pm)				User Contributed Perl Documentation				  RDF::Helper::Object(3pm)

NAME
RDF::Helper::Object - Perl extension to use RDF property names as methods SYNOPSIS
use RDF::Helper; my $rdf = RDF::Helper->new( BaseInterface => 'RDF::Trine', namespaces => { dc => 'http://purl.org/dc/terms/', rdf => "http://www.w3.org/1999/02/22-rdf-syntax-ns#", '#default' => "http://xmlns.com/foaf/0.1/" } ); my $obj = $rdf->get_object('http://dahut.pm.org/dahut_group.rdf#bender'); $obj->rdf_type('http://xmlns.com/foaf/0.1/Person'); $obj->name("Bender"); $obj->dc_description("A description of Bender"); print $rdf->serialize(format => 'rdfxml') DESCRIPTION
An object of this class is returned by the RDF::Helper "get_object" method, which takes a subject URI as the first argument, and optionally a hash or hashref of options as the second argument. On this object, you may then call methods that correspond to property names of the properties you want to get or set. For properties in the default namespace, you may use them without any regard to prefixes, whereas with properties in other namespaces, you need to use the prefix and an underscore before the property name. This class does not make any attempt to verify whether the methods are actually valid properties within the used schema, it just blindly does what you tell it to. It is suitable for creating relatively simple RDF. To set more than one object, use an arrayref as argument, e.g. $obj->rdfs_label(['Foo', 'Bar']) will result in two triples, one for each "rdfs:label". perl v5.14.2 2011-06-24 RDF::Helper::Object(3pm)

Check Out this Related Man Page

RDF::Trine::Serializer::RDFXML(3pm)			User Contributed Perl Documentation		       RDF::Trine::Serializer::RDFXML(3pm)

NAME
RDF::Trine::Serializer::RDFXML - RDF/XML Serializer VERSION
This document describes RDF::Trine::Serializer::RDFXML version 1.000 SYNOPSIS
use RDF::Trine::Serializer::RDFXML; my $serializer = RDF::Trine::Serializer::RDFXML->new( namespaces => { ex => 'http://example/' } ); print $serializer->serialize_model_to_string($model); DESCRIPTION
The RDF::Trine::Serializer::Turtle class provides an API for serializing RDF graphs to the RDF/XML syntax. METHODS
Beyond the methods documented below, this class inherits methods from the RDF::Trine::Serializer class. "new ( namespaces => \%namespaces, base_uri => $baseuri )" Returns a new RDF/XML serializer object. "serialize_model_to_file ( $fh, $model )" Serializes the $model to RDF/XML, printing the results to the supplied filehandle "<$fh">. "serialize_model_to_string ( $model )" Serializes the $model to RDF/XML, returning the result as a string. "serialize_iterator_to_file ( $file, $iter )" Serializes the iterator to RDF/XML, printing the results to the supplied filehandle "<$fh">. "serialize_iterator_to_string ( $iter )" Serializes the iterator to RDF/XML, returning the result as a string. BUGS
Please report any bugs or feature requests to through the GitHub web interface at <https://github.com/kasei/perlrdf/issues>. SEE ALSO
http://www.w3.org/TR/rdf-syntax-grammar/ <http://www.w3.org/TR/rdf-syntax-grammar/> AUTHOR
Gregory Todd Williams "<gwilliams@cpan.org>" 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. perl v5.14.2 2012-06-29 RDF::Trine::Serializer::RDFXML(3pm)
Man Page