Пример #1
0
def issue_pages_rdf(request, lccn, date, edition):
    title, issue, page = _get_tip(lccn, date, edition)
    graph = issue_to_graph(issue)
    response = HttpResponse(graph.serialize(base=_rdf_base(request),
                                            include_base=True),
                            content_type='application/rdf+xml')
    return add_cache_tag(response, "lccn=%s" % lccn)
Пример #2
0
def issue_pages_rdf(request, lccn, date, edition):
    title, issue, page = _get_tip(lccn, date, edition)
    graph = issue_to_graph(issue)
    response = HttpResponse(graph.serialize(base=_rdf_base(request),
                                            include_base=True),
                            mimetype='application/rdf+xml')
    return response
Пример #3
0
def issue_pages_rdf(request, lccn, date, edition):
    title, issue, page = _get_tip(lccn, date, edition)
    graph = issue_to_graph(issue)
    response = HttpResponse(graph.serialize(base=_rdf_base(request),
                                            include_base=True),
                            content_type='application/rdf+xml')
    return add_cache_tag(response, "lccn=%s" % lccn)
Пример #4
0
def issue_pages_rdf(request, lccn, date, edition):
    title, issue, page = _get_tip(lccn, date, edition)
    graph = issue_to_graph(issue)
    response = HttpResponse(graph.serialize(base=_rdf_base(request),
                                            include_base=True),
                            mimetype='application/rdf+xml')
    return response
Пример #5
0
 def test_issue(self):
     i = Issue.objects.get(id=1)
     g = rdf.issue_to_graph(i)
     u = URIRef('/lccn/sn83030214/1898-01-01/ed-1#issue')
     _xsd_date = URIRef('http://www.w3.org/2001/XMLSchema#date')
     _issued = Literal('1898-01-01', datatype=_xsd_date)
     self.assertEqual(g.value(u, DCTERMS['issued']), _issued)
     self.assertEqual(g.value(u, ORE.isDescribedBy),
                      URIRef('/lccn/sn83030214/1898-01-01/ed-1.rdf'))
Пример #6
0
 def test_issue(self):
     i = Issue.objects.get(id=1)
     g = rdf.issue_to_graph(i)
     u = URIRef('/lccn/sn83030214/1898-01-01/ed-1#issue')
     _xsd_date = URIRef('http://www.w3.org/2001/XMLSchema#date')
     _issued = Literal('1898-01-01', datatype=_xsd_date)
     self.assertEqual(g.value(u, DCTERMS['issued']), _issued)
     self.assertEqual(g.value(u, ORE.isDescribedBy),
                      URIRef('/lccn/sn83030214/1898-01-01/ed-1.rdf'))