in core/src/main/java/org/apache/sdap/mudrod/weblog/structure/session/SessionTree.java [194:241]
public List<ClickStream> getClickStreamList(Properties props) {
List<ClickStream> clickthroughs = new ArrayList<>();
List<SessionNode> viewnodes = this.getViewNodes(this.root);
for (SessionNode viewnode : viewnodes) {
SessionNode parent = viewnode.getParent();
List<SessionNode> children = viewnode.getChildren();
if (!MudrodConstants.SEARCH_MARKER.equals(parent.getKey())) {
continue;
}
RequestUrl requestURL = new RequestUrl();
String viewquery = "";
try {
String infoStr = requestURL.getSearchInfo(viewnode.getRequest());
viewquery = es.customAnalyzing(props.getProperty(MudrodConstants.ES_INDEX_NAME), infoStr);
} catch (UnsupportedEncodingException | InterruptedException | ExecutionException e) {
LOG.warn("Exception getting search info. Ignoring...", e);
if (e instanceof InterruptedException) {
Thread.currentThread().interrupt();
}
}
String dataset = viewnode.getDatasetId();
boolean download = false;
for (SessionNode child : children) {
if ("ftp".equals(child.getKey())) {
download = true;
break;
}
}
if (viewquery != null && !"".equals(viewquery)) {
String[] queries = viewquery.trim().split(",");
if (queries.length > 0) {
for (String query : queries) {
ClickStream data = new ClickStream(query, dataset, download);
data.setSessionId(this.sessionID);
data.setType(this.cleanupType);
clickthroughs.add(data);
}
}
}
}
return clickthroughs;
}