Update sitemap model imports (#138)

Signed-off-by: Wouter Born <github@maindrain.net>
pull/139/head
Wouter Born 2019-11-07 17:22:10 +01:00 committed by Kai Kreuzer
parent bd9b5db691
commit c101937616
39 changed files with 118 additions and 117 deletions

View File

@ -29,7 +29,7 @@ import org.eclipse.smarthome.core.i18n.LocaleProvider;
import org.eclipse.smarthome.core.i18n.TranslationProvider;
import org.eclipse.smarthome.core.library.types.QuantityType;
import org.eclipse.smarthome.core.types.State;
import org.eclipse.smarthome.model.sitemap.Widget;
import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.openhab.ui.basic.internal.WebAppActivator;
import org.openhab.ui.basic.internal.WebAppConfig;

View File

@ -19,8 +19,8 @@ import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.core.items.GroupItem;
import org.eclipse.smarthome.core.items.Item;
import org.eclipse.smarthome.core.items.ItemNotFoundException;
import org.eclipse.smarthome.model.sitemap.Chart;
import org.eclipse.smarthome.model.sitemap.Widget;
import org.eclipse.smarthome.model.sitemap.sitemap.Chart;
import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.openhab.ui.basic.internal.WebAppConfig;
import org.openhab.ui.basic.render.RenderException;

View File

@ -16,8 +16,8 @@ import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.core.library.types.HSBType;
import org.eclipse.smarthome.core.types.State;
import org.eclipse.smarthome.model.sitemap.Colorpicker;
import org.eclipse.smarthome.model.sitemap.Widget;
import org.eclipse.smarthome.model.sitemap.sitemap.Colorpicker;
import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.openhab.ui.basic.internal.servlet.WebAppServlet;
import org.openhab.ui.basic.render.RenderException;

View File

@ -18,8 +18,8 @@ import java.util.List;
import org.apache.commons.lang.StringEscapeUtils;
import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.model.sitemap.Frame;
import org.eclipse.smarthome.model.sitemap.Widget;
import org.eclipse.smarthome.model.sitemap.sitemap.Frame;
import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.openhab.ui.basic.render.RenderException;
import org.openhab.ui.basic.render.WidgetRenderer;

View File

@ -14,8 +14,8 @@ package org.openhab.ui.basic.internal.render;
import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.model.sitemap.Group;
import org.eclipse.smarthome.model.sitemap.Widget;
import org.eclipse.smarthome.model.sitemap.sitemap.Group;
import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.openhab.ui.basic.render.RenderException;
import org.openhab.ui.basic.render.WidgetRenderer;

View File

@ -19,8 +19,8 @@ import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.core.library.types.RawType;
import org.eclipse.smarthome.core.library.types.StringType;
import org.eclipse.smarthome.core.types.State;
import org.eclipse.smarthome.model.sitemap.Image;
import org.eclipse.smarthome.model.sitemap.Widget;
import org.eclipse.smarthome.model.sitemap.sitemap.Image;
import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.openhab.ui.basic.render.RenderException;
import org.openhab.ui.basic.render.WidgetRenderer;

View File

@ -14,8 +14,8 @@ package org.openhab.ui.basic.internal.render;
import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.model.sitemap.List;
import org.eclipse.smarthome.model.sitemap.Widget;
import org.eclipse.smarthome.model.sitemap.sitemap.List;
import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.openhab.ui.basic.render.RenderException;
import org.openhab.ui.basic.render.WidgetRenderer;

View File

@ -16,8 +16,8 @@ import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.core.library.types.PointType;
import org.eclipse.smarthome.core.types.State;
import org.eclipse.smarthome.model.sitemap.Mapview;
import org.eclipse.smarthome.model.sitemap.Widget;
import org.eclipse.smarthome.model.sitemap.sitemap.Mapview;
import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.openhab.ui.basic.render.RenderException;
import org.openhab.ui.basic.render.WidgetRenderer;

View File

@ -22,10 +22,10 @@ import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.smarthome.core.i18n.LocaleProvider;
import org.eclipse.smarthome.core.i18n.TranslationProvider;
import org.eclipse.smarthome.model.sitemap.Frame;
import org.eclipse.smarthome.model.sitemap.Sitemap;
import org.eclipse.smarthome.model.sitemap.SitemapProvider;
import org.eclipse.smarthome.model.sitemap.Widget;
import org.eclipse.smarthome.model.sitemap.sitemap.Frame;
import org.eclipse.smarthome.model.sitemap.sitemap.Sitemap;
import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.openhab.ui.basic.internal.WebAppConfig;
import org.openhab.ui.basic.internal.servlet.WebAppServlet;
@ -136,7 +136,7 @@ public class PageRenderer extends AbstractWidgetRenderer {
EObject firstChild = children.get(0);
EObject parent = itemUIRegistry.getParent((Widget) firstChild);
if (!(firstChild instanceof Frame || parent instanceof Frame || parent instanceof Sitemap
|| parent instanceof org.eclipse.smarthome.model.sitemap.List)) {
|| parent instanceof org.eclipse.smarthome.model.sitemap.sitemap.List)) {
String frameSnippet = getSnippet("frame");
frameSnippet = StringUtils.replace(frameSnippet, "%widget_id%", "");
frameSnippet = StringUtils.replace(frameSnippet, "%label%", "");

View File

@ -23,9 +23,9 @@ import org.eclipse.smarthome.core.types.State;
import org.eclipse.smarthome.core.types.StateDescription;
import org.eclipse.smarthome.core.types.StateOption;
import org.eclipse.smarthome.core.types.util.UnitUtils;
import org.eclipse.smarthome.model.sitemap.Mapping;
import org.eclipse.smarthome.model.sitemap.Selection;
import org.eclipse.smarthome.model.sitemap.Widget;
import org.eclipse.smarthome.model.sitemap.sitemap.Mapping;
import org.eclipse.smarthome.model.sitemap.sitemap.Selection;
import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.openhab.ui.basic.render.RenderException;
import org.openhab.ui.basic.render.WidgetRenderer;

View File

@ -18,8 +18,8 @@ import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.core.library.types.DecimalType;
import org.eclipse.smarthome.core.types.State;
import org.eclipse.smarthome.model.sitemap.Setpoint;
import org.eclipse.smarthome.model.sitemap.Widget;
import org.eclipse.smarthome.model.sitemap.sitemap.Setpoint;
import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.openhab.ui.basic.render.RenderException;
import org.openhab.ui.basic.render.WidgetRenderer;

View File

@ -14,8 +14,8 @@ package org.openhab.ui.basic.internal.render;
import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.model.sitemap.Slider;
import org.eclipse.smarthome.model.sitemap.Widget;
import org.eclipse.smarthome.model.sitemap.sitemap.Slider;
import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.openhab.ui.basic.render.RenderException;
import org.openhab.ui.basic.render.WidgetRenderer;

View File

@ -26,9 +26,9 @@ import org.eclipse.smarthome.core.types.State;
import org.eclipse.smarthome.core.types.StateDescription;
import org.eclipse.smarthome.core.types.StateOption;
import org.eclipse.smarthome.core.types.util.UnitUtils;
import org.eclipse.smarthome.model.sitemap.Mapping;
import org.eclipse.smarthome.model.sitemap.Switch;
import org.eclipse.smarthome.model.sitemap.Widget;
import org.eclipse.smarthome.model.sitemap.sitemap.Mapping;
import org.eclipse.smarthome.model.sitemap.sitemap.Switch;
import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.openhab.ui.basic.render.RenderException;
import org.openhab.ui.basic.render.WidgetRenderer;

View File

@ -14,8 +14,8 @@ package org.openhab.ui.basic.internal.render;
import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.model.sitemap.Text;
import org.eclipse.smarthome.model.sitemap.Widget;
import org.eclipse.smarthome.model.sitemap.sitemap.Text;
import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.openhab.ui.basic.render.RenderException;
import org.openhab.ui.basic.render.WidgetRenderer;

View File

@ -18,8 +18,8 @@ import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.core.library.types.StringType;
import org.eclipse.smarthome.core.types.State;
import org.eclipse.smarthome.model.sitemap.Video;
import org.eclipse.smarthome.model.sitemap.Widget;
import org.eclipse.smarthome.model.sitemap.sitemap.Video;
import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.openhab.ui.basic.render.RenderException;
import org.openhab.ui.basic.render.WidgetRenderer;

View File

@ -14,8 +14,8 @@ package org.openhab.ui.basic.internal.render;
import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.model.sitemap.Webview;
import org.eclipse.smarthome.model.sitemap.Widget;
import org.eclipse.smarthome.model.sitemap.sitemap.Webview;
import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.openhab.ui.basic.render.RenderException;
import org.openhab.ui.basic.render.WidgetRenderer;

View File

@ -29,10 +29,10 @@ import org.eclipse.smarthome.config.core.ConfigurableService;
import org.eclipse.smarthome.core.items.ItemRegistry;
import org.eclipse.smarthome.io.http.HttpContextFactoryService;
import org.eclipse.smarthome.io.rest.sitemap.SitemapSubscriptionService;
import org.eclipse.smarthome.model.sitemap.LinkableWidget;
import org.eclipse.smarthome.model.sitemap.Sitemap;
import org.eclipse.smarthome.model.sitemap.SitemapProvider;
import org.eclipse.smarthome.model.sitemap.Widget;
import org.eclipse.smarthome.model.sitemap.sitemap.LinkableWidget;
import org.eclipse.smarthome.model.sitemap.sitemap.Sitemap;
import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.openhab.ui.basic.internal.WebAppConfig;
import org.openhab.ui.basic.internal.render.PageRenderer;
import org.openhab.ui.basic.render.RenderException;

View File

@ -13,7 +13,7 @@
package org.openhab.ui.basic.render;
import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.model.sitemap.Widget;
import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.openhab.ui.basic.internal.WebAppConfig;
/**
@ -36,7 +36,7 @@ public interface WidgetRenderer {
/**
* Produces HTML code for a given widget and writes it to a string builder.
*
* @param w the widget to produce HTML code for
* @param w the widget to produce HTML code for
* @param sb the string builder to append the HTML code to
* @return a list of widgets that need to be rendered as children of the widget; the HTML code in sb should contain
* a "%children%" placeholder for them.

View File

@ -30,7 +30,7 @@ import org.eclipse.smarthome.core.library.types.DecimalType;
import org.eclipse.smarthome.core.library.types.PercentType;
import org.eclipse.smarthome.core.library.types.QuantityType;
import org.eclipse.smarthome.core.types.State;
import org.eclipse.smarthome.model.sitemap.Widget;
import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.openhab.ui.classic.internal.WebAppActivator;
import org.openhab.ui.classic.internal.WebAppConfig;

View File

@ -19,8 +19,8 @@ import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.core.items.GroupItem;
import org.eclipse.smarthome.core.items.Item;
import org.eclipse.smarthome.core.items.ItemNotFoundException;
import org.eclipse.smarthome.model.sitemap.Chart;
import org.eclipse.smarthome.model.sitemap.Widget;
import org.eclipse.smarthome.model.sitemap.sitemap.Chart;
import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;

View File

@ -16,8 +16,8 @@ import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.core.library.types.HSBType;
import org.eclipse.smarthome.core.types.State;
import org.eclipse.smarthome.model.sitemap.Colorpicker;
import org.eclipse.smarthome.model.sitemap.Widget;
import org.eclipse.smarthome.model.sitemap.sitemap.Colorpicker;
import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.openhab.ui.classic.internal.servlet.WebAppServlet;
import org.osgi.service.component.annotations.Component;

View File

@ -15,8 +15,8 @@ package org.openhab.ui.classic.internal.render;
import org.apache.commons.lang.StringEscapeUtils;
import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.model.sitemap.Frame;
import org.eclipse.smarthome.model.sitemap.Widget;
import org.eclipse.smarthome.model.sitemap.sitemap.Frame;
import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;

View File

@ -14,8 +14,8 @@ package org.openhab.ui.classic.internal.render;
import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.model.sitemap.Group;
import org.eclipse.smarthome.model.sitemap.Widget;
import org.eclipse.smarthome.model.sitemap.sitemap.Group;
import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;

View File

@ -19,8 +19,8 @@ import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.core.library.types.RawType;
import org.eclipse.smarthome.core.library.types.StringType;
import org.eclipse.smarthome.core.types.State;
import org.eclipse.smarthome.model.sitemap.Image;
import org.eclipse.smarthome.model.sitemap.Widget;
import org.eclipse.smarthome.model.sitemap.sitemap.Image;
import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;

View File

@ -15,8 +15,8 @@ package org.openhab.ui.classic.internal.render;
import org.apache.commons.lang.StringEscapeUtils;
import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.model.sitemap.List;
import org.eclipse.smarthome.model.sitemap.Widget;
import org.eclipse.smarthome.model.sitemap.sitemap.List;
import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;

View File

@ -16,8 +16,8 @@ import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.core.library.types.PointType;
import org.eclipse.smarthome.core.types.State;
import org.eclipse.smarthome.model.sitemap.Mapview;
import org.eclipse.smarthome.model.sitemap.Widget;
import org.eclipse.smarthome.model.sitemap.sitemap.Mapview;
import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;

View File

@ -19,8 +19,8 @@ import org.apache.commons.lang.StringEscapeUtils;
import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.smarthome.model.sitemap.Frame;
import org.eclipse.smarthome.model.sitemap.Widget;
import org.eclipse.smarthome.model.sitemap.sitemap.Frame;
import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.openhab.ui.classic.internal.WebAppConfig;
import org.openhab.ui.classic.internal.servlet.WebAppServlet;

View File

@ -23,9 +23,9 @@ import org.eclipse.smarthome.core.types.State;
import org.eclipse.smarthome.core.types.StateDescription;
import org.eclipse.smarthome.core.types.StateOption;
import org.eclipse.smarthome.core.types.util.UnitUtils;
import org.eclipse.smarthome.model.sitemap.Mapping;
import org.eclipse.smarthome.model.sitemap.Selection;
import org.eclipse.smarthome.model.sitemap.Widget;
import org.eclipse.smarthome.model.sitemap.sitemap.Mapping;
import org.eclipse.smarthome.model.sitemap.sitemap.Selection;
import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;

View File

@ -19,8 +19,8 @@ import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.core.library.types.DecimalType;
import org.eclipse.smarthome.core.library.types.QuantityType;
import org.eclipse.smarthome.core.types.State;
import org.eclipse.smarthome.model.sitemap.Setpoint;
import org.eclipse.smarthome.model.sitemap.Widget;
import org.eclipse.smarthome.model.sitemap.sitemap.Setpoint;
import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.openhab.ui.classic.internal.servlet.WebAppServlet;
import org.osgi.service.component.annotations.Component;

View File

@ -14,8 +14,8 @@ package org.openhab.ui.classic.internal.render;
import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.model.sitemap.Slider;
import org.eclipse.smarthome.model.sitemap.Widget;
import org.eclipse.smarthome.model.sitemap.sitemap.Slider;
import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.openhab.ui.classic.internal.servlet.WebAppServlet;
import org.osgi.service.component.annotations.Component;

View File

@ -27,9 +27,9 @@ import org.eclipse.smarthome.core.types.State;
import org.eclipse.smarthome.core.types.StateDescription;
import org.eclipse.smarthome.core.types.StateOption;
import org.eclipse.smarthome.core.types.util.UnitUtils;
import org.eclipse.smarthome.model.sitemap.Mapping;
import org.eclipse.smarthome.model.sitemap.Switch;
import org.eclipse.smarthome.model.sitemap.Widget;
import org.eclipse.smarthome.model.sitemap.sitemap.Mapping;
import org.eclipse.smarthome.model.sitemap.sitemap.Switch;
import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.openhab.ui.classic.internal.servlet.WebAppServlet;
import org.osgi.service.component.annotations.Component;

View File

@ -14,8 +14,8 @@ package org.openhab.ui.classic.internal.render;
import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.model.sitemap.Text;
import org.eclipse.smarthome.model.sitemap.Widget;
import org.eclipse.smarthome.model.sitemap.sitemap.Text;
import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;

View File

@ -16,8 +16,8 @@ import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.core.library.types.StringType;
import org.eclipse.smarthome.core.types.State;
import org.eclipse.smarthome.model.sitemap.Video;
import org.eclipse.smarthome.model.sitemap.Widget;
import org.eclipse.smarthome.model.sitemap.sitemap.Video;
import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;

View File

@ -14,8 +14,8 @@ package org.openhab.ui.classic.internal.render;
import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.model.sitemap.Webview;
import org.eclipse.smarthome.model.sitemap.Widget;
import org.eclipse.smarthome.model.sitemap.sitemap.Webview;
import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;

View File

@ -13,7 +13,7 @@
package org.openhab.ui.classic.internal.render;
import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.model.sitemap.Widget;
import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.openhab.ui.classic.internal.WebAppConfig;
/**

View File

@ -35,13 +35,13 @@ import org.eclipse.smarthome.core.items.ItemRegistry;
import org.eclipse.smarthome.core.items.StateChangeListener;
import org.eclipse.smarthome.core.types.State;
import org.eclipse.smarthome.io.http.HttpContextFactoryService;
import org.eclipse.smarthome.model.sitemap.Chart;
import org.eclipse.smarthome.model.sitemap.Frame;
import org.eclipse.smarthome.model.sitemap.LinkableWidget;
import org.eclipse.smarthome.model.sitemap.Sitemap;
import org.eclipse.smarthome.model.sitemap.SitemapProvider;
import org.eclipse.smarthome.model.sitemap.VisibilityRule;
import org.eclipse.smarthome.model.sitemap.Widget;
import org.eclipse.smarthome.model.sitemap.sitemap.Chart;
import org.eclipse.smarthome.model.sitemap.sitemap.Frame;
import org.eclipse.smarthome.model.sitemap.sitemap.LinkableWidget;
import org.eclipse.smarthome.model.sitemap.sitemap.Sitemap;
import org.eclipse.smarthome.model.sitemap.sitemap.VisibilityRule;
import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.openhab.ui.classic.internal.WebAppConfig;
import org.openhab.ui.classic.internal.render.PageRenderer;
import org.openhab.ui.classic.internal.render.RenderException;

View File

@ -34,7 +34,7 @@ import org.eclipse.smarthome.core.library.types.StringType;
import org.eclipse.smarthome.core.library.types.UpDownType;
import org.eclipse.smarthome.core.types.Command;
import org.eclipse.smarthome.core.types.TypeParser;
import org.eclipse.smarthome.model.sitemap.Widget;
import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.icon.IconProvider;
import org.eclipse.smarthome.ui.icon.IconSet.Format;
import org.openhab.ui.cometvisu.internal.Config;
@ -441,7 +441,8 @@ public class ConfigHelper {
return null;
}
public Mapping createMapping(String name, EList<org.eclipse.smarthome.model.sitemap.Mapping> sitemapMapping) {
public Mapping createMapping(String name,
EList<org.eclipse.smarthome.model.sitemap.sitemap.Mapping> sitemapMapping) {
Mapping mapping = null;
if (mappings.containsKey(name)) {
mapping = mappings.get(name);
@ -450,7 +451,7 @@ public class ConfigHelper {
mapping = new Mapping();
mapping.setName(name);
for (org.eclipse.smarthome.model.sitemap.Mapping map : sitemapMapping) {
for (org.eclipse.smarthome.model.sitemap.sitemap.Mapping map : sitemapMapping) {
Entry entry = new Entry();
entry.setValue(map.getCmd());
entry.getContent().add(map.getLabel());
@ -519,7 +520,7 @@ public class ConfigHelper {
}
public void mapToTriggers(Object element, Item item, Widget widget) {
EList<org.eclipse.smarthome.model.sitemap.Mapping> sitemapMapping = getMapping(widget);
EList<org.eclipse.smarthome.model.sitemap.sitemap.Mapping> sitemapMapping = getMapping(widget);
int groupColumns = 6;
@ -546,7 +547,7 @@ public class ConfigHelper {
states.add(UpDownType.class);
states.add(StringType.class);
for (org.eclipse.smarthome.model.sitemap.Mapping map : sitemapMapping) {
for (org.eclipse.smarthome.model.sitemap.sitemap.Mapping map : sitemapMapping) {
Command command = TypeParser.parseCommand(states, map.getCmd());
if (!(command instanceof DecimalType)) {
// no number command
@ -560,7 +561,7 @@ public class ConfigHelper {
Mapping mapping = createMapping(mappingName, sitemapMapping);
addToMappings(mapping);
for (org.eclipse.smarthome.model.sitemap.Mapping map : sitemapMapping) {
for (org.eclipse.smarthome.model.sitemap.sitemap.Mapping map : sitemapMapping) {
Trigger trigger = new Trigger();
trigger.setValue(map.getCmd());
@ -581,7 +582,7 @@ public class ConfigHelper {
* @param widget
*/
public void mapToMultiTrigger(Object element, Item item, Widget widget) {
EList<org.eclipse.smarthome.model.sitemap.Mapping> sitemapMapping = getMapping(widget);
EList<org.eclipse.smarthome.model.sitemap.sitemap.Mapping> sitemapMapping = getMapping(widget);
Transform transform = Transform.NUMBER;
@ -592,7 +593,7 @@ public class ConfigHelper {
states.add(UpDownType.class);
states.add(StringType.class);
for (org.eclipse.smarthome.model.sitemap.Mapping map : sitemapMapping) {
for (org.eclipse.smarthome.model.sitemap.sitemap.Mapping map : sitemapMapping) {
Command command = TypeParser.parseCommand(states, map.getCmd());
if (!(command instanceof DecimalType)) {
// no number command
@ -610,7 +611,7 @@ public class ConfigHelper {
mtrigger.setLayout(createLayout(6));
int i = 1;
for (org.eclipse.smarthome.model.sitemap.Mapping map : sitemapMapping) {
for (org.eclipse.smarthome.model.sitemap.sitemap.Mapping map : sitemapMapping) {
switch (i) {
case 1:
mtrigger.setButton1Label(map.getLabel());
@ -635,11 +636,11 @@ public class ConfigHelper {
}
@SuppressWarnings("unchecked")
private EList<org.eclipse.smarthome.model.sitemap.Mapping> getMapping(Widget widget) {
EList<org.eclipse.smarthome.model.sitemap.Mapping> mapping = null;
private EList<org.eclipse.smarthome.model.sitemap.sitemap.Mapping> getMapping(Widget widget) {
EList<org.eclipse.smarthome.model.sitemap.sitemap.Mapping> mapping = null;
try {
Method getter = widget.getClass().getMethod("getMappings");
mapping = (EList<org.eclipse.smarthome.model.sitemap.Mapping>) getter.invoke(widget);
mapping = (EList<org.eclipse.smarthome.model.sitemap.sitemap.Mapping>) getter.invoke(widget);
} catch (NoSuchMethodException | SecurityException e) {
// do nothing, normal behaviour for item that have no mappingdefined
} catch (IllegalAccessException e) {
@ -654,7 +655,7 @@ public class ConfigHelper {
public Mapping addMapping(Object element, Widget widget) {
Mapping mapping = null;
EList<org.eclipse.smarthome.model.sitemap.Mapping> smap = getMapping(widget);
EList<org.eclipse.smarthome.model.sitemap.sitemap.Mapping> smap = getMapping(widget);
if (smap != null && smap.size() > 0) {
mapping = addMapping(element, String.valueOf(smap.hashCode()), smap);
}
@ -663,7 +664,7 @@ public class ConfigHelper {
}
public Mapping addMapping(Object element, String name,
EList<org.eclipse.smarthome.model.sitemap.Mapping> sitemapMapping) {
EList<org.eclipse.smarthome.model.sitemap.sitemap.Mapping> sitemapMapping) {
Mapping mapping = createMapping(name, sitemapMapping);
addMapping(element, mapping);
return mapping;
@ -831,7 +832,7 @@ public class ConfigHelper {
* the page for wich the pagejump should be created
* @param widget
*/
public void addToNavbar(Page barPage, Page targetPage, org.eclipse.smarthome.model.sitemap.Group widget,
public void addToNavbar(Page barPage, Page targetPage, org.eclipse.smarthome.model.sitemap.sitemap.Group widget,
NavbarPositionType position, Item item) {
Pagejump pagejump = new Pagejump();
pagejump.setBindClickToWidget(true);

View File

@ -33,12 +33,12 @@ import org.eclipse.smarthome.core.library.items.ContactItem;
import org.eclipse.smarthome.core.library.items.DateTimeItem;
import org.eclipse.smarthome.core.library.items.NumberItem;
import org.eclipse.smarthome.core.library.items.RollershutterItem;
import org.eclipse.smarthome.model.sitemap.LinkableWidget;
import org.eclipse.smarthome.model.sitemap.Selection;
import org.eclipse.smarthome.model.sitemap.Setpoint;
import org.eclipse.smarthome.model.sitemap.Sitemap;
import org.eclipse.smarthome.model.sitemap.Webview;
import org.eclipse.smarthome.model.sitemap.Widget;
import org.eclipse.smarthome.model.sitemap.sitemap.LinkableWidget;
import org.eclipse.smarthome.model.sitemap.sitemap.Selection;
import org.eclipse.smarthome.model.sitemap.sitemap.Setpoint;
import org.eclipse.smarthome.model.sitemap.sitemap.Sitemap;
import org.eclipse.smarthome.model.sitemap.sitemap.Webview;
import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.openhab.ui.cometvisu.internal.Config;
import org.openhab.ui.cometvisu.internal.config.ConfigHelper.Transform;
import org.openhab.ui.cometvisu.internal.config.beans.Address;
@ -208,7 +208,7 @@ public class VisuConfig {
EList<Widget> children = app.getItemUIRegistry().getChildren((LinkableWidget) widget);
if (children.size() == 0) {
processItemWidget(rootPage, widget, item, pages, level);
} else if (widget instanceof org.eclipse.smarthome.model.sitemap.Frame) {
} else if (widget instanceof org.eclipse.smarthome.model.sitemap.sitemap.Frame) {
Group group = new Group();
group.setLayout(configHelper.createLayout(6));
group.setName(configHelper.getLabel(widget));
@ -220,8 +220,8 @@ public class VisuConfig {
Page page = new Page();
page.setName(configHelper.getLabel(widget));
configHelper.addToRoot(rootPage, factory.createPagePage(page));
if (widget instanceof org.eclipse.smarthome.model.sitemap.Group) {
org.eclipse.smarthome.model.sitemap.Group group = (org.eclipse.smarthome.model.sitemap.Group) widget;
if (widget instanceof org.eclipse.smarthome.model.sitemap.sitemap.Group) {
org.eclipse.smarthome.model.sitemap.sitemap.Group group = (org.eclipse.smarthome.model.sitemap.sitemap.Group) widget;
// add Group item to the Navbar
// logger.debug("page '{}' on level {}",page.getName(),level);
NavbarPositionType position = (level <= 1) ? NavbarPositionType.TOP : NavbarPositionType.LEFT;
@ -247,8 +247,8 @@ public class VisuConfig {
}
private void processItemWidget(Object rootPage, Widget widget, Item item, Pages pages, int level) {
if (widget instanceof org.eclipse.smarthome.model.sitemap.Switch) {
org.eclipse.smarthome.model.sitemap.Switch switchWidget = (org.eclipse.smarthome.model.sitemap.Switch) widget;
if (widget instanceof org.eclipse.smarthome.model.sitemap.sitemap.Switch) {
org.eclipse.smarthome.model.sitemap.sitemap.Switch switchWidget = (org.eclipse.smarthome.model.sitemap.sitemap.Switch) widget;
if (item instanceof RollershutterItem) {
// in the demo-sitemap a rullershutter item is defined as
@ -272,7 +272,7 @@ public class VisuConfig {
configHelper.addStyling(switchBean, widget);
configHelper.addToRoot(rootPage, factory.createPageSwitch(switchBean));
}
} else if (widget instanceof org.eclipse.smarthome.model.sitemap.Text) {
} else if (widget instanceof org.eclipse.smarthome.model.sitemap.sitemap.Text) {
Info info = new Info();
Transform transform = Transform.STRING;
boolean skipFormat = false;
@ -304,7 +304,7 @@ public class VisuConfig {
configHelper.addToRoot(rootPage, factory.createPageText(text));
}
} else if (widget instanceof org.eclipse.smarthome.model.sitemap.Slider) {
} else if (widget instanceof org.eclipse.smarthome.model.sitemap.sitemap.Slider) {
Slide bean = new Slide();
bean.setFormat("%d%%");
configHelper.addAddress(bean, item, Transform.DIMMER);
@ -334,7 +334,7 @@ public class VisuConfig {
Mapping mapping = configHelper.createMapping(mappingName, selection.getMappings());
configHelper.addToMappings(mapping);
for (org.eclipse.smarthome.model.sitemap.Mapping map : selection.getMappings()) {
for (org.eclipse.smarthome.model.sitemap.sitemap.Mapping map : selection.getMappings()) {
Trigger trigger = new Trigger();
trigger.setValue(map.getCmd());
trigger.setMapping(mappingName);
@ -356,8 +356,8 @@ public class VisuConfig {
configHelper.addLabel(bean, widget);
configHelper.addToRoot(rootPage, factory.createPageWeb(bean));
} else if (widget instanceof org.eclipse.smarthome.model.sitemap.Image) {
org.eclipse.smarthome.model.sitemap.Image image = (org.eclipse.smarthome.model.sitemap.Image) widget;
} else if (widget instanceof org.eclipse.smarthome.model.sitemap.sitemap.Image) {
org.eclipse.smarthome.model.sitemap.sitemap.Image image = (org.eclipse.smarthome.model.sitemap.sitemap.Image) widget;
Image bean = new Image();
bean.setSrc(image.getUrl());
bean.setRefresh(new BigDecimal(image.getRefresh()));
@ -365,19 +365,19 @@ public class VisuConfig {
configHelper.addLabel(bean, widget);
configHelper.addToRoot(rootPage, factory.createPageImage(bean));
} else if (widget instanceof org.eclipse.smarthome.model.sitemap.Video) {
org.eclipse.smarthome.model.sitemap.Video video = (org.eclipse.smarthome.model.sitemap.Video) widget;
} else if (widget instanceof org.eclipse.smarthome.model.sitemap.sitemap.Video) {
org.eclipse.smarthome.model.sitemap.sitemap.Video video = (org.eclipse.smarthome.model.sitemap.sitemap.Video) widget;
Video bean = new Video();
bean.setSrc(video.getUrl());
configHelper.addLabel(bean, widget);
configHelper.addToRoot(rootPage, factory.createPageVideo(bean));
} else if (widget instanceof org.eclipse.smarthome.model.sitemap.Chart && item != null) {
} else if (widget instanceof org.eclipse.smarthome.model.sitemap.sitemap.Chart && item != null) {
Plugin plugin = new Plugin();
plugin.setName("diagram");
configHelper.addPlugin(plugin);
org.eclipse.smarthome.model.sitemap.Chart chart = (org.eclipse.smarthome.model.sitemap.Chart) widget;
org.eclipse.smarthome.model.sitemap.sitemap.Chart chart = (org.eclipse.smarthome.model.sitemap.sitemap.Chart) widget;
Diagram bean = new Diagram();
bean.setSeries(configHelper.getCvChartPeriod(chart.getPeriod()));
bean.setRefresh(new BigInteger(String.valueOf(chart.getRefresh())));
@ -406,7 +406,7 @@ public class VisuConfig {
}
configHelper.addToRoot(rootPage, factory.createPageDiagram(bean));
} else if (widget instanceof org.eclipse.smarthome.model.sitemap.Colorpicker) {
} else if (widget instanceof org.eclipse.smarthome.model.sitemap.sitemap.Colorpicker) {
Plugin plugin = new Plugin();
plugin.setName("colorchooser");
configHelper.addPlugin(plugin);

View File

@ -68,8 +68,8 @@ import org.eclipse.smarthome.core.persistence.FilterCriteria.Ordering;
import org.eclipse.smarthome.core.persistence.HistoricItem;
import org.eclipse.smarthome.core.persistence.QueryablePersistenceService;
import org.eclipse.smarthome.core.types.Command;
import org.eclipse.smarthome.model.sitemap.Sitemap;
import org.eclipse.smarthome.model.sitemap.SitemapProvider;
import org.eclipse.smarthome.model.sitemap.sitemap.Sitemap;
import org.openhab.ui.cometvisu.internal.Config;
import org.openhab.ui.cometvisu.internal.config.ConfigHelper.Transform;
import org.openhab.ui.cometvisu.internal.config.VisuConfig;