|
|
@@ -47,7 +47,6 @@ class SparqlEndpoint(FastAPI):
|
|
|
title: str,
|
|
|
description: str,
|
|
|
version: str,
|
|
|
- example_query: str,
|
|
|
functions: Dict[str, Callable[..., Any]],
|
|
|
graph: Union[Graph, ConjunctiveGraph, Dataset] = ConjunctiveGraph(),
|
|
|
**kwargs: Any,
|
|
|
@@ -58,7 +57,6 @@ class SparqlEndpoint(FastAPI):
|
|
|
self.title = title
|
|
|
self.description = description
|
|
|
self.version = version
|
|
|
- self.example_query = example_query
|
|
|
|
|
|
super().__init__(*args, title=title, description=description, version=version, **kwargs)
|
|
|
rdflib.plugins.sparql.CUSTOM_EVALS["evalCustomFunctions"] = self.eval_custom_functions
|
|
|
@@ -162,7 +160,7 @@ class SparqlEndpoint(FastAPI):
|
|
|
"""Serve YASGUI interface"""
|
|
|
with open(pkg_resources.resource_filename("spendpoint", "yasgui.html")) as f:
|
|
|
html_str = f.read()
|
|
|
- html_str = html_str.replace("$EXAMPLE_QUERY", self.example_query)
|
|
|
+ html_str = html_str.replace("$EXAMPLE_QUERY", "")
|
|
|
return Response(content=html_str, media_type="text/html")
|
|
|
|
|
|
def eval_custom_functions(self, ctx: QueryContext, part: CompValue) -> List[Any]:
|