use of query.statistics.NonSimplePropertyPathVisitor in project QueryAnalysis by Wikidata.
the class OpenRDFQueryHandler method computeNonSimplePropertyPaths.
@Override
protected final void computeNonSimplePropertyPaths() {
if (getValidityStatus() != QueryHandler.Validity.VALID) {
this.nonSimplePropertyPaths = getValidityStatus().toString();
return;
}
try {
ASTQueryContainer qc = new StandardizingSPARQLParser().getASTQueryContainerPrefixesProcessed(getQueryString(), BASE_URI);
Set<String> nonSimplePropertyPaths = new NonSimplePropertyPathVisitor().getNonSimplePropertyPaths(qc);
this.nonSimplePropertyPaths = this.computeAnyIDString(nonSimplePropertyPaths);
if (this.nonSimplePropertyPaths.equals("")) {
this.nonSimplePropertyPaths = "NONE";
}
} catch (VisitorException | MalformedQueryException e) {
this.nonSimplePropertyPaths = "INTERNAL_ERROR";
logger.error("Unexpected error while calculating non-simple property paths.", e);
}
}
Aggregations