Esempio n. 1
0
def prov(request):
    """
        a view that will call all the methods for creating and persisting provenance graphs for each action
    """
    
    provManager = ProvManager()
    post = request.POST
    if post['actionPerformed'] == 'tripCreation':
        bundle = provManager.createTripCreationGraph(post['userName'], post['userEmail'], post['tripId'],\
                                                      simplejson.loads(post['tripLegIds']), post['startTime'], post['endTime'])
        trip = models.Trip.objects.get(id=post['tripId'])
        trip.provBundle = bundle
        trip.save()
        
    json = simplejson.dumps( {'status': 'OK'} )
    
    return HttpResponse(json, mimetype='application/json')