Example #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 response
Example #2
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'))