parent.forceAddChild(node);
}
}
public boolean checkLocalFilter(String sessionId, String axisHierarchyId, String viewId, String axisId, String filterPaths, XElementNode [] visibleElements, boolean displayLeft) throws SessionExpiredException, PaloGwtCoreException {
AxisHierarchy axisHierarchy = toNative(sessionId, axisHierarchyId, viewId, axisId);
if (axisHierarchy == null) {
return false;
}
ElementNode [] initialLocalFilter = axisHierarchy.getLocalFilter() == null ? null :
axisHierarchy.getLocalFilter().getVisibleElements();
if (visibleElements != null && visibleElements.length > 0) {
// String path = xAxisHierarchy.getProperty("filterPaths");
updateLocalFilter(axisHierarchy, visibleElements);
if (filterPaths != null) {
axisHierarchy.addProperty(new Property<String>("filterPaths", filterPaths));
} else {
axisHierarchy.removeProperty(new Property<String>("filterPaths", ""));
}
}
if (axisHierarchy.getLocalFilter() == null) {
updateLocalFilter(axisHierarchy, initialLocalFilter);
return false;
}
ElementNode [] nodes = axisHierarchy.getLocalFilter().getVisibleElements();
String [] allPaths = null;
if (axisHierarchy.getProperty("filterPaths") != null) {
String filterPath = (String) axisHierarchy.getProperty("filterPaths").getValue();
if (filterPath != null) {
allPaths = filterPath.split(",");
}
}
if (nodes == null || nodes.length == 0) {
updateLocalFilter(axisHierarchy, initialLocalFilter);
return false;
}
pathCounter = 0;
boolean result;
if (axisHierarchy.getSubset() == null) {
result = tryToMatch(nodes, nodes, axisHierarchy.getHierarchy().getElementsTree(), axisHierarchy.getHierarchy(), allPaths, displayLeft);
} else {
result = tryToMatch(nodes, nodes, axisHierarchy.getSubset().getRootNodes(), axisHierarchy.getHierarchy(), allPaths, displayLeft);
}
updateLocalFilter(axisHierarchy, initialLocalFilter);
return result;
}