def last_user(): return endpoint.query(""" PREFIX user: <https://github.com/superphy#User> PREFIX RDF_type: <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> SELECT ?s WHERE { ?s RDF_type: user: } ORDER BY DESC(?s) LIMIT 1 """)
def get_all_literals(): return endpoint.query(""" SELECT ?s ?p ?o WHERE {d {?s ?p ?o FILTER ISLITERAL(?o) } UNION {?s ?p ?o FILTER ISLITERAL(?p) } UNION {?s ?p ?o FILTER ISLITERAL(?s) } }""")
def get_all_literals(): return endpoint.query( """ SELECT ?s ?p ?o WHERE {d {?s ?p ?o FILTER ISLITERAL(?o) } UNION {?s ?p ?o FILTER ISLITERAL(?p) } UNION {?s ?p ?o FILTER ISLITERAL(?s) } }""" )
def get_all_uri_triples(): return endpoint.query(""" SELECT ?s ?p ?o WHERE { {?s ?p ?o} MINUS {?s ?p ?o FILTER ISLITERAL(?o) } MINUS { FILTER ISLITERAL(?p) } MINUS { FILTER ISLITERAL(?s) } }""")
def get_all_uri_triples(): return endpoint.query( """ SELECT ?s ?p ?o WHERE { {?s ?p ?o} MINUS {?s ?p ?o FILTER ISLITERAL(?o) } MINUS { FILTER ISLITERAL(?p) } MINUS { FILTER ISLITERAL(?s) } }""" )
def get_object_literals(): # Verified return endpoint.query("""SELECT ?s ?p ?o WHERE {?s ?p ?o FILTER ISLITERAL(?o)}""")
def get_all_triples(): # Verified return endpoint.query("""SELECT * {?s ?p ?o}""")
def get_object_literals(): #Verified return endpoint.query( """SELECT ?s ?p ?o WHERE {?s ?p ?o FILTER ISLITERAL(?o)}""")
def get_all_triples(): #Verified return endpoint.query("""SELECT * {?s ?p ?o}""")