我有一个脚本,当我在graphdb的本地实例中运行它时。
但是当我尝试在https://cloud.ontotext.com/的在线graphdb上使用它时,我得到一个org.eclipse.rdf4j.query.QueryEvaluationException
,但没有任何内容表明导致它的脚本的哪个部分。
本地脚本的唯一变化是
SERVICE <https://rdf.ontotext.com/4136450524/pedtermsDB/repositories/pedagogyrepo>{
是
SERVICE <http://localhost:7200/rdf-bridge/1967855032375>{
感谢任何帮助。
剧本:
PREFIX spif: <http://spinrdf.org/spif#>
PREFIX pdb:<http://example.org/pedtermsDB/>
# CLEAR GRAPH <http://example.org/pedtermsDB/>
# INSERT query that maps the raw RDF data from OntoRefine to user-specified
# RDF data (different IRIs, types, property names and dates as date-typed literals)
# and inserts the data into the current GraphDB repository.
INSERT { graph <http://example.org/pedtermsDB/> {
?subtermIRI a pdb:SubTerm ;
pdb:label ?subterm;
pdb:replyList ?sb_id;
pdb:hasParent ?termIRI.
?termIRI a pdb:Term ;
pdb:label ?term;
pdb:replyList ?sb_id;
pdb:topic ?topicIRI.
?topicIRI a pdb:Topic;
pdb:label ?topic;
pdb:mapping ?sb_topic;
pdb:replyList ?sb_id;
pdb:subject ?subjectIRI.
# ?sb_topicIRI a pdb:StudyBotTopic;
# pdb:mapping ?term;
# pdb:label ?sb_topic.
?subjectIRI a pdb:Subject ;
pdb:label ?subject;
pdb:field ?fieldIRI.
?fieldIRI a pdb:Field;
pdb:label ?field;
pdb:faculty ?facultyIRI.
?facultyIRI a pdb:Faculty;
pdb:label ?faculty;
}
} where {
# Uses SERVICE to fetch the raw RDF data from OntoRefine
SERVICE <https://rdf.ontotext.com/4136450524/pedtermsDB/repositories/pedagogyrepo>{
?termRow a pdb:Row;
pdb:rowNumber ?termRowNumber.
OPTIONAL {?termRow pdb:term ?term}
OPTIONAL {?termRow pdb:sb_id ?sb_id}
OPTIONAL {?termRow pdb:sb_topic ?sb_topic}
OPTIONAL {?termRow pdb:subterm ?subterm}
OPTIONAL {?termRow pdb:topic ?topic}
?termRow pdb:subject ?subject.
?termRow pdb:field ?field.
?termRow pdb:faculty ?faculty.
BIND(iri(concat("http://example.org/pedtermsDB/terms/", ?term)) as ?termIRI)
BIND(iri(concat("http://example.org/pedtermsDB/subterms/", ?subterm)) as ?subtermIRI)
# BIND(iri(concat("http://example.org/pedtermsDB/studybotTopics/", ?sb_topic)) as ?sb_topicIRI)
# BIND(IF(?topic=?term,iri(concat("http://example.org/pedtermsDB/topics/", ?topic)),"") as ?topicIRI)
BIND(iri(concat("http://example.org/pedtermsDB/topics/", ?topic)) as ?topicIRI)
BIND(iri(concat("http://example.org/pedtermsDB/subjects/", ?subject)) as ?subjectIRI)
BIND(iri(concat("http://example.org/pedtermsDB/fields/", ?field)) as ?fieldIRI)
BIND(iri(concat("http://example.org/pedtermsDB/faculties/", ?faculty)) as ?facultyIRI)
}
}
答案 0 :(得分:1)
您的查询中混合了两种不同类型的SPARQL端点:
GraphDB端点 - 为索引的RDF三元组提供服务的存储库端点:
OntoRefine端点 - 用于提供OpenRefine内部表格模型的虚拟端点
您必须通过Workbench界面找到云上正确的OntoRefine端点。