Esempio n. 1
0
 /** Returns the dimension IDs, in order of tree level, to this node. */
 public List<Integer> getPathDimensions() {
   StarTreeIndexNode current = this;
   List<Integer> dimensions = new LinkedList<Integer>();
   while (current != null && current.getParent() != null) {
     dimensions.add(0, current.getDimensionName());
     current = current.getParent();
   }
   return dimensions;
 }
Esempio n. 2
0
 /** Returns the dimension values, in order of tree level, to this node. */
 public Map<Integer, Integer> getPathValues() {
   StarTreeIndexNode current = this;
   Map<Integer, Integer> values = new HashMap<Integer, Integer>();
   while (current != null && current.getParent() != null) {
     values.put(current.getDimensionName(), current.getDimensionValue());
     current = current.getParent();
   }
   return values;
 }
Esempio n. 3
0
 @Override
 public boolean equals(Object o) {
   if (!(o instanceof StarTreeIndexNode)) {
     return false;
   }
   StarTreeIndexNode n = (StarTreeIndexNode) o;
   return Objects.equal(nodeId, n.getNodeId())
       && Objects.equal(level, n.getLevel())
       && Objects.equal(dimensionName, n.getDimensionName())
       && Objects.equal(dimensionValue, n.getDimensionValue())
       && Objects.equal(childDimensionName, n.getChildDimensionName())
       && Objects.equal(children, n.getChildren())
       && Objects.equal(startDocumentId, n.getStartDocumentId())
       && Objects.equal(documentCount, n.getDocumentCount());
 }