Beispiel #1
0
 @Override
 public IAttribute findAttributeIgnoreCase(String name) {
   if (attributes != null) {
     for (IAttribute attribute : attributes) {
       if (StringUtils.isSameStringIgnoreCase(name, attribute.getName())) {
         return attribute;
       }
     }
   }
   return null;
 }
Beispiel #2
0
  @Override
  public void setDimensions(String dimString) {
    IGroup parent = getParentGroup();

    List<String> dimNames = java.util.Arrays.asList(dimString.split(" "));
    List<IDataItem> items = parent.getDataItemList();

    for (IDataItem item : items) {
      IAttribute attr = item.getAttribute("axis");
      if (attr != null) {
        try {
          IDimension dim =
              new BasicDimension(item.getName(), item.getData(), false, item.isUnlimited(), false);
          if ("*".equals(dimString)) {
            setDimension(dim, attr.getNumericValue().intValue());
          } else if (dimNames.contains(attr.getName())) {
            setDimension(dim, attr.getNumericValue().intValue());
          }
        } catch (IOException e) {
          e.printStackTrace();
        }
      }
    }
  }
Beispiel #3
0
 @Override
 public boolean removeAttribute(final IAttribute a) {
   boolean result = true;
   attributeMap.remove(a.getName());
   return result;
 }
Beispiel #4
0
 @Override
 public void addOneAttribute(final IAttribute attribute) {
   attributeMap.put(attribute.getName(), attribute);
 }