Sha256: b129f575e5fd1274a0d06ffa53df8de1dad6bf593c527d15ff65acbc5de8796e
Contents?: true
Size: 1.36 KB
Versions: 4
Compression:
Stored size: 1.36 KB
Contents
#!/usr/bin/env ruby require 'rdf' require 'rdf/n3' doc = %q( @prefix dms: <http://example.stanford.edu/ns/> . @prefix ore: <http://www.openarchives.org/ore/terms/> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . <http://dmstech.groups.stanford.edu/ccc001/manifest/NormalSequence> a dms:Sequence, ore:Aggregation, rdf:List; ore:aggregates ( <http://example.stanford.edu/item/DOC001/fob> <http://example.stanford.edu/item/DOC001/fib> <http://example.stanford.edu/item/DOC001/iR> <http://example.stanford.edu/item/DOC001/iV> <http://example.stanford.edu/item/DOC001/iiR> <http://example.stanford.edu/item/DOC001/iiV> <http://example.stanford.edu/item/DOC001/1R> <http://example.stanford.edu/item/DOC001/1V> <http://example.stanford.edu/item/DOC001/2R> <http://example.stanford.edu/item/DOC001/2V> <http://example.stanford.edu/item/DOC001/iiiR> <http://example.stanford.edu/item/DOC001/iiiV> <http://example.stanford.edu/item/DOC001/ivR> <http://example.stanford.edu/item/DOC001/ivV> <http://example.stanford.edu/item/DOC001/bib> <http://example.stanford.edu/item/DOC001/bob> ) . ) r = RDF::N3::Reader.new(doc) g = RDF::Graph.new << r puts "NTriples Representation" puts g.dump(:ntriples) puts "Turtle/N3 Representation" puts g.dump(:n3, :prefixes => r.prefixes)
Version data entries
4 entries across 4 versions & 1 rubygems