Exemplo n.º 1
0
def edit_quads():
    temp_subject = request.form.get('subject')
    temp_predicate = request.form.get('predicate')
    temp_object = request.form.get('object')
    temp_time = request.form.get('time')

    result = update_quads(temp_subject, temp_predicate, temp_object,
                          timestamp=temp_time)
    return json.dumps({"result": result})
Exemplo n.º 2
0
def edit_quads():
    temp_subject = request.form.get('subject')
    temp_predicate = request.form.get('predicate')
    temp_object = request.form.get('object')
    temp_time = request.form.get('time')

    result = update_quads(temp_subject,
                          temp_predicate,
                          temp_object,
                          timestamp=temp_time)
    return json.dumps({"result": result})
Exemplo n.º 3
0
def add_quads():
    temp_subject = request.form.get('subject')
    temp_predicate = request.form.get('predicate')
    temp_object = request.form.get('object')
    temp_time = request.form.get('time')

    # add quads by cayley and then edit attributes by mongodb
    result1 = write_quad(temp_subject, temp_predicate, temp_object)
    result2 = update_quads(temp_subject, temp_predicate, temp_object,
                           timestamp=temp_time)

    return json.dumps({"result": result1 and result2})
Exemplo n.º 4
0
def add_quads():
    temp_subject = request.form.get('subject')
    temp_predicate = request.form.get('predicate')
    temp_object = request.form.get('object')
    temp_time = request.form.get('time')

    # add quads by cayley and then edit attributes by mongodb
    result1 = write_quad(temp_subject, temp_predicate, temp_object)
    result2 = update_quads(temp_subject,
                           temp_predicate,
                           temp_object,
                           timestamp=temp_time)

    return json.dumps({"result": result1 and result2})