コード例 #1
0
ファイル: reports.py プロジェクト: MaximilianoR/open-oni
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
コード例 #2
0
ファイル: reports.py プロジェクト: open-oni/open-oni
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
コード例 #3
0
ファイル: test_rdf.py プロジェクト: alyasamba/open-oni
 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'])
コード例 #4
0
ファイル: test_rdf.py プロジェクト: open-oni/open-oni
 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'])