Commits

Toby Inkster committed e930083

Need flatten_node, rdf_statement and rdf_resource.

Comments (0)

Files changed (4)

lib/RDF/iCalendar.pm

 use RDF::iCalendar::Exporter;
 use RDF::iCalendar::Importer;
 
-our $VERSION = '0.002';
+our $VERSION = '0.003';
 
 1;
 

lib/RDF/iCalendar/Entity.pm

 use base qw[RDF::vCard::Entity];
 use strict;
 
-our $VERSION = '0.002';
+our $VERSION = '0.003';
 
 1;
 

lib/RDF/iCalendar/Exporter.pm

 use MIME::Base64 qw[];
 use RDF::iCalendar::Entity;
 use RDF::iCalendar::Line;
-use RDF::TrineX::Functions -shortcuts;
+use RDF::TrineX::Functions
+	-shortcuts,
+	statement => { -as => 'rdf_statement' },
+	iri       => { -as => 'rdf_resource' };
 use Scalar::Util qw[blessed];
 use URI;
 
 sub VX   { return 'http://buzzword.org.uk/rdf/vcardx#' . shift; }
 sub XSD  { return 'http://www.w3.org/2001/XMLSchema#' . shift; }
 
+sub flatten_node
+{
+	my $node = shift;
+	return $node->value if $node->is_resource || $node->is_literal;
+	return $node->as_ntriples;
+}
+
 use namespace::clean;
 
-our $VERSION = '0.002';
+our $VERSION = '0.003';
 our $PRODID  = sprintf("+//IDN cpan.org//NONSGML %s v %s//EN", __PACKAGE__, $VERSION);
 
 our %cal_dispatch = (

lib/RDF/iCalendar/Line.pm

 use base qw[RDF::vCard::Line];
 use strict;
 
-our $VERSION = '0.002';
+our $VERSION = '0.003';
 
 1;