Sha256: 197153f989135b410f1f7db6016134d191ebcb7640e5770049f9624c3468fac5
Contents?: true
Size: 733 Bytes
Versions: 47
Compression:
Stored size: 733 Bytes
Contents
module Hydra module ContentNegotiation def self.extended(document) document.will_export_as(:nt, "application/n-triples") document.will_export_as(:jsonld, "application/ld+json") document.will_export_as(:ttl, "text/turtle") end def export_as_nt clean_graph.dump(:ntriples) end def export_as_jsonld clean_graph.dump(:jsonld, :standard_prefixes => true) end def export_as_ttl clean_graph.dump(:ttl) end private def clean_graph @clean_graph ||= clean_graph_repository.find(id) end def clean_graph_repository CleanGraphRepository.new(connection) end def connection ActiveFedora.fedora.clean_connection end end end
Version data entries
47 entries across 47 versions & 1 rubygems