Package org.openhab.model.items

Examples of org.openhab.model.items.ModelGroupItem


  }

  private Item createItemFromModelItem(ModelItem modelItem) {
    Item item = null;
    if (modelItem instanceof ModelGroupItem) {
      ModelGroupItem modelGroupItem = (ModelGroupItem) modelItem;
      String baseItemType = modelGroupItem.getType();
      GenericItem baseItem = createItemOfType(baseItemType, modelGroupItem.getName());
      if (baseItem != null) {
        ModelGroupFunction function = modelGroupItem.getFunction();
        if (function == null) {
          item = new GroupItem(modelGroupItem.getName(), baseItem);
        } else {
          item = applyGroupFunction(baseItem, modelGroupItem, function);
        }
      } else {
        item = new GroupItem(modelGroupItem.getName());
      }
    } else {
      ModelNormalItem normalItem = (ModelNormalItem) modelItem;
      String itemName = normalItem.getName();
      item = createItemOfType(normalItem.getType(), itemName);
View Full Code Here

TOP

Related Classes of org.openhab.model.items.ModelGroupItem

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.