Пример #1
0
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
	""")
Пример #2
0
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
	""")
Пример #3
0
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)
	  }
	}""")
Пример #4
0
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)
	  }
	}"""
    )
Пример #5
0
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)
	  }
	}""")
Пример #6
0
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)
	  }
	}"""
    )
Пример #7
0
def get_object_literals():  # Verified
    return endpoint.query("""SELECT ?s ?p ?o WHERE {?s ?p ?o FILTER  ISLITERAL(?o)}""")
Пример #8
0
def get_all_triples():  # Verified
    return endpoint.query("""SELECT * {?s ?p ?o}""")
Пример #9
0
def get_object_literals():  #Verified
    return endpoint.query(
        """SELECT ?s ?p ?o WHERE {?s ?p ?o FILTER  ISLITERAL(?o)}""")
Пример #10
0
def get_all_triples():  #Verified
    return endpoint.query("""SELECT * {?s ?p ?o}""")