rdf-rdfxml 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -0
- data/.yardopts +2 -1
- data/CONTRIBUTORS +1 -0
- data/History.txt +7 -0
- data/README.rdoc +19 -2
- data/Rakefile +14 -0
- data/VERSION +1 -1
- data/example.rb +0 -1
- data/lib/rdf/rdfxml.rb +14 -6
- data/lib/rdf/rdfxml/format.rb +6 -5
- data/lib/rdf/rdfxml/patches/array_hacks.rb +53 -0
- data/lib/rdf/rdfxml/patches/nokogiri_hacks.rb +8 -0
- data/lib/rdf/rdfxml/patches/rdf_escape.rb +131 -0
- data/lib/rdf/rdfxml/reader.rb +90 -57
- data/lib/rdf/rdfxml/version.rb +1 -1
- data/lib/rdf/rdfxml/vocab.rb +3 -0
- data/lib/rdf/rdfxml/writer.rb +399 -0
- data/rdf-rdfxml.gemspec +448 -0
- data/script/console +10 -0
- data/spec/format_spec.rb +22 -0
- data/spec/matchers.rb +121 -0
- data/spec/rdf_helper.rb +176 -0
- data/spec/rdf_tests/cc197bad-dc9c-440d-a5b5-d52ba2e14234.nt +24 -0
- data/spec/rdf_tests/cc197bad-dc9c-440d-a5b5-d52ba2e14234.rdf +46 -0
- data/spec/rdf_tests/tm_001.nt +1 -0
- data/spec/rdf_tests/tm_001.rdf +7 -0
- data/spec/rdf_tests/xml-literal-mixed.nt +6 -0
- data/spec/rdf_tests/xml-literal-mixed.rdf +15 -0
- data/spec/rdfcore/Manifest.rdf +5395 -0
- data/spec/rdfcore/Manifest.yml +1970 -0
- data/spec/rdfcore/amp-in-url/test001.nt +16 -0
- data/spec/rdfcore/amp-in-url/test001.rdf +40 -0
- data/spec/rdfcore/datatypes-intensional/test001.nt +18 -0
- data/spec/rdfcore/datatypes-intensional/test002.nt +18 -0
- data/spec/rdfcore/datatypes/test001.nt +15 -0
- data/spec/rdfcore/datatypes/test001.rdf +29 -0
- data/spec/rdfcore/datatypes/test002.nt +14 -0
- data/spec/rdfcore/datatypes/test002.rdf +27 -0
- data/spec/rdfcore/datatypes/test002b.nt +17 -0
- data/spec/rdfcore/datatypes/test003a.nt +16 -0
- data/spec/rdfcore/datatypes/test003b.nt +16 -0
- data/spec/rdfcore/datatypes/test005a.nt +16 -0
- data/spec/rdfcore/datatypes/test005b.nt +16 -0
- data/spec/rdfcore/datatypes/test006.nt +17 -0
- data/spec/rdfcore/datatypes/test008a.nt +15 -0
- data/spec/rdfcore/datatypes/test008b.nt +15 -0
- data/spec/rdfcore/datatypes/test009a.nt +15 -0
- data/spec/rdfcore/datatypes/test009b.nt +15 -0
- data/spec/rdfcore/datatypes/test010.nt +17 -0
- data/spec/rdfcore/datatypes/test011a.nt +17 -0
- data/spec/rdfcore/datatypes/test011b.nt +17 -0
- data/spec/rdfcore/horst-01/test001.rdf +38 -0
- data/spec/rdfcore/horst-01/test002.rdf +39 -0
- data/spec/rdfcore/horst-01/test003.rdf +40 -0
- data/spec/rdfcore/horst-01/test004.rdf +42 -0
- data/spec/rdfcore/pfps-10/test001a.nt +14 -0
- data/spec/rdfcore/pfps-10/test001b.nt +15 -0
- data/spec/rdfcore/rdf-charmod-literals/test001.nt +15 -0
- data/spec/rdfcore/rdf-charmod-literals/test001.rdf +34 -0
- data/spec/rdfcore/rdf-charmod-uris/test001.nt +14 -0
- data/spec/rdfcore/rdf-charmod-uris/test001.rdf +34 -0
- data/spec/rdfcore/rdf-charmod-uris/test002.nt +15 -0
- data/spec/rdfcore/rdf-charmod-uris/test002.rdf +33 -0
- data/spec/rdfcore/rdf-containers-syntax-vs-schema/error001.rdf +27 -0
- data/spec/rdfcore/rdf-containers-syntax-vs-schema/error002.rdf +34 -0
- data/spec/rdfcore/rdf-containers-syntax-vs-schema/test001.nt +17 -0
- data/spec/rdfcore/rdf-containers-syntax-vs-schema/test001.rdf +27 -0
- data/spec/rdfcore/rdf-containers-syntax-vs-schema/test002.nt +19 -0
- data/spec/rdfcore/rdf-containers-syntax-vs-schema/test002.rdf +37 -0
- data/spec/rdfcore/rdf-containers-syntax-vs-schema/test003.nt +18 -0
- data/spec/rdfcore/rdf-containers-syntax-vs-schema/test003.rdf +29 -0
- data/spec/rdfcore/rdf-containers-syntax-vs-schema/test004.nt +29 -0
- data/spec/rdfcore/rdf-containers-syntax-vs-schema/test004.rdf +33 -0
- data/spec/rdfcore/rdf-containers-syntax-vs-schema/test006.nt +40 -0
- data/spec/rdfcore/rdf-containers-syntax-vs-schema/test006.rdf +28 -0
- data/spec/rdfcore/rdf-containers-syntax-vs-schema/test007.nt +20 -0
- data/spec/rdfcore/rdf-containers-syntax-vs-schema/test007.rdf +32 -0
- data/spec/rdfcore/rdf-containers-syntax-vs-schema/test008.nt +15 -0
- data/spec/rdfcore/rdf-containers-syntax-vs-schema/test008.rdf +28 -0
- data/spec/rdfcore/rdf-element-not-mandatory/test001.nt +10 -0
- data/spec/rdfcore/rdf-element-not-mandatory/test001.rdf +14 -0
- data/spec/rdfcore/rdf-ns-prefix-confusion/test0001.nt +14 -0
- data/spec/rdfcore/rdf-ns-prefix-confusion/test0001.rdf +35 -0
- data/spec/rdfcore/rdf-ns-prefix-confusion/test0003.nt +14 -0
- data/spec/rdfcore/rdf-ns-prefix-confusion/test0003.rdf +35 -0
- data/spec/rdfcore/rdf-ns-prefix-confusion/test0004.nt +14 -0
- data/spec/rdfcore/rdf-ns-prefix-confusion/test0004.rdf +34 -0
- data/spec/rdfcore/rdf-ns-prefix-confusion/test0005.nt +15 -0
- data/spec/rdfcore/rdf-ns-prefix-confusion/test0005.rdf +40 -0
- data/spec/rdfcore/rdf-ns-prefix-confusion/test0006.nt +14 -0
- data/spec/rdfcore/rdf-ns-prefix-confusion/test0006.rdf +32 -0
- data/spec/rdfcore/rdf-ns-prefix-confusion/test0009.nt +14 -0
- data/spec/rdfcore/rdf-ns-prefix-confusion/test0009.rdf +32 -0
- data/spec/rdfcore/rdf-ns-prefix-confusion/test0010.nt +14 -0
- data/spec/rdfcore/rdf-ns-prefix-confusion/test0010.rdf +38 -0
- data/spec/rdfcore/rdf-ns-prefix-confusion/test0011.nt +15 -0
- data/spec/rdfcore/rdf-ns-prefix-confusion/test0011.rdf +40 -0
- data/spec/rdfcore/rdf-ns-prefix-confusion/test0012.nt +15 -0
- data/spec/rdfcore/rdf-ns-prefix-confusion/test0012.rdf +40 -0
- data/spec/rdfcore/rdf-ns-prefix-confusion/test0013.nt +15 -0
- data/spec/rdfcore/rdf-ns-prefix-confusion/test0013.rdf +40 -0
- data/spec/rdfcore/rdf-ns-prefix-confusion/test0014.nt +15 -0
- data/spec/rdfcore/rdf-ns-prefix-confusion/test0014.rdf +42 -0
- data/spec/rdfcore/rdfms-abouteach/error001.rdf +35 -0
- data/spec/rdfcore/rdfms-abouteach/error002.rdf +35 -0
- data/spec/rdfcore/rdfms-difference-between-ID-and-about/error1.rdf +25 -0
- data/spec/rdfcore/rdfms-difference-between-ID-and-about/test1.nt +14 -0
- data/spec/rdfcore/rdfms-difference-between-ID-and-about/test1.rdf +22 -0
- data/spec/rdfcore/rdfms-difference-between-ID-and-about/test2.nt +14 -0
- data/spec/rdfcore/rdfms-difference-between-ID-and-about/test2.rdf +22 -0
- data/spec/rdfcore/rdfms-difference-between-ID-and-about/test3.nt +14 -0
- data/spec/rdfcore/rdfms-difference-between-ID-and-about/test3.rdf +22 -0
- data/spec/rdfcore/rdfms-duplicate-member-props/test001.nt +17 -0
- data/spec/rdfcore/rdfms-duplicate-member-props/test001.rdf +30 -0
- data/spec/rdfcore/rdfms-empty-property-elements/error001.rdf +33 -0
- data/spec/rdfcore/rdfms-empty-property-elements/error002.rdf +33 -0
- data/spec/rdfcore/rdfms-empty-property-elements/error003.rdf +39 -0
- data/spec/rdfcore/rdfms-empty-property-elements/test001.nt +14 -0
- data/spec/rdfcore/rdfms-empty-property-elements/test001.rdf +33 -0
- data/spec/rdfcore/rdfms-empty-property-elements/test002.nt +14 -0
- data/spec/rdfcore/rdfms-empty-property-elements/test002.rdf +31 -0
- data/spec/rdfcore/rdfms-empty-property-elements/test003.nt +14 -0
- data/spec/rdfcore/rdfms-empty-property-elements/test003.rdf +32 -0
- data/spec/rdfcore/rdfms-empty-property-elements/test004.nt +14 -0
- data/spec/rdfcore/rdfms-empty-property-elements/test004.rdf +32 -0
- data/spec/rdfcore/rdfms-empty-property-elements/test005.nt +18 -0
- data/spec/rdfcore/rdfms-empty-property-elements/test005.rdf +32 -0
- data/spec/rdfcore/rdfms-empty-property-elements/test006.nt +18 -0
- data/spec/rdfcore/rdfms-empty-property-elements/test006.rdf +32 -0
- data/spec/rdfcore/rdfms-empty-property-elements/test007.nt +14 -0
- data/spec/rdfcore/rdfms-empty-property-elements/test007.rdf +32 -0
- data/spec/rdfcore/rdfms-empty-property-elements/test008.nt +14 -0
- data/spec/rdfcore/rdfms-empty-property-elements/test008.rdf +31 -0
- data/spec/rdfcore/rdfms-empty-property-elements/test009.nt +14 -0
- data/spec/rdfcore/rdfms-empty-property-elements/test009.rdf +32 -0
- data/spec/rdfcore/rdfms-empty-property-elements/test010.nt +14 -0
- data/spec/rdfcore/rdfms-empty-property-elements/test010.rdf +31 -0
- data/spec/rdfcore/rdfms-empty-property-elements/test011.nt +18 -0
- data/spec/rdfcore/rdfms-empty-property-elements/test011.rdf +30 -0
- data/spec/rdfcore/rdfms-empty-property-elements/test012.nt +18 -0
- data/spec/rdfcore/rdfms-empty-property-elements/test012.rdf +30 -0
- data/spec/rdfcore/rdfms-empty-property-elements/test013.nt +15 -0
- data/spec/rdfcore/rdfms-empty-property-elements/test013.rdf +35 -0
- data/spec/rdfcore/rdfms-empty-property-elements/test014.nt +15 -0
- data/spec/rdfcore/rdfms-empty-property-elements/test014.rdf +34 -0
- data/spec/rdfcore/rdfms-empty-property-elements/test015.nt +15 -0
- data/spec/rdfcore/rdfms-empty-property-elements/test015.rdf +38 -0
- data/spec/rdfcore/rdfms-empty-property-elements/test016.nt +14 -0
- data/spec/rdfcore/rdfms-empty-property-elements/test016.rdf +31 -0
- data/spec/rdfcore/rdfms-empty-property-elements/test017.nt +14 -0
- data/spec/rdfcore/rdfms-empty-property-elements/test017.rdf +38 -0
- data/spec/rdfcore/rdfms-identity-anon-resources/test001.nt +14 -0
- data/spec/rdfcore/rdfms-identity-anon-resources/test001.rdf +33 -0
- data/spec/rdfcore/rdfms-identity-anon-resources/test002.nt +15 -0
- data/spec/rdfcore/rdfms-identity-anon-resources/test002.rdf +33 -0
- data/spec/rdfcore/rdfms-identity-anon-resources/test003.nt +14 -0
- data/spec/rdfcore/rdfms-identity-anon-resources/test003.rdf +31 -0
- data/spec/rdfcore/rdfms-identity-anon-resources/test004.nt +15 -0
- data/spec/rdfcore/rdfms-identity-anon-resources/test004.rdf +33 -0
- data/spec/rdfcore/rdfms-identity-anon-resources/test005.nt +14 -0
- data/spec/rdfcore/rdfms-identity-anon-resources/test005.rdf +31 -0
- data/spec/rdfcore/rdfms-not-id-and-resource-attr/test001.nt +19 -0
- data/spec/rdfcore/rdfms-not-id-and-resource-attr/test001.rdf +29 -0
- data/spec/rdfcore/rdfms-not-id-and-resource-attr/test002.nt +15 -0
- data/spec/rdfcore/rdfms-not-id-and-resource-attr/test002.rdf +29 -0
- data/spec/rdfcore/rdfms-not-id-and-resource-attr/test004.nt +18 -0
- data/spec/rdfcore/rdfms-not-id-and-resource-attr/test004.rdf +29 -0
- data/spec/rdfcore/rdfms-not-id-and-resource-attr/test005.nt +19 -0
- data/spec/rdfcore/rdfms-not-id-and-resource-attr/test005.rdf +29 -0
- data/spec/rdfcore/rdfms-para196/test001.nt +17 -0
- data/spec/rdfcore/rdfms-para196/test001.rdf +35 -0
- data/spec/rdfcore/rdfms-rdf-id/error001.rdf +26 -0
- data/spec/rdfcore/rdfms-rdf-id/error002.rdf +26 -0
- data/spec/rdfcore/rdfms-rdf-id/error003.rdf +29 -0
- data/spec/rdfcore/rdfms-rdf-id/error004.rdf +27 -0
- data/spec/rdfcore/rdfms-rdf-id/error005.rdf +31 -0
- data/spec/rdfcore/rdfms-rdf-id/error006.rdf +26 -0
- data/spec/rdfcore/rdfms-rdf-id/error007.rdf +29 -0
- data/spec/rdfcore/rdfms-rdf-names-use/error-001.rdf +23 -0
- data/spec/rdfcore/rdfms-rdf-names-use/error-002.rdf +23 -0
- data/spec/rdfcore/rdfms-rdf-names-use/error-003.rdf +23 -0
- data/spec/rdfcore/rdfms-rdf-names-use/error-004.rdf +23 -0
- data/spec/rdfcore/rdfms-rdf-names-use/error-005.rdf +23 -0
- data/spec/rdfcore/rdfms-rdf-names-use/error-006.rdf +23 -0
- data/spec/rdfcore/rdfms-rdf-names-use/error-007.rdf +23 -0
- data/spec/rdfcore/rdfms-rdf-names-use/error-008.rdf +23 -0
- data/spec/rdfcore/rdfms-rdf-names-use/error-009.rdf +23 -0
- data/spec/rdfcore/rdfms-rdf-names-use/error-010.rdf +23 -0
- data/spec/rdfcore/rdfms-rdf-names-use/error-011.rdf +25 -0
- data/spec/rdfcore/rdfms-rdf-names-use/error-012.rdf +25 -0
- data/spec/rdfcore/rdfms-rdf-names-use/error-013.rdf +25 -0
- data/spec/rdfcore/rdfms-rdf-names-use/error-014.rdf +25 -0
- data/spec/rdfcore/rdfms-rdf-names-use/error-015.rdf +25 -0
- data/spec/rdfcore/rdfms-rdf-names-use/error-016.rdf +25 -0
- data/spec/rdfcore/rdfms-rdf-names-use/error-017.rdf +25 -0
- data/spec/rdfcore/rdfms-rdf-names-use/error-018.rdf +25 -0
- data/spec/rdfcore/rdfms-rdf-names-use/error-019.rdf +25 -0
- data/spec/rdfcore/rdfms-rdf-names-use/error-020.rdf +25 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-001.nt +1 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-001.rdf +23 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-002.nt +1 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-002.rdf +23 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-003.nt +1 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-003.rdf +23 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-004.nt +1 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-004.rdf +23 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-005.nt +1 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-005.rdf +23 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-006.nt +1 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-006.rdf +23 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-007.nt +1 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-007.rdf +23 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-008.nt +1 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-008.rdf +23 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-009.nt +1 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-009.rdf +23 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-010.nt +1 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-010.rdf +23 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-011.nt +1 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-011.rdf +23 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-012.nt +1 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-012.rdf +23 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-013.nt +1 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-013.rdf +23 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-014.nt +1 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-014.rdf +23 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-015.nt +1 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-015.rdf +23 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-016.nt +1 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-016.rdf +23 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-017.nt +1 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-017.rdf +25 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-018.nt +1 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-018.rdf +25 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-019.nt +1 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-019.rdf +25 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-020.nt +1 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-020.rdf +25 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-021.nt +1 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-021.rdf +25 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-022.nt +1 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-022.rdf +25 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-023.nt +1 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-023.rdf +25 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-024.nt +1 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-024.rdf +25 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-025.nt +1 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-025.rdf +25 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-026.nt +1 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-026.rdf +25 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-027.nt +1 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-027.rdf +25 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-028.nt +1 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-028.rdf +25 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-029.nt +1 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-029.rdf +25 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-030.nt +1 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-030.rdf +25 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-031.nt +1 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-031.rdf +25 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-032.nt +1 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-032.rdf +24 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-033.nt +1 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-033.rdf +24 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-034.nt +1 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-034.rdf +24 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-035.nt +1 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-035.rdf +24 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-036.nt +1 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-036.rdf +24 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-037.nt +1 -0
- data/spec/rdfcore/rdfms-rdf-names-use/test-037.rdf +24 -0
- data/spec/rdfcore/rdfms-rdf-names-use/warn-001.nt +1 -0
- data/spec/rdfcore/rdfms-rdf-names-use/warn-001.rdf +23 -0
- data/spec/rdfcore/rdfms-rdf-names-use/warn-002.nt +1 -0
- data/spec/rdfcore/rdfms-rdf-names-use/warn-002.rdf +25 -0
- data/spec/rdfcore/rdfms-rdf-names-use/warn-003.nt +1 -0
- data/spec/rdfcore/rdfms-rdf-names-use/warn-003.rdf +24 -0
- data/spec/rdfcore/rdfms-reification-required/test001.nt +15 -0
- data/spec/rdfcore/rdfms-reification-required/test001.rdf +29 -0
- data/spec/rdfcore/rdfms-seq-representation/empty.nt +13 -0
- data/spec/rdfcore/rdfms-seq-representation/test001.nt +19 -0
- data/spec/rdfcore/rdfms-seq-representation/test001.rdf +33 -0
- data/spec/rdfcore/rdfms-seq-representation/test002.nt +14 -0
- data/spec/rdfcore/rdfms-seq-representation/test003a.nt +14 -0
- data/spec/rdfcore/rdfms-seq-representation/test003b.nt +14 -0
- data/spec/rdfcore/rdfms-seq-representation/test004.nt +14 -0
- data/spec/rdfcore/rdfms-syntax-incomplete/error001.rdf +26 -0
- data/spec/rdfcore/rdfms-syntax-incomplete/error002.rdf +26 -0
- data/spec/rdfcore/rdfms-syntax-incomplete/error003.rdf +29 -0
- data/spec/rdfcore/rdfms-syntax-incomplete/error004.rdf +25 -0
- data/spec/rdfcore/rdfms-syntax-incomplete/error005.rdf +25 -0
- data/spec/rdfcore/rdfms-syntax-incomplete/error006.rdf +28 -0
- data/spec/rdfcore/rdfms-syntax-incomplete/test001.nt +14 -0
- data/spec/rdfcore/rdfms-syntax-incomplete/test001.rdf +28 -0
- data/spec/rdfcore/rdfms-syntax-incomplete/test002.nt +19 -0
- data/spec/rdfcore/rdfms-syntax-incomplete/test002.rdf +38 -0
- data/spec/rdfcore/rdfms-syntax-incomplete/test003.nt +17 -0
- data/spec/rdfcore/rdfms-syntax-incomplete/test003.rdf +28 -0
- data/spec/rdfcore/rdfms-syntax-incomplete/test004.nt +21 -0
- data/spec/rdfcore/rdfms-syntax-incomplete/test004.rdf +36 -0
- data/spec/rdfcore/rdfms-uri-substructure/error001.nt +18 -0
- data/spec/rdfcore/rdfms-uri-substructure/test001.nt +17 -0
- data/spec/rdfcore/rdfms-uri-substructure/test001.rdf +29 -0
- data/spec/rdfcore/rdfms-xml-literal-namespaces/test001.nt +13 -0
- data/spec/rdfcore/rdfms-xml-literal-namespaces/test001.rdf +33 -0
- data/spec/rdfcore/rdfms-xml-literal-namespaces/test002.nt +14 -0
- data/spec/rdfcore/rdfms-xml-literal-namespaces/test002.rdf +47 -0
- data/spec/rdfcore/rdfms-xmllang/test001.nt +14 -0
- data/spec/rdfcore/rdfms-xmllang/test001.rdf +30 -0
- data/spec/rdfcore/rdfms-xmllang/test002.nt +14 -0
- data/spec/rdfcore/rdfms-xmllang/test002.rdf +29 -0
- data/spec/rdfcore/rdfms-xmllang/test003.nt +14 -0
- data/spec/rdfcore/rdfms-xmllang/test003.rdf +28 -0
- data/spec/rdfcore/rdfms-xmllang/test004.nt +14 -0
- data/spec/rdfcore/rdfms-xmllang/test004.rdf +28 -0
- data/spec/rdfcore/rdfms-xmllang/test005.nt +14 -0
- data/spec/rdfcore/rdfms-xmllang/test005.rdf +28 -0
- data/spec/rdfcore/rdfms-xmllang/test006.nt +14 -0
- data/spec/rdfcore/rdfms-xmllang/test006.rdf +29 -0
- data/spec/rdfcore/rdfms-xmllang/test007a.nt +14 -0
- data/spec/rdfcore/rdfms-xmllang/test007b.nt +14 -0
- data/spec/rdfcore/rdfms-xmllang/test007c.nt +14 -0
- data/spec/rdfcore/rdfs-container-membership-superProperty/not1C.rdf +13 -0
- data/spec/rdfcore/rdfs-container-membership-superProperty/not1P.rdf +14 -0
- data/spec/rdfcore/rdfs-domain-and-range/nonconclusions005.rdf +28 -0
- data/spec/rdfcore/rdfs-domain-and-range/nonconclusions006.rdf +28 -0
- data/spec/rdfcore/rdfs-domain-and-range/premises005.rdf +32 -0
- data/spec/rdfcore/rdfs-domain-and-range/premises006.rdf +32 -0
- data/spec/rdfcore/rdfs-domain-and-range/test001.nt +16 -0
- data/spec/rdfcore/rdfs-domain-and-range/test001.rdf +29 -0
- data/spec/rdfcore/rdfs-domain-and-range/test002.nt +16 -0
- data/spec/rdfcore/rdfs-domain-and-range/test002.rdf +29 -0
- data/spec/rdfcore/rdfs-entailment/test001.nt +16 -0
- data/spec/rdfcore/rdfs-entailment/test002.nt +15 -0
- data/spec/rdfcore/rdfs-no-cycles-in-subClassOf/test001.nt +18 -0
- data/spec/rdfcore/rdfs-no-cycles-in-subClassOf/test001.rdf +37 -0
- data/spec/rdfcore/rdfs-no-cycles-in-subPropertyOf/test001.nt +18 -0
- data/spec/rdfcore/rdfs-no-cycles-in-subPropertyOf/test001.rdf +40 -0
- data/spec/rdfcore/rdfs-subClassOf-a-Property/test001.nt +15 -0
- data/spec/rdfcore/rdfs-subPropertyOf-semantics/test001.nt +24 -0
- data/spec/rdfcore/rdfs-subPropertyOf-semantics/test002.nt +21 -0
- data/spec/rdfcore/statement-entailment/test001a.nt +12 -0
- data/spec/rdfcore/statement-entailment/test001b.nt +2 -0
- data/spec/rdfcore/statement-entailment/test002a.nt +2 -0
- data/spec/rdfcore/statement-entailment/test002b.nt +5 -0
- data/spec/rdfcore/tex-01/test001.rdf +34 -0
- data/spec/rdfcore/tex-01/test002.rdf +33 -0
- data/spec/rdfcore/unrecognised-xml-attributes/test001.nt +15 -0
- data/spec/rdfcore/unrecognised-xml-attributes/test001.rdf +31 -0
- data/spec/rdfcore/unrecognised-xml-attributes/test002.nt +14 -0
- data/spec/rdfcore/unrecognised-xml-attributes/test002.rdf +32 -0
- data/spec/rdfcore/xml-canon/test001.nt +16 -0
- data/spec/rdfcore/xml-canon/test001.rdf +28 -0
- data/spec/rdfcore/xmlbase/test001.nt +14 -0
- data/spec/rdfcore/xmlbase/test001.rdf +27 -0
- data/spec/rdfcore/xmlbase/test002.nt +14 -0
- data/spec/rdfcore/xmlbase/test002.rdf +28 -0
- data/spec/rdfcore/xmlbase/test003.nt +14 -0
- data/spec/rdfcore/xmlbase/test003.rdf +25 -0
- data/spec/rdfcore/xmlbase/test004.nt +18 -0
- data/spec/rdfcore/xmlbase/test004.rdf +27 -0
- data/spec/rdfcore/xmlbase/test006.nt +15 -0
- data/spec/rdfcore/xmlbase/test006.rdf +26 -0
- data/spec/rdfcore/xmlbase/test007.nt +14 -0
- data/spec/rdfcore/xmlbase/test007.rdf +25 -0
- data/spec/rdfcore/xmlbase/test008.nt +14 -0
- data/spec/rdfcore/xmlbase/test008.rdf +25 -0
- data/spec/rdfcore/xmlbase/test009.nt +14 -0
- data/spec/rdfcore/xmlbase/test009.rdf +26 -0
- data/spec/rdfcore/xmlbase/test010.nt +14 -0
- data/spec/rdfcore/xmlbase/test010.rdf +26 -0
- data/spec/rdfcore/xmlbase/test011.nt +14 -0
- data/spec/rdfcore/xmlbase/test011.rdf +27 -0
- data/spec/rdfcore/xmlbase/test013.nt +15 -0
- data/spec/rdfcore/xmlbase/test013.rdf +28 -0
- data/spec/rdfcore/xmlbase/test014.nt +15 -0
- data/spec/rdfcore/xmlbase/test014.rdf +28 -0
- data/spec/rdfcore/xmlsch-02/test001.rdf +34 -0
- data/spec/rdfcore/xmlsch-02/test002.rdf +34 -0
- data/spec/rdfcore/xmlsch-02/test003.rdf +37 -0
- data/spec/reader_spec.rb +421 -0
- data/spec/spec.opts +1 -0
- data/spec/spec_helper.rb +50 -0
- data/spec/xml_serializer_spec.rb +386 -0
- metadata +385 -6
data/lib/rdf/rdfxml/version.rb
CHANGED
data/lib/rdf/rdfxml/writer.rb
CHANGED
@@ -0,0 +1,399 @@
|
|
1
|
+
require 'nokogiri' # FIXME: Implement using different modules as in RDF::TriX
|
2
|
+
|
3
|
+
module RDF::RDFXML
|
4
|
+
##
|
5
|
+
# An RDF/XML serialiser in Ruby
|
6
|
+
#
|
7
|
+
# @author [Gregg Kellogg](http://kellogg-assoc.com/)
|
8
|
+
class Writer < RDF::Writer
|
9
|
+
format RDF::RDFXML::Format
|
10
|
+
|
11
|
+
VALID_ATTRIBUTES = [:none, :untyped, :typed]
|
12
|
+
|
13
|
+
attr_accessor :graph, :base
|
14
|
+
|
15
|
+
|
16
|
+
##
|
17
|
+
# @param [IO, File] output
|
18
|
+
# @param [Hash{Symbol => Object}] options
|
19
|
+
# @yield [writer]
|
20
|
+
# @yieldparam [RDF::Writer] writer
|
21
|
+
def initialize(output = $stdout, options = {}, &block)
|
22
|
+
super do
|
23
|
+
@graph = RDF::Graph.new
|
24
|
+
@stream = nil
|
25
|
+
@base = nil
|
26
|
+
@force_RDF_about = {}
|
27
|
+
@max_depth = options[:max_depth] || 3
|
28
|
+
@base = options[:base]
|
29
|
+
@lang = options[:lang]
|
30
|
+
@attributes = options[:attributes] || :none
|
31
|
+
raise "Invalid attribute option '#{@attributes}', should be one of #{VALID_ATTRIBUTES.to_sentence}" unless VALID_ATTRIBUTES.include?(@attributes.to_sym)
|
32
|
+
self.reset
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
##
|
37
|
+
# Stores the RDF/XML representation of a triple.
|
38
|
+
#
|
39
|
+
# @param [RDF::Resource] subject
|
40
|
+
# @param [RDF::URI] predicate
|
41
|
+
# @param [RDF::Value] object
|
42
|
+
# @return [void]
|
43
|
+
# @see #write_epilogue
|
44
|
+
def write_triple(subject, predicate, object)
|
45
|
+
@graph << [subject, predicate, object]
|
46
|
+
end
|
47
|
+
|
48
|
+
##
|
49
|
+
# Outputs the RDF/XML representation of all stored triples.
|
50
|
+
#
|
51
|
+
# @return [void]
|
52
|
+
# @see #write_triple
|
53
|
+
def write_epilogue
|
54
|
+
doc = Nokogiri::XML::Document.new
|
55
|
+
|
56
|
+
puts "\nserialize: graph namespaces: #{@graph.nsbinding.inspect}" if $DEBUG
|
57
|
+
|
58
|
+
preprocess
|
59
|
+
|
60
|
+
predicates = @graph.predicates.uniq
|
61
|
+
possible = predicates + @graph.objects.uniq
|
62
|
+
namespaces = {}
|
63
|
+
required_namespaces = {}
|
64
|
+
possible.each do |res|
|
65
|
+
next unless res.is_a?(RDF::URI)
|
66
|
+
if res.namespace
|
67
|
+
add_namespace(res.namespace)
|
68
|
+
else
|
69
|
+
required_namespaces[res.base] = true
|
70
|
+
end
|
71
|
+
#puts "possible namespace for #{res}: #{res.namespace || %(<#{res.base}>)}"
|
72
|
+
end
|
73
|
+
add_namespace(RDF_NS)
|
74
|
+
add_namespace(XML_NS) if @base || @lang
|
75
|
+
|
76
|
+
# See if there's a default namespace, and favor it when generating element names.
|
77
|
+
# Lookup an equivalent prefixed namespace for use in generating attributes
|
78
|
+
@default_ns = @graph.namespace("")
|
79
|
+
if @default_ns
|
80
|
+
add_namespace(@default_ns)
|
81
|
+
prefix = @graph.prefix(@default_ns.uri)
|
82
|
+
@prefixed_default_ns = @graph.namespace(prefix)
|
83
|
+
add_namespace(@prefixed_default_ns) if @prefixed_default_ns
|
84
|
+
end
|
85
|
+
|
86
|
+
# Add bindings for predicates not already having bindings
|
87
|
+
tmp_ns = "ns0"
|
88
|
+
required_namespaces.keys.each do |uri|
|
89
|
+
puts "create namespace definition for #{uri}" if $DEBUG
|
90
|
+
add_namespace(Namespace.new(uri, tmp_ns))
|
91
|
+
tmp_ns = tmp_ns.succ
|
92
|
+
end
|
93
|
+
|
94
|
+
doc.root = Nokogiri::XML::Element.new("rdf:RDF", doc)
|
95
|
+
@namespaces.each_pair do |p, ns|
|
96
|
+
if p.to_s.empty?
|
97
|
+
doc.root.default_namespace = ns.uri.to_s
|
98
|
+
else
|
99
|
+
doc.root.add_namespace(p, ns.uri.to_s)
|
100
|
+
end
|
101
|
+
end
|
102
|
+
doc.root["xml:lang"] = @lang if @lang
|
103
|
+
doc.root["xml:base"] = @base if @base
|
104
|
+
|
105
|
+
# Add statements for each subject
|
106
|
+
order_subjects.each do |subject|
|
107
|
+
#puts "subj: #{subject.inspect}"
|
108
|
+
subject(subject, doc.root)
|
109
|
+
end
|
110
|
+
|
111
|
+
doc.write_xml_to(stream, :encoding => "UTF-8", :indent => 2)
|
112
|
+
end
|
113
|
+
|
114
|
+
protected
|
115
|
+
def subject(subject, parent_node)
|
116
|
+
node = nil
|
117
|
+
|
118
|
+
if !is_done?(subject)
|
119
|
+
subject_done(subject)
|
120
|
+
properties = @graph.properties(subject)
|
121
|
+
prop_list = sort_properties(properties)
|
122
|
+
puts "subject: #{subject.to_n3}, props: #{properties.inspect}" if $DEBUG
|
123
|
+
|
124
|
+
rdf_type, *rest = properties.fetch(RDF_TYPE.to_s, [])
|
125
|
+
if rdf_type.is_a?(RDF::URI)
|
126
|
+
element = get_qname(rdf_type)
|
127
|
+
properties[RDF_TYPE.to_s] = rest
|
128
|
+
type_ns = rdf_type.namespace rescue nil
|
129
|
+
if type_ns && @default_ns && type_ns.uri == @default_ns.uri
|
130
|
+
properties[RDF_TYPE.to_s] = rest
|
131
|
+
element = rdf_type.short_name
|
132
|
+
end
|
133
|
+
end
|
134
|
+
element ||= "rdf:Description"
|
135
|
+
|
136
|
+
node = Nokogiri::XML::Element.new(element, parent_node.document)
|
137
|
+
|
138
|
+
if subject.is_a?(BNode)
|
139
|
+
# Only need nodeID if it's referenced elsewhere
|
140
|
+
node["rdf:nodeID"] = subject.to_s if ref_count(subject) > (@depth == 0 ? 0 : 1)
|
141
|
+
else
|
142
|
+
node["rdf:about"] = relativize(subject)
|
143
|
+
end
|
144
|
+
|
145
|
+
prop_list.each do |prop|
|
146
|
+
prop_ref = RDF::URI.new(prop)
|
147
|
+
|
148
|
+
properties[prop].each do |object|
|
149
|
+
@depth += 1
|
150
|
+
predicate(prop_ref, object, node, properties[prop].length == 1)
|
151
|
+
@depth -= 1
|
152
|
+
end
|
153
|
+
end
|
154
|
+
elsif @force_RDF_about.include?(subject)
|
155
|
+
puts "subject: #{subject.to_n3}, force about" if $DEBUG
|
156
|
+
node = Nokogiri::XML::Element.new("rdf:Description", parent_node.document)
|
157
|
+
node["rdf:about"] = relativize(subject)
|
158
|
+
@force_RDF_about.delete(subject)
|
159
|
+
end
|
160
|
+
|
161
|
+
parent_node.add_child(node) if node
|
162
|
+
end
|
163
|
+
|
164
|
+
# Output a predicate into the specified node.
|
165
|
+
#
|
166
|
+
# If _is_unique_ is true, this predicate may be able to be serialized as an attribute
|
167
|
+
def predicate(prop, object, node, is_unique)
|
168
|
+
qname = prop.to_qname(uri_binding)
|
169
|
+
raise RdfException, "No qname generated for <#{prop}>" unless qname
|
170
|
+
|
171
|
+
# See if we can serialize as attribute.
|
172
|
+
# * untyped attributes that aren't duplicated where xml:lang == @lang
|
173
|
+
# * typed attributes that aren't duplicated if @dt_as_attr is true
|
174
|
+
# * rdf:type
|
175
|
+
as_attr = false
|
176
|
+
as_attr ||= true if [:untyped, :typed].include?(@attributes) && prop == RDF_TYPE
|
177
|
+
|
178
|
+
# Untyped attribute with no lang, or whos lang is the same as the default and RDF_TYPE
|
179
|
+
as_attr ||= true if [:untyped, :typed].include?(@attributes) &&
|
180
|
+
(object.is_a?(Literal) && object.untyped? && (object.lang.nil? || object.lang == @lang))
|
181
|
+
|
182
|
+
as_attr ||= true if [:typed].include?(@attributes) && object.is_a?(Literal) && object.typed?
|
183
|
+
|
184
|
+
as_attr = false unless is_unique
|
185
|
+
|
186
|
+
# Can't do as an attr if the qname has no prefix and there is no prefixed version
|
187
|
+
if @default_ns && prop.namespace.uri == @default_ns.uri
|
188
|
+
if as_attr
|
189
|
+
if @prefixed_default_ns
|
190
|
+
qname = "#{@prefixed_default_ns.prefix}:#{prop.short_name}"
|
191
|
+
else
|
192
|
+
as_attr = false
|
193
|
+
end
|
194
|
+
else
|
195
|
+
qname = prop.short_name
|
196
|
+
end
|
197
|
+
end
|
198
|
+
|
199
|
+
puts "predicate: #{qname}, as_attr: #{as_attr}, object: #{object.inspect}, done: #{is_done?(object)}, sub: #{@subjects.include?(object)}" if $DEBUG
|
200
|
+
qname = "rdf:li" if qname.match(/rdf:_\d+/)
|
201
|
+
pred_node = Nokogiri::XML::Element.new(qname, node.document)
|
202
|
+
|
203
|
+
if object.is_a?(Literal) || is_done?(object) || !@subjects.include?(object)
|
204
|
+
# Literals or references to objects that aren't subjects, or that have already been serialized
|
205
|
+
|
206
|
+
args = object.xml_args
|
207
|
+
puts "predicate: args=#{args.inspect}" if $DEBUG
|
208
|
+
attrs = args.pop
|
209
|
+
|
210
|
+
if as_attr
|
211
|
+
# Serialize as attribute
|
212
|
+
pred_node.unlink
|
213
|
+
pred_node = nil
|
214
|
+
node[qname] = object.is_a?(RDF::URI) ? relativize(object) : object.to_s
|
215
|
+
else
|
216
|
+
# Serialize as element
|
217
|
+
attrs.each_pair do |a, av|
|
218
|
+
next if a == "xml:lang" && av == @lang # Lang already specified, don't repeat
|
219
|
+
av = relativize(object) if a == "#{RDF_NS.prefix}:resource"
|
220
|
+
puts " elt attr #{a}=#{av}" if $DEBUG
|
221
|
+
pred_node[a] = av.to_s
|
222
|
+
end
|
223
|
+
puts " elt #{'xmllit ' if object.is_a?(Literal) && object.xmlliteral?}content=#{args.first}" if $DEBUG && !args.empty?
|
224
|
+
if object.is_a?(Literal) && object.xmlliteral?
|
225
|
+
pred_node.add_child(Nokogiri::XML::CharacterData.new(args.first, node.document))
|
226
|
+
elsif args.first
|
227
|
+
pred_node.content = args.first unless args.empty?
|
228
|
+
end
|
229
|
+
end
|
230
|
+
else
|
231
|
+
# Check to see if it can be serialized as a collection
|
232
|
+
col = @graph.seq(object)
|
233
|
+
conformant_list = col.all? {|item| !item.is_a?(Literal)}
|
234
|
+
o_props = @graph.properties(object)
|
235
|
+
if conformant_list && o_props[RDF_NS.first.to_s]
|
236
|
+
# Serialize list as parseType="Collection"
|
237
|
+
pred_node["rdf:parseType"] = "Collection"
|
238
|
+
col.each do |item|
|
239
|
+
# Mark the BNode subject of each item as being complete, so that it is not serialized
|
240
|
+
@graph.triples(Triple.new(nil, RDF_NS.first, item)) do |triple, ctx|
|
241
|
+
subject_done(triple.subject)
|
242
|
+
end
|
243
|
+
@force_RDF_about[item] = true
|
244
|
+
subject(item, pred_node)
|
245
|
+
end
|
246
|
+
else
|
247
|
+
if @depth < @max_depth
|
248
|
+
@depth += 1
|
249
|
+
subject(object, pred_node)
|
250
|
+
@depth -= 1
|
251
|
+
elsif object.is_a?(BNode)
|
252
|
+
pred_node["rdf:nodeID"] = object.identifier
|
253
|
+
else
|
254
|
+
pred_node["rdf:resource"] = relativize(object)
|
255
|
+
end
|
256
|
+
end
|
257
|
+
end
|
258
|
+
node.add_child(pred_node) if pred_node
|
259
|
+
end
|
260
|
+
|
261
|
+
def relativize(uri)
|
262
|
+
uri = uri.to_s
|
263
|
+
self.base ? uri.sub(/^#{self.base}/, "") : uri
|
264
|
+
end
|
265
|
+
|
266
|
+
def preprocess_triple(triple)
|
267
|
+
super
|
268
|
+
|
269
|
+
# Pre-fetch qnames, to fill namespaces
|
270
|
+
get_qname(triple.predicate)
|
271
|
+
get_qname(triple.object) if triple.predicate == RDF_TYPE
|
272
|
+
|
273
|
+
@references[triple.predicate] = ref_count(triple.predicate) + 1
|
274
|
+
end
|
275
|
+
|
276
|
+
MAX_DEPTH = 10
|
277
|
+
INDENT_STRING = " "
|
278
|
+
|
279
|
+
def top_classes; [RDFS_NS.Class]; end
|
280
|
+
def predicate_order; [RDF_TYPE, RDFS_NS.label, DC_NS.title]; end
|
281
|
+
|
282
|
+
def is_done?(subject)
|
283
|
+
@serialized.include?(subject)
|
284
|
+
end
|
285
|
+
|
286
|
+
# Mark a subject as done.
|
287
|
+
def subject_done(subject)
|
288
|
+
@serialized[subject] = true
|
289
|
+
end
|
290
|
+
|
291
|
+
def order_subjects
|
292
|
+
seen = {}
|
293
|
+
subjects = []
|
294
|
+
|
295
|
+
top_classes.each do |class_uri|
|
296
|
+
graph.triples(Triple.new(nil, RDF_TYPE, class_uri)).map {|t| t.subject}.sort.uniq.each do |subject|
|
297
|
+
#puts "order_subjects: #{subject.inspect}"
|
298
|
+
subjects << subject
|
299
|
+
seen[subject] = @top_levels[subject] = true
|
300
|
+
end
|
301
|
+
end
|
302
|
+
|
303
|
+
# Sort subjects by resources over bnodes, ref_counts and the subject URI itself
|
304
|
+
recursable = @subjects.keys.
|
305
|
+
select {|s| !seen.include?(s)}.
|
306
|
+
map {|r| [r.is_a?(BNode) ? 1 : 0, ref_count(r), r]}.
|
307
|
+
sort
|
308
|
+
|
309
|
+
subjects += recursable.map{|r| r.last}
|
310
|
+
end
|
311
|
+
|
312
|
+
def preprocess
|
313
|
+
@graph.triples.each {|t| preprocess_triple(t)}
|
314
|
+
end
|
315
|
+
|
316
|
+
def preprocess_triple(triple)
|
317
|
+
#puts "preprocess: #{triple.inspect}"
|
318
|
+
references = ref_count(triple.object) + 1
|
319
|
+
@references[triple.object] = references
|
320
|
+
@subjects[triple.subject] = true
|
321
|
+
end
|
322
|
+
|
323
|
+
# Return the number of times this node has been referenced in the object position
|
324
|
+
def ref_count(node)
|
325
|
+
@references.fetch(node, 0)
|
326
|
+
end
|
327
|
+
|
328
|
+
# Return a QName for the URI, or nil. Adds namespace of QName to defined namespaces
|
329
|
+
def get_qname(uri)
|
330
|
+
if uri.is_a?(RDF::URI)
|
331
|
+
qn = @graph.qname(uri)
|
332
|
+
# Local parts with . will mess up serialization
|
333
|
+
return false if qn.nil? || qn.index('.')
|
334
|
+
|
335
|
+
add_namespace(uri.namespace)
|
336
|
+
qn
|
337
|
+
end
|
338
|
+
end
|
339
|
+
|
340
|
+
def add_namespace(ns)
|
341
|
+
@namespaces[ns.prefix.to_s] = ns
|
342
|
+
end
|
343
|
+
|
344
|
+
# URI -> Namespace bindings (similar to graph) for looking up qnames
|
345
|
+
def uri_binding
|
346
|
+
@uri_binding ||= @namespaces.values.inject({}) {|hash, ns| hash[ns.uri.to_s] = ns; hash}
|
347
|
+
end
|
348
|
+
|
349
|
+
def reset
|
350
|
+
@depth = 0
|
351
|
+
@lists = {}
|
352
|
+
@namespaces = {}
|
353
|
+
@references = {}
|
354
|
+
@serialized = {}
|
355
|
+
@subjects = {}
|
356
|
+
@top_levels = {}
|
357
|
+
end
|
358
|
+
|
359
|
+
# Take a hash from predicate uris to lists of values.
|
360
|
+
# Sort the lists of values. Return a sorted list of properties.
|
361
|
+
def sort_properties(properties)
|
362
|
+
properties.keys.each do |k|
|
363
|
+
properties[k] = properties[k].sort do |a, b|
|
364
|
+
a_li = a.is_a?(RDF::URI) && a.short_name =~ /^_\d+$/ ? a.to_i : a.to_s
|
365
|
+
b_li = b.is_a?(RDF::URI) && b.short_name =~ /^_\d+$/ ? b.to_i : b.to_s
|
366
|
+
|
367
|
+
a_li <=> b_li
|
368
|
+
end
|
369
|
+
end
|
370
|
+
|
371
|
+
# Make sorted list of properties
|
372
|
+
prop_list = []
|
373
|
+
|
374
|
+
predicate_order.each do |prop|
|
375
|
+
next unless properties[prop]
|
376
|
+
prop_list << prop.to_s
|
377
|
+
end
|
378
|
+
|
379
|
+
properties.keys.sort.each do |prop|
|
380
|
+
next if prop_list.include?(prop.to_s)
|
381
|
+
prop_list << prop.to_s
|
382
|
+
end
|
383
|
+
|
384
|
+
puts "sort_properties: #{prop_list.to_sentence}" if $DEBUG
|
385
|
+
prop_list
|
386
|
+
end
|
387
|
+
|
388
|
+
# Returns indent string multiplied by the depth
|
389
|
+
def indent(modifier = 0)
|
390
|
+
INDENT_STRING * (@depth + modifier)
|
391
|
+
end
|
392
|
+
|
393
|
+
# Write text
|
394
|
+
def write(text)
|
395
|
+
@stream.write(text)
|
396
|
+
end
|
397
|
+
|
398
|
+
end
|
399
|
+
end
|
data/rdf-rdfxml.gemspec
ADDED
@@ -0,0 +1,448 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{rdf-rdfxml}
|
8
|
+
s.version = "0.0.2"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Gregg Kellogg"]
|
12
|
+
s.date = %q{2010-06-07}
|
13
|
+
s.description = %q{ RDF::RDFXML is an RDF/XML reader and writer for Ruby using the RDF.rb library suite.
|
14
|
+
}
|
15
|
+
s.email = %q{gregg@kellogg-assoc.com}
|
16
|
+
s.extra_rdoc_files = [
|
17
|
+
"AUTHORS",
|
18
|
+
"History.txt",
|
19
|
+
"README.rdoc"
|
20
|
+
]
|
21
|
+
s.files = [
|
22
|
+
".gitignore",
|
23
|
+
".yardopts",
|
24
|
+
"AUTHORS",
|
25
|
+
"CONTRIBUTORS",
|
26
|
+
"History.txt",
|
27
|
+
"README.rdoc",
|
28
|
+
"Rakefile",
|
29
|
+
"VERSION",
|
30
|
+
"example.rb",
|
31
|
+
"lib/rdf/rdfxml.rb",
|
32
|
+
"lib/rdf/rdfxml/format.rb",
|
33
|
+
"lib/rdf/rdfxml/patches/array_hacks.rb",
|
34
|
+
"lib/rdf/rdfxml/patches/nokogiri_hacks.rb",
|
35
|
+
"lib/rdf/rdfxml/patches/rdf_escape.rb",
|
36
|
+
"lib/rdf/rdfxml/reader.rb",
|
37
|
+
"lib/rdf/rdfxml/version.rb",
|
38
|
+
"lib/rdf/rdfxml/vocab.rb",
|
39
|
+
"lib/rdf/rdfxml/writer.rb",
|
40
|
+
"rdf-rdfxml.gemspec",
|
41
|
+
"script/console",
|
42
|
+
"spec/format_spec.rb",
|
43
|
+
"spec/matchers.rb",
|
44
|
+
"spec/rdf_helper.rb",
|
45
|
+
"spec/rdf_tests/cc197bad-dc9c-440d-a5b5-d52ba2e14234.nt",
|
46
|
+
"spec/rdf_tests/cc197bad-dc9c-440d-a5b5-d52ba2e14234.rdf",
|
47
|
+
"spec/rdf_tests/tm_001.nt",
|
48
|
+
"spec/rdf_tests/tm_001.rdf",
|
49
|
+
"spec/rdf_tests/xml-literal-mixed.nt",
|
50
|
+
"spec/rdf_tests/xml-literal-mixed.rdf",
|
51
|
+
"spec/rdfcore/Manifest.rdf",
|
52
|
+
"spec/rdfcore/Manifest.yml",
|
53
|
+
"spec/rdfcore/amp-in-url/test001.nt",
|
54
|
+
"spec/rdfcore/amp-in-url/test001.rdf",
|
55
|
+
"spec/rdfcore/datatypes-intensional/test001.nt",
|
56
|
+
"spec/rdfcore/datatypes-intensional/test002.nt",
|
57
|
+
"spec/rdfcore/datatypes/test001.nt",
|
58
|
+
"spec/rdfcore/datatypes/test001.rdf",
|
59
|
+
"spec/rdfcore/datatypes/test002.nt",
|
60
|
+
"spec/rdfcore/datatypes/test002.rdf",
|
61
|
+
"spec/rdfcore/datatypes/test002b.nt",
|
62
|
+
"spec/rdfcore/datatypes/test003a.nt",
|
63
|
+
"spec/rdfcore/datatypes/test003b.nt",
|
64
|
+
"spec/rdfcore/datatypes/test005a.nt",
|
65
|
+
"spec/rdfcore/datatypes/test005b.nt",
|
66
|
+
"spec/rdfcore/datatypes/test006.nt",
|
67
|
+
"spec/rdfcore/datatypes/test008a.nt",
|
68
|
+
"spec/rdfcore/datatypes/test008b.nt",
|
69
|
+
"spec/rdfcore/datatypes/test009a.nt",
|
70
|
+
"spec/rdfcore/datatypes/test009b.nt",
|
71
|
+
"spec/rdfcore/datatypes/test010.nt",
|
72
|
+
"spec/rdfcore/datatypes/test011a.nt",
|
73
|
+
"spec/rdfcore/datatypes/test011b.nt",
|
74
|
+
"spec/rdfcore/horst-01/test001.rdf",
|
75
|
+
"spec/rdfcore/horst-01/test002.rdf",
|
76
|
+
"spec/rdfcore/horst-01/test003.rdf",
|
77
|
+
"spec/rdfcore/horst-01/test004.rdf",
|
78
|
+
"spec/rdfcore/pfps-10/test001a.nt",
|
79
|
+
"spec/rdfcore/pfps-10/test001b.nt",
|
80
|
+
"spec/rdfcore/rdf-charmod-literals/test001.nt",
|
81
|
+
"spec/rdfcore/rdf-charmod-literals/test001.rdf",
|
82
|
+
"spec/rdfcore/rdf-charmod-uris/test001.nt",
|
83
|
+
"spec/rdfcore/rdf-charmod-uris/test001.rdf",
|
84
|
+
"spec/rdfcore/rdf-charmod-uris/test002.nt",
|
85
|
+
"spec/rdfcore/rdf-charmod-uris/test002.rdf",
|
86
|
+
"spec/rdfcore/rdf-containers-syntax-vs-schema/error001.rdf",
|
87
|
+
"spec/rdfcore/rdf-containers-syntax-vs-schema/error002.rdf",
|
88
|
+
"spec/rdfcore/rdf-containers-syntax-vs-schema/test001.nt",
|
89
|
+
"spec/rdfcore/rdf-containers-syntax-vs-schema/test001.rdf",
|
90
|
+
"spec/rdfcore/rdf-containers-syntax-vs-schema/test002.nt",
|
91
|
+
"spec/rdfcore/rdf-containers-syntax-vs-schema/test002.rdf",
|
92
|
+
"spec/rdfcore/rdf-containers-syntax-vs-schema/test003.nt",
|
93
|
+
"spec/rdfcore/rdf-containers-syntax-vs-schema/test003.rdf",
|
94
|
+
"spec/rdfcore/rdf-containers-syntax-vs-schema/test004.nt",
|
95
|
+
"spec/rdfcore/rdf-containers-syntax-vs-schema/test004.rdf",
|
96
|
+
"spec/rdfcore/rdf-containers-syntax-vs-schema/test006.nt",
|
97
|
+
"spec/rdfcore/rdf-containers-syntax-vs-schema/test006.rdf",
|
98
|
+
"spec/rdfcore/rdf-containers-syntax-vs-schema/test007.nt",
|
99
|
+
"spec/rdfcore/rdf-containers-syntax-vs-schema/test007.rdf",
|
100
|
+
"spec/rdfcore/rdf-containers-syntax-vs-schema/test008.nt",
|
101
|
+
"spec/rdfcore/rdf-containers-syntax-vs-schema/test008.rdf",
|
102
|
+
"spec/rdfcore/rdf-element-not-mandatory/test001.nt",
|
103
|
+
"spec/rdfcore/rdf-element-not-mandatory/test001.rdf",
|
104
|
+
"spec/rdfcore/rdf-ns-prefix-confusion/test0001.nt",
|
105
|
+
"spec/rdfcore/rdf-ns-prefix-confusion/test0001.rdf",
|
106
|
+
"spec/rdfcore/rdf-ns-prefix-confusion/test0003.nt",
|
107
|
+
"spec/rdfcore/rdf-ns-prefix-confusion/test0003.rdf",
|
108
|
+
"spec/rdfcore/rdf-ns-prefix-confusion/test0004.nt",
|
109
|
+
"spec/rdfcore/rdf-ns-prefix-confusion/test0004.rdf",
|
110
|
+
"spec/rdfcore/rdf-ns-prefix-confusion/test0005.nt",
|
111
|
+
"spec/rdfcore/rdf-ns-prefix-confusion/test0005.rdf",
|
112
|
+
"spec/rdfcore/rdf-ns-prefix-confusion/test0006.nt",
|
113
|
+
"spec/rdfcore/rdf-ns-prefix-confusion/test0006.rdf",
|
114
|
+
"spec/rdfcore/rdf-ns-prefix-confusion/test0009.nt",
|
115
|
+
"spec/rdfcore/rdf-ns-prefix-confusion/test0009.rdf",
|
116
|
+
"spec/rdfcore/rdf-ns-prefix-confusion/test0010.nt",
|
117
|
+
"spec/rdfcore/rdf-ns-prefix-confusion/test0010.rdf",
|
118
|
+
"spec/rdfcore/rdf-ns-prefix-confusion/test0011.nt",
|
119
|
+
"spec/rdfcore/rdf-ns-prefix-confusion/test0011.rdf",
|
120
|
+
"spec/rdfcore/rdf-ns-prefix-confusion/test0012.nt",
|
121
|
+
"spec/rdfcore/rdf-ns-prefix-confusion/test0012.rdf",
|
122
|
+
"spec/rdfcore/rdf-ns-prefix-confusion/test0013.nt",
|
123
|
+
"spec/rdfcore/rdf-ns-prefix-confusion/test0013.rdf",
|
124
|
+
"spec/rdfcore/rdf-ns-prefix-confusion/test0014.nt",
|
125
|
+
"spec/rdfcore/rdf-ns-prefix-confusion/test0014.rdf",
|
126
|
+
"spec/rdfcore/rdfms-abouteach/error001.rdf",
|
127
|
+
"spec/rdfcore/rdfms-abouteach/error002.rdf",
|
128
|
+
"spec/rdfcore/rdfms-difference-between-ID-and-about/error1.rdf",
|
129
|
+
"spec/rdfcore/rdfms-difference-between-ID-and-about/test1.nt",
|
130
|
+
"spec/rdfcore/rdfms-difference-between-ID-and-about/test1.rdf",
|
131
|
+
"spec/rdfcore/rdfms-difference-between-ID-and-about/test2.nt",
|
132
|
+
"spec/rdfcore/rdfms-difference-between-ID-and-about/test2.rdf",
|
133
|
+
"spec/rdfcore/rdfms-difference-between-ID-and-about/test3.nt",
|
134
|
+
"spec/rdfcore/rdfms-difference-between-ID-and-about/test3.rdf",
|
135
|
+
"spec/rdfcore/rdfms-duplicate-member-props/test001.nt",
|
136
|
+
"spec/rdfcore/rdfms-duplicate-member-props/test001.rdf",
|
137
|
+
"spec/rdfcore/rdfms-empty-property-elements/error001.rdf",
|
138
|
+
"spec/rdfcore/rdfms-empty-property-elements/error002.rdf",
|
139
|
+
"spec/rdfcore/rdfms-empty-property-elements/error003.rdf",
|
140
|
+
"spec/rdfcore/rdfms-empty-property-elements/test001.nt",
|
141
|
+
"spec/rdfcore/rdfms-empty-property-elements/test001.rdf",
|
142
|
+
"spec/rdfcore/rdfms-empty-property-elements/test002.nt",
|
143
|
+
"spec/rdfcore/rdfms-empty-property-elements/test002.rdf",
|
144
|
+
"spec/rdfcore/rdfms-empty-property-elements/test003.nt",
|
145
|
+
"spec/rdfcore/rdfms-empty-property-elements/test003.rdf",
|
146
|
+
"spec/rdfcore/rdfms-empty-property-elements/test004.nt",
|
147
|
+
"spec/rdfcore/rdfms-empty-property-elements/test004.rdf",
|
148
|
+
"spec/rdfcore/rdfms-empty-property-elements/test005.nt",
|
149
|
+
"spec/rdfcore/rdfms-empty-property-elements/test005.rdf",
|
150
|
+
"spec/rdfcore/rdfms-empty-property-elements/test006.nt",
|
151
|
+
"spec/rdfcore/rdfms-empty-property-elements/test006.rdf",
|
152
|
+
"spec/rdfcore/rdfms-empty-property-elements/test007.nt",
|
153
|
+
"spec/rdfcore/rdfms-empty-property-elements/test007.rdf",
|
154
|
+
"spec/rdfcore/rdfms-empty-property-elements/test008.nt",
|
155
|
+
"spec/rdfcore/rdfms-empty-property-elements/test008.rdf",
|
156
|
+
"spec/rdfcore/rdfms-empty-property-elements/test009.nt",
|
157
|
+
"spec/rdfcore/rdfms-empty-property-elements/test009.rdf",
|
158
|
+
"spec/rdfcore/rdfms-empty-property-elements/test010.nt",
|
159
|
+
"spec/rdfcore/rdfms-empty-property-elements/test010.rdf",
|
160
|
+
"spec/rdfcore/rdfms-empty-property-elements/test011.nt",
|
161
|
+
"spec/rdfcore/rdfms-empty-property-elements/test011.rdf",
|
162
|
+
"spec/rdfcore/rdfms-empty-property-elements/test012.nt",
|
163
|
+
"spec/rdfcore/rdfms-empty-property-elements/test012.rdf",
|
164
|
+
"spec/rdfcore/rdfms-empty-property-elements/test013.nt",
|
165
|
+
"spec/rdfcore/rdfms-empty-property-elements/test013.rdf",
|
166
|
+
"spec/rdfcore/rdfms-empty-property-elements/test014.nt",
|
167
|
+
"spec/rdfcore/rdfms-empty-property-elements/test014.rdf",
|
168
|
+
"spec/rdfcore/rdfms-empty-property-elements/test015.nt",
|
169
|
+
"spec/rdfcore/rdfms-empty-property-elements/test015.rdf",
|
170
|
+
"spec/rdfcore/rdfms-empty-property-elements/test016.nt",
|
171
|
+
"spec/rdfcore/rdfms-empty-property-elements/test016.rdf",
|
172
|
+
"spec/rdfcore/rdfms-empty-property-elements/test017.nt",
|
173
|
+
"spec/rdfcore/rdfms-empty-property-elements/test017.rdf",
|
174
|
+
"spec/rdfcore/rdfms-identity-anon-resources/test001.nt",
|
175
|
+
"spec/rdfcore/rdfms-identity-anon-resources/test001.rdf",
|
176
|
+
"spec/rdfcore/rdfms-identity-anon-resources/test002.nt",
|
177
|
+
"spec/rdfcore/rdfms-identity-anon-resources/test002.rdf",
|
178
|
+
"spec/rdfcore/rdfms-identity-anon-resources/test003.nt",
|
179
|
+
"spec/rdfcore/rdfms-identity-anon-resources/test003.rdf",
|
180
|
+
"spec/rdfcore/rdfms-identity-anon-resources/test004.nt",
|
181
|
+
"spec/rdfcore/rdfms-identity-anon-resources/test004.rdf",
|
182
|
+
"spec/rdfcore/rdfms-identity-anon-resources/test005.nt",
|
183
|
+
"spec/rdfcore/rdfms-identity-anon-resources/test005.rdf",
|
184
|
+
"spec/rdfcore/rdfms-not-id-and-resource-attr/test001.nt",
|
185
|
+
"spec/rdfcore/rdfms-not-id-and-resource-attr/test001.rdf",
|
186
|
+
"spec/rdfcore/rdfms-not-id-and-resource-attr/test002.nt",
|
187
|
+
"spec/rdfcore/rdfms-not-id-and-resource-attr/test002.rdf",
|
188
|
+
"spec/rdfcore/rdfms-not-id-and-resource-attr/test004.nt",
|
189
|
+
"spec/rdfcore/rdfms-not-id-and-resource-attr/test004.rdf",
|
190
|
+
"spec/rdfcore/rdfms-not-id-and-resource-attr/test005.nt",
|
191
|
+
"spec/rdfcore/rdfms-not-id-and-resource-attr/test005.rdf",
|
192
|
+
"spec/rdfcore/rdfms-para196/test001.nt",
|
193
|
+
"spec/rdfcore/rdfms-para196/test001.rdf",
|
194
|
+
"spec/rdfcore/rdfms-rdf-id/error001.rdf",
|
195
|
+
"spec/rdfcore/rdfms-rdf-id/error002.rdf",
|
196
|
+
"spec/rdfcore/rdfms-rdf-id/error003.rdf",
|
197
|
+
"spec/rdfcore/rdfms-rdf-id/error004.rdf",
|
198
|
+
"spec/rdfcore/rdfms-rdf-id/error005.rdf",
|
199
|
+
"spec/rdfcore/rdfms-rdf-id/error006.rdf",
|
200
|
+
"spec/rdfcore/rdfms-rdf-id/error007.rdf",
|
201
|
+
"spec/rdfcore/rdfms-rdf-names-use/error-001.rdf",
|
202
|
+
"spec/rdfcore/rdfms-rdf-names-use/error-002.rdf",
|
203
|
+
"spec/rdfcore/rdfms-rdf-names-use/error-003.rdf",
|
204
|
+
"spec/rdfcore/rdfms-rdf-names-use/error-004.rdf",
|
205
|
+
"spec/rdfcore/rdfms-rdf-names-use/error-005.rdf",
|
206
|
+
"spec/rdfcore/rdfms-rdf-names-use/error-006.rdf",
|
207
|
+
"spec/rdfcore/rdfms-rdf-names-use/error-007.rdf",
|
208
|
+
"spec/rdfcore/rdfms-rdf-names-use/error-008.rdf",
|
209
|
+
"spec/rdfcore/rdfms-rdf-names-use/error-009.rdf",
|
210
|
+
"spec/rdfcore/rdfms-rdf-names-use/error-010.rdf",
|
211
|
+
"spec/rdfcore/rdfms-rdf-names-use/error-011.rdf",
|
212
|
+
"spec/rdfcore/rdfms-rdf-names-use/error-012.rdf",
|
213
|
+
"spec/rdfcore/rdfms-rdf-names-use/error-013.rdf",
|
214
|
+
"spec/rdfcore/rdfms-rdf-names-use/error-014.rdf",
|
215
|
+
"spec/rdfcore/rdfms-rdf-names-use/error-015.rdf",
|
216
|
+
"spec/rdfcore/rdfms-rdf-names-use/error-016.rdf",
|
217
|
+
"spec/rdfcore/rdfms-rdf-names-use/error-017.rdf",
|
218
|
+
"spec/rdfcore/rdfms-rdf-names-use/error-018.rdf",
|
219
|
+
"spec/rdfcore/rdfms-rdf-names-use/error-019.rdf",
|
220
|
+
"spec/rdfcore/rdfms-rdf-names-use/error-020.rdf",
|
221
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-001.nt",
|
222
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-001.rdf",
|
223
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-002.nt",
|
224
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-002.rdf",
|
225
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-003.nt",
|
226
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-003.rdf",
|
227
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-004.nt",
|
228
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-004.rdf",
|
229
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-005.nt",
|
230
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-005.rdf",
|
231
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-006.nt",
|
232
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-006.rdf",
|
233
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-007.nt",
|
234
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-007.rdf",
|
235
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-008.nt",
|
236
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-008.rdf",
|
237
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-009.nt",
|
238
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-009.rdf",
|
239
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-010.nt",
|
240
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-010.rdf",
|
241
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-011.nt",
|
242
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-011.rdf",
|
243
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-012.nt",
|
244
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-012.rdf",
|
245
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-013.nt",
|
246
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-013.rdf",
|
247
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-014.nt",
|
248
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-014.rdf",
|
249
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-015.nt",
|
250
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-015.rdf",
|
251
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-016.nt",
|
252
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-016.rdf",
|
253
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-017.nt",
|
254
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-017.rdf",
|
255
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-018.nt",
|
256
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-018.rdf",
|
257
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-019.nt",
|
258
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-019.rdf",
|
259
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-020.nt",
|
260
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-020.rdf",
|
261
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-021.nt",
|
262
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-021.rdf",
|
263
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-022.nt",
|
264
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-022.rdf",
|
265
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-023.nt",
|
266
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-023.rdf",
|
267
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-024.nt",
|
268
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-024.rdf",
|
269
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-025.nt",
|
270
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-025.rdf",
|
271
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-026.nt",
|
272
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-026.rdf",
|
273
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-027.nt",
|
274
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-027.rdf",
|
275
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-028.nt",
|
276
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-028.rdf",
|
277
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-029.nt",
|
278
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-029.rdf",
|
279
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-030.nt",
|
280
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-030.rdf",
|
281
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-031.nt",
|
282
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-031.rdf",
|
283
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-032.nt",
|
284
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-032.rdf",
|
285
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-033.nt",
|
286
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-033.rdf",
|
287
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-034.nt",
|
288
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-034.rdf",
|
289
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-035.nt",
|
290
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-035.rdf",
|
291
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-036.nt",
|
292
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-036.rdf",
|
293
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-037.nt",
|
294
|
+
"spec/rdfcore/rdfms-rdf-names-use/test-037.rdf",
|
295
|
+
"spec/rdfcore/rdfms-rdf-names-use/warn-001.nt",
|
296
|
+
"spec/rdfcore/rdfms-rdf-names-use/warn-001.rdf",
|
297
|
+
"spec/rdfcore/rdfms-rdf-names-use/warn-002.nt",
|
298
|
+
"spec/rdfcore/rdfms-rdf-names-use/warn-002.rdf",
|
299
|
+
"spec/rdfcore/rdfms-rdf-names-use/warn-003.nt",
|
300
|
+
"spec/rdfcore/rdfms-rdf-names-use/warn-003.rdf",
|
301
|
+
"spec/rdfcore/rdfms-reification-required/test001.nt",
|
302
|
+
"spec/rdfcore/rdfms-reification-required/test001.rdf",
|
303
|
+
"spec/rdfcore/rdfms-seq-representation/empty.nt",
|
304
|
+
"spec/rdfcore/rdfms-seq-representation/test001.nt",
|
305
|
+
"spec/rdfcore/rdfms-seq-representation/test001.rdf",
|
306
|
+
"spec/rdfcore/rdfms-seq-representation/test002.nt",
|
307
|
+
"spec/rdfcore/rdfms-seq-representation/test003a.nt",
|
308
|
+
"spec/rdfcore/rdfms-seq-representation/test003b.nt",
|
309
|
+
"spec/rdfcore/rdfms-seq-representation/test004.nt",
|
310
|
+
"spec/rdfcore/rdfms-syntax-incomplete/error001.rdf",
|
311
|
+
"spec/rdfcore/rdfms-syntax-incomplete/error002.rdf",
|
312
|
+
"spec/rdfcore/rdfms-syntax-incomplete/error003.rdf",
|
313
|
+
"spec/rdfcore/rdfms-syntax-incomplete/error004.rdf",
|
314
|
+
"spec/rdfcore/rdfms-syntax-incomplete/error005.rdf",
|
315
|
+
"spec/rdfcore/rdfms-syntax-incomplete/error006.rdf",
|
316
|
+
"spec/rdfcore/rdfms-syntax-incomplete/test001.nt",
|
317
|
+
"spec/rdfcore/rdfms-syntax-incomplete/test001.rdf",
|
318
|
+
"spec/rdfcore/rdfms-syntax-incomplete/test002.nt",
|
319
|
+
"spec/rdfcore/rdfms-syntax-incomplete/test002.rdf",
|
320
|
+
"spec/rdfcore/rdfms-syntax-incomplete/test003.nt",
|
321
|
+
"spec/rdfcore/rdfms-syntax-incomplete/test003.rdf",
|
322
|
+
"spec/rdfcore/rdfms-syntax-incomplete/test004.nt",
|
323
|
+
"spec/rdfcore/rdfms-syntax-incomplete/test004.rdf",
|
324
|
+
"spec/rdfcore/rdfms-uri-substructure/error001.nt",
|
325
|
+
"spec/rdfcore/rdfms-uri-substructure/test001.nt",
|
326
|
+
"spec/rdfcore/rdfms-uri-substructure/test001.rdf",
|
327
|
+
"spec/rdfcore/rdfms-xml-literal-namespaces/test001.nt",
|
328
|
+
"spec/rdfcore/rdfms-xml-literal-namespaces/test001.rdf",
|
329
|
+
"spec/rdfcore/rdfms-xml-literal-namespaces/test002.nt",
|
330
|
+
"spec/rdfcore/rdfms-xml-literal-namespaces/test002.rdf",
|
331
|
+
"spec/rdfcore/rdfms-xmllang/test001.nt",
|
332
|
+
"spec/rdfcore/rdfms-xmllang/test001.rdf",
|
333
|
+
"spec/rdfcore/rdfms-xmllang/test002.nt",
|
334
|
+
"spec/rdfcore/rdfms-xmllang/test002.rdf",
|
335
|
+
"spec/rdfcore/rdfms-xmllang/test003.nt",
|
336
|
+
"spec/rdfcore/rdfms-xmllang/test003.rdf",
|
337
|
+
"spec/rdfcore/rdfms-xmllang/test004.nt",
|
338
|
+
"spec/rdfcore/rdfms-xmllang/test004.rdf",
|
339
|
+
"spec/rdfcore/rdfms-xmllang/test005.nt",
|
340
|
+
"spec/rdfcore/rdfms-xmllang/test005.rdf",
|
341
|
+
"spec/rdfcore/rdfms-xmllang/test006.nt",
|
342
|
+
"spec/rdfcore/rdfms-xmllang/test006.rdf",
|
343
|
+
"spec/rdfcore/rdfms-xmllang/test007a.nt",
|
344
|
+
"spec/rdfcore/rdfms-xmllang/test007b.nt",
|
345
|
+
"spec/rdfcore/rdfms-xmllang/test007c.nt",
|
346
|
+
"spec/rdfcore/rdfs-container-membership-superProperty/not1C.rdf",
|
347
|
+
"spec/rdfcore/rdfs-container-membership-superProperty/not1P.rdf",
|
348
|
+
"spec/rdfcore/rdfs-domain-and-range/nonconclusions005.rdf",
|
349
|
+
"spec/rdfcore/rdfs-domain-and-range/nonconclusions006.rdf",
|
350
|
+
"spec/rdfcore/rdfs-domain-and-range/premises005.rdf",
|
351
|
+
"spec/rdfcore/rdfs-domain-and-range/premises006.rdf",
|
352
|
+
"spec/rdfcore/rdfs-domain-and-range/test001.nt",
|
353
|
+
"spec/rdfcore/rdfs-domain-and-range/test001.rdf",
|
354
|
+
"spec/rdfcore/rdfs-domain-and-range/test002.nt",
|
355
|
+
"spec/rdfcore/rdfs-domain-and-range/test002.rdf",
|
356
|
+
"spec/rdfcore/rdfs-entailment/test001.nt",
|
357
|
+
"spec/rdfcore/rdfs-entailment/test002.nt",
|
358
|
+
"spec/rdfcore/rdfs-no-cycles-in-subClassOf/test001.nt",
|
359
|
+
"spec/rdfcore/rdfs-no-cycles-in-subClassOf/test001.rdf",
|
360
|
+
"spec/rdfcore/rdfs-no-cycles-in-subPropertyOf/test001.nt",
|
361
|
+
"spec/rdfcore/rdfs-no-cycles-in-subPropertyOf/test001.rdf",
|
362
|
+
"spec/rdfcore/rdfs-subClassOf-a-Property/test001.nt",
|
363
|
+
"spec/rdfcore/rdfs-subPropertyOf-semantics/test001.nt",
|
364
|
+
"spec/rdfcore/rdfs-subPropertyOf-semantics/test002.nt",
|
365
|
+
"spec/rdfcore/statement-entailment/test001a.nt",
|
366
|
+
"spec/rdfcore/statement-entailment/test001b.nt",
|
367
|
+
"spec/rdfcore/statement-entailment/test002a.nt",
|
368
|
+
"spec/rdfcore/statement-entailment/test002b.nt",
|
369
|
+
"spec/rdfcore/tex-01/test001.rdf",
|
370
|
+
"spec/rdfcore/tex-01/test002.rdf",
|
371
|
+
"spec/rdfcore/unrecognised-xml-attributes/test001.nt",
|
372
|
+
"spec/rdfcore/unrecognised-xml-attributes/test001.rdf",
|
373
|
+
"spec/rdfcore/unrecognised-xml-attributes/test002.nt",
|
374
|
+
"spec/rdfcore/unrecognised-xml-attributes/test002.rdf",
|
375
|
+
"spec/rdfcore/xml-canon/test001.nt",
|
376
|
+
"spec/rdfcore/xml-canon/test001.rdf",
|
377
|
+
"spec/rdfcore/xmlbase/test001.nt",
|
378
|
+
"spec/rdfcore/xmlbase/test001.rdf",
|
379
|
+
"spec/rdfcore/xmlbase/test002.nt",
|
380
|
+
"spec/rdfcore/xmlbase/test002.rdf",
|
381
|
+
"spec/rdfcore/xmlbase/test003.nt",
|
382
|
+
"spec/rdfcore/xmlbase/test003.rdf",
|
383
|
+
"spec/rdfcore/xmlbase/test004.nt",
|
384
|
+
"spec/rdfcore/xmlbase/test004.rdf",
|
385
|
+
"spec/rdfcore/xmlbase/test006.nt",
|
386
|
+
"spec/rdfcore/xmlbase/test006.rdf",
|
387
|
+
"spec/rdfcore/xmlbase/test007.nt",
|
388
|
+
"spec/rdfcore/xmlbase/test007.rdf",
|
389
|
+
"spec/rdfcore/xmlbase/test008.nt",
|
390
|
+
"spec/rdfcore/xmlbase/test008.rdf",
|
391
|
+
"spec/rdfcore/xmlbase/test009.nt",
|
392
|
+
"spec/rdfcore/xmlbase/test009.rdf",
|
393
|
+
"spec/rdfcore/xmlbase/test010.nt",
|
394
|
+
"spec/rdfcore/xmlbase/test010.rdf",
|
395
|
+
"spec/rdfcore/xmlbase/test011.nt",
|
396
|
+
"spec/rdfcore/xmlbase/test011.rdf",
|
397
|
+
"spec/rdfcore/xmlbase/test013.nt",
|
398
|
+
"spec/rdfcore/xmlbase/test013.rdf",
|
399
|
+
"spec/rdfcore/xmlbase/test014.nt",
|
400
|
+
"spec/rdfcore/xmlbase/test014.rdf",
|
401
|
+
"spec/rdfcore/xmlsch-02/test001.rdf",
|
402
|
+
"spec/rdfcore/xmlsch-02/test002.rdf",
|
403
|
+
"spec/rdfcore/xmlsch-02/test003.rdf",
|
404
|
+
"spec/reader_spec.rb",
|
405
|
+
"spec/spec.opts",
|
406
|
+
"spec/spec_helper.rb",
|
407
|
+
"spec/xml_serializer_spec.rb"
|
408
|
+
]
|
409
|
+
s.homepage = %q{http://github.com/gkellogg/rdf-rdfxml}
|
410
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
411
|
+
s.require_paths = ["lib"]
|
412
|
+
s.rubygems_version = %q{1.3.7}
|
413
|
+
s.summary = %q{RDF/XML reader/writer for RDF.rb.}
|
414
|
+
s.test_files = [
|
415
|
+
"spec/format_spec.rb",
|
416
|
+
"spec/matchers.rb",
|
417
|
+
"spec/rdf_helper.rb",
|
418
|
+
"spec/reader_spec.rb",
|
419
|
+
"spec/spec_helper.rb",
|
420
|
+
"spec/xml_serializer_spec.rb"
|
421
|
+
]
|
422
|
+
|
423
|
+
if s.respond_to? :specification_version then
|
424
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
425
|
+
s.specification_version = 3
|
426
|
+
|
427
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
428
|
+
s.add_runtime_dependency(%q<rdf>, [">= 0.1.6"])
|
429
|
+
s.add_runtime_dependency(%q<nokogiri>, [">= 1.3.3"])
|
430
|
+
s.add_development_dependency(%q<rspec>, [">= 0"])
|
431
|
+
s.add_development_dependency(%q<rdf-spec>, [">= 0"])
|
432
|
+
s.add_development_dependency(%q<activesupport>, [">= 2.3.0"])
|
433
|
+
else
|
434
|
+
s.add_dependency(%q<rdf>, [">= 0.1.6"])
|
435
|
+
s.add_dependency(%q<nokogiri>, [">= 1.3.3"])
|
436
|
+
s.add_dependency(%q<rspec>, [">= 0"])
|
437
|
+
s.add_dependency(%q<rdf-spec>, [">= 0"])
|
438
|
+
s.add_dependency(%q<activesupport>, [">= 2.3.0"])
|
439
|
+
end
|
440
|
+
else
|
441
|
+
s.add_dependency(%q<rdf>, [">= 0.1.6"])
|
442
|
+
s.add_dependency(%q<nokogiri>, [">= 1.3.3"])
|
443
|
+
s.add_dependency(%q<rspec>, [">= 0"])
|
444
|
+
s.add_dependency(%q<rdf-spec>, [">= 0"])
|
445
|
+
s.add_dependency(%q<activesupport>, [">= 2.3.0"])
|
446
|
+
end
|
447
|
+
end
|
448
|
+
|