@@ -18,7 +18,7 @@ class FOO < RDF::Vocabulary("http://foo/"); end
1818 context "typed resources" do
1919 context "resource without type" do
2020 subject do
21- @graph << [ RDF ::URI . new ( "http://release/" ) , RDF ::DC . title , "foo" ]
21+ @graph << [ RDF ::URI . new ( "http://release/" ) , RDF ::URI ( "http://purl.org/dc/terms/ title" ) , "foo" ]
2222 serialize ( attributes : :untyped )
2323 end
2424
@@ -35,7 +35,7 @@ class FOO < RDF::Vocabulary("http://foo/"); end
3535 context "resource with type" do
3636 subject do
3737 @graph << [ RDF ::URI . new ( "http://release/" ) , RDF . type , FOO . Release ]
38- @graph << [ RDF ::URI . new ( "http://release/" ) , RDF ::DC . title , "foo" ]
38+ @graph << [ RDF ::URI . new ( "http://release/" ) , RDF ::URI ( "http://purl.org/dc/terms/ title" ) , "foo" ]
3939 serialize ( attributes : :untyped )
4040 end
4141
@@ -54,7 +54,7 @@ class FOO < RDF::Vocabulary("http://foo/"); end
5454 subject do
5555 @graph << [ RDF ::URI . new ( "http://release/" ) , RDF . type , FOO . Release ]
5656 @graph << [ RDF ::URI . new ( "http://release/" ) , RDF . type , FOO . XtraRelease ]
57- @graph << [ RDF ::URI . new ( "http://release/" ) , RDF ::DC . title , "foo" ]
57+ @graph << [ RDF ::URI . new ( "http://release/" ) , RDF ::URI ( "http://purl.org/dc/terms/ title" ) , "foo" ]
5858 serialize ( attributes : :untyped )
5959 end
6060
@@ -73,7 +73,7 @@ class FOO < RDF::Vocabulary("http://foo/"); end
7373 subject do
7474 @graph << [ RDF ::URI . new ( "http://release/" ) , RDF . type , FOO . Release ]
7575 @graph << [ RDF ::URI . new ( "http://release/" ) , RDF . type , FOO . XtraRelease ]
76- @graph << [ RDF ::URI . new ( "http://release/" ) , RDF ::DC . title , "foo" ]
76+ @graph << [ RDF ::URI . new ( "http://release/" ) , RDF ::URI ( "http://purl.org/dc/terms/ title" ) , "foo" ]
7777 serialize ( attributes : :none )
7878 end
7979
@@ -94,7 +94,7 @@ class FOO < RDF::Vocabulary("http://foo/"); end
9494 @graph << [ RDF ::URI . new ( "http://release/" ) , RDF . type , FOO . Release ]
9595 @graph << [ RDF ::URI . new ( "http://release/" ) , RDF . type , FOO . XtraRelease ]
9696 @graph << [ RDF ::URI . new ( "http://release/" ) , RDF . type , FOO . XXtraRelease ]
97- @graph << [ RDF ::URI . new ( "http://release/" ) , RDF ::DC . title , "foo" ]
97+ @graph << [ RDF ::URI . new ( "http://release/" ) , RDF ::URI ( "http://purl.org/dc/terms/ title" ) , "foo" ]
9898 serialize ( attributes : :typed )
9999 end
100100
@@ -114,7 +114,7 @@ class FOO < RDF::Vocabulary("http://foo/"); end
114114 context "with illegal content" do
115115 context "in attribute" , skip : !defined? ( ::Nokogiri ) do
116116 subject do
117- @graph << [ RDF ::URI . new ( "http://release/" ) , RDF ::DC . title , "foo & bar" ]
117+ @graph << [ RDF ::URI . new ( "http://release/" ) , RDF ::URI ( "http://purl.org/dc/terms/ title" ) , "foo & bar" ]
118118 serialize ( attributes : :untyped )
119119 end
120120
@@ -130,7 +130,7 @@ class FOO < RDF::Vocabulary("http://foo/"); end
130130 end
131131 context "in element" do
132132 subject do
133- @graph << [ RDF ::URI . new ( "http://release/" ) , RDF ::DC . title , "foo & bar" ]
133+ @graph << [ RDF ::URI . new ( "http://release/" ) , RDF ::URI ( "http://purl.org/dc/terms/ title" ) , "foo & bar" ]
134134 serialize ( attributes : :none )
135135 end
136136
@@ -149,9 +149,9 @@ class FOO < RDF::Vocabulary("http://foo/"); end
149149 context "with children" do
150150 before ( :each ) {
151151 @graph << [ RDF ::URI . new ( "http://release/" ) , RDF . type , FOO . Release ]
152- @graph << [ RDF ::URI . new ( "http://release/" ) , RDF ::DC . title , "foo" ]
152+ @graph << [ RDF ::URI . new ( "http://release/" ) , RDF ::URI ( "http://purl.org/dc/terms/ title" ) , "foo" ]
153153 @graph << [ RDF ::URI . new ( "http://release/contributor" ) , RDF . type , FOO . Contributor ]
154- @graph << [ RDF ::URI . new ( "http://release/contributor" ) , RDF ::DC . title , "bar" ]
154+ @graph << [ RDF ::URI . new ( "http://release/contributor" ) , RDF ::URI ( "http://purl.org/dc/terms/ title" ) , "bar" ]
155155 @graph << [ RDF ::URI . new ( "http://release/" ) , FOO . releaseContributor , RDF ::URI . new ( "http://release/contributor" ) ]
156156 }
157157 subject { serialize ( attributes : :untyped ) }
@@ -347,7 +347,7 @@ class FOO < RDF::Vocabulary("http://foo/"); end
347347 context "with untyped literals" do
348348 context ":attributes == :none" do
349349 subject do
350- @graph << [ RDF ::URI . new ( "http://release/" ) , RDF ::DC . title , "foo" ]
350+ @graph << [ RDF ::URI . new ( "http://release/" ) , RDF ::URI ( "http://purl.org/dc/terms/ title" ) , "foo" ]
351351 serialize ( attributes : :none )
352352 end
353353
@@ -364,7 +364,7 @@ class FOO < RDF::Vocabulary("http://foo/"); end
364364 [ :untyped , :typed ] . each do |opt |
365365 context ":attributes == #{ opt } " do
366366 subject do
367- @graph << [ RDF ::URI . new ( "http://release/" ) , RDF ::DC . title , "foo" ]
367+ @graph << [ RDF ::URI . new ( "http://release/" ) , RDF ::URI ( "http://purl.org/dc/terms/ title" ) , "foo" ]
368368 serialize ( attributes : opt )
369369 end
370370
@@ -381,7 +381,7 @@ class FOO < RDF::Vocabulary("http://foo/"); end
381381
382382 context "untyped without lang if attribute lang set" do
383383 subject do
384- @graph << [ RDF ::URI . new ( "http://release/" ) , RDF ::DC . title , RDF ::Literal . new ( "foo" , :language => "de" ) ]
384+ @graph << [ RDF ::URI . new ( "http://release/" ) , RDF ::URI ( "http://purl.org/dc/terms/ title" ) , RDF ::Literal . new ( "foo" , :language => "de" ) ]
385385 serialize ( attributes : :untyped , :lang => "de" )
386386 end
387387
@@ -398,7 +398,7 @@ class FOO < RDF::Vocabulary("http://foo/"); end
398398 context "with language" do
399399 context "property for title" do
400400 subject do
401- @graph << [ RDF ::URI . new ( "http://release/" ) , RDF ::DC . title , RDF ::Literal . new ( "foo" , :language => "en-us" ) ]
401+ @graph << [ RDF ::URI . new ( "http://release/" ) , RDF ::URI ( "http://purl.org/dc/terms/ title" ) , RDF ::Literal . new ( "foo" , :language => "en-us" ) ]
402402 serialize ( attributes : :untyped , :lang => "de" )
403403 end
404404
@@ -418,7 +418,7 @@ class FOO < RDF::Vocabulary("http://foo/"); end
418418
419419 context "attribute if lang is default" do
420420 subject do
421- @graph << [ RDF ::URI . new ( "http://release/" ) , RDF ::DC . title , RDF ::Literal . new ( "foo" , :language => "de" ) ]
421+ @graph << [ RDF ::URI . new ( "http://release/" ) , RDF ::URI ( "http://purl.org/dc/terms/ title" ) , RDF ::Literal . new ( "foo" , :language => "de" ) ]
422422 serialize ( attributes : :untyped , :lang => "de" )
423423 end
424424
@@ -435,7 +435,7 @@ class FOO < RDF::Vocabulary("http://foo/"); end
435435
436436 context "untyped as property if lang set and no default" do
437437 subject do
438- @graph << [ RDF ::URI . new ( "http://release/" ) , RDF ::DC . title , RDF ::Literal . new ( "foo" , :language => "de" ) ]
438+ @graph << [ RDF ::URI . new ( "http://release/" ) , RDF ::URI ( "http://purl.org/dc/terms/ title" ) , RDF ::Literal . new ( "foo" , :language => "de" ) ]
439439 serialize ( attributes : :untyped )
440440 end
441441
@@ -454,7 +454,7 @@ class FOO < RDF::Vocabulary("http://foo/"); end
454454
455455 context "untyped as property if lang set and not default" do
456456 subject do
457- @graph << [ RDF ::URI . new ( "http://release/" ) , RDF ::DC . title , RDF ::Literal . new ( "foo" , :language => "de" ) ]
457+ @graph << [ RDF ::URI . new ( "http://release/" ) , RDF ::URI ( "http://purl.org/dc/terms/ title" ) , RDF ::Literal . new ( "foo" , :language => "de" ) ]
458458 serialize ( attributes : :untyped , :lang => "en-us" )
459459 end
460460
@@ -473,8 +473,8 @@ class FOO < RDF::Vocabulary("http://foo/"); end
473473
474474 context "multiple untyped attributes values through properties" do
475475 subject do
476- @graph << [ RDF ::URI . new ( "http://release/" ) , RDF ::DC . title , RDF ::Literal . new ( "foo" , :language => "de" ) ]
477- @graph << [ RDF ::URI . new ( "http://release/" ) , RDF ::DC . title , RDF ::Literal . new ( "foo" , :language => "en-us" ) ]
476+ @graph << [ RDF ::URI . new ( "http://release/" ) , RDF ::URI ( "http://purl.org/dc/terms/ title" ) , RDF ::Literal . new ( "foo" , :language => "de" ) ]
477+ @graph << [ RDF ::URI . new ( "http://release/" ) , RDF ::URI ( "http://purl.org/dc/terms/ title" ) , RDF ::Literal . new ( "foo" , :language => "en-us" ) ]
478478 serialize ( attributes : :untyped , :lang => "en-us" )
479479 end
480480
@@ -493,7 +493,7 @@ class FOO < RDF::Vocabulary("http://foo/"); end
493493
494494 context "typed node as element if :untyped" do
495495 subject do
496- @graph << [ RDF ::URI . new ( "http://release/" ) , RDF ::DC . title , RDF ::Literal . new ( "foo" , :datatype => RDF ::XSD . string ) ]
496+ @graph << [ RDF ::URI . new ( "http://release/" ) , RDF ::URI ( "http://purl.org/dc/terms/ title" ) , RDF ::Literal . new ( "foo" , :datatype => RDF ::XSD . string ) ]
497497 serialize ( attributes : :untyped )
498498 end
499499
@@ -509,7 +509,7 @@ class FOO < RDF::Vocabulary("http://foo/"); end
509509
510510 context "typed node as attribute if :typed" do
511511 subject do
512- @graph << [ RDF ::URI . new ( "http://release/" ) , RDF ::DC . title , RDF ::Literal . new ( "foo" , :datatype => RDF ::XSD . string ) ]
512+ @graph << [ RDF ::URI . new ( "http://release/" ) , RDF ::URI ( "http://purl.org/dc/terms/ title" ) , RDF ::Literal . new ( "foo" , :datatype => RDF ::XSD . string ) ]
513513 serialize ( attributes : :typed )
514514 end
515515
@@ -525,8 +525,8 @@ class FOO < RDF::Vocabulary("http://foo/"); end
525525
526526 context "multiple typed values through properties" do
527527 subject do
528- @graph << [ RDF ::URI . new ( "http://release/" ) , RDF ::DC . title , RDF ::Literal . new ( "foo" , :datatype => RDF ::XSD . string ) ]
529- @graph << [ RDF ::URI . new ( "http://release/" ) , RDF ::DC . title , RDF ::Literal . new ( "bar" , :datatype => RDF ::XSD . string ) ]
528+ @graph << [ RDF ::URI . new ( "http://release/" ) , RDF ::URI ( "http://purl.org/dc/terms/ title" ) , RDF ::Literal . new ( "foo" , :datatype => RDF ::XSD . string ) ]
529+ @graph << [ RDF ::URI . new ( "http://release/" ) , RDF ::URI ( "http://purl.org/dc/terms/ title" ) , RDF ::Literal . new ( "bar" , :datatype => RDF ::XSD . string ) ]
530530 serialize ( attributes : :untyped )
531531 end
532532
@@ -545,7 +545,7 @@ class FOO < RDF::Vocabulary("http://foo/"); end
545545 context "with namespace" do
546546 before ( :each ) do
547547 @graph << [ RDF ::URI . new ( "http://release/" ) , RDF . type , FOO . Release ]
548- @graph << [ RDF ::URI . new ( "http://release/" ) , RDF ::DC . title , "foo" ]
548+ @graph << [ RDF ::URI . new ( "http://release/" ) , RDF ::URI ( "http://purl.org/dc/terms/ title" ) , "foo" ]
549549 @graph << [ RDF ::URI . new ( "http://release/" ) , FOO . pred , FOO . obj ]
550550 end
551551
@@ -606,7 +606,7 @@ class FOO < RDF::Vocabulary("http://foo/"); end
606606 context "with bnodes" do
607607 context "no nodeID attribute unless node is referenced as an object" do
608608 subject do
609- @graph << [ RDF ::Node . new ( "a" ) , RDF ::DC . title , "foo" ]
609+ @graph << [ RDF ::Node . new ( "a" ) , RDF ::URI ( "http://purl.org/dc/terms/ title" ) , "foo" ]
610610 serialize ( attributes : :untyped , base_uri : "http://release/" )
611611 end
612612
@@ -623,7 +623,7 @@ class FOO < RDF::Vocabulary("http://foo/"); end
623623 context "nodeID attribute if node is referenced as an object" do
624624 subject do
625625 bn = RDF ::Node . new ( "a" )
626- @graph << [ bn , RDF ::DC . title , "foo" ]
626+ @graph << [ bn , RDF ::URI ( "http://purl.org/dc/terms/ title" ) , "foo" ]
627627 @graph << [ bn , RDF ::OWL . sameAs , bn ]
628628 serialize ( attributes : :untyped , base_uri : "http://release/" )
629629 end
@@ -689,7 +689,7 @@ class FOO < RDF::Vocabulary("http://foo/"); end
689689
690690 describe "illegal RDF values" do
691691 it "raises error with literal as subject" do
692- @graph << [ RDF ::Literal . new ( "literal" ) , RDF ::DC . title , RDF ::Literal . new ( "foo" ) ]
692+ @graph << [ RDF ::Literal . new ( "literal" ) , RDF ::URI ( "http://purl.org/dc/terms/ title" ) , RDF ::Literal . new ( "foo" ) ]
693693 expect { serialize ( :validate => true ) } . to raise_error ( RDF ::WriterError )
694694 end
695695 it "raises error with node as predicate" do
0 commit comments