@@ -757,59 +757,60 @@ has _last_extvoid_mtime => (is => 'rw', isa => Int);
757
757
sub _common_fragments_control {
758
758
my $self = shift ;
759
759
my $model = shift || RDF::Trine::Model-> temporary_model;
760
- my $void = RDF::Trine::Namespace-> new(' http://rdfs.org/ns/void#' );
761
- my $xsd = RDF::Trine::Namespace-> new(' http://www.w3.org/2001/XMLSchema#' );
762
- my $hydra = RDF::Trine::Namespace-> new(' http://www.w3.org/ns/hydra/core#' );
763
- my $rdf = RDF::Trine::Namespace-> new(' http://www.w3.org/1999/02/22-rdf-syntax-ns#' );
760
+ $self -> guess_namespaces(' rdf' , ' void' );
761
+ $self -> add_namespace_mapping(hydra => ' http://www.w3.org/ns/hydra/core#' );
762
+ my $void = $self -> namespaces-> void;
763
+ my $hydra = $self -> namespaces-> hydra;
764
+ my $rdf = $self -> namespaces-> rdf;
764
765
$model -> begin_bulk_ops;
765
766
my $void_subject = $self -> void-> dataset_uri;
766
767
$model -> add_statement(statement($void_subject ,
767
- $rdf -> type,
768
- $hydra -> Collection));
768
+ iri( $rdf -> type) ,
769
+ iri( $hydra -> Collection) ));
769
770
$model -> add_statement(statement($void_subject ,
770
- $rdf -> type,
771
- $void -> Dataset));
771
+ iri( $rdf -> type) ,
772
+ iri( $void -> Dataset) ));
772
773
$model -> add_statement(statement($void_subject ,
773
- $hydra -> search,
774
+ iri( $hydra -> search) ,
774
775
blank(' template' )));
775
776
$model -> add_statement(statement($void_subject ,
776
- $void -> uriLookupEndpoint,
777
+ iri( $void -> uriLookupEndpoint) ,
777
778
literal($self -> base_uri . $self -> fragments_config-> {fragments_path }
778
779
. ' {?subject,predicate,object}' )));
779
780
$model -> add_statement(statement(blank(' template' ),
780
- $hydra -> template,
781
+ iri( $hydra -> template) ,
781
782
literal($self -> base_uri . $self -> fragments_config-> {fragments_path }
782
783
. ' {?subject,predicate,object}' )));
783
784
784
785
$model -> add_statement(statement(blank(' template' ),
785
- $hydra -> mapping,
786
+ iri( $hydra -> mapping) ,
786
787
blank(' subject' )));
787
788
$model -> add_statement(statement(blank(' template' ),
788
- $hydra -> mapping,
789
+ iri( $hydra -> mapping) ,
789
790
blank(' predicate' )));
790
791
$model -> add_statement(statement(blank(' template' ),
791
- $hydra -> mapping,
792
+ iri( $hydra -> mapping) ,
792
793
blank(' object' )));
793
794
794
795
$model -> add_statement(statement(blank(' subject' ),
795
- $hydra -> property,
796
- $rdf -> subject));
796
+ iri( $hydra -> property) ,
797
+ iri( $rdf -> subject) ));
797
798
$model -> add_statement(statement(blank(' subject' ),
798
- $hydra -> variable,
799
+ iri( $hydra -> variable) ,
799
800
literal(' subject' )));
800
801
801
802
$model -> add_statement(statement(blank(' predicate' ),
802
- $hydra -> property,
803
- $rdf -> predicate));
803
+ iri( $hydra -> property) ,
804
+ iri( $rdf -> predicate) ));
804
805
$model -> add_statement(statement(blank(' predicate' ),
805
- $hydra -> variable,
806
+ iri( $hydra -> variable) ,
806
807
literal(' predicate' )));
807
808
808
809
$model -> add_statement(statement(blank(' object' ),
809
- $hydra -> property,
810
- $rdf -> object));
810
+ iri( $hydra -> property) ,
811
+ iri( $rdf -> object) ));
811
812
$model -> add_statement(statement(blank(' object' ),
812
- $hydra -> variable,
813
+ iri( $hydra -> variable) ,
813
814
literal(' object' )));
814
815
$model -> end_bulk_ops;
815
816
return $model ;
0 commit comments