RDFStore::Serializer - Interface to an RDF model/graph serializer


RDFStore documentation  | view source Contained in the RDFStore distribution.

Index


NAME

Top

RDFStore::Serializer - Interface to an RDF model/graph serializer

SYNOPSIS

Top

	use RDFStore::Serializer;

	my $model= new RDFStore::Model();
	$model->add($statement);
	$model->add($statement1);
	$model->add($statement2);

	my $serializer = new RDFStore::Serializer;

	my $rdf = $serializer->serialize( $model ); # serialise model to a string in-memory
	my $rdf = $serializer->serialize( $model, undef, {}, $base ); # using xml:base
	my $rdf = $serializer->serialize( $model, undef, { 'http://mynamespace.org/blaaa/' => blaa } ); # using my blaa namespace

	$serializer->serialize( $model, *STREAM ); # serialise model to a given file descriptor (stream)

DESCRIPTION

Top

An RDFStore::Model serializer.

CONSTRUCTORS

Top

The following methods construct RDFStore::Serializer:

 Create an new RDFStore::Serializer object to serialize and RDFStore::Model.

METHODS

Top

 Write out the given MODEL to FILEHANDLE_REF (or in-memory string if not passed) using a given list of NAMESPACES and xml:base BASE if passed. The NAMESPACES hash ref contains a list of namespace values (URI refs) and prefix names - see RDFStore::Vocabulary::Generator(3). By default the output is returned from the method into a string otheriwse a valid (and opened) FILEHANLDE_REF can be passed, which will be being printed to.

 Same as write method above.

SEE ALSO

Top

RDFStore::Model(3) RDFStore::Serializer::Strawman(3) RDFStore::Serializer::RDFXML(3)

AUTHOR

Top

	Alberto Reggiori <areggiori@webweaving.org>



RDFStore documentation  | view source Contained in the RDFStore distribution.