Example #1
0
 /**
  * Export to Map from DimsDataList
  *
  * @return
  */
 public Map<Integer, String> toMap() {
   final Map<Integer, String> ret = new HashMap<Integer, String>(size());
   for (DimsData dd : iterable()) {
     if (dd.isSlice()) {
       ret.put(dd.getDimension(), String.valueOf(dd.getSlice()));
     } else if (dd.isTextRange()) {
       ret.put(dd.getDimension(), dd.getSliceRange() != null ? dd.getSliceRange() : "all");
     } else if (dd.getPlotAxis() != null) {
       ret.put(dd.getDimension(), dd.getPlotAxis().getName());
     }
   }
   return ret;
 }
Example #2
0
  public void removeLargeStacks(ISliceSystem slicingSystem, int maxStack) {

    for (DimsData dd : getDimsData()) {
      if (dd.getPlotAxis().isStack(slicingSystem)) {
        if (dd.getSliceRange(true) == null
            || "".equals(dd.getSliceRange(true))
            || "all".equals(dd.getSliceRange(true))) {
          final ILazyDataset lz = slicingSystem.getData().getLazySet();
          if (lz != null) {
            final int size = lz.getShape()[dd.getDimension()];
            if (size >= maxStack) { // We set a default slice
              dd.setSliceRange("0:25");
            }
          }
        }
      }
    }
  }
Example #3
0
 public boolean isRangeDefined() {
   for (DimsData data : iterable()) {
     if (data.getSliceRange() != null) return true;
   }
   return false;
 }