=encoding utf8
=head1 NAME
rdf/serializer - shared RDF serializer trait.
=head1 SYNOPSIS
from rdf/serializer import RdfSerializer;
=head1 DESCRIPTION
C<RdfSerializer> provides the common serializer entry points used by the
RDF serializer classes. Classes compose the trait and implement
C<serialize>.
=head1 EXPORTS
=head2 Traits
=over
=item C<RdfSerializer>
=over
=item C<< serialize(Array quads) >>
Placeholder serializer method. Classes using this trait should override
it.
=item C<< serialize_each(Array quads, Function emit) >>
Serializes C<quads> and calls C<emit> with the result when it is not
empty. Returns the serializer.
=back
=back
=head1 COPYRIGHT AND LICENCE
B<< rdf/serializer >> is copyright Toby Inkster.
It is free software; you may redistribute it and/or modify it under
the terms of either the Artistic License 1.0 or the GNU General Public
License version 2.
=cut
trait RdfSerializer {
method serialize ( Array quads ) {
die "Unimplemented";
}
method serialize_each ( Array quads, Function emit ) {
let text := self.serialize(quads);
emit(text) if text ne "";
return self;
}
}
modules/rdf/serializer.zzm
rdf-0.0.3 source code
Package
- Name
- rdf
- Version
- 0.0.3
- Uploaded
- 2026-06-12 23:55:02
- Repository
- https://github.com/tobyink/zuzu-rdf
- Dependencies
-
-
std/data/xml>= 0 -
std/data/xml/escape>= 0 -
std/data/json>= 0 -
std/db>= 0 -
std/digest/sha>= 0 -
std/getopt>= 0 -
std/internals>= 0 -
std/io>= 0 -
std/math>= 0 -
std/proc>= 0 -
std/string>= 0 -
std/time>= 0 -
std/uuid>= 0
-
- Metadata
- zuzu-distribution.json
- Archive
- Download .tar.gz