@@ -240,9 +240,10 @@ Returns or sets the last Etag of so that changes to the model can be detected.
240
240
has last_etag => ( is => ' rw' , isa => Str, predicate => ' has_last_etag' );
241
241
242
242
243
- =item namespaces ( { skos => 'http://www.w3.org/2004/02/skos/core#', dct => 'http://purl.org/dc/terms/' } )
243
+ =item namespaces ( $namespace_map )
244
244
245
- Gets or sets the namespaces that some serializers use for pretty-printing.
245
+ Gets or sets the namespaces that some serializers use for
246
+ pretty-printing. Should be handed a L<URI::NamespaceMap> object.
246
247
247
248
=cut
248
249
@@ -260,8 +261,9 @@ sub _build_namespaces {
260
261
my ($self , $ns_hash ) = @_ ;
261
262
my $map = URI::NamespaceMap-> new([' rdf' , ' void' , ' dct' ]);
262
263
while (my ($name , $uri ) = each %{$ns_hash }) {
263
- $self -> add_namespace_mapping ($name => $uri );
264
+ $map -> add_mapping ($name => $uri );
264
265
}
266
+ warn Data::Dumper::Dumper($map )
265
267
return $map ;
266
268
}
267
269
@@ -351,6 +353,7 @@ sub response {
351
353
}
352
354
$self -> add_namespace_mapping(hydra => ' http://www.w3.org/ns/hydra/core#' );
353
355
my $cl = literal($counter , undef , ' http://www.w3.org/2001/XMLSchema#integer' );
356
+ warn Data::Dumper::Dumper($self -> list_namespaces);
354
357
my $void = $self -> namespaces-> void;
355
358
$output_model -> add_statement(statement(iri($uri ),
356
359
iri($void -> triples),
0 commit comments