如果有以下SPARQL查詢一個問題:耶拿/ ARQ:查詢處理卡住
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX :<http://www.test.at/DA.owl#>
SELECT ?ModuleName ?SLAName ?SLOName ?SLOTypeName ?SLOTHV (AVG(DISTINCT ?SLTTV) AS ?AVGTrackValue) (COUNT(DISTINCT ?SLT) AS ?SLTCOUNT)
WHERE {
?Module rdf:type :ServiceModule .
?SLA rdf:type :ServiceLevelAgreement.
?SLO rdf:type :ServiceLevelObjective .
?SLT rdf:type :ServiceLevelTracking .
?Day rdf:type :Day .
?Holiday rdf:type :Holiday .
?rel1 rdf:type :RelationFact .
?rel2 rdf:type :RelationFact .
?rel3 rdf:type :RelationFact .
?rel4 rdf:type :RelationFact .
?rel5 rdf:type :RelationFact .
?Module :hasName ?ModuleName .
?SLA :hasName ?SLAName .
?SLO :hasName ?SLOName .
?SLO :hasType ?SLOType .
?SLO :hasThresholdValue ?SLOTHV .
?SLOType :hasName ?SLOTypeName .
?SLT :hasDayName ?SLTDayName .
?SLT :hasType ?SLTType .
?SLT :hasTrackedDateTime ?trackTime .
?SLT :hasTrackedValue ?SLTTV .
?Day :hasDayName ?DayName .
?Holiday :hasDate ?HolidayDate .
?Holiday :hasStartTime ?HolidayStartTime .
?Holiday :hasEndTime ?HolidayEndTime .
?rel1 :hasParent ?Module .
?rel1 :hasChild ?SLA .
?rel2 :hasParent ?Module.
?rel2 :hasChild ?SLT .
?rel3 :hasParent ?SLA .
?rel3 :hasChild ?SLO .
?rel4 :hasParent ?SLA .
?rel4 :hasChild ?Day .
?rel5 :hasParent ?SLA .
?rel5 :hasChild ?Holiday .
Filter(regex(str(?ModuleName), "E-mail")) .
Filter(?SLOType = ?SLTType) .
Filter(xsd:dateTime(?trackTime) >= xsd:dateTime("2012-08-15T12:00:00") && ?trackTime < xsd:dateTime("2012-08-15T13:00:00")) .
Filter(?DayName = ?SLTDayName || (xsd:dateTime("2012-08-15T00:00:00") = ?HolidayDate && xsd:dateTime(?trackTime) >= xsd:dateTime("2012-08-15T12:00:00") && xsd:dateTime(?trackTime) < xsd:dateTime("2012-08-15T14:00:00")))
}
GROUP BY ?ModuleName ?SLAName ?SLOName ?SLOTypeName ?SLOTHV
HAVING (?AVGTrackValue < ?SLOTHV)
隨着potégé4.2此查詢工作沒有任何問題,並在1秒內返回結果。此外,使用SPARQLer Query Validator(http://www.sparql.org/query-validator.html)進行的語法檢查表明SPARQL查詢是有效的。但是對於jena arq引擎,查詢處理在等待結果集時一直處於卡住狀態。我與耶拿-ARQ-2.9.1試圖從命令行還與follwing代碼的Java應用程序:
Query q = QueryFactory.create(queryString);
QueryExecution qexec = QueryExecutionFactory.create(q, currentOntologyModel);
try {
ResultSet results = qexec.execSelect();
while (results.hasNext()) {
QuerySolution soln = results.nextSolution();
.
.
.
<some other code>
.
.
.
}
}
} finally {
qexec.close();
}
也許有人有一個想法是什麼問題。