Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

rdf::vcard(3pm) [debian man page]

RDF::vCard(3pm) 					User Contributed Perl Documentation					   RDF::vCard(3pm)

NAME
RDF::vCard - convert between RDF and vCard SYNOPSIS
use RDF::vCard; use RDF::TrineShortcuts qw(rdf_string); my $input = "http://example.com/contact-data.rdf"; my $exporter = RDF::vCard::Exporter->new; my $data = join '', $exporter->export_cards($input); print $data; # vCard 3.0 data my $importer = RDF::vCard::Importer->new; $importer->import_string($data); print rdf_string($importer->model => 'RDFXML'); DESCRIPTION
This module doesn't do anything itself; it just loads RDF::vCard::Exporter and RDF::vCard::Importer for you. RDF::vCard::Exporter RDF::vCard::Exporter takes some RDF using the W3C's vCard vocabulary, and outputs RDF::vCard::Entity objects. RDF::vCard::Importer RDF::vCard::Importer does the reverse. RDF::vCard::Entity An RDF::vCard::Entity objects is an individual vCard. It overloads stringification, so just treat it like a string. RDF::vCard::Entity::WithXmlSupport RDF::vCard::Entity::WithXmlSupport is a subclass of RDF::vCard::Entity, with a "to_xml" method. It requires XML::LibXML to be installed and working. The importer and exporter will try to create these if possible. RDF::vCard::Line RDF::vCard::Line is internal fu that you probably don't want to touch. BUGS
If your RDF asserts that Alice is Bob's AGENT and Bob is Alice's AGENT, then RDF::vCard::Export will eat your face. Don't do it. Please report any other bugs to https://rt.cpan.org/Public/Dist/Display.html?Name=RDF-vCard <https://rt.cpan.org/Public/Dist/Display.html?Name=RDF-vCard>. SEE ALSO
http://www.w3.org/Submission/vcard-rdf/ <http://www.w3.org/Submission/vcard-rdf/>. <http://perlrdf.org/>. RDF::vCard::Babelfish. AUTHOR
Toby Inkster <tobyink@cpan.org>. COPYRIGHT
Copyright 2011 Toby Inkster This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2012-06-23 RDF::vCard(3pm)

Check Out this Related Man Page

RDF::vCard::Line(3pm)					User Contributed Perl Documentation				     RDF::vCard::Line(3pm)

NAME
RDF::vCard::Line - represents a line within a vCard DESCRIPTION
Instances of this class correspond to lines within vCards, though they could potentially be used as basis for other RFC 2425-based formats such as iCalendar. Constructor o "new(%options)" Returns a new RDF::vCard::Line object. The only options worth worrying about are: property (case-insensitive property name), value (arrayref or single string value), type_parameters (hashref of property-related parameters). RDF::vCard::Entity overloads stringification, so you can do the following: my $line = RDF::vCard::Line->new( property => 'email', value => 'joe@example.net', type_parameters => { type=>['PREF','INTERNET'] }, ); print "$line " if $line =~ /internet/i; Methods o "to_string()" Formats the line according to RFC 2425 and RFC 2426. o "add_to_model($model, $node)" Given an RDF::Trine::Model and an RDF::Trine::Node representing the entity (i.e. vcard) that this line belongs to, adds triples to the model for this line. o "property()" Returns the line's property - e.g. "EMAIL". o "property_node()" Returns the line's property as an RDF::Trine::Node that can be used as an RDF predicate. Returns undef if a sensible URI cannot be found. o "property_order()" Returns a string which can be used to sort a list of lines into a sensible order. o "value()" Returns an arrayref for the value. Each item in the arrayref could be a plain scalar, or an arrayref of scalars. For example the arrayref representing this name: N:Smith;John;Edward,James which is the vCard representation of somebody with surname Smith, given name John and additional names (middle names) Edward and James, might be represented with the following "value" arrayref: [ 'Smith', 'John', ['Edward', 'James'], ] or maybe: [ ['Smith'], 'John', ['Edward', 'James'], ] That's why it's sometimes useful to have a normalised version of it... o "nvalue()" Returns a normalised version of the arrayref for the value. It will always be an arrayref of arrayrefs. For example: [ ['Smith'], ['John'], ['Edward', 'James'], ] o "value_node()" Returns the line's value as an RDF::Trine::Node that can be used as an RDF object. For some complex properties (e.g. ADR, GEO, ORG, N, etc) the result is not especially useful. o "value_to_string()" Formats the line value according to RFC 2425 and RFC 2426. o "type_parameters()" Returns the type_parameters hashref. Here be monsters (kinda). SEE ALSO
RDF::vCard. AUTHOR
Toby Inkster <tobyink@cpan.org>. COPYRIGHT
Copyright 2011 Toby Inkster This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2012-06-23 RDF::vCard::Line(3pm)
Man Page