use strict;

require RDF::Core::Storage::Memory;
require RDF::Core::Model;
require RDF::Core::Statement;
require RDF::Core::Model::Serializer;
require RDF::Core::Literal;

# create storage object
my $storage = new RDF::Core::Storage::Memory;
my $model = new RDF::Core::Model (Storage => $storage);

my $subject = new RDF::Core::Resource('http://burningbird.net/articles/monsters1.rdf');
my $predicate = $subject->new('http://www.w3.org/1999/02/22-rdf-syntax-ns#type');
my $object = new RDF::Core::Resource('http://burningbird.net/postcon/elements/1.0/Resource');
my $statement = new RDF::Core::Statement($subject, $predicate, $object);
$model->addStmt($statement);

$model->addStmt(new RDF::Core::Statement($subject,
                                         $subject->new('http://burningbird.net/postcon/elements/1.0/movementType'),
                                          new RDF::Core::Literal('Move')));

my $xml = '';
  my $serializer = new RDF::Core::Model::Serializer(Model=>$model,
                                                    Output=>\$xml
                                                   );
  $serializer->serialize;
  print "$xml\n";
