Example #1
0
def batch_rdf(request, batch_name):
    batch = get_object_or_404(models.Batch, name=batch_name)
    graph = batch_to_graph(batch)
    response = HttpResponse(graph.serialize(base=_rdf_base(request),
                                            include_base=True),
                            content_type='application/rdf+xml')
    return response
Example #2
0
def batch_rdf(request, batch_name):
    batch = get_object_or_404(models.Batch, name=batch_name)
    graph = batch_to_graph(batch)
    response = HttpResponse(graph.serialize(base=_rdf_base(request),
                                            include_base=True),
                            content_type='application/rdf+xml')
    return response
Example #3
0
 def test_batch(self):
     b = Batch.objects.get(name='batch_curiv_ahwahnee_ver01')
     g = rdf.batch_to_graph(b)
     u = URIRef('/batches/batch_curiv_ahwahnee_ver01#batch')
     self.assertEqual(g.value(u, RDF.type), NDNP['Batch'])
Example #4
0
 def test_batch(self):
     b = Batch.objects.get(name='batch_curiv_ahwahnee_ver01')
     g = rdf.batch_to_graph(b)
     u = URIRef('/batches/batch_curiv_ahwahnee_ver01#batch')
     self.assertEqual(g.value(u, RDF.type), NDNP['Batch'])