def rdf_conceptscheme_export_turtle(self): graph = utils.rdf_conceptscheme_dumper(self.provider) response = Response(content_type='text/turtle') response.body = graph.serialize(format='turtle') response.content_disposition = 'attachment; filename="%s.ttl"' % (str( self.scheme_id), ) return response
def rdf_conceptscheme_export(self): graph = utils.rdf_conceptscheme_dumper(self.provider) response = Response(content_type='application/rdf+xml') response.body = graph.serialize(format='xml') response.content_disposition = 'attachment; filename="%s.rdf"' % (str( self.scheme_id), ) return response
def test_dump_conceptscheme_tree_to_rdf(self): graph_dump = utils.rdf_conceptscheme_dumper(self.tree_provider) cs = URIRef('http://id.trees.org') assert (cs, RDF.type, SKOS.ConceptScheme) in graph_dump assert (cs, SKOS.definition, Literal('<p xml:lang="en">Trees as used by Monthy Python.</p>', datatype=RDF.HTML)) in graph_dump assert (cs, SKOS.prefLabel, Literal('Pythonic trees.', lang='en')) in graph_dump
def rdf_conceptscheme_export_turtle(self): graph = utils.rdf_conceptscheme_dumper(self.provider) response = Response(content_type='text/turtle') response.body = graph.serialize(format='turtle') response.content_disposition = 'attachment; filename="%s.ttl"' % (str(self.scheme_id),) return response
def rdf_conceptscheme_export(self): graph = utils.rdf_conceptscheme_dumper(self.provider) response = Response(content_type='application/rdf+xml') response.body = graph.serialize(format='xml') response.content_disposition = 'attachment; filename="%s.rdf"' % (str(self.scheme_id),) return response