Example #1
0
def get_graph_by_wildcard(space, subject, predicate, obj):
    """read({space},{template})"""
    from otsopy.network.communication.view.wildcards import http_arguments_to_wildcard_template, render_wildcard_graph
    template = http_arguments_to_wildcard_template( subject, predicate, obj )
    #return "let's see: %s" % str(template)
    read_graph = app.kernel.read_template( template, space )
    return render_wildcard_graph( space, read_graph )
Example #2
0
def get_triples_by_wildcard(space, subject, predicate, obj):
    """query({space},{template})"""
    from otsopy.network.communication.view.wildcards import http_arguments_to_wildcard_template
    from otsopy.network.communication.view.query import render_results
    template = http_arguments_to_wildcard_template( subject, predicate, obj )
    triples_result = app.kernel.query( template, space )
    return render_results( triples_result )