diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/addons/binding/org.openhab.binding.network/.classpath b/addons/binding/org.openhab.binding.network/.classpath index a95e0906ca013..a508449f823d6 100644 --- a/addons/binding/org.openhab.binding.network/.classpath +++ b/addons/binding/org.openhab.binding.network/.classpath @@ -1,5 +1,10 @@ + + + + + diff --git a/addons/ui/org.openhab.ui.cometvisu/.classpath b/addons/ui/org.openhab.ui.cometvisu/.classpath new file mode 100644 index 0000000000000..2a1817f909a06 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/.classpath @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/addons/ui/org.openhab.ui.cometvisu/.project b/addons/ui/org.openhab.ui.cometvisu/.project new file mode 100644 index 0000000000000..87110c1552648 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/.project @@ -0,0 +1,33 @@ + + + org.openhab.ui.cometvisu + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.pde.ds.core.builder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/addons/ui/org.openhab.ui.cometvisu/META-INF/MANIFEST.MF b/addons/ui/org.openhab.ui.cometvisu/META-INF/MANIFEST.MF new file mode 100644 index 0000000000000..cae5fdf1f507c --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/META-INF/MANIFEST.MF @@ -0,0 +1,59 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: CometVisu backend +Bundle-SymbolicName: org.openhab.ui.cometvisu +Bundle-Version: 2.0.0.qualifier +Bundle-Vendor: openHAB +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Bundle-Activator: org.openhab.ui.cometvisu.internal.CvActivator +Import-Package: + com.google.gson, + javax.inject, + javax.servlet, + javax.servlet.annotation, + javax.servlet.http, + javax.ws.rs, + javax.ws.rs.container, + javax.ws.rs.core, + javax.ws.rs.ext, + org.apache.commons.io, + org.apache.commons.lang, + org.eclipse.emf.common.util, + org.eclipse.emf.ecore, + org.eclipse.smarthome.config.core, + org.eclipse.smarthome.config.discovery, + org.eclipse.smarthome.config.discovery.inbox, + org.eclipse.smarthome.core.common.registry, + org.eclipse.smarthome.core.events, + org.eclipse.smarthome.core.items, + org.eclipse.smarthome.core.items.events, + org.eclipse.smarthome.core.library.items, + org.eclipse.smarthome.core.library.types, + org.eclipse.smarthome.core.persistence, + org.eclipse.smarthome.core.thing, + org.eclipse.smarthome.core.thing.link, + org.eclipse.smarthome.core.types, + org.eclipse.smarthome.io.rest, + org.eclipse.smarthome.model.items, + org.eclipse.smarthome.model.sitemap, + org.eclipse.smarthome.ui.icon, + org.eclipse.smarthome.ui.items, + org.glassfish.hk2.utilities.binding, + org.glassfish.jersey.internal.inject, + org.glassfish.jersey.media.sse, + org.glassfish.jersey.server, + org.glassfish.jersey.servlet.spi, + org.openhab.core.types, + org.openhab.ui.dashboard, + org.osgi.framework, + org.osgi.service.cm, + org.osgi.service.component, + org.osgi.service.event, + org.osgi.service.http, + org.slf4j +Service-Component: OSGI-INF/*.xml +Bundle-ActivationPolicy: lazy +Bundle-ClassPath: ., + lib/rrd4j-2.2.jar, + lib/quercus.jar, + lib/sqlite-jdbc-3.8.7.jar diff --git a/addons/ui/org.openhab.ui.cometvisu/OSGI-INF/cv-backend-charts.xml b/addons/ui/org.openhab.ui.cometvisu/OSGI-INF/cv-backend-charts.xml new file mode 100644 index 0000000000000..d0775a5b95467 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/OSGI-INF/cv-backend-charts.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + diff --git a/addons/ui/org.openhab.ui.cometvisu/OSGI-INF/cv-backend-login.xml b/addons/ui/org.openhab.ui.cometvisu/OSGI-INF/cv-backend-login.xml new file mode 100644 index 0000000000000..9b4429e77290e --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/OSGI-INF/cv-backend-login.xml @@ -0,0 +1,17 @@ + + + + + + + + + diff --git a/addons/ui/org.openhab.ui.cometvisu/OSGI-INF/cv-backend-read.xml b/addons/ui/org.openhab.ui.cometvisu/OSGI-INF/cv-backend-read.xml new file mode 100644 index 0000000000000..26468a0f9fc8d --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/OSGI-INF/cv-backend-read.xml @@ -0,0 +1,18 @@ + + + + + + + + + + diff --git a/addons/ui/org.openhab.ui.cometvisu/OSGI-INF/cv-backend-write.xml b/addons/ui/org.openhab.ui.cometvisu/OSGI-INF/cv-backend-write.xml new file mode 100644 index 0000000000000..fa638f7ee75f4 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/OSGI-INF/cv-backend-write.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + diff --git a/addons/ui/org.openhab.ui.cometvisu/OSGI-INF/cv-frontend-app.xml b/addons/ui/org.openhab.ui.cometvisu/OSGI-INF/cv-frontend-app.xml new file mode 100644 index 0000000000000..6bf87c1e57c52 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/OSGI-INF/cv-frontend-app.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + diff --git a/addons/ui/org.openhab.ui.cometvisu/OSGI-INF/dashboardtile.xml b/addons/ui/org.openhab.ui.cometvisu/OSGI-INF/dashboardtile.xml new file mode 100644 index 0000000000000..eeb6404ec66a0 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/OSGI-INF/dashboardtile.xml @@ -0,0 +1,14 @@ + + + + + + + + \ No newline at end of file diff --git a/addons/ui/org.openhab.ui.cometvisu/OSGI-INF/itemregistryeventlistener.xml b/addons/ui/org.openhab.ui.cometvisu/OSGI-INF/itemregistryeventlistener.xml new file mode 100644 index 0000000000000..16ae97b9eb0b5 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/OSGI-INF/itemregistryeventlistener.xml @@ -0,0 +1,15 @@ + + + + + + + diff --git a/addons/ui/org.openhab.ui.cometvisu/README.md b/addons/ui/org.openhab.ui.cometvisu/README.md new file mode 100644 index 0000000000000..79a2899b8a824 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/README.md @@ -0,0 +1,208 @@ +Documentation of the CometVisu Backend for openHAB2 + +## Introduction + +This adds a backend for the web based visualization CometVisu (http://www.cometvisu.org). The CometVisu is a highly customizable visualization, that runs in any browser. Despite the existing browser based UI´s in openHAB, the CometVisu does not rely on sitemaps (although they can be used). The layout is defined with an XML-based configuration file, which allows a multi column layout. + +This is just a short overview, more details will be added soon! + +## Requirements + +* openHAB 2.0 or greater
+* CometVisu >=0.8.6? (not released yet) or greater (https://github.com/CometVisu/CometVisu/releases).
+ +## Installation + +* Copy the addon org.openhab.ui.cometvisu*.jar to the openHAB addon folder +* Then just extract the "release" folder (the one which contains the index.html file) of the downloaded CometVisu archive in the runtime folder off your openHAB2 server. +Note: if you want to store the CometVisu client in another folder you have to set the webfolder in your config file + +## Configuration +### Server configuration +You can customize some setting of the CometVisu backend in a configuration file named 'cometvisu.cfg' which has to be created in the 'conf/services/' folder of your openHAB2 instance. +The following settings are available: + +Relative path to the folder the CometVisu client can be found: +``` +cometvisu:webFolder=runtime/web/src/ +``` + +The alias where you can access the client e.g http://\:8080/\/ +``` +cometvisu:webAlias=/cometvisu +``` + +Enable icon mapping from openHAB-items to CometVisu-items (Note this is only needed if you use the automatic sitemap->config generation feature) +``` +cometvisu:icons>enableMapping=true +``` + +List of mappings of structure: icons.mapping\>\=\ +``` +cometvisu:icons.mapping>firstfloor=control_building_int_og +cometvisu:icons.mapping>groundfloor=control_building_int_eg +``` +The list of icons in the CometVisu is available at: +``` +http://:8080//icon/knx-uf-iconset/showicons.php +``` + +### Override CometVisu files +You can create a folder called 'cometvisu' in openHAB's 'conf/' folder and create files there which should be used instead of CometVisu's own. For example you can put all your customizations there (e.g. you config, custom.css, etc.). So the CometVisu itself stays untouched and can easily be replaced with a new release. + +Please use the same folder structure and file names as they are used in the CometVisu package. For example if you want to replace the original config with your own copy the file to the following path: +``` +'conf/cometvisu/config/visu_config.xml' +``` + +Or for design customizations use: +``` +'conf/cometvisu/designs/metal/custom.css' +``` + +### Client configuration +If you don´t use the given example below, please make sure that you correctly configure openHAB as backend in the CometVisu-Config by adding `backend="oh2"` to the root pages-element, like `` + +It is a good start to use the new sitemap support, to get a working example config, which you can store an customize for your needs. +Open a sitemap in the CometVisu client like this: +``` +http://:8080//?config= +``` + +You can use the editor to change and store this config. You can start with the demo-sitemap to get a quick overview about how the CometVisu looks like. + +## New features (compared to the 1.x version) +* PHP support: Editor is working, rrslog-plugin can be used (see examples) +* Persistence support: Any persisted item can be used to create a chart +* GroupItem support: as known from the openHAB UI´s the group-functions like the number of open windows in a group of contacts +can be shown in the visu +* ... + + +## Examples +### Show how many lights are switched on +* Items: uses the demo.items provided by openHAB2 +* Config (please add the infoaction-plugin in pages->meta->plugins in your config in order to use this): +``` + + + + +
number:Lights
+
+
+ + +
Lights
+
+
+
+``` + * use it in navbar: +``` + + + + + + +
number:Lights
+
+
+
+``` +###Charts: +* Items: see demo.items +* Config: +``` + +Weather_Temperature +Weather_Temp_Max +Weather_Temp_Min + +``` +some notes: + * consolidationFunction is only obeyed, when the item is persisted by the rrd4f persistence service + * altough you have to define Item_name for every line in the config, the used items doe not have to be persisted by the rrd4j persistence service, any other service will work too + +###RSS-Log: +* Items: no special item needed +* Config: +``` + + + + +``` + * Fill the log from a rule: +``` +var content = "Call recevied from 123456",encode("UTF-8") +var tag = "Call".encode("UTF-8") +sendHttpGetRequest("http://:8080//plugins/rsslog_pdo.php?c="+content+"&t="+tag) +``` +###RSS-Log from persisted item: +* Items: +``` +String Logger +``` +* Config: +``` + + + + +``` + * Fill the log from a rule: +``` +# Message structure is |<content>|<state>|<tags> +sendCommand(Logger,"Call received|Received call from 123456789|0|Call,Incoming") +# but you can also just use any string like +sendCommand(Logger,"Received call from 123456789") +``` +###ColorItem (supported since CometVisu-Release 0.8.2) => +``` +<colorchooser> + <label>Color</label> + <address transform="OH:color" variant="rgb">ITEM_NAME</address> +</colorchooser> +``` +Please note: You have to add the colorchooser plugin in the meta>plugins section of you config + +## Known problems +Not all of the PHP-based functions in the CometVisu client have been tested so far. The untested features are: +* Automatic configuration upgrade, when the library version has changed +* calendarlist plugin +* upnpcontroller plugin + +The sitemap support can only be used as a starting point for own customizations, e.g. you open an automatic generated config and store it in by CometVisu by using the editor. Then you start to customize it to your own needs. New items must by added by hand from the moment you stored and changed the generated config. + +### 403 error +If you get an 403 - Access Denied error, when you try to open the CometVisu in your browser you have not copied the correct release folder into the \<webFolder\> folder. Please check if there is a subfolder with the exact name "release/", which contains an index.html file and copy the content to the folder defined in the \<webFolder\>-property. + +## TODO +Maybe it is possible to define a general structure (in addition to a sitemap), that maps and groups items based on their context, e.g. which floor/room/subsection the belong to +``` +<floor> + <room navbar="top"> + <all-lights-items colspan="12"> + <all-rollershutter-items colspan="6"> + <all-contact-items colspan="6"> + <all-other-items colspan="12"> + </room> +</floor> +``` +Something like that could help to improve the sitemap->config generation. + +## Screenshots + +some screenshots can be found here: +- http://knx-user-forum.de/forum/supportforen/cometvisu/26809-allgemeine-frage-wie-sieht-eure-cv-startseite-aus + +## Links + +* German CometVisu Support Forum: http://knx-user-forum.de/forum/supportforen/cometvisu +* User documentation for the CometVisu: http://www.cometvisu.org/ +* GitHub project page of the CometVisu: https://github.com/CometVisu/CometVisu +* Current development version of the openHAB2 compatible CometVisu: https://github.com/peuter/CometVisu/tree/openhab2 diff --git a/addons/ui/org.openhab.ui.cometvisu/about.html b/addons/ui/org.openhab.ui.cometvisu/about.html new file mode 100644 index 0000000000000..c258ef55d834c --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/about.html @@ -0,0 +1,28 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> +<title>About + + +

About This Content

+ +

June 5, 2006

+

License

+ +

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise +indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available +at http://www.eclipse.org/legal/epl-v10.html. +For purposes of the EPL, "Program" will mean the Content.

+ +

If you did not receive this Content directly from the Eclipse Foundation, the Content is +being redistributed by another party ("Redistributor") and different terms and conditions may +apply to your use of any object code in the Content. Check the Redistributor's license that was +provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise +indicated below, the terms and conditions of the EPL still apply to any source code in the Content +and such source code may be obtained at http://www.eclipse.org.

+ + + \ No newline at end of file diff --git a/addons/ui/org.openhab.ui.cometvisu/build.properties b/addons/ui/org.openhab.ui.cometvisu/build.properties new file mode 100644 index 0000000000000..76a5e9bb450d2 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/build.properties @@ -0,0 +1,10 @@ +output.. = target/classes/ +bin.includes = META-INF/,\ + .,\ + OSGI-INF/,\ + about.html,\ + lib/,\ + lib/rrd4j-2.2.jar,\ + lib/quercus.jar,\ + lib/sqlite-jdbc-3.8.7.jar +source.. = src/main/java/ diff --git a/addons/ui/org.openhab.ui.cometvisu/lib/quercus.jar b/addons/ui/org.openhab.ui.cometvisu/lib/quercus.jar new file mode 100644 index 0000000000000..ee2dc38063b68 Binary files /dev/null and b/addons/ui/org.openhab.ui.cometvisu/lib/quercus.jar differ diff --git a/addons/ui/org.openhab.ui.cometvisu/lib/rrd4j-2.2.jar b/addons/ui/org.openhab.ui.cometvisu/lib/rrd4j-2.2.jar new file mode 100644 index 0000000000000..5581ef63ef1af Binary files /dev/null and b/addons/ui/org.openhab.ui.cometvisu/lib/rrd4j-2.2.jar differ diff --git a/addons/ui/org.openhab.ui.cometvisu/lib/sqlite-jdbc-3.8.7.jar b/addons/ui/org.openhab.ui.cometvisu/lib/sqlite-jdbc-3.8.7.jar new file mode 100644 index 0000000000000..22acadde81067 Binary files /dev/null and b/addons/ui/org.openhab.ui.cometvisu/lib/sqlite-jdbc-3.8.7.jar differ diff --git a/addons/ui/org.openhab.ui.cometvisu/pom.xml b/addons/ui/org.openhab.ui.cometvisu/pom.xml new file mode 100644 index 0000000000000..6db9c98d9a566 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/pom.xml @@ -0,0 +1,22 @@ + + + + + org.openhab.addons.ui + pom + 2.0.0-SNAPSHOT + + + + org.openhab.ui.cometvisu + org.openhab.ui.cometvisu + + + 4.0.0 + org.openhab.ui + org.openhab.ui.cometvisu + + openHAB CometVisu Backend + + eclipse-plugin + diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/backend/ChartResource.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/backend/ChartResource.java new file mode 100644 index 0000000000000..23d2a7f33bba7 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/backend/ChartResource.java @@ -0,0 +1,292 @@ +/** + * Copyright (c) 2014-2015 openHAB UG (haftungsbeschraenkt) and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package org.openhab.ui.cometvisu.backend; + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.text.DecimalFormat; +import java.text.NumberFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Map.Entry; + +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.QueryParam; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.HttpHeaders; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; +import javax.ws.rs.core.UriInfo; + +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.core.items.ItemRegistry; +import org.eclipse.smarthome.core.library.types.DecimalType; +import org.eclipse.smarthome.core.persistence.FilterCriteria; +import org.eclipse.smarthome.core.persistence.FilterCriteria.Ordering; +import org.eclipse.smarthome.core.persistence.HistoricItem; +import org.eclipse.smarthome.core.persistence.PersistenceService; +import org.eclipse.smarthome.core.persistence.QueryablePersistenceService; +import org.eclipse.smarthome.io.rest.RESTResource; +import org.openhab.ui.cometvisu.internal.Config; +import org.rrd4j.ConsolFun; +import org.rrd4j.core.FetchData; +import org.rrd4j.core.FetchRequest; +import org.rrd4j.core.RrdDb; +import org.rrd4j.core.Util; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * handles requests for chart series data from the CometVisu client + * used by the diagram plugin + * + * @author Tobias Bräutigam + * @since 2.0.0 + * + */ +@Path(Config.COMETVISU_BACKEND_ALIAS + "/" + Config.COMETVISU_BACKEND_CHART_ALIAS) +public class ChartResource implements RESTResource { + private static final Logger logger = LoggerFactory.getLogger(ChartResource.class); + + // pattern RRDTool uses to format doubles in XML files + static final String PATTERN = "0.0000000000E00"; + + static final DecimalFormat df; + + protected final static String RRD_FOLDER = org.eclipse.smarthome.config.core.ConfigConstants.getUserDataFolder() + + File.separator + "rrd4j"; + + static { + df = (DecimalFormat) NumberFormat.getNumberInstance(Locale.ENGLISH); + df.applyPattern(PATTERN); + // df.setPositivePrefix("+"); + } + + static protected Map persistenceServices = new HashMap(); + + private ItemRegistry itemRegistry; + + @Context + private UriInfo uriInfo; + + public void addPersistenceService(PersistenceService service) { + if (service instanceof QueryablePersistenceService) + persistenceServices.put(service.getName(), (QueryablePersistenceService) service); + } + + public void removePersistenceService(PersistenceService service) { + persistenceServices.remove(service.getName()); + } + + static public Map getPersistenceServices() { + return persistenceServices; + } + + protected void setItemRegistry(ItemRegistry itemRegistry) { + this.itemRegistry = itemRegistry; + } + + protected void unsetItemRegistry(ItemRegistry itemRegistry) { + this.itemRegistry = null; + } + + @GET + @Produces({ MediaType.APPLICATION_JSON }) + public Response getChartSeries(@Context HttpHeaders headers, @QueryParam("rrd") String itemName, + @QueryParam("ds") String consFunction, @QueryParam("start") String start, @QueryParam("end") String end, + @QueryParam("res") long resolution) { + if (logger.isDebugEnabled()) + logger.debug("Received GET request at '{}' for rrd '{}'.", uriInfo.getPath(), itemName); + String responseType = MediaType.APPLICATION_JSON; + + // RRD specific: no equivalent in PersistenceService known + ConsolFun consilidationFunction = ConsolFun.valueOf(consFunction); + + // read the start/end time as they are provided in the RRD-way, we use + // the RRD4j to read them + long[] times = Util.getTimestamps(start, end); + Date startTime = new Date(); + startTime.setTime(times[0] * 1000L); + Date endTime = new Date(); + endTime.setTime(times[1] * 1000L); + + if (itemName.endsWith(".rrd")) + itemName = itemName.substring(0, itemName.length() - 4); + String[] parts = itemName.split(":"); + String service = "rrd4j"; + + if (parts.length == 2) { + itemName = parts[1]; + service = parts[0]; + } + + Item item; + try { + item = itemRegistry.getItem(itemName); + logger.debug("item '{}' found ", item); + + // Prefer RRD-Service + QueryablePersistenceService persistenceService = getPersistenceServices().get(service); + // Fallback to first persistenceService from list + if (persistenceService == null) { + Iterator> pit = getPersistenceServices().entrySet() + .iterator(); + if (pit.hasNext()) { + persistenceService = pit.next().getValue(); + } else { + throw new IllegalArgumentException("No Persistence service found."); + } + } + Object data = null; + if (persistenceService.getName().equals("rrd4j")) { + data = getRrdSeries(persistenceService, item, consilidationFunction, startTime, endTime, resolution); + } else { + data = getPersistenceSeries(persistenceService, item, startTime, endTime, resolution); + } + return Response.ok(data, responseType).build(); + } catch (ItemNotFoundException e1) { + logger.error("Item '{}' not found error while requesting series data.", itemName); + + } + return Response.serverError().build(); + } + + public Object getPersistenceSeries(QueryablePersistenceService persistenceService, Item item, Date timeBegin, + Date timeEnd, long resolution) { + Map> data = new HashMap>(); + + // Define the data filter + FilterCriteria filter = new FilterCriteria(); + filter.setBeginDate(timeBegin); + filter.setEndDate(timeEnd); + filter.setItemName(item.getName()); + filter.setOrdering(Ordering.ASCENDING); + + // Get the data from the persistence store + Iterable result = persistenceService.query(filter); + Iterator it = result.iterator(); + + // Iterate through the data + int dataCounter = 0; + while (it.hasNext()) { + dataCounter++; + HistoricItem historicItem = it.next(); + org.eclipse.smarthome.core.types.State state = historicItem.getState(); + if (state instanceof DecimalType) { + ArrayList vals = new ArrayList(); + vals.add(formatDouble(((DecimalType) state).doubleValue(), "null", true)); + data.put(historicItem.getTimestamp().getTime(), vals); + } + } + logger.debug("'{}' querying item '{}' from '{}' to '{}' => '{}' results", persistenceService.getName(), + filter.getItemName(), filter.getBeginDate(), filter.getEndDate(), dataCounter); + return convertToRrd(data); + } + + /** + * returns a rrd series data, an array of [[timestamp,data1,data2,...]] + * + * @param persistenceService + * @param item + * @param consilidationFunction + * @param timeBegin + * @param timeEnd + * @param resolution + * @return + */ + public Object getRrdSeries(QueryablePersistenceService persistenceService, Item item, + ConsolFun consilidationFunction, Date timeBegin, Date timeEnd, long resolution) { + Map> data = new HashMap>(); + try { + List itemNames = new ArrayList(); + + if (item instanceof GroupItem) { + GroupItem groupItem = (GroupItem) item; + for (Item member : groupItem.getMembers()) { + itemNames.add(member.getName()); + } + } else { + itemNames.add(item.getName()); + } + for (String itemName : itemNames) { + addRrdData(data, itemName, consilidationFunction, timeBegin, timeEnd, resolution); + } + + } catch (FileNotFoundException e) { + // rrd file does not exist, fallback to generic persistance service + logger.debug("no rrd file found '{}'", (RRD_FOLDER + File.separator + item.getName() + ".rrd")); + return getPersistenceSeries(persistenceService, item, timeBegin, timeEnd, resolution); + } catch (Exception e) { + logger.error(e.getLocalizedMessage() + ": fallback to generic persistance service"); + return getPersistenceSeries(persistenceService, item, timeBegin, timeEnd, resolution); + } + return convertToRrd(data); + } + + private ArrayList convertToRrd(Map> data) { + ArrayList rrd = new ArrayList(); + for (Long time : data.keySet()) { + Object[] entry = new Object[2]; + entry[0] = time; + entry[1] = data.get(time); + rrd.add(entry); + } + return rrd; + } + + private Map> addRrdData(Map> data, String itemName, + ConsolFun consilidationFunction, Date timeBegin, Date timeEnd, long resolution) throws IOException { + RrdDb rrdDb = new RrdDb(RRD_FOLDER + File.separator + itemName + ".rrd"); + FetchRequest fetchRequest = rrdDb.createFetchRequest(consilidationFunction, Util.getTimestamp(timeBegin), + Util.getTimestamp(timeEnd), resolution); + FetchData fetchData = fetchRequest.fetchData(); + // logger.info(fetchData.toString()); + long[] timestamps = fetchData.getTimestamps(); + double[][] values = fetchData.getValues(); + + logger.debug("RRD fetch returned '{}' rows and '{}' columns", fetchData.getRowCount(), + fetchData.getColumnCount()); + + for (int row = 0; row < fetchData.getRowCount(); row++) { + // change to microseconds + long time = timestamps[row] * 1000; + + if (!data.containsKey(time)) { + data.put(time, new ArrayList()); + } + ArrayList vals = data.get(time); + int indexOffset = vals.size(); + for (int dsIndex = 0; dsIndex < fetchData.getColumnCount(); dsIndex++) { + vals.add(dsIndex + indexOffset, formatDouble(values[dsIndex][row], "null", true)); + } + } + rrdDb.close(); + + return data; + } + + static String formatDouble(double x, String nanString, boolean forceExponents) { + if (Double.isNaN(x)) { + return nanString; + } + if (forceExponents) { + return df.format(x); + } + return "" + x; + } +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/backend/EventBroadcaster.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/backend/EventBroadcaster.java new file mode 100644 index 0000000000000..92e3a7717cca6 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/backend/EventBroadcaster.java @@ -0,0 +1,65 @@ +/** + * Copyright (c) 2014-2015 openHAB UG (haftungsbeschraenkt) and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package org.openhab.ui.cometvisu.backend; + +import java.util.Map; + +import org.eclipse.smarthome.core.items.Item; +import org.eclipse.smarthome.core.types.State; + +/** + * Broadcast state change events of items to listening clients + * + * @author Tobias Bräutigam + * @since 2.0.0 + */ +public interface EventBroadcaster { + /** + * Broadcasts an event described by the given parameters to all currently + * listening clients. + * + * @param item + * - the item that should be broadcasted + * @param eventObject + * - bean that can be converted to a JSON object. + */ + public void broadcastEvent(final Object eventObject); + + /** + * listens to state changes of the given item, if it is part of the + * requested items + * + * @param item + * - the new item, that should be listened to + */ + public void registerItem(Item item); + + /** + * listens to state changes of the given item, if it is part of the + * requested items + * + * @param item + * - the new item, that should be listened to + */ + public void unregisterItem(Item item); + + /** + * listen for state changes from the requested items + */ + public void registerItems(); + + /** + * lists all client item names and the associated type which must be notified + * when the item changes + * + * @param item + * - the item that is listened to + * @return + */ + public Map> getClientItems(Item item); +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/backend/LoginResource.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/backend/LoginResource.java new file mode 100644 index 0000000000000..5e7abc517375d --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/backend/LoginResource.java @@ -0,0 +1,42 @@ +/** + * Copyright (c) 2014-2015 openHAB UG (haftungsbeschraenkt) and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package org.openhab.ui.cometvisu.backend; + +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.QueryParam; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.HttpHeaders; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; + +import org.eclipse.smarthome.io.rest.RESTResource; +import org.openhab.ui.cometvisu.backend.beans.LoginBean; +import org.openhab.ui.cometvisu.internal.Config; + +/** + * handles login request from the CometVisu client + * currently this is just a placeholder and does no real authentification + * + * @author Tobias Bräutigam + * @since 2.0.0 + */ +@Path(Config.COMETVISU_BACKEND_ALIAS + "/" + Config.COMETVISU_BACKEND_LOGIN_ALIAS) +public class LoginResource implements RESTResource { + + @GET + @Produces({ MediaType.APPLICATION_JSON }) + public Response getLogin(@Context HttpHeaders headers, @QueryParam("u") String user, + @QueryParam("p") String password, @QueryParam("d") String device) { + LoginBean bean = new LoginBean(); + bean.v = "0.0.1"; + bean.s = "0"; // Session-ID not needed with SSE + return Response.ok(bean, MediaType.APPLICATION_JSON).build(); + } +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/backend/ReadResource.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/backend/ReadResource.java new file mode 100644 index 0000000000000..7dc63f95f7044 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/backend/ReadResource.java @@ -0,0 +1,239 @@ +/** + * Copyright (c) 2014-2015 openHAB UG (haftungsbeschraenkt) and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package org.openhab.ui.cometvisu.backend; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.CopyOnWriteArrayList; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.QueryParam; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.UriInfo; + +import org.eclipse.smarthome.core.items.GenericItem; +import org.eclipse.smarthome.core.items.Item; +import org.eclipse.smarthome.core.items.ItemFactory; +import org.eclipse.smarthome.core.items.ItemNotFoundException; +import org.eclipse.smarthome.core.items.ItemRegistry; +import org.eclipse.smarthome.core.types.State; +import org.eclipse.smarthome.io.rest.RESTResource; +import org.glassfish.jersey.media.sse.EventOutput; +import org.glassfish.jersey.media.sse.SseBroadcaster; +import org.glassfish.jersey.media.sse.SseFeature; +import org.openhab.ui.cometvisu.backend.beans.StateBean; +import org.openhab.ui.cometvisu.internal.Config; +import org.openhab.ui.cometvisu.internal.listeners.StateEventListener; +import org.openhab.ui.cometvisu.internal.util.SseUtil; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * handles read request from the CometVisu client every request initializes a + * SSE communication + * + * @author Tobias Bräutigam + * @since 2.0.0 + */ +@Path(Config.COMETVISU_BACKEND_ALIAS + "/" + Config.COMETVISU_BACKEND_READ_ALIAS) +public class ReadResource implements EventBroadcaster, RESTResource { + private static final Logger logger = LoggerFactory.getLogger(ReadResource.class); + + private SseBroadcaster broadcaster = new SseBroadcaster(); + + private final ExecutorService executorService; + + private ItemRegistry itemRegistry; + + private StateEventListener stateEventListener; + + private List itemNames = new ArrayList(); + private Map>> items = new HashMap>>(); + + @Context + private UriInfo uriInfo; + + @Context + private HttpServletResponse response; + + @Context + private HttpServletRequest request; + + private Collection itemFactories = new CopyOnWriteArrayList(); + + public ReadResource() { + this.executorService = Executors.newSingleThreadExecutor(); + this.stateEventListener = new StateEventListener(); + this.stateEventListener.setEventBroadcaster(this); + } + + protected void setItemRegistry(ItemRegistry itemRegistry) { + this.itemRegistry = itemRegistry; + } + + protected void unsetItemRegistry(ItemRegistry itemRegistry) { + this.itemRegistry = null; + } + + protected void addItemFactory(ItemFactory itemFactory) { + itemFactories.add(itemFactory); + } + + protected void removeItemFactory(ItemFactory itemFactory) { + itemFactories.remove(itemFactory); + } + + /** + * Subscribes the connecting client to the stream of events filtered by the + * given eventFilter. + * + * @param eventFilter + * @return {@link EventOutput} object associated with the incoming + * connection. + * @throws IOException + * @throws InterruptedException + */ + @GET + @Produces(SseFeature.SERVER_SENT_EVENTS) + public Object getStates(@QueryParam("a") List itemNames, @QueryParam("i") long index, + @QueryParam("t") long time) throws IOException, InterruptedException { + final EventOutput eventOutput = new EventOutput(); + + this.itemNames = itemNames; + + broadcaster.add(eventOutput); + + // get all requested items and send their states to the client + items = new HashMap>>(); + // send the current states of all items to the client + if (this.itemRegistry != null) { + List states = new ArrayList(); + for (String cvItemName : itemNames) { + try { + String[] parts = cvItemName.split(":"); + String ohItemName = cvItemName; + Class stateClass = null; + if (parts.length == 2) { + String classPrefix = parts[0].toLowerCase(); + if (Config.itemTypeMapper.containsKey(classPrefix)) { + stateClass = Config.itemTypeMapper.get(classPrefix); + classPrefix += ":"; + } else { + logger.debug("no type found for '{}'", classPrefix); + classPrefix = ""; + } + ohItemName = parts[1]; + } + Item item = this.itemRegistry.getItem(ohItemName); + if (!items.containsKey(item)) { + items.put(item, new HashMap>()); + } + items.get(item).put(cvItemName, stateClass); + StateBean itemState = new StateBean(); + itemState.name = cvItemName; + + if (stateClass != null) { + itemState.state = item.getStateAs(stateClass).toString(); + logger.trace("get state of '{}' as '{}' == '{}'", item, stateClass, itemState.state); + } else { + itemState.state = item.getState().toString(); + } + states.add(itemState); + } catch (ItemNotFoundException e) { + logger.error(e.getLocalizedMessage()); + } + } + logger.debug("initially broadcasting " + states.size() + "/" + itemNames.size() + " item states"); + broadcaster.broadcast(SseUtil.buildEvent(states)); + } + // listen to state changes of the requested items + registerItems(); + + return eventOutput; + } + + /** + * listen for state changes from the requested items + */ + @Override + public void registerItems() { + for (Item item : items.keySet()) { + if (item instanceof GenericItem) { + ((GenericItem) item).addStateChangeListener(stateEventListener); + } + } + } + + /** + * listens to state changes of the given item, if it is part of the + * requested items + * + * @param item + * - the new item, that should be listened to + */ + @Override + public void registerItem(Item item) { + if (item == null || items.containsKey(item) || !itemNames.contains(item.getName())) + return; + if (item instanceof GenericItem) { + ((GenericItem) item).addStateChangeListener(stateEventListener); + } + } + + /** + * listens to state changes of the given item, if it is part of the + * requested items + * + * @param item + * - the new item, that should be listened to + */ + @Override + public void unregisterItem(Item item) { + if (item == null || items.containsKey(item) || !itemNames.contains(item.getName())) + return; + if (item instanceof GenericItem) { + ((GenericItem) item).removeStateChangeListener(stateEventListener); + items.remove(item); + } + } + + /** + * Broadcasts an event described by the given parameters to all currently + * listening clients. + * + * @param item + * - the item which has changed + * @param eventObject + * - bean that can be converted to a JSON object. + */ + @Override + public void broadcastEvent(final Object eventObject) { + executorService.execute(new Runnable() { + + @Override + public void run() { + broadcaster.broadcast(SseUtil.buildEvent(eventObject)); + } + }); + } + + @Override + public Map> getClientItems(Item item) { + return items.get(item); + } +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/backend/WriteResource.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/backend/WriteResource.java new file mode 100644 index 0000000000000..86d8679bc6b6b --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/backend/WriteResource.java @@ -0,0 +1,90 @@ +/** + * Copyright (c) 2014-2015 openHAB UG (haftungsbeschraenkt) and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package org.openhab.ui.cometvisu.backend; + +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.QueryParam; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.HttpHeaders; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; +import javax.ws.rs.core.UriInfo; + +import org.eclipse.smarthome.core.events.EventPublisher; +import org.eclipse.smarthome.core.items.Item; +import org.eclipse.smarthome.core.items.ItemNotFoundException; +import org.eclipse.smarthome.core.items.ItemRegistry; +import org.eclipse.smarthome.core.items.events.ItemEventFactory; +import org.eclipse.smarthome.core.types.Command; +import org.eclipse.smarthome.core.types.TypeParser; +import org.eclipse.smarthome.io.rest.RESTResource; +import org.openhab.ui.cometvisu.backend.beans.SuccessBean; +import org.openhab.ui.cometvisu.internal.Config; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * handles state updates send by the CometVisu client and forwars them to the EventPublisher + * + * @author Tobias Bräutigam + * @since 2.0.0 + */ +@Path(Config.COMETVISU_BACKEND_ALIAS + "/" + Config.COMETVISU_BACKEND_WRITE_ALIAS) +public class WriteResource implements RESTResource { + private static final Logger logger = LoggerFactory.getLogger(WriteResource.class); + + private ItemRegistry itemRegistry; + + private EventPublisher eventPublisher; + + @Context + private UriInfo uriInfo; + + @GET + @Produces({ MediaType.APPLICATION_JSON }) + public Response setState(@Context HttpHeaders headers, @QueryParam("a") String itemName, + @QueryParam("v") String value, @QueryParam("ts") long timestamp) { + if (logger.isDebugEnabled()) + logger.debug("Received CV write request at '{}' for item '{}' with value '{}'.", uriInfo.getPath(), + itemName, value); + Item item; + try { + item = itemRegistry.getItem(itemName); + Command command = TypeParser.parseCommand(item.getAcceptedCommandTypes(), value); + SuccessBean bean = new SuccessBean(); + if (command != null) { + eventPublisher.post(ItemEventFactory.createCommandEvent(item.getName(), command)); + bean.success = 1; + } else { + bean.success = 0; + } + return Response.ok(bean, MediaType.APPLICATION_JSON).build(); + } catch (ItemNotFoundException e) { + logger.error(e.getLocalizedMessage()); + return Response.notAcceptable(null).build(); + } + } + + protected void setItemRegistry(ItemRegistry itemRegistry) { + this.itemRegistry = itemRegistry; + } + + protected void unsetItemRegistry(ItemRegistry itemRegistry) { + this.itemRegistry = null; + } + + protected void setEventPublisher(EventPublisher eventPublisher) { + this.eventPublisher = eventPublisher; + } + + protected void unsetEventPublisher(EventPublisher eventPublisher) { + this.eventPublisher = null; + } +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/backend/beans/LoginBean.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/backend/beans/LoginBean.java new file mode 100644 index 0000000000000..fd7a32e1a9e28 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/backend/beans/LoginBean.java @@ -0,0 +1,22 @@ +/** + * Copyright (c) 2010-2015, openHAB.org and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package org.openhab.ui.cometvisu.backend.beans; + +/** + * This is a java bean that is used with JAXB to define the login entry + * page of the Cometvisu interface. + * + * @author Tobias Bräutigam + * @since 2.0.0 + * + */ +public class LoginBean { + public String v; + public String s; +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/backend/beans/StateBean.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/backend/beans/StateBean.java new file mode 100644 index 0000000000000..d6f2ab3f53fb7 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/backend/beans/StateBean.java @@ -0,0 +1,22 @@ +/** + * Copyright (c) 2014-2015 openHAB UG (haftungsbeschraenkt) and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package org.openhab.ui.cometvisu.backend.beans; + +/** + * Item bean for broadcasted item states. + * + * @author Tobias Bräutigam - Initial Contribution and API + * @since 2.0.0 + */ +public class StateBean { + + public String name; + + public String state; + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/backend/beans/SuccessBean.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/backend/beans/SuccessBean.java new file mode 100644 index 0000000000000..f76f8c0f4959d --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/backend/beans/SuccessBean.java @@ -0,0 +1,21 @@ +/** + * Copyright (c) 2010-2015, openHAB.org and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package org.openhab.ui.cometvisu.backend.beans; + +/** + * This is a java bean that is used with JAXB to define the login entry + * page of the Cometvisu interface. + * + * @author Tobias Bräutigam + * @since 2.0.0 + * + */ +public class SuccessBean { + public int success; +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/CometVisuDashboardTile.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/CometVisuDashboardTile.java new file mode 100644 index 0000000000000..513c6c15ec159 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/CometVisuDashboardTile.java @@ -0,0 +1,33 @@ +/** + * Copyright (c) 2014-2015 openHAB UG (haftungsbeschraenkt) and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package org.openhab.ui.cometvisu.internal; + +import org.openhab.ui.dashboard.DashboardTile; + +public class CometVisuDashboardTile implements DashboardTile { + @Override + public String getName() { + return "CometVisu"; + } + + @Override + public String getUrl() { + return Config.COMETVISU_WEBAPP_ALIAS + "/?config=demo"; + } + + @Override + public String getOverlay() { + return "html5"; + } + + @Override + public String getImageUrl() { + return "img/cometvisu.png"; + } +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/Config.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/Config.java new file mode 100644 index 0000000000000..a9824830f1a8e --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/Config.java @@ -0,0 +1,83 @@ +/** + * Copyright (c) 2014-2015 openHAB UG (haftungsbeschraenkt) and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package org.openhab.ui.cometvisu.internal; + +import java.io.File; +import java.util.Hashtable; + +import org.eclipse.smarthome.core.library.types.DateTimeType; +import org.eclipse.smarthome.core.library.types.DecimalType; +import org.eclipse.smarthome.core.library.types.HSBType; +import org.eclipse.smarthome.core.library.types.OnOffType; +import org.eclipse.smarthome.core.library.types.OpenClosedType; +import org.eclipse.smarthome.core.library.types.StringType; +import org.eclipse.smarthome.core.library.types.UpDownType; +import org.eclipse.smarthome.core.types.State; + +/** + * Utility class for constants. + * + * @author Tobias Bräutigam + * + */ +public class Config { + + public static final String COMETVISU_CONFIG = "org.openhab.cometvisu"; + + public static final String COMETVISU_ICON_CONFIG = "icons"; + + public static final String COMETVISU_ICON_MAPPING_CONFIG = "icons.mapping"; + + public static final String COMETVISU_ICON_ENABLE_MAPPING_PROPERTY = "enableMapping"; + + public static final String COMETVISU_WEBFOLDER_PROPERTY = "webFolder"; + + public static String COMETVISU_WEBFOLDER = "runtime/web/"; + + public static final String COMETVISU_WEBAPP_ALIAS_PROPERTY = "webAlias"; + + public static String COMETVISU_WEBAPP_ALIAS = "/cometvisu"; + + public static String COMETVISU_WEBAPP_USERFILE_FOLDER = File.separator + "cometvisu"; + + /* + * path of the cometvisu backend (automatically prefixed by /rest/) + * all the backend aliases must not be changed as they are hard coded in the CometVisu client + */ + public static final String COMETVISU_BACKEND_ALIAS = "cv"; + public static final String COMETVISU_BACKEND_LOGIN_ALIAS = "l"; + public static final String COMETVISU_BACKEND_READ_ALIAS = "r"; + public static final String COMETVISU_BACKEND_WRITE_ALIAS = "w"; + public static final String COMETVISU_BACKEND_CHART_ALIAS = "rrdfetch"; + + public static Hashtable iconConfig = new Hashtable(); + public static Hashtable iconMappings = new Hashtable(); + + public static Hashtable> configMappings = new Hashtable>(); + + /** + * maps CometVise address transform to State class + */ + public static Hashtable> itemTypeMapper = new Hashtable>(); + + static { + configMappings.put(COMETVISU_ICON_CONFIG, iconConfig); + configMappings.put(COMETVISU_ICON_MAPPING_CONFIG, iconMappings); + + itemTypeMapper.put("number", DecimalType.class); + itemTypeMapper.put("switch", OnOffType.class); + itemTypeMapper.put("contact", OpenClosedType.class); + itemTypeMapper.put("dimmer", DecimalType.class); + itemTypeMapper.put("rollershutter", UpDownType.class); + itemTypeMapper.put("string", StringType.class); + itemTypeMapper.put("datetime", DateTimeType.class); + itemTypeMapper.put("time", DateTimeType.class); + itemTypeMapper.put("color", HSBType.class); + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/CvActivator.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/CvActivator.java new file mode 100644 index 0000000000000..fb4e4dc13faa8 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/CvActivator.java @@ -0,0 +1,77 @@ +/** + * Copyright (c) 2014-2015 openHAB UG (haftungsbeschraenkt) and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package org.openhab.ui.cometvisu.internal; + +import org.glassfish.jersey.media.sse.SseFeature; +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; +import org.osgi.framework.ServiceRegistration; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * Bundle activator for CometVisu backend. + * + * @author Tobias Bräutigam - Initial Contribution and API + * + */ +public class CvActivator implements BundleActivator { + + private static final Logger logger = LoggerFactory.getLogger(CvActivator.class); + + private static BundleContext context; + + private ServiceRegistration sseFeatureRegistration; + + private ServiceRegistration blockingAsyncFeatureRegistration; + + /** + * Called whenever the OSGi framework starts our bundle + */ + @Override + public void start(BundleContext bc) throws Exception { + context = bc; + + String featureName = SseFeature.class.getName(); + if (bc.getServiceReference(featureName) == null) { + sseFeatureRegistration = bc.registerService(featureName, new SseFeature(), null); + + logger.debug("SSE API - SseFeature registered."); + } + logger.debug("SSE API has been started."); + } + + /** + * Called whenever the OSGi framework stops our bundle + */ + @Override + public void stop(BundleContext bc) throws Exception { + context = null; + + if (sseFeatureRegistration != null) { + sseFeatureRegistration.unregister(); + logger.debug("SseFeature unregistered."); + } + + if (blockingAsyncFeatureRegistration != null) { + blockingAsyncFeatureRegistration.unregister(); + logger.debug("BlockingAsyncFeature unregistered."); + } + + logger.debug("SSE API has been stopped."); + } + + /** + * Returns the bundle context of this bundle + * + * @return the bundle context + */ + public static BundleContext getContext() { + return context; + } +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/StateBeanMessageBodyWriter.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/StateBeanMessageBodyWriter.java new file mode 100644 index 0000000000000..a92d3ed768ffe --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/StateBeanMessageBodyWriter.java @@ -0,0 +1,90 @@ +/** + * Copyright (c) 2014-2015 openHAB UG (haftungsbeschraenkt) and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package org.openhab.ui.cometvisu.internal; + +import java.io.DataOutputStream; +import java.io.IOException; +import java.io.OutputStream; +import java.lang.annotation.Annotation; +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.List; + +import javax.ws.rs.Produces; +import javax.ws.rs.WebApplicationException; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.MultivaluedMap; +import javax.ws.rs.ext.MessageBodyWriter; +import javax.ws.rs.ext.Provider; + +import org.apache.commons.lang.StringUtils; +import org.openhab.ui.cometvisu.backend.beans.StateBean; + +/** + * {@link StateBeanMessageBodyWriter} is used to serialize state update messages + * for the CometVisu client + * + * @author Tobias Bräutigam + * @since 2.0.0 + */ +@Provider +@Produces(MediaType.APPLICATION_JSON) +public class StateBeanMessageBodyWriter implements MessageBodyWriter { + + // private static final Logger logger = LoggerFactory.getLogger(StateBeanMessageBodyWriter.class); + + @Override + public long getSize(Object arg0, Class arg1, Type arg2, Annotation[] arg3, MediaType arg4) { + // deprecated by JAX-RS 2.0 and ignored by Jersey runtime + return 0; + } + + @Override + public boolean isWriteable(Class type, Type genericType, Annotation[] arg2, MediaType arg3) { + return (type == StateBean.class || genericType == StateBean.class); + } + + @Override + public void writeTo(Object stateBean, Class type, Type genericType, Annotation[] annotations, + MediaType mediaType, MultivaluedMap httpHeaders, OutputStream entityStream) + throws IOException, WebApplicationException { + StringBuilder sb = new StringBuilder(); + sb.append(serialize(stateBean)); + try (DataOutputStream dos = new DataOutputStream(entityStream)) { + dos.writeUTF(sb.toString()); + } + } + + /** + * + * @param bean + * - StateBean or List + * @return String + * - CV-Protocol state update json format {d:{item:state,...}} + */ + public String serialize(Object bean) { + String msg = "{\"d\":{"; + if (bean instanceof StateBean) { + StateBean stateBean = (StateBean) bean; + msg += "\"" + stateBean.name + "\":\"" + stateBean.state + "\""; + } else if (bean instanceof List) { + List states = new ArrayList(); + for (Object bo : (List) bean) { + if (bo instanceof StateBean) { + StateBean stateBean = (StateBean) bo; + states.add("\"" + stateBean.name + "\":\"" + stateBean.state + "\""); + } + } + if (states.size() > 0) { + msg += StringUtils.join(states, ","); + } + } + msg += "}}"; + return msg; + } +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/async/BlockingAsyncBinder.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/async/BlockingAsyncBinder.java new file mode 100644 index 0000000000000..6225051f8ed8a --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/async/BlockingAsyncBinder.java @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2014-2015 openHAB UG (haftungsbeschraenkt) and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package org.openhab.ui.cometvisu.internal.async; + +import org.glassfish.hk2.utilities.binding.AbstractBinder; +import org.glassfish.jersey.internal.inject.CustomAnnotationLiteral; +import org.glassfish.jersey.servlet.spi.AsyncContextDelegateProvider; + +/** + * An {@link AbstractBinder} implementation that registers our custom + * {@link BlockingAsyncContextDelegateProvider} class as an implementation of + * the {@link AsyncContextDelegateProvider} SPI interface. + * + * @author Tobias Bräutigam - Initial Contribution and API + * + */ +public class BlockingAsyncBinder extends AbstractBinder { + + @Override + protected void configure() { + // the qualifiedBy is needed in order for our implementation to be used + // if there are multiple implementations of AsyncContextDelegateProvider + bind(new BlockingAsyncContextDelegateProvider()).to(AsyncContextDelegateProvider.class) + .qualifiedBy(CustomAnnotationLiteral.INSTANCE); + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/async/BlockingAsyncContextDelegateProvider.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/async/BlockingAsyncContextDelegateProvider.java new file mode 100644 index 0000000000000..741a953ee331d --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/async/BlockingAsyncContextDelegateProvider.java @@ -0,0 +1,94 @@ +/** + * Copyright (c) 2014-2015 openHAB UG (haftungsbeschraenkt) and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package org.openhab.ui.cometvisu.internal.async; + +import java.io.IOException; + +import javax.servlet.ServletOutputStream; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.openhab.ui.cometvisu.internal.util.SseUtil; +import org.glassfish.jersey.media.sse.SseFeature; +import org.glassfish.jersey.servlet.spi.AsyncContextDelegate; +import org.glassfish.jersey.servlet.spi.AsyncContextDelegateProvider; + +/** + * An {@link AsyncContextDelegateProvider} implementation that returns a + * blocking {@link AsyncContextDelegate}, which blocks while the connection is + * alive if the response content-type is {@link SseFeature #SERVER_SENT_EVENTS} + * or throws an UnsupportedOperationException otherwise. The blocking continues + * until the response can longer be written to. + * + * @author Tobias Bräutigam - Initial Contribution and API + * + */ +public class BlockingAsyncContextDelegateProvider implements AsyncContextDelegateProvider { + + @Override + public final AsyncContextDelegate createDelegate(final HttpServletRequest request, + final HttpServletResponse response) { + return new BlockingAsyncContextDelegate(request, response); + } + + private static final class BlockingAsyncContextDelegate implements AsyncContextDelegate { + private static final int PING_TIMEOUT = 15 * 1000; + + private final HttpServletResponse response; + + private volatile boolean isRunning; + + private BlockingAsyncContextDelegate(final HttpServletRequest request, final HttpServletResponse response) { + this.response = response; + } + + @Override + public void complete() { + isRunning = false; + } + + @Override + public void suspend() throws IllegalStateException { + if (SseUtil.shouldAsyncBlock()) { + isRunning = true; + + synchronized (this) { + while (isRunning) { + try { + this.wait(PING_TIMEOUT); + ServletOutputStream outputStream = response.getOutputStream(); + + // write a new line to the OutputStream and flush to + // check connectivity. If the other peer closes the + // connection, the first flush() should generate a + // TCP reset that is detected on the second flush() + outputStream.write('\n'); + response.flushBuffer(); + + outputStream.write('\n'); + response.flushBuffer(); + } catch (Exception exception) { + + // If an exception has occured during write and + // flush we consider the connection closed, attempt + // to close the outputstream and stop blocking. + try { + response.getOutputStream().close(); + } catch (IOException e) { + } + + isRunning = false; + } + } + } + } else { + throw new UnsupportedOperationException("ASYNCHRONOUS PROCESSING IS NOT SUPPORTED!"); + } + } + } +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/async/BlockingAsyncFeature.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/async/BlockingAsyncFeature.java new file mode 100644 index 0000000000000..3f2a54f4b4d4e --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/async/BlockingAsyncFeature.java @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2014-2015 openHAB UG (haftungsbeschraenkt) and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package org.openhab.ui.cometvisu.internal.async; + +import javax.ws.rs.core.Feature; +import javax.ws.rs.core.FeatureContext; + +/** + * A {@link Feature} implementation that registers our custom + * {@link BlockingAsyncBinder}. + * + * @author Tobias Bräutigam - Initial Contribution and API + * + */ +public class BlockingAsyncFeature implements Feature { + + @Override + public boolean configure(FeatureContext context) { + if (context.getConfiguration().isEnabled(BlockingAsyncFeature.class)) { + return false; + } + + context.register(new BlockingAsyncBinder()); + + return true; + } +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/AdapterCDATA.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/AdapterCDATA.java new file mode 100644 index 0000000000000..cf0d8458fb106 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/AdapterCDATA.java @@ -0,0 +1,23 @@ +package org.openhab.ui.cometvisu.internal.config; + +import javax.xml.bind.annotation.adapters.XmlAdapter; + +/** + * Adapter for marshaling CDATA content + * + * @author Tobias Bräutigam + * + */ +public class AdapterCDATA extends XmlAdapter { + + @Override + public String unmarshal(String v) throws Exception { + return String.format("", v); + } + + @Override + public String marshal(String v) throws Exception { + return v; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/ConfigHelper.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/ConfigHelper.java new file mode 100644 index 0000000000000..5682552b8207e --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/ConfigHelper.java @@ -0,0 +1,1075 @@ +/** + * Copyright (c) 2014-2015 openHAB UG (haftungsbeschraenkt) and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package org.openhab.ui.cometvisu.internal.config; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import javax.xml.bind.JAXBElement; + +import org.apache.commons.lang.StringEscapeUtils; +import org.eclipse.emf.common.util.EList; +import org.eclipse.smarthome.core.items.Item; +import org.eclipse.smarthome.core.library.types.DecimalType; +import org.eclipse.smarthome.core.library.types.OnOffType; +import org.eclipse.smarthome.core.library.types.OpenClosedType; +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.ui.icon.IconProvider; +import org.eclipse.smarthome.ui.icon.IconSet.Format; +import org.openhab.ui.cometvisu.internal.Config; +import org.openhab.ui.cometvisu.internal.config.beans.Address; +import org.openhab.ui.cometvisu.internal.config.beans.CDataStatus; +import org.openhab.ui.cometvisu.internal.config.beans.Entry; +import org.openhab.ui.cometvisu.internal.config.beans.Group; +import org.openhab.ui.cometvisu.internal.config.beans.Icon; +import org.openhab.ui.cometvisu.internal.config.beans.IconDefinition; +import org.openhab.ui.cometvisu.internal.config.beans.Icons; +import org.openhab.ui.cometvisu.internal.config.beans.Info; +import org.openhab.ui.cometvisu.internal.config.beans.Label; +import org.openhab.ui.cometvisu.internal.config.beans.Layout; +import org.openhab.ui.cometvisu.internal.config.beans.Line; +import org.openhab.ui.cometvisu.internal.config.beans.Mapping; +import org.openhab.ui.cometvisu.internal.config.beans.Mappings; +import org.openhab.ui.cometvisu.internal.config.beans.Multitrigger; +import org.openhab.ui.cometvisu.internal.config.beans.Navbar; +import org.openhab.ui.cometvisu.internal.config.beans.NavbarPositionType; +import org.openhab.ui.cometvisu.internal.config.beans.ObjectFactory; +import org.openhab.ui.cometvisu.internal.config.beans.Page; +import org.openhab.ui.cometvisu.internal.config.beans.Pagejump; +import org.openhab.ui.cometvisu.internal.config.beans.Pages; +import org.openhab.ui.cometvisu.internal.config.beans.Plugin; +import org.openhab.ui.cometvisu.internal.config.beans.Plugins; +import org.openhab.ui.cometvisu.internal.config.beans.Statusbar; +import org.openhab.ui.cometvisu.internal.config.beans.StylingEntry; +import org.openhab.ui.cometvisu.internal.config.beans.Stylings; +import org.openhab.ui.cometvisu.internal.config.beans.Text; +import org.openhab.ui.cometvisu.internal.config.beans.Trigger; +import org.openhab.ui.cometvisu.internal.config.beans.Widgetinfo; +import org.openhab.ui.cometvisu.servlet.CometVisuApp; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * a set of helper methods to convert an openHAB sitemap to a CometVisu config + * XML file. + * + * @author Tobias Bräutigam + * @since 2.0.0 + */ +public class ConfigHelper { + public enum Transform { + NUMBER, + SWITCH, + STRING, + ROLLERSHUTTER, + DATETIME, + TIME, + CONTACT, + DIMMER, + COLOR + } + + // MashMap(openHAB-Icon,CometVisu-Icon) + // private static HashMap iconMapping = new + // HashMap(); + + private final Logger logger = LoggerFactory.getLogger(ConfigHelper.class); + private Pages pages; + + private String sitemapName; + + private CometVisuApp app; + + private ObjectFactory factory = new ObjectFactory(); + + private HashMap mappings = new HashMap(); + + private HashMap chartPeriodMapping = new HashMap(); + + public final String defaultChartHeight = "300px"; + + private Pattern labelPattern = Pattern.compile(".+\\[(MAP\\(.+\\))?:?(.+)\\]$"); + + public ConfigHelper(Pages pages, CometVisuApp app, String sitemapName) { + this.pages = pages; + this.app = app; + this.sitemapName = sitemapName; + + logger.info("icon mapping enabled: " + Config.iconConfig.get(Config.COMETVISU_ICON_ENABLE_MAPPING_PROPERTY) + + ", " + Config.iconMappings.size() + " known mappings"); + + // this.initIconMapping(); + this.initBasicMappings(); + this.initBasicStylings(); + this.initStatusBar(); + + chartPeriodMapping.put("h", "hour"); + chartPeriodMapping.put("d", "day"); + chartPeriodMapping.put("w", "week"); + chartPeriodMapping.put("m", "month"); + chartPeriodMapping.put("y", "year"); + } + + public String getCvChartPeriod(String ohChartPeriod) { + if (chartPeriodMapping.containsKey(ohChartPeriod.toLowerCase())) { + return chartPeriodMapping.get(ohChartPeriod.toLowerCase()); + } else { + return ohChartPeriod.toLowerCase(); + } + } + + /** + * add the default statusbar know from the CometVisu´s demo config + */ + private void initStatusBar() { + Statusbar statusbar = new Statusbar(); + CDataStatus confStatus = new CDataStatus(); + confStatus.setType("html"); + confStatus.setValue( + "\"CometVisu\" by CometVisu.org"); + statusbar.getStatus().add(confStatus); + + CDataStatus reloadStatus = new CDataStatus(); + reloadStatus.setType("html"); + reloadStatus.setHrefextend("config"); + reloadStatus.setValue(" - Reload"); + statusbar.getStatus().add(reloadStatus); + + CDataStatus defaultStatus = new CDataStatus(); + defaultStatus.setType("html"); + defaultStatus.setValue(" - Default Config"); + statusbar.getStatus().add(defaultStatus); + + CDataStatus editStatus = new CDataStatus(); + editStatus.setType("html"); + editStatus.setCondition("!edit"); + editStatus.setHrefextend("config"); + editStatus.setValue(" - Edit"); + statusbar.getStatus().add(editStatus); + + CDataStatus checkStatus = new CDataStatus(); + checkStatus.setType("html"); + checkStatus.setHrefextend("config"); + String version = "autogenerated from openHAB " + sitemapName + " sitemap"; + checkStatus.setValue("- Check Config" + + "
Version: " + version + "
"); + statusbar.getStatus().add(checkStatus); + + pages.getMeta().getPluginsOrIconsOrMappings().add(statusbar); + } + + public boolean hasIconMapping(String ohIconName) { + return Config.iconConfig.get(Config.COMETVISU_ICON_ENABLE_MAPPING_PROPERTY) != null + && Config.iconConfig.get(Config.COMETVISU_ICON_ENABLE_MAPPING_PROPERTY).equals("true") + && Config.iconMappings.get(ohIconName) != null; + } + + public String getIconMapping(String ohIconName) { + return (String) Config.iconMappings.get(ohIconName); + } + + /** + * add some basic stylings + */ + private void initBasicStylings() { + StylingEntry styling = new StylingEntry(); + styling.setName("RedGreen"); + HashMap map = new HashMap(); + map.put("0", "red"); + map.put("1", "green"); + for (String value : map.keySet()) { + Entry entry = new Entry(); + entry.setValue(value); + entry.getContent().add(map.get(value)); + styling.getEntry().add(entry); + } + addToStylings(styling); + + styling = new StylingEntry(); + styling.setName("GreyGreen"); + map.clear(); + map.put("0", "grey"); + map.put("1", "green"); + for (String value : map.keySet()) { + Entry entry = new Entry(); + entry.setValue(value); + entry.getContent().add(map.get(value)); + styling.getEntry().add(entry); + } + addToStylings(styling); + + styling = new StylingEntry(); + styling.setName("GreenGrey"); + map.clear(); + map.put("0", "green"); + map.put("1", "grey"); + for (String value : map.keySet()) { + Entry entry = new Entry(); + entry.setValue(value); + entry.getContent().add(map.get(value)); + styling.getEntry().add(entry); + } + addToStylings(styling); + } + + /** + * add some basic mappings + */ + private void initBasicMappings() { + // Rollershutter mapping + Mapping mapping = new Mapping(); + mapping.setName("shutter"); + HashMap map = new HashMap(); + map.put("UP", "↑"); + map.put("STOP", "o"); + map.put("DOWN", "↓"); + for (String value : map.keySet()) { + Entry entry = new Entry(); + entry.setValue(value); + entry.getContent().add(map.get(value)); + mapping.getEntry().add(entry); + } + addToMappings(mapping); + + // On/Off + mapping = new Mapping(); + mapping.setName("OnOff"); + map.clear(); + map.put("0", "O"); + map.put("1", "I"); + for (String value : map.keySet()) { + Entry entry = new Entry(); + entry.setValue(value); + if (value == "0") + entry.setDefault(true); + entry.getContent().add(map.get(value)); + mapping.getEntry().add(entry); + } + addToMappings(mapping); + + // Open/Close (for contacts) + mapping = new Mapping(); + mapping.setName("OpenClose"); + HashMap iconMap = new HashMap(); + iconMap.put("1", createIcon("fts_window_1w_open", "red")); + iconMap.put("0", createIcon("fts_window_1w", null)); + for (String value : iconMap.keySet()) { + Entry entry = new Entry(); + entry.setValue(value); + entry.getContent().add(factory.createEntryIcon(iconMap.get(value))); + mapping.getEntry().add(entry); + } + addToMappings(mapping); + + // Up/Down + mapping = new Mapping(); + mapping.setName("UpDown"); + iconMap.clear(); + iconMap.put("1", createIcon("control_down", null)); + iconMap.put("0", createIcon("control_up", null)); + for (String value : iconMap.keySet()) { + Entry entry = new Entry(); + entry.setValue(value); + entry.getContent().add(factory.createEntryIcon(iconMap.get(value))); + mapping.getEntry().add(entry); + } + addToMappings(mapping); + } + + private Icon createIcon(String name, String color) { + Icon icon = new Icon(); + icon.setName(name); + if (color != null && !color.isEmpty()) + icon.setColor(color); + return icon; + } + + /** + * reads the address from the given item {@link Item } creates an + * {@link Address } element and adds it to the element object + * + * @param element + * - the element to which the Address should be added + * {@link Object } + * @param item + * - the item name is used to create the Address element + * {@link Item } + * @return - returns the created Address element {@link Address } + */ + public Address addAddress(Object element, Item item) { + return addAddress(element, item, Transform.STRING); + } + + /** + * reads the address from the given item {@link Item } creates an + * {@link Address } element with the given {@link Transform } and adds it to + * the element object + * + * @param element + * - the element to which the Address should be added + * {@link Object } + * @param item + * - the item name is used to create the Address element + * {@link Item } + * @param transform + * {@link Transform} - the transform type of the address + * @return - returns the created Address element {@link Address } + */ + public Address addAddress(Object element, Item item, Transform transform) { + return addAddress(element, item, transform, null); + } + + /** + * reads the address from the given item {@link Item } creates an + * {@link Address } element with the given {@link Transform } and adds it to + * the element object + * + * @param element + * - the element to which the Address should be added + * {@link Object } + * @param item + * - the item name is used to create the Address element + * {@link Item } + * @param transform + * {@link Transform} - the transform type of the address + * @param variant + * - variant of address (read,readwrite,write) + * @return - returns the created Address element {@link Address } + */ + @SuppressWarnings("unchecked") + public Address addAddress(Object element, Item item, Transform transform, String variant) { + if (element == null || item == null) + return null; + try { + Method getAddress = element.getClass().getMethod("getAddress"); + Address address = getAddress(item, transform, variant); + if (getAddress != null && address != null) { + ((List
) getAddress.invoke(element)).add(address); + return address; + } + } catch (NoSuchMethodException | SecurityException e) { + logger.error(e.getMessage()); + } catch (IllegalAccessException e) { + logger.error(e.getMessage()); + } catch (IllegalArgumentException e) { + logger.error(e.getMessage()); + } catch (InvocationTargetException e) { + logger.error(e.getMessage()); + } + return null; + } + + public Address getAddress(Item item, Transform transform) { + return getAddress(item, transform, null); + } + + public Address getAddress(Item item, Transform transform, String variant) { + if (item == null) + return null; + Address address = new Address(); + address.setTransform("OH:" + transform.toString().toLowerCase()); + address.setValue(item.getName()); + if (variant != null) { + address.setVariant(variant); + } + return address; + } + + public Label addLabel(Object element, Widget widget) { + return addLabel(element, getLabel(widget), null); + } + + public Label addLabel(Object element, String name) { + return addLabel(element, name, null); + } + + public Label addLabel(Object element, String name, String iconName) { + if (element == null) + return null; + try { + Method setter = element.getClass().getMethod("setLabel", Label.class); + if (setter != null) { + Label label = new Label(); + if (iconName != null) { + Icon icon = new Icon(); + icon.setName(iconName); + label.getContent().add(factory.createLabelIcon(icon)); + } + label.getContent().add(name); + setter.invoke(element, label); + return label; + } + } catch (NoSuchMethodException | SecurityException e) { + logger.error(e.getMessage()); + } catch (IllegalAccessException e) { + logger.error(e.getMessage()); + } catch (IllegalArgumentException e) { + logger.error(e.getMessage()); + } catch (InvocationTargetException e) { + logger.error(e.getMessage()); + } + return null; + } + + public Mapping createMapping(String name, EList sitemapMapping) { + Mapping mapping = null; + if (mappings.containsKey(name)) { + mapping = mappings.get(name); + } else { + // create Mapping from sitemap mapping + mapping = new Mapping(); + mapping.setName(name); + + for (org.eclipse.smarthome.model.sitemap.Mapping map : sitemapMapping) { + Entry entry = new Entry(); + entry.setValue(map.getCmd()); + entry.getContent().add(map.getLabel()); + mapping.getEntry().add(entry); + } + mappings.put(name, mapping); + addToMappings(mapping); + } + return mapping; + } + + public Mapping addMapping(Object element, Mapping mapping) { + if (element != null && mapping != null) { + try { + Method setter = element.getClass().getMethod("setMapping", String.class); + setter.invoke(element, mapping.getName()); + return mapping; + } catch (NoSuchMethodException | SecurityException e) { + logger.error(e.getMessage()); + } catch (IllegalAccessException e) { + logger.error(e.getMessage()); + } catch (IllegalArgumentException e) { + logger.error(e.getMessage()); + } catch (InvocationTargetException e) { + logger.error(e.getMessage()); + } + } + return null; + } + + public void addRollershutter(Object element, Item item, Widget widget) { + Group bean = new Group(); + bean.setNowidget(true); + bean.setLayout(createLayout(6)); + + // Text element as Label + Text text = new Text(); + text.setLayout(createLayout(3)); + addLabel(text, getLabel(widget), "fts_shutter"); + addToRoot(bean, factory.createPageText(text)); + + Address address = getAddress(item, Transform.ROLLERSHUTTER); + + Trigger upTrigger = new Trigger(); + upTrigger.setValue("UP"); + upTrigger.setMapping("shutter"); + upTrigger.getAddress().add(address); + upTrigger.setLayout(createLayout(1)); + addToRoot(bean, factory.createPageTrigger(upTrigger)); + + Trigger stopTrigger = new Trigger(); + stopTrigger.setValue("STOP"); + stopTrigger.setMapping("shutter"); + stopTrigger.getAddress().add(address); + stopTrigger.setLayout(createLayout(1)); + addToRoot(bean, factory.createPageTrigger(stopTrigger)); + + Trigger downTrigger = new Trigger(); + downTrigger.setValue("DOWN"); + downTrigger.setMapping("shutter"); + downTrigger.getAddress().add(address); + downTrigger.setLayout(createLayout(1)); + addToRoot(bean, factory.createPageTrigger(downTrigger)); + + addToRoot(element, factory.createPageGroup(bean)); + } + + public void mapToTriggers(Object element, Item item, Widget widget) { + EList sitemapMapping = getMapping(widget); + + int groupColumns = 6; + + Group bean = new Group(); + bean.setNowidget(true); + bean.setLayout(createLayout(groupColumns)); + + int textColumns = Math.min(3, groupColumns - sitemapMapping.size()); + int triggerColumns = Math.max(1, Math.round((groupColumns - textColumns) / sitemapMapping.size())); + + // Text element as Label + Text text = new Text(); + text.setLayout(createLayout(textColumns)); + addLabel(text, getLabel(widget)); + + addToRoot(bean, factory.createGroupText(text)); + + Transform transform = Transform.NUMBER; + + List> states = new ArrayList>(); + states.add(DecimalType.class); + states.add(OnOffType.class); + states.add(OpenClosedType.class); + states.add(UpDownType.class); + states.add(StringType.class); + + for (org.eclipse.smarthome.model.sitemap.Mapping map : sitemapMapping) { + Command command = TypeParser.parseCommand(states, map.getCmd()); + if (!(command instanceof DecimalType)) { + // no number command + transform = Transform.STRING; + break; + } + } + + Address address = getAddress(item, transform); + String mappingName = String.valueOf(sitemapMapping.hashCode()); + Mapping mapping = createMapping(mappingName, sitemapMapping); + addToMappings(mapping); + + for (org.eclipse.smarthome.model.sitemap.Mapping map : sitemapMapping) { + Trigger trigger = new Trigger(); + + trigger.setValue(map.getCmd()); + trigger.setMapping(mappingName); + trigger.getAddress().add(address); + trigger.setLayout(createLayout(triggerColumns)); + + addToRoot(bean, factory.createGroupTrigger(trigger)); + } + addToRoot(element, factory.createPageGroup(bean)); + } + + /** + * up to 4 mapping a multitrigger can be uses + * + * @param element + * @param item + * @param widget + */ + public void mapToMultiTrigger(Object element, Item item, Widget widget) { + EList sitemapMapping = getMapping(widget); + + Transform transform = Transform.NUMBER; + + List> states = new ArrayList>(); + states.add(DecimalType.class); + states.add(OnOffType.class); + states.add(OpenClosedType.class); + states.add(UpDownType.class); + states.add(StringType.class); + + for (org.eclipse.smarthome.model.sitemap.Mapping map : sitemapMapping) { + Command command = TypeParser.parseCommand(states, map.getCmd()); + if (!(command instanceof DecimalType)) { + // no number command + transform = Transform.STRING; + break; + } + } + + Address address = getAddress(item, transform); + // String mappingName = String.valueOf(sitemapMapping.hashCode()); + // Mapping mapping = createMapping(mappingName, sitemapMapping); + // addToMappings(mapping); + + Multitrigger mtrigger = factory.createMultitrigger(); + mtrigger.setShowstatus("true"); + addLabel(mtrigger, getLabel(widget)); + mtrigger.getAddress().add(address); + mtrigger.setLayout(createLayout(6)); + + int i = 1; + for (org.eclipse.smarthome.model.sitemap.Mapping map : sitemapMapping) { + switch (i) { + case 1: + mtrigger.setButton1Label(map.getLabel()); + mtrigger.setButton1Value(map.getCmd()); + break; + case 2: + mtrigger.setButton2Label(map.getLabel()); + mtrigger.setButton2Value(map.getCmd()); + break; + case 3: + mtrigger.setButton3Label(map.getLabel()); + mtrigger.setButton3Value(map.getCmd()); + break; + case 4: + mtrigger.setButton4Label(map.getLabel()); + mtrigger.setButton4Value(map.getCmd()); + break; + } + i++; + } + addToRoot(element, factory.createPageMultitrigger(mtrigger)); + } + + @SuppressWarnings("unchecked") + private EList getMapping(Widget widget) { + EList mapping = null; + try { + Method getter = widget.getClass().getMethod("getMappings"); + mapping = (EList) getter.invoke(widget); + } catch (NoSuchMethodException | SecurityException e) { + // do nothing, normal behaviour for item that have no mappingdefined + } catch (IllegalAccessException e) { + logger.error(e.getMessage()); + } catch (IllegalArgumentException e) { + logger.error(e.getMessage()); + } catch (InvocationTargetException e) { + logger.error(e.getMessage()); + } + return mapping; + } + + public Mapping addMapping(Object element, Widget widget) { + Mapping mapping = null; + EList smap = getMapping(widget); + if (smap != null && smap.size() > 0) { + mapping = addMapping(element, String.valueOf(smap.hashCode()), smap); + } + + return mapping; + } + + public Mapping addMapping(Object element, String name, + EList sitemapMapping) { + Mapping mapping = createMapping(name, sitemapMapping); + addMapping(element, mapping); + return mapping; + } + + public void addToMappings(Mapping mapping) { + Mappings mappings = null; + for (Object mp : pages.getMeta().getPluginsOrIconsOrMappings()) { + if (mp instanceof Mappings) { + mappings = (Mappings) mp; + for (Mapping map : mappings.getMapping()) { + if (map.getName().equals(mapping.getName())) { + // Mapping already exists + return; + } + } + } + } + if (mappings == null) { + mappings = new Mappings(); + pages.getMeta().getPluginsOrIconsOrMappings().add(mappings); + } + mappings.getMapping().add(mapping); + } + + /** + * map a @org.eclipse.smarthome.model.sitemap.ColorArray to an CometVisu + * styling TODO: CometVisu only knows min/max ranges for stylings, the + * mapping of openHAB´s conditions to these ranges is quite complex and not + * yet implemented + * + * @param bean + * the JAXB bean the styling is added to + * @param widget + * the openHAB @Widget the styling is read from + */ + public void addStyling(Object bean, Widget widget) { + // StylingEntry styling = null; + // EList smap = getStyling(widget); + // for (org.eclipse.smarthome.model.sitemap.ColorArray colors : smap) { + // Entry entry = new Entry(); + // entry.getContent().add(colors.getArg()); + // + // } + } + + public void addToStylings(StylingEntry styling) { + Stylings stylings = null; + for (Object mp : pages.getMeta().getPluginsOrIconsOrMappings()) { + if (mp instanceof Stylings) { + stylings = (Stylings) mp; + for (StylingEntry style : stylings.getStyling()) { + if (style.getName().equals(styling.getName())) { + // Styling already exists + return; + } + } + } + } + if (stylings == null) { + stylings = new Stylings(); + pages.getMeta().getPluginsOrIconsOrMappings().add(stylings); + } + stylings.getStyling().add(styling); + } + + public void addPlugin(Plugin plugin) { + boolean found = false; + Plugins plugins = null; + for (Object rp : pages.getMeta().getPluginsOrIconsOrMappings()) { + if (rp instanceof Plugins) { + plugins = (Plugins) rp; + for (Plugin p : plugins.getPlugin()) { + if (p.getName().equals(plugin.getName())) { + found = true; + break; + } + } + } + if (found) + break; + + } + if (!found) { + if (plugins == null) { + plugins = new Plugins(); + pages.getMeta().getPluginsOrIconsOrMappings().add(plugins); + } + plugins.getPlugin().add(plugin); + } + } + + public void addToRoot(Object root, JAXBElement child) { + if (root instanceof Page) { + ((Page) root).getPageOrGroupOrNavbar().add(child); + } else if (root instanceof Group) { + ((Group) root).getPageOrGroupOrLine().add(child); + } + } + + public Layout createLayout(int colspan) { + return createLayout(colspan, 1); + } + + public Layout createLayout(int colspan, int rowspan) { + Layout layout = new Layout(); + layout.setColspan(new BigDecimal(colspan)); + if (rowspan != 1) { + layout.setRowspan(new BigDecimal(rowspan)); + } + return layout; + } + + public String getLabel(Widget widget) { + String label = app.getItemUIRegistry().getLabel(widget); + // remove format + label = label.replaceAll("\\[.*\\]$", ""); + return StringEscapeUtils.escapeXml(label); + } + + // public JAXBElement convertToJAXBElement(Object bean) { + // return new JAXBElement(new QName(bean.getClass().getSimpleName() + // .toLowerCase()), bean.getClass(), bean); + // } + + /** + * add the separating line in the navbar + * + * @param page + * - the page the navbar should be searched in + * @param position + * - the position of the navbar + * @param ifNotEmpty + * - true: only add the separator ot the navbar has already + * content (e.g. prevent a seperator at the beginning of the + * navbar) + */ + public void addSeparatorToNavbar(Page page, NavbarPositionType position, boolean ifNotEmpty) { + Navbar navbar = getNavbar(page, position); + if (navbar != null) { + if (!ifNotEmpty || navbar.getPageOrGroupOrLine().size() > 0) { + Line line = new Line(); + line.setLayout(createLayout(0)); + navbar.getPageOrGroupOrLine().add(factory.createNavbarLine(line)); + } + } + } + + public String getExistingIconName(String ohIcon) { + if (ohIcon == null || ohIcon.isEmpty()) + return null; + if (hasIconMapping(ohIcon)) { + return getIconMapping(ohIcon); + } else { + // add the oh-icon to the icon definitions + for (IconProvider provider : app.getIconProviders()) { + logger.debug("searching for icon '{}' on provider '{}'", ohIcon, provider); + if (provider.hasIcon(ohIcon, "classic", Format.PNG) != null) { + IconDefinition iconDef = factory.createIconDefinition(); + iconDef.setUri("/icon/" + ohIcon + "?format=png"); + iconDef.setName("OH_" + ohIcon); + addIconDefinition(iconDef); + return "OH_" + ohIcon; + } + } + logger.debug("no icon named '{}' found", ohIcon); + return null; + } + } + + /** + * add a pagejump for the given page to the navbar + * + * @param page + * 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, + NavbarPositionType position, Item item) { + Pagejump pagejump = new Pagejump(); + pagejump.setBindClickToWidget(true); + pagejump.setTarget(targetPage.getName()); + String ohIcon = app.getItemUIRegistry().getCategory(widget); + if (NavbarPositionType.TOP.equals(position) || NavbarPositionType.BOTTOM.equals(position)) { + addLabel(pagejump, targetPage.getName(), getExistingIconName(ohIcon)); + } else { + // on LEFT / RIGHT navbar we use a different labeling approach + addLabel(pagejump, "", getExistingIconName(ohIcon)); + pagejump.setName(targetPage.getName()); + } + if (item != null && item.getLabel() != null) { + Matcher m = labelPattern.matcher(item.getLabel()); + String format = null; + if (m.matches()) { + format = m.group(2); + if (format.contains("%d")) { + Widgetinfo infowidget = new Widgetinfo(); + Info info = new Info(); + info.setFormat(format); + info.setLayout(createLayout(0)); + Address address = new Address(); + address.setTransform("OH:" + Transform.NUMBER.toString().toLowerCase()); + address.setValue(Transform.NUMBER.toString().toLowerCase() + ":" + item.getName()); + info.getAddress().add(address); + infowidget.setInfo(info); + pagejump.setWidgetinfo(infowidget); + } + } + + } + // add to Root page + addToNavbar(barPage, pagejump, position); + } + + public void addIconDefinition(IconDefinition iconDef) { + Icons icons = null; + for (Object entry : pages.getMeta().getPluginsOrIconsOrMappings()) { + if (entry instanceof Icons) { + icons = (Icons) entry; + break; + } + } + if (icons == null) { + icons = factory.createIcons(); + pages.getMeta().getPluginsOrIconsOrMappings().add(icons); + icons.getIconDefinition().add(iconDef); + } else { + // check if definition already exists + boolean found = false; + for (IconDefinition def : icons.getIconDefinition()) { + if (def.getName().equals(iconDef.getName())) { + found = true; + break; + } + } + if (!found) + icons.getIconDefinition().add(iconDef); + } + + logger.trace("adding icon-def '{}' url '{}'", iconDef.getName(), iconDef.getUri()); + } + + private Navbar getNavbar(Page page, NavbarPositionType position) { + Navbar navbar = null; + for (JAXBElement elem : page.getPageOrGroupOrNavbar()) { + if (elem.getValue() instanceof Navbar && ((Navbar) elem.getValue()).getPosition().equals(position)) { + navbar = (Navbar) elem.getValue(); + break; + } + } + return navbar; + } + + /** + * add the pagejump to the page´s navbar + * + * @param page + * @param pagejump + * @param position + * top, bottom, left, right navbar + */ + private void addToNavbar(Page page, Pagejump pagejump, NavbarPositionType position) { + Navbar navbar = getNavbar(page, position); + if (navbar == null) { + // create the navbar as it does not exist yet + navbar = new Navbar(); + navbar.setPosition(position); + navbar.setDynamic(true); + page.getPageOrGroupOrNavbar().add(factory.createPageNavbar(navbar)); + switch (position) { + case BOTTOM: + page.setShownavbarBottom(true); + break; + case LEFT: + navbar.setWidth("200px"); + page.setShownavbarLeft(true); + break; + case RIGHT: + navbar.setWidth("200px"); + page.setShownavbarRight(true); + break; + case TOP: + // page.setShowtopnavigation(true); + page.setShownavbarTop(true); + break; + } + } + if (NavbarPositionType.TOP.equals(position)) { + pagejump.setLayout(createLayout(0)); + } + navbar.getPageOrGroupOrLine().add(factory.createNavbarPagejump(pagejump)); + } + + public void addFormat(Object elem, String label) { + try { + Method method = elem.getClass().getMethod("setFormat", String.class); + Matcher m = labelPattern.matcher(label); + String format = null; + if (m.matches() && !m.group(2).equals("%s")) { // ignore simple string formats, they work out-of-the box + format = m.group(2); + method.invoke(elem, format); + } + } catch (NoSuchMethodException | SecurityException e) { + logger.error(e.getMessage()); + } catch (IllegalAccessException e) { + logger.error(e.getMessage()); + } catch (IllegalArgumentException e) { + logger.error(e.getMessage()); + } catch (InvocationTargetException e) { + logger.error(e.getMessage()); + } + + } + + /** + * clean up the tree (e.g. remove groups with no visible elements) + * + * @param pages + * - Pages,Page,Group element wich should be checked + */ + public void cleanup(Object page, Pages pages) { + List> children = new ArrayList>(); + if (page instanceof Pages) { + cleanup(((Pages) page).getPage(), pages); + } else if (page instanceof Page) { + children = ((Page) page).getPageOrGroupOrNavbar(); + } else if (page instanceof Group) { + children = ((Group) page).getPageOrGroupOrLine(); + } + List> childsToAdd = new ArrayList>(); + List> groupsToDelete = new ArrayList>(); + for (JAXBElement element : children) { + if (element.getValue() instanceof Page) { + // check if this page only has invisible subpages and a pagejump + // in the navbar => change the pagejump to the first subpage + Page p = (Page) element.getValue(); + int visible = 0; + Page firstChildPage = null; + for (JAXBElement ge : p.getPageOrGroupOrNavbar()) { + if (ge.getValue() instanceof Page) { + if (firstChildPage == null) + firstChildPage = (Page) ge.getValue(); + if (((Page) ge.getValue()).isVisible() == null + || ((Page) ge.getValue()).isVisible().booleanValue() == true) { + visible++; + } + } else if (ge.getValue() instanceof Group) { + visible++; + } + } + if (visible == 0 && firstChildPage != null) { + // find the pagejumps (only on the root page) + for (JAXBElement e : pages.getPage().getPageOrGroupOrNavbar()) { + if (e.getValue() instanceof Navbar) { + Navbar navbar = (Navbar) e.getValue(); + for (JAXBElement ne : navbar.getPageOrGroupOrLine()) { + if (ne.getValue() instanceof Pagejump) { + Pagejump pj = (Pagejump) ne.getValue(); + if (pj.getTarget().equals(p.getName())) { + pj.setTarget(firstChildPage.getName()); + } + } + } + } + } + } + cleanup(element.getValue(), pages); + } else if (element.getValue() instanceof Group) { + Group group = (Group) element.getValue(); + // check for visible elements + int visible = 0; + for (JAXBElement ge : group.getPageOrGroupOrLine()) { + if (ge == null || ge.getValue() == null) + continue; + if (ge.getValue() instanceof Page) { + Page p = (Page) ge.getValue(); + if (p.isVisible() == null || p.isVisible().booleanValue() == true) + visible++; + } else { + // all other elements are visible + visible++; + } + } + + if (visible == 0) { + if (logger.isTraceEnabled()) + logger.trace("group '{}' has no visible elements", group.getName()); + // group is empty move all pages to the groups parent page + // and delete the group + for (JAXBElement ge : group.getPageOrGroupOrLine()) { + childsToAdd.add(ge); + } + groupsToDelete.add(element); + } + cleanup(group, pages); + } + } + if (childsToAdd.size() > 0 && page instanceof Page) + if (logger.isTraceEnabled()) + logger.trace("there are '{}' children to be added to '{}'", childsToAdd.size(), + ((Page) page).getName()); + for (JAXBElement element : childsToAdd) { + if (page instanceof Page) { + ((Page) page).getPageOrGroupOrNavbar().add(element); + } else if (page instanceof Group) { + ((Group) page).getPageOrGroupOrLine().add(element); + } + } + for (JAXBElement element : groupsToDelete) { + if (page instanceof Page) { + if (logger.isTraceEnabled()) + logger.trace("removing group '{}' from '{}'", element, ((Page) page).getName()); + ((Page) page).getPageOrGroupOrNavbar().remove(element); + } else if (page instanceof Group) { + if (logger.isTraceEnabled()) + logger.trace("removing group '{}' from '{}'", element, ((Group) page).getName()); + ((Group) page).getPageOrGroupOrLine().remove(element); + } + } + } +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/VisuConfig.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/VisuConfig.java new file mode 100644 index 0000000000000..cefb70a28444c --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/VisuConfig.java @@ -0,0 +1,420 @@ +/** + * Copyright (c) 2014-2015 openHAB UG (haftungsbeschraenkt) and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package org.openhab.ui.cometvisu.internal.config; + +import java.io.File; +import java.io.StringWriter; +import java.math.BigDecimal; +import java.math.BigInteger; + +import javax.servlet.http.HttpServletRequest; +import javax.xml.XMLConstants; +import javax.xml.bind.JAXBContext; +import javax.xml.bind.JAXBException; +import javax.xml.bind.Marshaller; +import javax.xml.validation.Schema; +import javax.xml.validation.SchemaFactory; + +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.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.openhab.ui.cometvisu.internal.config.ConfigHelper.Transform; +import org.openhab.ui.cometvisu.internal.config.beans.Address; +import org.openhab.ui.cometvisu.internal.config.beans.Colorchooser; +import org.openhab.ui.cometvisu.internal.config.beans.Diagram; +import org.openhab.ui.cometvisu.internal.config.beans.Group; +import org.openhab.ui.cometvisu.internal.config.beans.Image; +import org.openhab.ui.cometvisu.internal.config.beans.Info; +import org.openhab.ui.cometvisu.internal.config.beans.LibVersion; +import org.openhab.ui.cometvisu.internal.config.beans.Mapping; +import org.openhab.ui.cometvisu.internal.config.beans.Meta; +import org.openhab.ui.cometvisu.internal.config.beans.NavbarPositionType; +import org.openhab.ui.cometvisu.internal.config.beans.ObjectFactory; +import org.openhab.ui.cometvisu.internal.config.beans.Page; +import org.openhab.ui.cometvisu.internal.config.beans.Pages; +import org.openhab.ui.cometvisu.internal.config.beans.Plugin; +import org.openhab.ui.cometvisu.internal.config.beans.Rrd; +import org.openhab.ui.cometvisu.internal.config.beans.SchemaPages; +import org.openhab.ui.cometvisu.internal.config.beans.Slide; +import org.openhab.ui.cometvisu.internal.config.beans.Switch; +import org.openhab.ui.cometvisu.internal.config.beans.Text; +import org.openhab.ui.cometvisu.internal.config.beans.Trigger; +import org.openhab.ui.cometvisu.internal.config.beans.Video; +import org.openhab.ui.cometvisu.internal.config.beans.Web; +import org.openhab.ui.cometvisu.servlet.CometVisuApp; +import org.rrd4j.ConsolFun; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.xml.sax.SAXException; + +/** + * Generates a CometVisu visu_config.xml settings file from an openHAB sitemap + * the result of this automatic configuration should be taken as a basis for + * customizing an own visu_config.xml, because thats the only way you can + * benefit from all the features the CometVisu offers (e.g. + * multi-column-layouts) + * + * @author Tobias Bräutigam + * @since 2.0.0 + * + */ +public class VisuConfig { + private final Logger logger = LoggerFactory.getLogger(VisuConfig.class); + + private Sitemap sitemap; + + /** + * relative path to the config XSD schema + */ + private final String schemaFile = "visu_config.xsd"; + + private CometVisuApp app; + + private ConfigHelper configHelper; + private File rootFolder; + + private ObjectFactory factory = new ObjectFactory(); + + public VisuConfig(Sitemap sitemap, CometVisuApp app, File rootFolder) { + this.sitemap = sitemap; + this.app = app; + this.rootFolder = rootFolder; + } + + /** + * generates a CometVisu config file from a sitemap + * + * @return valid XML config + */ + public String getConfigXml(HttpServletRequest req) { + SchemaPages pagesBean = new SchemaPages(); + pagesBean.setBackend("oh2"); + pagesBean.setDesign("metal"); + pagesBean.setEnableColumnAdjustment(true); + pagesBean.setMaxMobileScreenWidth(new BigDecimal(480)); + pagesBean.setBindClickToWidget(true); + + pagesBean.setLibVersion(BigInteger.valueOf(LibVersion.no)); + pagesBean.setScrollSpeed(new BigDecimal(0)); + + // set relative path to XSD file + int requestFolders = req.getPathInfo().substring(1).split("/").length; + logger.debug("requestPath '{}' has '{}' parts", req.getPathInfo(), requestFolders); + String relXsd = ""; + for (int i = 1; i < requestFolders; i++) { + relXsd += "../"; + } + pagesBean.setNoNamespaceSchemaLocation(relXsd + schemaFile); + + Meta meta = new Meta(); + pagesBean.setMeta(meta); + + configHelper = new ConfigHelper(pagesBean, app, sitemap.getName()); + createPages(pagesBean); + + return marshal(pagesBean, rootFolder.getAbsolutePath() + File.separator + schemaFile); + } + + private String marshal(Pages bean, String xsdSchema) { + String res = ""; + try { + JAXBContext jaxbContext = JAXBContext.newInstance(bean.getClass()); + SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); + Schema schema = (xsdSchema == null || xsdSchema.trim().length() == 0) ? null + : schemaFactory.newSchema(new File(xsdSchema)); + Marshaller marshaller = jaxbContext.createMarshaller(); + marshaller.setSchema(schema); + marshaller.setProperty(Marshaller.JAXB_ENCODING, "UTF-8"); + marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); + StringWriter sw = new StringWriter(); + marshaller.marshal(bean, sw); + res = sw.toString(); + } catch (JAXBException e) { + logger.error(e.getMessage(), e); + } catch (SAXException e) { + logger.error(e.getMessage(), e); + } + return res; + } + + private Pages createPages(Pages pagesBean) { + Page rootPage = new Page(); + rootPage.setName(sitemap.getName()); + pagesBean.setPage(rootPage); + try { + for (Widget widget : sitemap.getChildren()) { + processWidget(rootPage, widget, pagesBean, 0); + } + configHelper.cleanup(rootPage, pagesBean); + } catch (Exception e) { + logger.error(e.getMessage(), e); + // show the exception in the config + Text text = new Text(); + text.setFlavour("lithium"); + configHelper.addLabel(text, e.getClass() + ": " + e.getMessage()); + rootPage.getPageOrGroupOrNavbar().add(factory.createPageText(text)); + } + return pagesBean; + } + + /** + * traverse recursively through the sitemap tree (breadth-first) and + * generate the beans for later JAXB marshalling + * + * @param rootPage + * the current root page to which the widget should be added to + * @param widget + * the openHAB widget, which will be + * @param pages + * the root pages element of the config + * @param level + * the current tree level + */ + private void processWidget(Object rootPage, Widget widget, Pages pages, int level) { + Item item = null; + if (widget.getItem() != null) { + try { + item = app.getItemUIRegistry().getItem(widget.getItem()); + } catch (ItemNotFoundException e) { + logger.debug(e.getMessage()); + } + } + + if (widget instanceof LinkableWidget) { + EList 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) { + Group group = new Group(); + group.setLayout(configHelper.createLayout(6)); + group.setName(configHelper.getLabel(widget)); + configHelper.addToRoot(rootPage, factory.createPageGroup(group)); + for (Widget child : children) { + processWidget(group, child, pages, level + 1); + } + } else { + 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; + // add Group item to the Navbar + // logger.debug("page '{}' on level {}",page.getName(),level); + NavbarPositionType position = (level <= 1) ? NavbarPositionType.TOP : NavbarPositionType.LEFT; + Page barPage = (rootPage instanceof Page) ? (Page) rootPage : pages.getPage(); + if (NavbarPositionType.TOP.equals(position)) { + // add top navbar always to the root page + barPage = pages.getPage(); + } + // if (level==1) { + // configHelper.addSeparatorToNavbar(barPage, position, + // true); + // } + + configHelper.addToNavbar(barPage, page, group, position, item); + + // as the page is accessible via pagejump from a navbar we + // dont need the pagelink anymore + page.setVisible(false); + } + for (Widget child : children) { + processWidget(page, child, pages, level + 1); + } + } + } else { + processItemWidget(rootPage, widget, item, pages, level); + } + } + + 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 (item instanceof RollershutterItem) { + // in the demo-sitemap a rullershutter item is defined as + // switch??? + configHelper.addRollershutter(rootPage, item, switchWidget); + } else if (switchWidget.getMappings().size() > 0) { + // up to 5 mapping we can use a multitrigger + if (switchWidget.getMappings().size() <= 4) { + configHelper.mapToMultiTrigger(rootPage, item, switchWidget); + } else { + configHelper.mapToTriggers(rootPage, item, switchWidget); + } + } else { + + Switch switchBean = new Switch(); + switchBean.setStyling("GreyGreen"); + switchBean.setMapping("OnOff"); + configHelper.addAddress(switchBean, item, Transform.SWITCH); + configHelper.addLabel(switchBean, configHelper.getLabel(widget)); + + configHelper.addMapping(switchBean, widget); + configHelper.addStyling(switchBean, widget); + configHelper.addToRoot(rootPage, factory.createPageSwitch(switchBean)); + } + } else if (widget instanceof org.eclipse.smarthome.model.sitemap.Text) { + Info info = new Info(); + Transform transform = Transform.STRING; + boolean skipFormat = false; + if (item instanceof ContactItem) { + transform = Transform.CONTACT; + } else if (item instanceof DateTimeItem) { + transform = Transform.DATETIME; + skipFormat = true; // dont use the defined format for datetime as the cometvisu can´t handle it + } + Address address = configHelper.addAddress(info, item, transform); + if (address != null) { + address.setMode("read"); + if (item != null && !skipFormat) + configHelper.addFormat(info, item.getLabel()); + configHelper.addLabel(info, widget); + if (Transform.CONTACT.equals(transform)) { + info.setMapping("OpenClose"); + } else { + configHelper.addMapping(info, widget); + } + configHelper.addStyling(info, widget); + configHelper.addToRoot(rootPage, factory.createPageInfo(info)); + } else { + Text text = new Text(); + configHelper.addLabel(text, widget); + configHelper.addStyling(text, widget); + configHelper.addMapping(text, widget); + configHelper.addToRoot(rootPage, factory.createPageText(text)); + } + + } else if (widget instanceof org.eclipse.smarthome.model.sitemap.Slider) { + Slide bean = new Slide(); + bean.setFormat("%d%%"); + configHelper.addAddress(bean, item, Transform.DIMMER); + configHelper.addLabel(bean, widget); + configHelper.addToRoot(rootPage, factory.createPageSlide(bean)); + } else if (widget instanceof Setpoint) { + Setpoint setpoint = (Setpoint) widget; + Slide bean = new Slide(); + bean.setFormat("%d"); + bean.setMin(setpoint.getMinValue()); + bean.setMax(setpoint.getMaxValue()); + bean.setStep(setpoint.getStep()); + + configHelper.addAddress(bean, item, Transform.DIMMER); + configHelper.addLabel(bean, widget); + + configHelper.addToRoot(rootPage, factory.createPageSlide(bean)); + } else if (widget instanceof Selection) { + Selection selection = (Selection) widget; + // Map a Selection to a Group of triggers + Group bean = new Group(); + bean.setNowidget(true); + bean.setName(configHelper.getLabel(widget)); + + Address address = configHelper.getAddress(item, Transform.NUMBER); + String mappingName = String.valueOf(selection.getMappings().hashCode()); + Mapping mapping = configHelper.createMapping(mappingName, selection.getMappings()); + configHelper.addToMappings(mapping); + + for (org.eclipse.smarthome.model.sitemap.Mapping map : selection.getMappings()) { + Trigger trigger = new Trigger(); + trigger.setValue(map.getCmd()); + trigger.setMapping(mappingName); + trigger.getAddress().add(address); + trigger.setLayout(configHelper.createLayout(Math.max(1, 6 / selection.getMappings().size()))); + + configHelper.addToRoot(bean, factory.createPageTrigger(trigger)); + } + + configHelper.addToRoot(rootPage, factory.createPageGroup(bean)); + } else if (widget instanceof Webview) { + Webview webview = (Webview) widget; + Web bean = new Web(); + bean.setHeight(String.valueOf(webview.getHeight()) + "%"); + bean.setWidth("100%"); + bean.setSrc(webview.getUrl()); + bean.setRefresh(new BigDecimal(60)); + + 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; + Image bean = new Image(); + bean.setSrc(image.getUrl()); + bean.setRefresh(new BigDecimal(image.getRefresh())); + + 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; + 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) { + Plugin plugin = new Plugin(); + plugin.setName("diagram"); + configHelper.addPlugin(plugin); + org.eclipse.smarthome.model.sitemap.Chart chart = (org.eclipse.smarthome.model.sitemap.Chart) widget; + Diagram bean = new Diagram(); + bean.setSeries(configHelper.getCvChartPeriod(chart.getPeriod())); + bean.setRefresh(new BigInteger(String.valueOf(chart.getRefresh()))); + bean.setHeight(configHelper.defaultChartHeight); + + if (item instanceof GroupItem) { + for (Item member : ((GroupItem) item).getMembers()) { + Rrd rrd = new Rrd(); + rrd.setValue(member.getName()); + if (member instanceof NumberItem) { + rrd.setConsolidationFunction(ConsolFun.AVERAGE.toString()); + } else { + rrd.setConsolidationFunction(ConsolFun.MAX.toString()); + } + bean.getRrd().add(rrd); + } + } else { + Rrd rrd = new Rrd(); + rrd.setValue(item.getName()); + if (item instanceof NumberItem) { + rrd.setConsolidationFunction(ConsolFun.AVERAGE.toString()); + } else { + rrd.setConsolidationFunction(ConsolFun.MAX.toString()); + } + bean.getRrd().add(rrd); + } + + configHelper.addToRoot(rootPage, factory.createPageDiagram(bean)); + } else if (widget instanceof org.eclipse.smarthome.model.sitemap.Colorpicker) { + Plugin plugin = new Plugin(); + plugin.setName("colorchooser"); + configHelper.addPlugin(plugin); + + Colorchooser bean = new Colorchooser(); + configHelper.addAddress(bean, item, Transform.COLOR, "rgb"); + configHelper.addLabel(bean, widget); + + configHelper.addToRoot(rootPage, factory.createPageColorchooser(bean)); + } else { + logger.error("unhandled widget '{}'", widget); + } + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Address.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Address.java new file mode 100644 index 0000000000000..e6246abed18aa --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Address.java @@ -0,0 +1,146 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; + +/** + *

+ * Java class for address complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="address">
+ *   <simpleContent>
+ *     <extension base="<>addr">
+ *       <attribute ref="{}transform use="required""/>
+ *       <attribute ref="{}mode"/>
+ *       <attribute name="variant" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     </extension>
+ *   </simpleContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "address", propOrder = { "value" }) +public class Address { + + @XmlValue + protected String value; + @XmlAttribute(name = "transform", required = true) + protected String transform; + @XmlAttribute(name = "mode") + protected String mode; + @XmlAttribute(name = "variant") + protected String variant; + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setValue(String value) { + this.value = value; + } + + /** + * Gets the value of the transform property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTransform() { + return transform; + } + + /** + * Sets the value of the transform property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTransform(String value) { + this.transform = value; + } + + /** + * Gets the value of the mode property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getMode() { + return mode; + } + + /** + * Sets the value of the mode property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setMode(String value) { + this.mode = value; + } + + /** + * Gets the value of the variant property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getVariant() { + return variant; + } + + /** + * Sets the value of the variant property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setVariant(String value) { + this.variant = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Audio.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Audio.java new file mode 100644 index 0000000000000..1f9c0c782a4aa --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Audio.java @@ -0,0 +1,371 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for audio complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="audio">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="layout" type="{}layout" minOccurs="0"/>
+ *         <element name="label" type="{}label"/>
+ *         <element name="address" type="{}address" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="src" use="required" type="{}uri" />
+ *       <attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="threshold_value" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="width" type="{}dimension" />
+ *       <attribute name="height" type="{}dimension" />
+ *       <attribute name="volume" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="autoplay" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="loop" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute ref="{}flavour"/>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "audio", propOrder = { "layout", "label", "address" }) +public class Audio { + + protected Layout layout; + @XmlElement(required = true) + protected Label label; + protected List
address; + @XmlAttribute(name = "src", required = true) + protected String src; + @XmlAttribute(name = "id", required = true) + protected String id; + @XmlAttribute(name = "threshold_value") + protected String thresholdValue; + @XmlAttribute(name = "width") + protected String width; + @XmlAttribute(name = "height") + protected String height; + @XmlAttribute(name = "volume") + protected String volume; + @XmlAttribute(name = "autoplay") + protected String autoplay; + @XmlAttribute(name = "loop") + protected String loop; + @XmlAttribute(name = "flavour") + protected String flavour; + + /** + * Gets the value of the layout property. + * + * @return + * possible object is + * {@link Layout } + * + */ + public Layout getLayout() { + return layout; + } + + /** + * Sets the value of the layout property. + * + * @param value + * allowed object is + * {@link Layout } + * + */ + public void setLayout(Layout value) { + this.layout = value; + } + + /** + * Gets the value of the label property. + * + * @return + * possible object is + * {@link Label } + * + */ + public Label getLabel() { + return label; + } + + /** + * Sets the value of the label property. + * + * @param value + * allowed object is + * {@link Label } + * + */ + public void setLabel(Label value) { + this.label = value; + } + + /** + * Gets the value of the address property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the address property. + * + *

+ * For example, to add a new item, do as follows: + * + *

+     * getAddress().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Address } + * + * + */ + public List

getAddress() { + if (address == null) { + address = new ArrayList
(); + } + return this.address; + } + + /** + * Gets the value of the src property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSrc() { + return src; + } + + /** + * Sets the value of the src property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSrc(String value) { + this.src = value; + } + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + + /** + * Gets the value of the thresholdValue property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getThresholdValue() { + return thresholdValue; + } + + /** + * Sets the value of the thresholdValue property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setThresholdValue(String value) { + this.thresholdValue = value; + } + + /** + * Gets the value of the width property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getWidth() { + return width; + } + + /** + * Sets the value of the width property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setWidth(String value) { + this.width = value; + } + + /** + * Gets the value of the height property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getHeight() { + return height; + } + + /** + * Sets the value of the height property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setHeight(String value) { + this.height = value; + } + + /** + * Gets the value of the volume property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getVolume() { + return volume; + } + + /** + * Sets the value of the volume property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setVolume(String value) { + this.volume = value; + } + + /** + * Gets the value of the autoplay property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAutoplay() { + return autoplay; + } + + /** + * Sets the value of the autoplay property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAutoplay(String value) { + this.autoplay = value; + } + + /** + * Gets the value of the loop property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getLoop() { + return loop; + } + + /** + * Sets the value of the loop property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setLoop(String value) { + this.loop = value; + } + + /** + * Gets the value of the flavour property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFlavour() { + return flavour; + } + + /** + * Sets the value of the flavour property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFlavour(String value) { + this.flavour = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Axis.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Axis.java new file mode 100644 index 0000000000000..dcfa3eda1f256 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Axis.java @@ -0,0 +1,236 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import java.math.BigDecimal; +import java.math.BigInteger; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; + +/** + *

+ * Java class for axis complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="axis">
+ *   <simpleContent>
+ *     <extension base="<http://www.w3.org/2001/XMLSchema>string">
+ *       <attribute name="label" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="min" type="{http://www.w3.org/2001/XMLSchema}decimal" />
+ *       <attribute name="max" type="{http://www.w3.org/2001/XMLSchema}decimal" />
+ *       <attribute name="position">
+ *         <simpleType>
+ *           <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *             <enumeration value="left"/>
+ *             <enumeration value="right"/>
+ *           </restriction>
+ *         </simpleType>
+ *       </attribute>
+ *       <attribute name="unit" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="decimals" type="{http://www.w3.org/2001/XMLSchema}integer" />
+ *     </extension>
+ *   </simpleContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "axis", propOrder = { "value" }) +public class Axis { + + @XmlValue + protected String value; + @XmlAttribute(name = "label") + protected String label; + @XmlAttribute(name = "min") + protected BigDecimal min; + @XmlAttribute(name = "max") + protected BigDecimal max; + @XmlAttribute(name = "position") + protected String position; + @XmlAttribute(name = "unit") + protected String unit; + @XmlAttribute(name = "decimals") + protected BigInteger decimals; + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setValue(String value) { + this.value = value; + } + + /** + * Gets the value of the label property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getLabel() { + return label; + } + + /** + * Sets the value of the label property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setLabel(String value) { + this.label = value; + } + + /** + * Gets the value of the min property. + * + * @return + * possible object is + * {@link BigDecimal } + * + */ + public BigDecimal getMin() { + return min; + } + + /** + * Sets the value of the min property. + * + * @param value + * allowed object is + * {@link BigDecimal } + * + */ + public void setMin(BigDecimal value) { + this.min = value; + } + + /** + * Gets the value of the max property. + * + * @return + * possible object is + * {@link BigDecimal } + * + */ + public BigDecimal getMax() { + return max; + } + + /** + * Sets the value of the max property. + * + * @param value + * allowed object is + * {@link BigDecimal } + * + */ + public void setMax(BigDecimal value) { + this.max = value; + } + + /** + * Gets the value of the position property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPosition() { + return position; + } + + /** + * Sets the value of the position property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPosition(String value) { + this.position = value; + } + + /** + * Gets the value of the unit property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getUnit() { + return unit; + } + + /** + * Sets the value of the unit property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setUnit(String value) { + this.unit = value; + } + + /** + * Gets the value of the decimals property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getDecimals() { + return decimals; + } + + /** + * Sets the value of the decimals property. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setDecimals(BigInteger value) { + this.decimals = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Break.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Break.java new file mode 100644 index 0000000000000..55fe7cf9127d7 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Break.java @@ -0,0 +1,36 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for break complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="break">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "break") +public class Break { + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/CDataLabel.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/CDataLabel.java new file mode 100644 index 0000000000000..76ea86271675a --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/CDataLabel.java @@ -0,0 +1,50 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.03.20 at 05:23:12 PM CET +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + +import org.openhab.ui.cometvisu.internal.config.AdapterCDATA; + +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "label", propOrder = { "value" }) +public class CDataLabel extends Label { + + @XmlJavaTypeAdapter(AdapterCDATA.class) + @XmlValue + protected String value; + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setValue(String value) { + this.value = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/CDataStatus.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/CDataStatus.java new file mode 100644 index 0000000000000..fd50ca8764e02 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/CDataStatus.java @@ -0,0 +1,27 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.03.20 at 05:23:12 PM CET +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + +import org.openhab.ui.cometvisu.internal.config.AdapterCDATA; + +/** + * {@inheritDoc} + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "status", propOrder = { "value" }) +public class CDataStatus extends Status { + + @XmlJavaTypeAdapter(AdapterCDATA.class) + protected String value; + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Calendar.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Calendar.java new file mode 100644 index 0000000000000..df50922010260 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Calendar.java @@ -0,0 +1,228 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import java.math.BigDecimal; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; + +/** + *

+ * Java class for calendar complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="calendar">
+ *   <simpleContent>
+ *     <extension base="<http://www.w3.org/2001/XMLSchema>string">
+ *       <attribute name="type" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="userid" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="magiccookie" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="color" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="format" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="days" type="{http://www.w3.org/2001/XMLSchema}decimal" />
+ *     </extension>
+ *   </simpleContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "calendar", propOrder = { "value" }) +public class Calendar { + + @XmlValue + protected String value; + @XmlAttribute(name = "type", required = true) + protected String type; + @XmlAttribute(name = "userid", required = true) + protected String userid; + @XmlAttribute(name = "magiccookie") + protected String magiccookie; + @XmlAttribute(name = "color") + protected String color; + @XmlAttribute(name = "format") + protected String format; + @XmlAttribute(name = "days") + protected BigDecimal days; + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setValue(String value) { + this.value = value; + } + + /** + * Gets the value of the type property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getType() { + return type; + } + + /** + * Sets the value of the type property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setType(String value) { + this.type = value; + } + + /** + * Gets the value of the userid property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getUserid() { + return userid; + } + + /** + * Sets the value of the userid property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setUserid(String value) { + this.userid = value; + } + + /** + * Gets the value of the magiccookie property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getMagiccookie() { + return magiccookie; + } + + /** + * Sets the value of the magiccookie property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setMagiccookie(String value) { + this.magiccookie = value; + } + + /** + * Gets the value of the color property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getColor() { + return color; + } + + /** + * Sets the value of the color property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setColor(String value) { + this.color = value; + } + + /** + * Gets the value of the format property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFormat() { + return format; + } + + /** + * Sets the value of the format property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFormat(String value) { + this.format = value; + } + + /** + * Gets the value of the days property. + * + * @return + * possible object is + * {@link BigDecimal } + * + */ + public BigDecimal getDays() { + return days; + } + + /** + * Sets the value of the days property. + * + * @param value + * allowed object is + * {@link BigDecimal } + * + */ + public void setDays(BigDecimal value) { + this.days = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Calendarlist.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Calendarlist.java new file mode 100644 index 0000000000000..b2558420f69b9 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Calendarlist.java @@ -0,0 +1,184 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for calendarlist complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="calendarlist">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="layout" type="{}layout" minOccurs="0"/>
+ *         <element name="calendar" type="{}calendar" maxOccurs="unbounded"/>
+ *       </sequence>
+ *       <attribute name="maxquantity" type="{http://www.w3.org/2001/XMLSchema}decimal" />
+ *       <attribute name="refresh" use="required" type="{http://www.w3.org/2001/XMLSchema}decimal" />
+ *       <attribute name="days" type="{http://www.w3.org/2001/XMLSchema}decimal" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "calendarlist", propOrder = { "layout", "calendar" }) +public class Calendarlist { + + protected Layout layout; + @XmlElement(required = true) + protected List calendar; + @XmlAttribute(name = "maxquantity") + protected BigDecimal maxquantity; + @XmlAttribute(name = "refresh", required = true) + protected BigDecimal refresh; + @XmlAttribute(name = "days") + protected BigDecimal days; + + /** + * Gets the value of the layout property. + * + * @return + * possible object is + * {@link Layout } + * + */ + public Layout getLayout() { + return layout; + } + + /** + * Sets the value of the layout property. + * + * @param value + * allowed object is + * {@link Layout } + * + */ + public void setLayout(Layout value) { + this.layout = value; + } + + /** + * Gets the value of the calendar property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the calendar property. + * + *

+ * For example, to add a new item, do as follows: + * + *

+     * getCalendar().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Calendar } + * + * + */ + public List getCalendar() { + if (calendar == null) { + calendar = new ArrayList(); + } + return this.calendar; + } + + /** + * Gets the value of the maxquantity property. + * + * @return + * possible object is + * {@link BigDecimal } + * + */ + public BigDecimal getMaxquantity() { + return maxquantity; + } + + /** + * Sets the value of the maxquantity property. + * + * @param value + * allowed object is + * {@link BigDecimal } + * + */ + public void setMaxquantity(BigDecimal value) { + this.maxquantity = value; + } + + /** + * Gets the value of the refresh property. + * + * @return + * possible object is + * {@link BigDecimal } + * + */ + public BigDecimal getRefresh() { + return refresh; + } + + /** + * Sets the value of the refresh property. + * + * @param value + * allowed object is + * {@link BigDecimal } + * + */ + public void setRefresh(BigDecimal value) { + this.refresh = value; + } + + /** + * Gets the value of the days property. + * + * @return + * possible object is + * {@link BigDecimal } + * + */ + public BigDecimal getDays() { + return days; + } + + /** + * Sets the value of the days property. + * + * @param value + * allowed object is + * {@link BigDecimal } + * + */ + public void setDays(BigDecimal value) { + this.days = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Clock.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Clock.java new file mode 100644 index 0000000000000..d2cbcbd87f8a3 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Clock.java @@ -0,0 +1,127 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for clock complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="clock">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="layout" type="{}layout" minOccurs="0"/>
+ *         <element name="label" type="{}label" minOccurs="0"/>
+ *         <element name="address" type="{}address" maxOccurs="unbounded"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "clock", propOrder = { "layout", "label", "address" }) +public class Clock { + + protected Layout layout; + protected Label label; + @XmlElement(required = true) + protected List
address; + + /** + * Gets the value of the layout property. + * + * @return + * possible object is + * {@link Layout } + * + */ + public Layout getLayout() { + return layout; + } + + /** + * Sets the value of the layout property. + * + * @param value + * allowed object is + * {@link Layout } + * + */ + public void setLayout(Layout value) { + this.layout = value; + } + + /** + * Gets the value of the label property. + * + * @return + * possible object is + * {@link Label } + * + */ + public Label getLabel() { + return label; + } + + /** + * Sets the value of the label property. + * + * @param value + * allowed object is + * {@link Label } + * + */ + public void setLabel(Label value) { + this.label = value; + } + + /** + * Gets the value of the address property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the address property. + * + *

+ * For example, to add a new item, do as follows: + * + *

+     * getAddress().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Address } + * + * + */ + public List

getAddress() { + if (address == null) { + address = new ArrayList
(); + } + return this.address; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Colorchooser.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Colorchooser.java new file mode 100644 index 0000000000000..97d9b966edf08 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Colorchooser.java @@ -0,0 +1,127 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for colorchooser complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="colorchooser">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="layout" type="{}layout" minOccurs="0"/>
+ *         <element name="label" type="{}label" minOccurs="0"/>
+ *         <element name="address" type="{}address" maxOccurs="unbounded"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "colorchooser", propOrder = { "layout", "label", "address" }) +public class Colorchooser { + + protected Layout layout; + protected Label label; + @XmlElement(required = true) + protected List
address; + + /** + * Gets the value of the layout property. + * + * @return + * possible object is + * {@link Layout } + * + */ + public Layout getLayout() { + return layout; + } + + /** + * Sets the value of the layout property. + * + * @param value + * allowed object is + * {@link Layout } + * + */ + public void setLayout(Layout value) { + this.layout = value; + } + + /** + * Gets the value of the label property. + * + * @return + * possible object is + * {@link Label } + * + */ + public Label getLabel() { + return label; + } + + /** + * Sets the value of the label property. + * + * @param value + * allowed object is + * {@link Label } + * + */ + public void setLabel(Label value) { + this.label = value; + } + + /** + * Gets the value of the address property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the address property. + * + *

+ * For example, to add a new item, do as follows: + * + *

+     * getAddress().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Address } + * + * + */ + public List

getAddress() { + if (address == null) { + address = new ArrayList
(); + } + return this.address; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Designtoggle.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Designtoggle.java new file mode 100644 index 0000000000000..1806c915a6c60 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Designtoggle.java @@ -0,0 +1,91 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for designtoggle complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="designtoggle">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="layout" type="{}layout" minOccurs="0"/>
+ *         <element name="label" type="{}label" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "designtoggle", propOrder = { "layout", "label" }) +public class Designtoggle { + + protected Layout layout; + protected Label label; + + /** + * Gets the value of the layout property. + * + * @return + * possible object is + * {@link Layout } + * + */ + public Layout getLayout() { + return layout; + } + + /** + * Sets the value of the layout property. + * + * @param value + * allowed object is + * {@link Layout } + * + */ + public void setLayout(Layout value) { + this.layout = value; + } + + /** + * Gets the value of the label property. + * + * @return + * possible object is + * {@link Label } + * + */ + public Label getLabel() { + return label; + } + + /** + * Sets the value of the label property. + * + * @param value + * allowed object is + * {@link Label } + * + */ + public void setLabel(Label value) { + this.label = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Diagram.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Diagram.java new file mode 100644 index 0000000000000..10b37039dc3ba --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Diagram.java @@ -0,0 +1,645 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import java.math.BigInteger; +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for diagram complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="diagram">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="layout" type="{}layout" minOccurs="0"/>
+ *         <element name="label" type="{}label" minOccurs="0"/>
+ *         <element name="axis" type="{}axis" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="rrd" type="{}rrd" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="width" type="{}dimension" />
+ *       <attribute name="height" type="{}dimension" />
+ *       <attribute name="popup" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       <attribute name="previewlabels" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       <attribute ref="{}series"/>
+ *       <attribute name="refresh" type="{http://www.w3.org/2001/XMLSchema}integer" />
+ *       <attribute name="period" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="gridcolor" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute ref="{}legend"/>
+ *       <attribute ref="{}legendposition"/>
+ *       <attribute name="title" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="tooltip" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       <attribute ref="{}timeformat"/>
+ *       <attribute ref="{}timeformatTooltip"/>
+ *       <attribute name="zoomYAxis" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       <attribute ref="{}seriesStart"/>
+ *       <attribute ref="{}seriesEnd"/>
+ *       <attribute ref="{}seriesResolution"/>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "diagram", propOrder = { "layout", "label", "axis", "rrd" }) +public class Diagram { + + protected Layout layout; + protected Label label; + protected List axis; + protected List rrd; + @XmlAttribute(name = "width") + protected String width; + @XmlAttribute(name = "height") + protected String height; + @XmlAttribute(name = "popup") + protected Boolean popup; + @XmlAttribute(name = "previewlabels") + protected Boolean previewlabels; + @XmlAttribute(name = "series") + protected String series; + @XmlAttribute(name = "refresh") + protected BigInteger refresh; + @XmlAttribute(name = "period") + protected String period; + @XmlAttribute(name = "gridcolor") + protected String gridcolor; + @XmlAttribute(name = "legend") + protected String legend; + @XmlAttribute(name = "legendposition") + protected String legendposition; + @XmlAttribute(name = "title") + protected String title; + @XmlAttribute(name = "tooltip") + protected Boolean tooltip; + @XmlAttribute(name = "timeformat") + protected String timeformat; + @XmlAttribute(name = "timeformatTooltip") + protected String timeformatTooltip; + @XmlAttribute(name = "zoomYAxis") + protected Boolean zoomYAxis; + @XmlAttribute(name = "seriesStart") + protected String seriesStart; + @XmlAttribute(name = "seriesEnd") + protected String seriesEnd; + @XmlAttribute(name = "seriesResolution") + protected BigInteger seriesResolution; + + /** + * Gets the value of the layout property. + * + * @return + * possible object is + * {@link Layout } + * + */ + public Layout getLayout() { + return layout; + } + + /** + * Sets the value of the layout property. + * + * @param value + * allowed object is + * {@link Layout } + * + */ + public void setLayout(Layout value) { + this.layout = value; + } + + /** + * Gets the value of the label property. + * + * @return + * possible object is + * {@link Label } + * + */ + public Label getLabel() { + return label; + } + + /** + * Sets the value of the label property. + * + * @param value + * allowed object is + * {@link Label } + * + */ + public void setLabel(Label value) { + this.label = value; + } + + /** + * Gets the value of the axis property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the axis property. + * + *

+ * For example, to add a new item, do as follows: + * + *

+     * getAxis().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Axis } + * + * + */ + public List getAxis() { + if (axis == null) { + axis = new ArrayList(); + } + return this.axis; + } + + /** + * Gets the value of the rrd property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the rrd property. + * + *

+ * For example, to add a new item, do as follows: + * + *

+     * getRrd().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Rrd } + * + * + */ + public List getRrd() { + if (rrd == null) { + rrd = new ArrayList(); + } + return this.rrd; + } + + /** + * Gets the value of the width property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getWidth() { + return width; + } + + /** + * Sets the value of the width property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setWidth(String value) { + this.width = value; + } + + /** + * Gets the value of the height property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getHeight() { + return height; + } + + /** + * Sets the value of the height property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setHeight(String value) { + this.height = value; + } + + /** + * Gets the value of the popup property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isPopup() { + return popup; + } + + /** + * Sets the value of the popup property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setPopup(Boolean value) { + this.popup = value; + } + + /** + * Gets the value of the previewlabels property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isPreviewlabels() { + return previewlabels; + } + + /** + * Sets the value of the previewlabels property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setPreviewlabels(Boolean value) { + this.previewlabels = value; + } + + /** + * Gets the value of the series property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSeries() { + return series; + } + + /** + * Sets the value of the series property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSeries(String value) { + this.series = value; + } + + /** + * Gets the value of the refresh property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getRefresh() { + return refresh; + } + + /** + * Sets the value of the refresh property. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setRefresh(BigInteger value) { + this.refresh = value; + } + + /** + * Gets the value of the period property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPeriod() { + return period; + } + + /** + * Sets the value of the period property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPeriod(String value) { + this.period = value; + } + + /** + * Gets the value of the gridcolor property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getGridcolor() { + return gridcolor; + } + + /** + * Sets the value of the gridcolor property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setGridcolor(String value) { + this.gridcolor = value; + } + + /** + * Gets the value of the legend property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getLegend() { + return legend; + } + + /** + * Sets the value of the legend property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setLegend(String value) { + this.legend = value; + } + + /** + * Gets the value of the legendposition property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getLegendposition() { + return legendposition; + } + + /** + * Sets the value of the legendposition property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setLegendposition(String value) { + this.legendposition = value; + } + + /** + * Gets the value of the title property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTitle() { + return title; + } + + /** + * Sets the value of the title property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTitle(String value) { + this.title = value; + } + + /** + * Gets the value of the tooltip property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isTooltip() { + return tooltip; + } + + /** + * Sets the value of the tooltip property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setTooltip(Boolean value) { + this.tooltip = value; + } + + /** + * Gets the value of the timeformat property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTimeformat() { + return timeformat; + } + + /** + * Sets the value of the timeformat property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTimeformat(String value) { + this.timeformat = value; + } + + /** + * Gets the value of the timeformatTooltip property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTimeformatTooltip() { + return timeformatTooltip; + } + + /** + * Sets the value of the timeformatTooltip property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTimeformatTooltip(String value) { + this.timeformatTooltip = value; + } + + /** + * Gets the value of the zoomYAxis property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isZoomYAxis() { + return zoomYAxis; + } + + /** + * Sets the value of the zoomYAxis property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setZoomYAxis(Boolean value) { + this.zoomYAxis = value; + } + + /** + * Gets the value of the seriesStart property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSeriesStart() { + return seriesStart; + } + + /** + * Sets the value of the seriesStart property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSeriesStart(String value) { + this.seriesStart = value; + } + + /** + * Gets the value of the seriesEnd property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSeriesEnd() { + return seriesEnd; + } + + /** + * Sets the value of the seriesEnd property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSeriesEnd(String value) { + this.seriesEnd = value; + } + + /** + * Gets the value of the seriesResolution property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getSeriesResolution() { + return seriesResolution; + } + + /** + * Sets the value of the seriesResolution property. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setSeriesResolution(BigInteger value) { + this.seriesResolution = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/DiagramInfo.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/DiagramInfo.java new file mode 100644 index 0000000000000..f007c532b00e6 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/DiagramInfo.java @@ -0,0 +1,704 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import java.math.BigInteger; +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for diagram_info complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="diagram_info">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="layout" type="{}layout" minOccurs="0"/>
+ *         <element name="label" type="{}label" minOccurs="0"/>
+ *         <element name="axis" type="{}axis" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="rrd" type="{}rrd" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="address" type="{}address" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute ref="{}format"/>
+ *       <attribute ref="{}styling"/>
+ *       <attribute ref="{}mapping"/>
+ *       <attribute ref="{}align"/>
+ *       <attribute ref="{}bind_click_to_widget"/>
+ *       <attribute ref="{}series"/>
+ *       <attribute name="refresh" type="{http://www.w3.org/2001/XMLSchema}integer" />
+ *       <attribute name="period" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="gridcolor" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute ref="{}legend"/>
+ *       <attribute ref="{}legendposition"/>
+ *       <attribute name="title" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="tooltip" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       <attribute ref="{}timeformat"/>
+ *       <attribute ref="{}timeformatTooltip"/>
+ *       <attribute name="zoomYAxis" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       <attribute ref="{}seriesStart"/>
+ *       <attribute ref="{}seriesEnd"/>
+ *       <attribute ref="{}seriesResolution"/>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "diagram_info", propOrder = { "layout", "label", "axis", "rrd", "address" }) +public class DiagramInfo { + + protected Layout layout; + protected Label label; + protected List axis; + protected List rrd; + protected List
address; + @XmlAttribute(name = "format") + protected String format; + @XmlAttribute(name = "styling") + protected String styling; + @XmlAttribute(name = "mapping") + protected String mapping; + @XmlAttribute(name = "align") + protected String align; + @XmlAttribute(name = "bind_click_to_widget") + protected Boolean bindClickToWidget; + @XmlAttribute(name = "series") + protected String series; + @XmlAttribute(name = "refresh") + protected BigInteger refresh; + @XmlAttribute(name = "period") + protected String period; + @XmlAttribute(name = "gridcolor") + protected String gridcolor; + @XmlAttribute(name = "legend") + protected String legend; + @XmlAttribute(name = "legendposition") + protected String legendposition; + @XmlAttribute(name = "title") + protected String title; + @XmlAttribute(name = "tooltip") + protected Boolean tooltip; + @XmlAttribute(name = "timeformat") + protected String timeformat; + @XmlAttribute(name = "timeformatTooltip") + protected String timeformatTooltip; + @XmlAttribute(name = "zoomYAxis") + protected Boolean zoomYAxis; + @XmlAttribute(name = "seriesStart") + protected String seriesStart; + @XmlAttribute(name = "seriesEnd") + protected String seriesEnd; + @XmlAttribute(name = "seriesResolution") + protected BigInteger seriesResolution; + + /** + * Gets the value of the layout property. + * + * @return + * possible object is + * {@link Layout } + * + */ + public Layout getLayout() { + return layout; + } + + /** + * Sets the value of the layout property. + * + * @param value + * allowed object is + * {@link Layout } + * + */ + public void setLayout(Layout value) { + this.layout = value; + } + + /** + * Gets the value of the label property. + * + * @return + * possible object is + * {@link Label } + * + */ + public Label getLabel() { + return label; + } + + /** + * Sets the value of the label property. + * + * @param value + * allowed object is + * {@link Label } + * + */ + public void setLabel(Label value) { + this.label = value; + } + + /** + * Gets the value of the axis property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the axis property. + * + *

+ * For example, to add a new item, do as follows: + * + *

+     * getAxis().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Axis } + * + * + */ + public List getAxis() { + if (axis == null) { + axis = new ArrayList(); + } + return this.axis; + } + + /** + * Gets the value of the rrd property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the rrd property. + * + *

+ * For example, to add a new item, do as follows: + * + *

+     * getRrd().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Rrd } + * + * + */ + public List getRrd() { + if (rrd == null) { + rrd = new ArrayList(); + } + return this.rrd; + } + + /** + * Gets the value of the address property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the address property. + * + *

+ * For example, to add a new item, do as follows: + * + *

+     * getAddress().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Address } + * + * + */ + public List

getAddress() { + if (address == null) { + address = new ArrayList
(); + } + return this.address; + } + + /** + * Gets the value of the format property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFormat() { + return format; + } + + /** + * Sets the value of the format property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFormat(String value) { + this.format = value; + } + + /** + * Gets the value of the styling property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getStyling() { + return styling; + } + + /** + * Sets the value of the styling property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setStyling(String value) { + this.styling = value; + } + + /** + * Gets the value of the mapping property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getMapping() { + return mapping; + } + + /** + * Sets the value of the mapping property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setMapping(String value) { + this.mapping = value; + } + + /** + * Gets the value of the align property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAlign() { + return align; + } + + /** + * Sets the value of the align property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAlign(String value) { + this.align = value; + } + + /** + * Gets the value of the bindClickToWidget property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isBindClickToWidget() { + return bindClickToWidget; + } + + /** + * Sets the value of the bindClickToWidget property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setBindClickToWidget(Boolean value) { + this.bindClickToWidget = value; + } + + /** + * Gets the value of the series property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSeries() { + return series; + } + + /** + * Sets the value of the series property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSeries(String value) { + this.series = value; + } + + /** + * Gets the value of the refresh property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getRefresh() { + return refresh; + } + + /** + * Sets the value of the refresh property. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setRefresh(BigInteger value) { + this.refresh = value; + } + + /** + * Gets the value of the period property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPeriod() { + return period; + } + + /** + * Sets the value of the period property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPeriod(String value) { + this.period = value; + } + + /** + * Gets the value of the gridcolor property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getGridcolor() { + return gridcolor; + } + + /** + * Sets the value of the gridcolor property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setGridcolor(String value) { + this.gridcolor = value; + } + + /** + * Gets the value of the legend property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getLegend() { + return legend; + } + + /** + * Sets the value of the legend property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setLegend(String value) { + this.legend = value; + } + + /** + * Gets the value of the legendposition property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getLegendposition() { + return legendposition; + } + + /** + * Sets the value of the legendposition property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setLegendposition(String value) { + this.legendposition = value; + } + + /** + * Gets the value of the title property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTitle() { + return title; + } + + /** + * Sets the value of the title property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTitle(String value) { + this.title = value; + } + + /** + * Gets the value of the tooltip property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isTooltip() { + return tooltip; + } + + /** + * Sets the value of the tooltip property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setTooltip(Boolean value) { + this.tooltip = value; + } + + /** + * Gets the value of the timeformat property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTimeformat() { + return timeformat; + } + + /** + * Sets the value of the timeformat property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTimeformat(String value) { + this.timeformat = value; + } + + /** + * Gets the value of the timeformatTooltip property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTimeformatTooltip() { + return timeformatTooltip; + } + + /** + * Sets the value of the timeformatTooltip property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTimeformatTooltip(String value) { + this.timeformatTooltip = value; + } + + /** + * Gets the value of the zoomYAxis property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isZoomYAxis() { + return zoomYAxis; + } + + /** + * Sets the value of the zoomYAxis property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setZoomYAxis(Boolean value) { + this.zoomYAxis = value; + } + + /** + * Gets the value of the seriesStart property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSeriesStart() { + return seriesStart; + } + + /** + * Sets the value of the seriesStart property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSeriesStart(String value) { + this.seriesStart = value; + } + + /** + * Gets the value of the seriesEnd property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSeriesEnd() { + return seriesEnd; + } + + /** + * Sets the value of the seriesEnd property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSeriesEnd(String value) { + this.seriesEnd = value; + } + + /** + * Gets the value of the seriesResolution property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getSeriesResolution() { + return seriesResolution; + } + + /** + * Sets the value of the seriesResolution property. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setSeriesResolution(BigInteger value) { + this.seriesResolution = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Entry.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Entry.java new file mode 100644 index 0000000000000..f4b4ab7385007 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Entry.java @@ -0,0 +1,188 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlMixed; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for entry complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="entry">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <choice maxOccurs="unbounded" minOccurs="0">
+ *         <element name="icon" type="{}icon"/>
+ *       </choice>
+ *       <attGroup ref="{}range"/>
+ *       <attribute ref="{}value"/>
+ *       <attribute name="default" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "entry", propOrder = { "content" }) +public class Entry { + + @XmlElementRef(name = "icon", type = JAXBElement.class, required = false) + @XmlMixed + protected List content; + @XmlAttribute(name = "value") + protected String value; + @XmlAttribute(name = "default") + protected Boolean _default; + @XmlAttribute(name = "range_min") + protected Float rangeMin; + @XmlAttribute(name = "range_max") + protected Float rangeMax; + + /** + * Gets the value of the content property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the content property. + * + *

+ * For example, to add a new item, do as follows: + * + *

+     * getContent().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * {@link JAXBElement }{@code <}{@link Icon }{@code >} + * + * + */ + public List getContent() { + if (content == null) { + content = new ArrayList(); + } + return this.content; + } + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setValue(String value) { + this.value = value; + } + + /** + * Gets the value of the default property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isDefault() { + return _default; + } + + /** + * Sets the value of the default property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setDefault(Boolean value) { + this._default = value; + } + + /** + * Gets the value of the rangeMin property. + * + * @return + * possible object is + * {@link Float } + * + */ + public Float getRangeMin() { + return rangeMin; + } + + /** + * Sets the value of the rangeMin property. + * + * @param value + * allowed object is + * {@link Float } + * + */ + public void setRangeMin(Float value) { + this.rangeMin = value; + } + + /** + * Gets the value of the rangeMax property. + * + * @return + * possible object is + * {@link Float } + * + */ + public Float getRangeMax() { + return rangeMax; + } + + /** + * Sets the value of the rangeMax property. + * + * @param value + * allowed object is + * {@link Float } + * + */ + public void setRangeMax(Float value) { + this.rangeMax = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Gauge.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Gauge.java new file mode 100644 index 0000000000000..9f75ec918958d --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Gauge.java @@ -0,0 +1,844 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for gauge complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="gauge">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="layout" type="{}layout" minOccurs="0"/>
+ *         <element name="label" type="{}label" minOccurs="0"/>
+ *         <element name="address" type="{}address" maxOccurs="unbounded"/>
+ *       </sequence>
+ *       <attribute name="type">
+ *         <simpleType>
+ *           <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *             <enumeration value="Radial"/>
+ *             <enumeration value="RadialBargraph"/>
+ *             <enumeration value="RadialVertical"/>
+ *             <enumeration value="Linear"/>
+ *             <enumeration value="LinearBargraph"/>
+ *             <enumeration value="DisplaySingle"/>
+ *             <enumeration value="DisplayMulti"/>
+ *             <enumeration value="Level"/>
+ *             <enumeration value="Compass"/>
+ *             <enumeration value="WindDirection"/>
+ *             <enumeration value="Horizon"/>
+ *             <enumeration value="Led"/>
+ *             <enumeration value="Clock"/>
+ *             <enumeration value="Battery"/>
+ *             <enumeration value="StopWatch"/>
+ *             <enumeration value="Altimeter"/>
+ *             <enumeration value="TrafficLight"/>
+ *             <enumeration value="LightBulb"/>
+ *             <enumeration value="Odometer"/>
+ *           </restriction>
+ *         </simpleType>
+ *       </attribute>
+ *       <attribute name="subtype">
+ *         <simpleType>
+ *           <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *             <enumeration value="type1"/>
+ *             <enumeration value="type2"/>
+ *             <enumeration value="type3"/>
+ *             <enumeration value="type4"/>
+ *             <enumeration value="type5"/>
+ *           </restriction>
+ *         </simpleType>
+ *       </attribute>
+ *       <attribute name="titleString" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="unitString" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="unitStringVisible" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       <attribute name="minValue" type="{http://www.w3.org/2001/XMLSchema}decimal" />
+ *       <attribute name="maxValue" type="{http://www.w3.org/2001/XMLSchema}decimal" />
+ *       <attribute name="size" type="{http://www.w3.org/2001/XMLSchema}decimal" />
+ *       <attribute name="threshold" type="{http://www.w3.org/2001/XMLSchema}decimal" />
+ *       <attribute name="thresholdRising" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       <attribute name="ledVisible" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       <attribute name="lcdVisible" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       <attribute name="trendVisible" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       <attribute name="autoScroll" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       <attribute name="valuesNumeric" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       <attribute name="lcdDecimals" type="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger" />
+ *       <attribute name="background">
+ *         <simpleType>
+ *           <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *             <enumeration value="DARK_GRAY"/>
+ *             <enumeration value="SATIN_GRAY"/>
+ *             <enumeration value="LIGHT_GRAY"/>
+ *             <enumeration value="WHITE"/>
+ *             <enumeration value="BLACK"/>
+ *             <enumeration value="BEIGE"/>
+ *             <enumeration value="BROWN"/>
+ *             <enumeration value="RED"/>
+ *             <enumeration value="GREEN"/>
+ *             <enumeration value="BLUE"/>
+ *             <enumeration value="ANTHRACITE"/>
+ *             <enumeration value="MUD"/>
+ *             <enumeration value="PUNCHED_SHEET"/>
+ *             <enumeration value="CARBON"/>
+ *             <enumeration value="STAINLESS"/>
+ *             <enumeration value="BRUSHED_METAL"/>
+ *             <enumeration value="BRUSHED_STAINLESS"/>
+ *             <enumeration value="TURNED"/>
+ *           </restriction>
+ *         </simpleType>
+ *       </attribute>
+ *       <attribute name="framedesign">
+ *         <simpleType>
+ *           <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *             <enumeration value="BLACK_METAL"/>
+ *             <enumeration value="METAL"/>
+ *             <enumeration value="SHINY_METAL"/>
+ *             <enumeration value="BRASS"/>
+ *             <enumeration value="STEEL"/>
+ *             <enumeration value="CHROME"/>
+ *             <enumeration value="GOLD"/>
+ *             <enumeration value="ANTHRACITE"/>
+ *             <enumeration value="TILTED_GRAY"/>
+ *             <enumeration value="TILTED_BLACK"/>
+ *             <enumeration value="GLOSSY_METAL"/>
+ *           </restriction>
+ *         </simpleType>
+ *       </attribute>
+ *       <attribute name="width" type="{}dimension" />
+ *       <attribute name="height" type="{}dimension" />
+ *       <attribute name="valueColor">
+ *         <simpleType>
+ *           <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *             <enumeration value="RED"/>
+ *             <enumeration value="GREEN"/>
+ *             <enumeration value="BLUE"/>
+ *             <enumeration value="ORANGE"/>
+ *             <enumeration value="YELLOW"/>
+ *             <enumeration value="CYAN"/>
+ *             <enumeration value="MAGENTA"/>
+ *             <enumeration value="WHITE"/>
+ *             <enumeration value="GRAY"/>
+ *             <enumeration value="BLACK"/>
+ *             <enumeration value="RAITH"/>
+ *             <enumeration value="GREEN_LCD"/>
+ *             <enumeration value="JUG_GREEN"/>
+ *           </restriction>
+ *         </simpleType>
+ *       </attribute>
+ *       <attribute ref="{}mapping"/>
+ *       <attribute ref="{}target"/>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "gauge", propOrder = { "layout", "label", "address" }) +public class Gauge { + + protected Layout layout; + protected Label label; + @XmlElement(required = true) + protected List
address; + @XmlAttribute(name = "type") + protected String type; + @XmlAttribute(name = "subtype") + protected String subtype; + @XmlAttribute(name = "titleString") + protected String titleString; + @XmlAttribute(name = "unitString") + protected String unitString; + @XmlAttribute(name = "unitStringVisible") + protected Boolean unitStringVisible; + @XmlAttribute(name = "minValue") + protected BigDecimal minValue; + @XmlAttribute(name = "maxValue") + protected BigDecimal maxValue; + @XmlAttribute(name = "size") + protected BigDecimal size; + @XmlAttribute(name = "threshold") + protected BigDecimal threshold; + @XmlAttribute(name = "thresholdRising") + protected Boolean thresholdRising; + @XmlAttribute(name = "ledVisible") + protected Boolean ledVisible; + @XmlAttribute(name = "lcdVisible") + protected Boolean lcdVisible; + @XmlAttribute(name = "trendVisible") + protected Boolean trendVisible; + @XmlAttribute(name = "autoScroll") + protected Boolean autoScroll; + @XmlAttribute(name = "valuesNumeric") + protected Boolean valuesNumeric; + @XmlAttribute(name = "lcdDecimals") + @XmlSchemaType(name = "nonNegativeInteger") + protected BigInteger lcdDecimals; + @XmlAttribute(name = "background") + protected String background; + @XmlAttribute(name = "framedesign") + protected String framedesign; + @XmlAttribute(name = "width") + protected String width; + @XmlAttribute(name = "height") + protected String height; + @XmlAttribute(name = "valueColor") + protected String valueColor; + @XmlAttribute(name = "mapping") + protected String mapping; + @XmlAttribute(name = "target") + protected String target; + + /** + * Gets the value of the layout property. + * + * @return + * possible object is + * {@link Layout } + * + */ + public Layout getLayout() { + return layout; + } + + /** + * Sets the value of the layout property. + * + * @param value + * allowed object is + * {@link Layout } + * + */ + public void setLayout(Layout value) { + this.layout = value; + } + + /** + * Gets the value of the label property. + * + * @return + * possible object is + * {@link Label } + * + */ + public Label getLabel() { + return label; + } + + /** + * Sets the value of the label property. + * + * @param value + * allowed object is + * {@link Label } + * + */ + public void setLabel(Label value) { + this.label = value; + } + + /** + * Gets the value of the address property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the address property. + * + *

+ * For example, to add a new item, do as follows: + * + *

+     * getAddress().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Address } + * + * + */ + public List

getAddress() { + if (address == null) { + address = new ArrayList
(); + } + return this.address; + } + + /** + * Gets the value of the type property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getType() { + return type; + } + + /** + * Sets the value of the type property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setType(String value) { + this.type = value; + } + + /** + * Gets the value of the subtype property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSubtype() { + return subtype; + } + + /** + * Sets the value of the subtype property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSubtype(String value) { + this.subtype = value; + } + + /** + * Gets the value of the titleString property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTitleString() { + return titleString; + } + + /** + * Sets the value of the titleString property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTitleString(String value) { + this.titleString = value; + } + + /** + * Gets the value of the unitString property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getUnitString() { + return unitString; + } + + /** + * Sets the value of the unitString property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setUnitString(String value) { + this.unitString = value; + } + + /** + * Gets the value of the unitStringVisible property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isUnitStringVisible() { + return unitStringVisible; + } + + /** + * Sets the value of the unitStringVisible property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setUnitStringVisible(Boolean value) { + this.unitStringVisible = value; + } + + /** + * Gets the value of the minValue property. + * + * @return + * possible object is + * {@link BigDecimal } + * + */ + public BigDecimal getMinValue() { + return minValue; + } + + /** + * Sets the value of the minValue property. + * + * @param value + * allowed object is + * {@link BigDecimal } + * + */ + public void setMinValue(BigDecimal value) { + this.minValue = value; + } + + /** + * Gets the value of the maxValue property. + * + * @return + * possible object is + * {@link BigDecimal } + * + */ + public BigDecimal getMaxValue() { + return maxValue; + } + + /** + * Sets the value of the maxValue property. + * + * @param value + * allowed object is + * {@link BigDecimal } + * + */ + public void setMaxValue(BigDecimal value) { + this.maxValue = value; + } + + /** + * Gets the value of the size property. + * + * @return + * possible object is + * {@link BigDecimal } + * + */ + public BigDecimal getSize() { + return size; + } + + /** + * Sets the value of the size property. + * + * @param value + * allowed object is + * {@link BigDecimal } + * + */ + public void setSize(BigDecimal value) { + this.size = value; + } + + /** + * Gets the value of the threshold property. + * + * @return + * possible object is + * {@link BigDecimal } + * + */ + public BigDecimal getThreshold() { + return threshold; + } + + /** + * Sets the value of the threshold property. + * + * @param value + * allowed object is + * {@link BigDecimal } + * + */ + public void setThreshold(BigDecimal value) { + this.threshold = value; + } + + /** + * Gets the value of the thresholdRising property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isThresholdRising() { + return thresholdRising; + } + + /** + * Sets the value of the thresholdRising property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setThresholdRising(Boolean value) { + this.thresholdRising = value; + } + + /** + * Gets the value of the ledVisible property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isLedVisible() { + return ledVisible; + } + + /** + * Sets the value of the ledVisible property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setLedVisible(Boolean value) { + this.ledVisible = value; + } + + /** + * Gets the value of the lcdVisible property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isLcdVisible() { + return lcdVisible; + } + + /** + * Sets the value of the lcdVisible property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setLcdVisible(Boolean value) { + this.lcdVisible = value; + } + + /** + * Gets the value of the trendVisible property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isTrendVisible() { + return trendVisible; + } + + /** + * Sets the value of the trendVisible property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setTrendVisible(Boolean value) { + this.trendVisible = value; + } + + /** + * Gets the value of the autoScroll property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isAutoScroll() { + return autoScroll; + } + + /** + * Sets the value of the autoScroll property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setAutoScroll(Boolean value) { + this.autoScroll = value; + } + + /** + * Gets the value of the valuesNumeric property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isValuesNumeric() { + return valuesNumeric; + } + + /** + * Sets the value of the valuesNumeric property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setValuesNumeric(Boolean value) { + this.valuesNumeric = value; + } + + /** + * Gets the value of the lcdDecimals property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getLcdDecimals() { + return lcdDecimals; + } + + /** + * Sets the value of the lcdDecimals property. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setLcdDecimals(BigInteger value) { + this.lcdDecimals = value; + } + + /** + * Gets the value of the background property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getBackground() { + return background; + } + + /** + * Sets the value of the background property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setBackground(String value) { + this.background = value; + } + + /** + * Gets the value of the framedesign property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFramedesign() { + return framedesign; + } + + /** + * Sets the value of the framedesign property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFramedesign(String value) { + this.framedesign = value; + } + + /** + * Gets the value of the width property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getWidth() { + return width; + } + + /** + * Sets the value of the width property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setWidth(String value) { + this.width = value; + } + + /** + * Gets the value of the height property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getHeight() { + return height; + } + + /** + * Sets the value of the height property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setHeight(String value) { + this.height = value; + } + + /** + * Gets the value of the valueColor property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getValueColor() { + return valueColor; + } + + /** + * Sets the value of the valueColor property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setValueColor(String value) { + this.valueColor = value; + } + + /** + * Gets the value of the mapping property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getMapping() { + return mapping; + } + + /** + * Sets the value of the mapping property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setMapping(String value) { + this.mapping = value; + } + + /** + * Gets the value of the target property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTarget() { + return target; + } + + /** + * Sets the value of the target property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTarget(String value) { + this.target = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Group.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Group.java new file mode 100644 index 0000000000000..2a2f9e732e8ae --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Group.java @@ -0,0 +1,349 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlElementRefs; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for group complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="group">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="layout" type="{}layout" minOccurs="0"/>
+ *         <choice maxOccurs="unbounded" minOccurs="0">
+ *           <element name="page" type="{}page"/>
+ *           <element name="group" type="{}group"/>
+ *           <group ref="{}Widgets"/>
+ *           <group ref="{}AvailablePlugins"/>
+ *         </choice>
+ *       </sequence>
+ *       <attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="nowidget" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       <attribute ref="{}flavour"/>
+ *       <attribute ref="{}target"/>
+ *       <attribute ref="{}align"/>
+ *       <attribute ref="{}class"/>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "group", propOrder = { "layout", "pageOrGroupOrLine" }) +public class Group { + + protected Layout layout; + @XmlElementRefs({ @XmlElementRef(name = "upnpcontroller", type = JAXBElement.class, required = false), + @XmlElementRef(name = "infotrigger", type = JAXBElement.class, required = false), + @XmlElementRef(name = "shade", type = JAXBElement.class, required = false), + @XmlElementRef(name = "diagram", type = JAXBElement.class, required = false), + @XmlElementRef(name = "video", type = JAXBElement.class, required = false), + @XmlElementRef(name = "clock", type = JAXBElement.class, required = false), + @XmlElementRef(name = "gauge", type = JAXBElement.class, required = false), + @XmlElementRef(name = "switch", type = JAXBElement.class, required = false), + @XmlElementRef(name = "reload", type = JAXBElement.class, required = false), + @XmlElementRef(name = "web", type = JAXBElement.class, required = false), + @XmlElementRef(name = "toggle", type = JAXBElement.class, required = false), + @XmlElementRef(name = "pushbutton", type = JAXBElement.class, required = false), + @XmlElementRef(name = "rsslog", type = JAXBElement.class, required = false), + @XmlElementRef(name = "timeout", type = JAXBElement.class, required = false), + @XmlElementRef(name = "multitrigger", type = JAXBElement.class, required = false), + @XmlElementRef(name = "info", type = JAXBElement.class, required = false), + @XmlElementRef(name = "audio", type = JAXBElement.class, required = false), + @XmlElementRef(name = "text", type = JAXBElement.class, required = false), + @XmlElementRef(name = "colorchooser", type = JAXBElement.class, required = false), + @XmlElementRef(name = "infoaction", type = JAXBElement.class, required = false), + @XmlElementRef(name = "pagejump", type = JAXBElement.class, required = false), + @XmlElementRef(name = "urltrigger", type = JAXBElement.class, required = false), + @XmlElementRef(name = "line", type = JAXBElement.class, required = false), + @XmlElementRef(name = "imagetrigger", type = JAXBElement.class, required = false), + @XmlElementRef(name = "calendarlist", type = JAXBElement.class, required = false), + @XmlElementRef(name = "break", type = JAXBElement.class, required = false), + @XmlElementRef(name = "group", type = JAXBElement.class, required = false), + @XmlElementRef(name = "wgplugin_info", type = JAXBElement.class, required = false), + @XmlElementRef(name = "svg", type = JAXBElement.class, required = false), + @XmlElementRef(name = "include", type = JAXBElement.class, required = false), + @XmlElementRef(name = "diagram_info", type = JAXBElement.class, required = false), + @XmlElementRef(name = "strftime", type = JAXBElement.class, required = false), + @XmlElementRef(name = "rgb", type = JAXBElement.class, required = false), + @XmlElementRef(name = "designtoggle", type = JAXBElement.class, required = false), + @XmlElementRef(name = "rss", type = JAXBElement.class, required = false), + @XmlElementRef(name = "page", type = JAXBElement.class, required = false), + @XmlElementRef(name = "image", type = JAXBElement.class, required = false), + @XmlElementRef(name = "slide", type = JAXBElement.class, required = false), + @XmlElementRef(name = "trigger", type = JAXBElement.class, required = false), + @XmlElementRef(name = "refresh", type = JAXBElement.class, required = false) }) + protected List> pageOrGroupOrLine; + @XmlAttribute(name = "name") + protected String name; + @XmlAttribute(name = "nowidget") + protected Boolean nowidget; + @XmlAttribute(name = "flavour") + protected String flavour; + @XmlAttribute(name = "target") + protected String target; + @XmlAttribute(name = "align") + protected String align; + @XmlAttribute(name = "class") + protected String clazz; + + /** + * Gets the value of the layout property. + * + * @return + * possible object is + * {@link Layout } + * + */ + public Layout getLayout() { + return layout; + } + + /** + * Sets the value of the layout property. + * + * @param value + * allowed object is + * {@link Layout } + * + */ + public void setLayout(Layout value) { + this.layout = value; + } + + /** + * Gets the value of the pageOrGroupOrLine property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the pageOrGroupOrLine property. + * + *

+ * For example, to add a new item, do as follows: + * + *

+     * getPageOrGroupOrLine().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link JAXBElement }{@code <}{@link Upnpcontroller }{@code >} + * {@link JAXBElement }{@code <}{@link Info }{@code >} + * {@link JAXBElement }{@code <}{@link Infotrigger }{@code >} + * {@link JAXBElement }{@code <}{@link Diagram }{@code >} + * {@link JAXBElement }{@code <}{@link Video }{@code >} + * {@link JAXBElement }{@code <}{@link Clock }{@code >} + * {@link JAXBElement }{@code <}{@link Reload }{@code >} + * {@link JAXBElement }{@code <}{@link Switch }{@code >} + * {@link JAXBElement }{@code <}{@link Gauge }{@code >} + * {@link JAXBElement }{@code <}{@link Web }{@code >} + * {@link JAXBElement }{@code <}{@link Toggle }{@code >} + * {@link JAXBElement }{@code <}{@link Pushbutton }{@code >} + * {@link JAXBElement }{@code <}{@link Rsslog }{@code >} + * {@link JAXBElement }{@code <}{@link Timeout }{@code >} + * {@link JAXBElement }{@code <}{@link Multitrigger }{@code >} + * {@link JAXBElement }{@code <}{@link Audio }{@code >} + * {@link JAXBElement }{@code <}{@link Info }{@code >} + * {@link JAXBElement }{@code <}{@link Text }{@code >} + * {@link JAXBElement }{@code <}{@link Colorchooser }{@code >} + * {@link JAXBElement }{@code <}{@link Urltrigger }{@code >} + * {@link JAXBElement }{@code <}{@link Pagejump }{@code >} + * {@link JAXBElement }{@code <}{@link Infoaction }{@code >} + * {@link JAXBElement }{@code <}{@link Imagetrigger }{@code >} + * {@link JAXBElement }{@code <}{@link Line }{@code >} + * {@link JAXBElement }{@code <}{@link Calendarlist }{@code >} + * {@link JAXBElement }{@code <}{@link Break }{@code >} + * {@link JAXBElement }{@code <}{@link Group }{@code >} + * {@link JAXBElement }{@code <}{@link WgpluginInfo }{@code >} + * {@link JAXBElement }{@code <}{@link Svg }{@code >} + * {@link JAXBElement }{@code <}{@link Include }{@code >} + * {@link JAXBElement }{@code <}{@link DiagramInfo }{@code >} + * {@link JAXBElement }{@code <}{@link Strftime }{@code >} + * {@link JAXBElement }{@code <}{@link Designtoggle }{@code >} + * {@link JAXBElement }{@code <}{@link Rgb }{@code >} + * {@link JAXBElement }{@code <}{@link Rss }{@code >} + * {@link JAXBElement }{@code <}{@link Image }{@code >} + * {@link JAXBElement }{@code <}{@link Page }{@code >} + * {@link JAXBElement }{@code <}{@link Slide }{@code >} + * {@link JAXBElement }{@code <}{@link Trigger }{@code >} + * {@link JAXBElement }{@code <}{@link Refresh }{@code >} + * + * + */ + public List> getPageOrGroupOrLine() { + if (pageOrGroupOrLine == null) { + pageOrGroupOrLine = new ArrayList>(); + } + return this.pageOrGroupOrLine; + } + + /** + * Gets the value of the name property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getName() { + return name; + } + + /** + * Sets the value of the name property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setName(String value) { + this.name = value; + } + + /** + * Gets the value of the nowidget property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isNowidget() { + return nowidget; + } + + /** + * Sets the value of the nowidget property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setNowidget(Boolean value) { + this.nowidget = value; + } + + /** + * Gets the value of the flavour property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFlavour() { + return flavour; + } + + /** + * Sets the value of the flavour property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFlavour(String value) { + this.flavour = value; + } + + /** + * Gets the value of the target property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTarget() { + return target; + } + + /** + * Sets the value of the target property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTarget(String value) { + this.target = value; + } + + /** + * Gets the value of the align property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAlign() { + return align; + } + + /** + * Sets the value of the align property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAlign(String value) { + this.align = value; + } + + /** + * Gets the value of the clazz property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getClazz() { + return clazz; + } + + /** + * Sets the value of the clazz property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setClazz(String value) { + this.clazz = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Icon.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Icon.java new file mode 100644 index 0000000000000..40c05177cc134 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Icon.java @@ -0,0 +1,200 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for icon complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="icon">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="type" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute ref="{}flavour"/>
+ *       <attribute name="color" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute ref="{}styling"/>
+ *       <attribute ref="{}class"/>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "icon") +public class Icon { + + @XmlAttribute(name = "name", required = true) + protected String name; + @XmlAttribute(name = "type") + protected String type; + @XmlAttribute(name = "flavour") + protected String flavour; + @XmlAttribute(name = "color") + protected String color; + @XmlAttribute(name = "styling") + protected String styling; + @XmlAttribute(name = "class") + protected String clazz; + + /** + * Gets the value of the name property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getName() { + return name; + } + + /** + * Sets the value of the name property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setName(String value) { + this.name = value; + } + + /** + * Gets the value of the type property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getType() { + return type; + } + + /** + * Sets the value of the type property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setType(String value) { + this.type = value; + } + + /** + * Gets the value of the flavour property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFlavour() { + return flavour; + } + + /** + * Sets the value of the flavour property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFlavour(String value) { + this.flavour = value; + } + + /** + * Gets the value of the color property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getColor() { + return color; + } + + /** + * Sets the value of the color property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setColor(String value) { + this.color = value; + } + + /** + * Gets the value of the styling property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getStyling() { + return styling; + } + + /** + * Sets the value of the styling property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setStyling(String value) { + this.styling = value; + } + + /** + * Gets the value of the clazz property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getClazz() { + return clazz; + } + + /** + * Sets the value of the clazz property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setClazz(String value) { + this.clazz = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/IconDefinition.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/IconDefinition.java new file mode 100644 index 0000000000000..7d4847081e21c --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/IconDefinition.java @@ -0,0 +1,227 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for icon-definition complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="icon-definition">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="uri" use="required" type="{}uri" />
+ *       <attribute name="type" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute ref="{}flavour"/>
+ *       <attribute name="color" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="styling" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="dynamic" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "icon-definition") +public class IconDefinition { + + @XmlAttribute(name = "name", required = true) + protected String name; + @XmlAttribute(name = "uri", required = true) + protected String uri; + @XmlAttribute(name = "type") + protected String type; + @XmlAttribute(name = "flavour") + protected String flavour; + @XmlAttribute(name = "color") + protected String color; + @XmlAttribute(name = "styling") + protected String styling; + @XmlAttribute(name = "dynamic") + protected String dynamic; + + /** + * Gets the value of the name property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getName() { + return name; + } + + /** + * Sets the value of the name property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setName(String value) { + this.name = value; + } + + /** + * Gets the value of the uri property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getUri() { + return uri; + } + + /** + * Sets the value of the uri property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setUri(String value) { + this.uri = value; + } + + /** + * Gets the value of the type property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getType() { + return type; + } + + /** + * Sets the value of the type property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setType(String value) { + this.type = value; + } + + /** + * Gets the value of the flavour property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFlavour() { + return flavour; + } + + /** + * Sets the value of the flavour property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFlavour(String value) { + this.flavour = value; + } + + /** + * Gets the value of the color property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getColor() { + return color; + } + + /** + * Sets the value of the color property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setColor(String value) { + this.color = value; + } + + /** + * Gets the value of the styling property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getStyling() { + return styling; + } + + /** + * Sets the value of the styling property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setStyling(String value) { + this.styling = value; + } + + /** + * Gets the value of the dynamic property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDynamic() { + return dynamic; + } + + /** + * Sets the value of the dynamic property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDynamic(String value) { + this.dynamic = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Icons.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Icons.java new file mode 100644 index 0000000000000..a59e6bd91ca1f --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Icons.java @@ -0,0 +1,75 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for icons complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="icons">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <choice maxOccurs="unbounded" minOccurs="0">
+ *         <element name="icon-definition" type="{}icon-definition"/>
+ *       </choice>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "icons", propOrder = { "iconDefinition" }) +public class Icons { + + @XmlElement(name = "icon-definition") + protected List iconDefinition; + + /** + * Gets the value of the iconDefinition property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the iconDefinition property. + * + *

+ * For example, to add a new item, do as follows: + * + *

+     * getIconDefinition().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link IconDefinition } + * + * + */ + public List getIconDefinition() { + if (iconDefinition == null) { + iconDefinition = new ArrayList(); + } + return this.iconDefinition; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Image.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Image.java new file mode 100644 index 0000000000000..0f5d0f8a7b430 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Image.java @@ -0,0 +1,228 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import java.math.BigDecimal; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for image complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="image">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="layout" type="{}layout" minOccurs="0"/>
+ *         <element name="label" type="{}label" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="src" use="required" type="{}uri" />
+ *       <attribute name="width" type="{}dimension" />
+ *       <attribute name="height" type="{}dimension" />
+ *       <attribute name="refresh" type="{http://www.w3.org/2001/XMLSchema}decimal" />
+ *       <attribute ref="{}flavour"/>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "image", propOrder = { "layout", "label" }) +public class Image { + + protected Layout layout; + protected Label label; + @XmlAttribute(name = "src", required = true) + protected String src; + @XmlAttribute(name = "width") + protected String width; + @XmlAttribute(name = "height") + protected String height; + @XmlAttribute(name = "refresh") + protected BigDecimal refresh; + @XmlAttribute(name = "flavour") + protected String flavour; + + /** + * Gets the value of the layout property. + * + * @return + * possible object is + * {@link Layout } + * + */ + public Layout getLayout() { + return layout; + } + + /** + * Sets the value of the layout property. + * + * @param value + * allowed object is + * {@link Layout } + * + */ + public void setLayout(Layout value) { + this.layout = value; + } + + /** + * Gets the value of the label property. + * + * @return + * possible object is + * {@link Label } + * + */ + public Label getLabel() { + return label; + } + + /** + * Sets the value of the label property. + * + * @param value + * allowed object is + * {@link Label } + * + */ + public void setLabel(Label value) { + this.label = value; + } + + /** + * Gets the value of the src property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSrc() { + return src; + } + + /** + * Sets the value of the src property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSrc(String value) { + this.src = value; + } + + /** + * Gets the value of the width property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getWidth() { + return width; + } + + /** + * Sets the value of the width property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setWidth(String value) { + this.width = value; + } + + /** + * Gets the value of the height property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getHeight() { + return height; + } + + /** + * Sets the value of the height property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setHeight(String value) { + this.height = value; + } + + /** + * Gets the value of the refresh property. + * + * @return + * possible object is + * {@link BigDecimal } + * + */ + public BigDecimal getRefresh() { + return refresh; + } + + /** + * Sets the value of the refresh property. + * + * @param value + * allowed object is + * {@link BigDecimal } + * + */ + public void setRefresh(BigDecimal value) { + this.refresh = value; + } + + /** + * Gets the value of the flavour property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFlavour() { + return flavour; + } + + /** + * Sets the value of the flavour property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFlavour(String value) { + this.flavour = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Imagetrigger.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Imagetrigger.java new file mode 100644 index 0000000000000..6c59e1630a931 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Imagetrigger.java @@ -0,0 +1,399 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for imagetrigger complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="imagetrigger">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="layout" type="{}layout" minOccurs="0"/>
+ *         <element name="label" type="{}label" minOccurs="0"/>
+ *         <element name="address" type="{}address" maxOccurs="unbounded"/>
+ *       </sequence>
+ *       <attribute name="src" type="{}uri" />
+ *       <attribute name="suffix" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="type" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="width" type="{}dimension" />
+ *       <attribute name="height" type="{}dimension" />
+ *       <attribute name="refresh" type="{http://www.w3.org/2001/XMLSchema}decimal" />
+ *       <attribute ref="{}mapping"/>
+ *       <attribute name="sendValue" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute ref="{}flavour"/>
+ *       <attribute ref="{}bind_click_to_widget"/>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "imagetrigger", propOrder = { "layout", "label", "address" }) +public class Imagetrigger { + + protected Layout layout; + protected Label label; + @XmlElement(required = true) + protected List
address; + @XmlAttribute(name = "src") + protected String src; + @XmlAttribute(name = "suffix", required = true) + protected String suffix; + @XmlAttribute(name = "type") + protected String type; + @XmlAttribute(name = "width") + protected String width; + @XmlAttribute(name = "height") + protected String height; + @XmlAttribute(name = "refresh") + protected BigDecimal refresh; + @XmlAttribute(name = "mapping") + protected String mapping; + @XmlAttribute(name = "sendValue") + protected String sendValue; + @XmlAttribute(name = "flavour") + protected String flavour; + @XmlAttribute(name = "bind_click_to_widget") + protected Boolean bindClickToWidget; + + /** + * Gets the value of the layout property. + * + * @return + * possible object is + * {@link Layout } + * + */ + public Layout getLayout() { + return layout; + } + + /** + * Sets the value of the layout property. + * + * @param value + * allowed object is + * {@link Layout } + * + */ + public void setLayout(Layout value) { + this.layout = value; + } + + /** + * Gets the value of the label property. + * + * @return + * possible object is + * {@link Label } + * + */ + public Label getLabel() { + return label; + } + + /** + * Sets the value of the label property. + * + * @param value + * allowed object is + * {@link Label } + * + */ + public void setLabel(Label value) { + this.label = value; + } + + /** + * Gets the value of the address property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the address property. + * + *

+ * For example, to add a new item, do as follows: + * + *

+     * getAddress().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Address } + * + * + */ + public List

getAddress() { + if (address == null) { + address = new ArrayList
(); + } + return this.address; + } + + /** + * Gets the value of the src property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSrc() { + return src; + } + + /** + * Sets the value of the src property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSrc(String value) { + this.src = value; + } + + /** + * Gets the value of the suffix property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSuffix() { + return suffix; + } + + /** + * Sets the value of the suffix property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSuffix(String value) { + this.suffix = value; + } + + /** + * Gets the value of the type property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getType() { + return type; + } + + /** + * Sets the value of the type property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setType(String value) { + this.type = value; + } + + /** + * Gets the value of the width property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getWidth() { + return width; + } + + /** + * Sets the value of the width property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setWidth(String value) { + this.width = value; + } + + /** + * Gets the value of the height property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getHeight() { + return height; + } + + /** + * Sets the value of the height property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setHeight(String value) { + this.height = value; + } + + /** + * Gets the value of the refresh property. + * + * @return + * possible object is + * {@link BigDecimal } + * + */ + public BigDecimal getRefresh() { + return refresh; + } + + /** + * Sets the value of the refresh property. + * + * @param value + * allowed object is + * {@link BigDecimal } + * + */ + public void setRefresh(BigDecimal value) { + this.refresh = value; + } + + /** + * Gets the value of the mapping property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getMapping() { + return mapping; + } + + /** + * Sets the value of the mapping property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setMapping(String value) { + this.mapping = value; + } + + /** + * Gets the value of the sendValue property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSendValue() { + return sendValue; + } + + /** + * Sets the value of the sendValue property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSendValue(String value) { + this.sendValue = value; + } + + /** + * Gets the value of the flavour property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFlavour() { + return flavour; + } + + /** + * Sets the value of the flavour property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFlavour(String value) { + this.flavour = value; + } + + /** + * Gets the value of the bindClickToWidget property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isBindClickToWidget() { + return bindClickToWidget; + } + + /** + * Sets the value of the bindClickToWidget property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setBindClickToWidget(Boolean value) { + this.bindClickToWidget = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Include.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Include.java new file mode 100644 index 0000000000000..2f2b0345b63d0 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Include.java @@ -0,0 +1,65 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for include complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="include">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="src" use="required" type="{}uri" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "include") +public class Include { + + @XmlAttribute(name = "src", required = true) + protected String src; + + /** + * Gets the value of the src property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSrc() { + return src; + } + + /** + * Sets the value of the src property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSrc(String value) { + this.src = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Info.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Info.java new file mode 100644 index 0000000000000..1f2b62a41ca9b --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Info.java @@ -0,0 +1,290 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for info complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="info">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="layout" type="{}layout" minOccurs="0"/>
+ *         <element name="label" type="{}label" minOccurs="0"/>
+ *         <element name="address" type="{}address" maxOccurs="unbounded"/>
+ *       </sequence>
+ *       <attribute ref="{}format"/>
+ *       <attribute ref="{}styling"/>
+ *       <attribute ref="{}mapping"/>
+ *       <attribute ref="{}align"/>
+ *       <attribute ref="{}flavour"/>
+ *       <attribute ref="{}class"/>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "info", propOrder = { "layout", "label", "address" }) +public class Info { + + protected Layout layout; + protected Label label; + @XmlElement(required = true) + protected List
address; + @XmlAttribute(name = "format") + protected String format; + @XmlAttribute(name = "styling") + protected String styling; + @XmlAttribute(name = "mapping") + protected String mapping; + @XmlAttribute(name = "align") + protected String align; + @XmlAttribute(name = "flavour") + protected String flavour; + @XmlAttribute(name = "class") + protected String clazz; + + /** + * Gets the value of the layout property. + * + * @return + * possible object is + * {@link Layout } + * + */ + public Layout getLayout() { + return layout; + } + + /** + * Sets the value of the layout property. + * + * @param value + * allowed object is + * {@link Layout } + * + */ + public void setLayout(Layout value) { + this.layout = value; + } + + /** + * Gets the value of the label property. + * + * @return + * possible object is + * {@link Label } + * + */ + public Label getLabel() { + return label; + } + + /** + * Sets the value of the label property. + * + * @param value + * allowed object is + * {@link Label } + * + */ + public void setLabel(Label value) { + this.label = value; + } + + /** + * Gets the value of the address property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the address property. + * + *

+ * For example, to add a new item, do as follows: + * + *

+     * getAddress().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Address } + * + * + */ + public List

getAddress() { + if (address == null) { + address = new ArrayList
(); + } + return this.address; + } + + /** + * Gets the value of the format property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFormat() { + return format; + } + + /** + * Sets the value of the format property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFormat(String value) { + this.format = value; + } + + /** + * Gets the value of the styling property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getStyling() { + return styling; + } + + /** + * Sets the value of the styling property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setStyling(String value) { + this.styling = value; + } + + /** + * Gets the value of the mapping property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getMapping() { + return mapping; + } + + /** + * Sets the value of the mapping property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setMapping(String value) { + this.mapping = value; + } + + /** + * Gets the value of the align property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAlign() { + return align; + } + + /** + * Sets the value of the align property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAlign(String value) { + this.align = value; + } + + /** + * Gets the value of the flavour property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFlavour() { + return flavour; + } + + /** + * Sets the value of the flavour property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFlavour(String value) { + this.flavour = value; + } + + /** + * Gets the value of the clazz property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getClazz() { + return clazz; + } + + /** + * Sets the value of the clazz property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setClazz(String value) { + this.clazz = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Infoaction.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Infoaction.java new file mode 100644 index 0000000000000..b30832ad5f5ca --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Infoaction.java @@ -0,0 +1,146 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for infoaction complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="infoaction">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="layout" type="{}layout" minOccurs="0"/>
+ *         <element name="label" type="{}label" minOccurs="0"/>
+ *         <element name="widgetinfo" type="{}widgetinfo"/>
+ *         <element name="widgetaction" type="{}widgetaction"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "infoaction", propOrder = { "layout", "label", "widgetinfo", "widgetaction" }) +public class Infoaction { + + protected Layout layout; + protected Label label; + @XmlElement(required = true) + protected Widgetinfo widgetinfo; + @XmlElement(required = true) + protected Widgetaction widgetaction; + + /** + * Gets the value of the layout property. + * + * @return + * possible object is + * {@link Layout } + * + */ + public Layout getLayout() { + return layout; + } + + /** + * Sets the value of the layout property. + * + * @param value + * allowed object is + * {@link Layout } + * + */ + public void setLayout(Layout value) { + this.layout = value; + } + + /** + * Gets the value of the label property. + * + * @return + * possible object is + * {@link Label } + * + */ + public Label getLabel() { + return label; + } + + /** + * Sets the value of the label property. + * + * @param value + * allowed object is + * {@link Label } + * + */ + public void setLabel(Label value) { + this.label = value; + } + + /** + * Gets the value of the widgetinfo property. + * + * @return + * possible object is + * {@link Widgetinfo } + * + */ + public Widgetinfo getWidgetinfo() { + return widgetinfo; + } + + /** + * Sets the value of the widgetinfo property. + * + * @param value + * allowed object is + * {@link Widgetinfo } + * + */ + public void setWidgetinfo(Widgetinfo value) { + this.widgetinfo = value; + } + + /** + * Gets the value of the widgetaction property. + * + * @return + * possible object is + * {@link Widgetaction } + * + */ + public Widgetaction getWidgetaction() { + return widgetaction; + } + + /** + * Sets the value of the widgetaction property. + * + * @param value + * allowed object is + * {@link Widgetaction } + * + */ + public void setWidgetaction(Widgetaction value) { + this.widgetaction = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Infotrigger.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Infotrigger.java new file mode 100644 index 0000000000000..a914e2d82a44a --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Infotrigger.java @@ -0,0 +1,576 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for infotrigger complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="infotrigger">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="layout" type="{}layout" minOccurs="0"/>
+ *         <element name="label" type="{}label" minOccurs="0"/>
+ *         <element name="address" type="{}address" maxOccurs="unbounded"/>
+ *       </sequence>
+ *       <attribute name="upvalue" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="shortupvalue" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="downvalue" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="shortdownvalue" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="uplabel" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="downlabel" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="shorttime" type="{http://www.w3.org/2001/XMLSchema}decimal" />
+ *       <attribute name="change">
+ *         <simpleType>
+ *           <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *             <enumeration value="absolute"/>
+ *             <enumeration value="relative"/>
+ *           </restriction>
+ *         </simpleType>
+ *       </attribute>
+ *       <attribute ref="{}min"/>
+ *       <attribute ref="{}max"/>
+ *       <attribute ref="{}mapping"/>
+ *       <attribute ref="{}styling"/>
+ *       <attribute ref="{}align"/>
+ *       <attribute ref="{}format"/>
+ *       <attribute name="infoposition">
+ *         <simpleType>
+ *           <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *             <enumeration value="left"/>
+ *             <enumeration value="middle"/>
+ *             <enumeration value="right"/>
+ *           </restriction>
+ *         </simpleType>
+ *       </attribute>
+ *       <attribute ref="{}flavour"/>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "infotrigger", propOrder = { "layout", "label", "address" }) +public class Infotrigger { + + protected Layout layout; + protected Label label; + @XmlElement(required = true) + protected List
address; + @XmlAttribute(name = "upvalue") + protected String upvalue; + @XmlAttribute(name = "shortupvalue") + protected String shortupvalue; + @XmlAttribute(name = "downvalue") + protected String downvalue; + @XmlAttribute(name = "shortdownvalue") + protected String shortdownvalue; + @XmlAttribute(name = "uplabel") + protected String uplabel; + @XmlAttribute(name = "downlabel") + protected String downlabel; + @XmlAttribute(name = "shorttime") + protected BigDecimal shorttime; + @XmlAttribute(name = "change") + protected String change; + @XmlAttribute(name = "min") + protected BigDecimal min; + @XmlAttribute(name = "max") + protected BigDecimal max; + @XmlAttribute(name = "mapping") + protected String mapping; + @XmlAttribute(name = "styling") + protected String styling; + @XmlAttribute(name = "align") + protected String align; + @XmlAttribute(name = "format") + protected String format; + @XmlAttribute(name = "infoposition") + protected String infoposition; + @XmlAttribute(name = "flavour") + protected String flavour; + + /** + * Gets the value of the layout property. + * + * @return + * possible object is + * {@link Layout } + * + */ + public Layout getLayout() { + return layout; + } + + /** + * Sets the value of the layout property. + * + * @param value + * allowed object is + * {@link Layout } + * + */ + public void setLayout(Layout value) { + this.layout = value; + } + + /** + * Gets the value of the label property. + * + * @return + * possible object is + * {@link Label } + * + */ + public Label getLabel() { + return label; + } + + /** + * Sets the value of the label property. + * + * @param value + * allowed object is + * {@link Label } + * + */ + public void setLabel(Label value) { + this.label = value; + } + + /** + * Gets the value of the address property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the address property. + * + *

+ * For example, to add a new item, do as follows: + * + *

+     * getAddress().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Address } + * + * + */ + public List

getAddress() { + if (address == null) { + address = new ArrayList
(); + } + return this.address; + } + + /** + * Gets the value of the upvalue property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getUpvalue() { + return upvalue; + } + + /** + * Sets the value of the upvalue property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setUpvalue(String value) { + this.upvalue = value; + } + + /** + * Gets the value of the shortupvalue property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getShortupvalue() { + return shortupvalue; + } + + /** + * Sets the value of the shortupvalue property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setShortupvalue(String value) { + this.shortupvalue = value; + } + + /** + * Gets the value of the downvalue property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDownvalue() { + return downvalue; + } + + /** + * Sets the value of the downvalue property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDownvalue(String value) { + this.downvalue = value; + } + + /** + * Gets the value of the shortdownvalue property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getShortdownvalue() { + return shortdownvalue; + } + + /** + * Sets the value of the shortdownvalue property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setShortdownvalue(String value) { + this.shortdownvalue = value; + } + + /** + * Gets the value of the uplabel property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getUplabel() { + return uplabel; + } + + /** + * Sets the value of the uplabel property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setUplabel(String value) { + this.uplabel = value; + } + + /** + * Gets the value of the downlabel property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDownlabel() { + return downlabel; + } + + /** + * Sets the value of the downlabel property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDownlabel(String value) { + this.downlabel = value; + } + + /** + * Gets the value of the shorttime property. + * + * @return + * possible object is + * {@link BigDecimal } + * + */ + public BigDecimal getShorttime() { + return shorttime; + } + + /** + * Sets the value of the shorttime property. + * + * @param value + * allowed object is + * {@link BigDecimal } + * + */ + public void setShorttime(BigDecimal value) { + this.shorttime = value; + } + + /** + * Gets the value of the change property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getChange() { + return change; + } + + /** + * Sets the value of the change property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setChange(String value) { + this.change = value; + } + + /** + * Gets the value of the min property. + * + * @return + * possible object is + * {@link BigDecimal } + * + */ + public BigDecimal getMin() { + return min; + } + + /** + * Sets the value of the min property. + * + * @param value + * allowed object is + * {@link BigDecimal } + * + */ + public void setMin(BigDecimal value) { + this.min = value; + } + + /** + * Gets the value of the max property. + * + * @return + * possible object is + * {@link BigDecimal } + * + */ + public BigDecimal getMax() { + return max; + } + + /** + * Sets the value of the max property. + * + * @param value + * allowed object is + * {@link BigDecimal } + * + */ + public void setMax(BigDecimal value) { + this.max = value; + } + + /** + * Gets the value of the mapping property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getMapping() { + return mapping; + } + + /** + * Sets the value of the mapping property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setMapping(String value) { + this.mapping = value; + } + + /** + * Gets the value of the styling property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getStyling() { + return styling; + } + + /** + * Sets the value of the styling property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setStyling(String value) { + this.styling = value; + } + + /** + * Gets the value of the align property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAlign() { + return align; + } + + /** + * Sets the value of the align property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAlign(String value) { + this.align = value; + } + + /** + * Gets the value of the format property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFormat() { + return format; + } + + /** + * Sets the value of the format property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFormat(String value) { + this.format = value; + } + + /** + * Gets the value of the infoposition property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getInfoposition() { + return infoposition; + } + + /** + * Sets the value of the infoposition property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setInfoposition(String value) { + this.infoposition = value; + } + + /** + * Gets the value of the flavour property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFlavour() { + return flavour; + } + + /** + * Sets the value of the flavour property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFlavour(String value) { + this.flavour = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Label.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Label.java new file mode 100644 index 0000000000000..67f9837452457 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Label.java @@ -0,0 +1,80 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlMixed; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for label complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="label">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <choice maxOccurs="unbounded" minOccurs="0">
+ *         <element name="icon" type="{}icon"/>
+ *       </choice>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "label", propOrder = { "content" }) +public class Label { + + @XmlElementRef(name = "icon", type = JAXBElement.class, required = false) + @XmlMixed + protected List content; + + /** + * Gets the value of the content property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the content property. + * + *

+ * For example, to add a new item, do as follows: + * + *

+     * getContent().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * {@link JAXBElement }{@code <}{@link Icon }{@code >} + * + * + */ + public List getContent() { + if (content == null) { + content = new ArrayList(); + } + return this.content; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Layout.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Layout.java new file mode 100644 index 0000000000000..cae006bf58a4f --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Layout.java @@ -0,0 +1,201 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import java.math.BigDecimal; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for layout complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="layout">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="colspan" type="{http://www.w3.org/2001/XMLSchema}decimal" />
+ *       <attribute name="rowspan" type="{http://www.w3.org/2001/XMLSchema}decimal" />
+ *       <attribute name="x" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="y" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="z" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="width" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "layout") +public class Layout { + + @XmlAttribute(name = "colspan") + protected BigDecimal colspan; + @XmlAttribute(name = "rowspan") + protected BigDecimal rowspan; + @XmlAttribute(name = "x") + protected String x; + @XmlAttribute(name = "y") + protected String y; + @XmlAttribute(name = "z") + protected String z; + @XmlAttribute(name = "width") + protected String width; + + /** + * Gets the value of the colspan property. + * + * @return + * possible object is + * {@link BigDecimal } + * + */ + public BigDecimal getColspan() { + return colspan; + } + + /** + * Sets the value of the colspan property. + * + * @param value + * allowed object is + * {@link BigDecimal } + * + */ + public void setColspan(BigDecimal value) { + this.colspan = value; + } + + /** + * Gets the value of the rowspan property. + * + * @return + * possible object is + * {@link BigDecimal } + * + */ + public BigDecimal getRowspan() { + return rowspan; + } + + /** + * Sets the value of the rowspan property. + * + * @param value + * allowed object is + * {@link BigDecimal } + * + */ + public void setRowspan(BigDecimal value) { + this.rowspan = value; + } + + /** + * Gets the value of the x property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getX() { + return x; + } + + /** + * Sets the value of the x property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setX(String value) { + this.x = value; + } + + /** + * Gets the value of the y property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getY() { + return y; + } + + /** + * Sets the value of the y property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setY(String value) { + this.y = value; + } + + /** + * Gets the value of the z property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getZ() { + return z; + } + + /** + * Sets the value of the z property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setZ(String value) { + this.z = value; + } + + /** + * Gets the value of the width property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getWidth() { + return width; + } + + /** + * Sets the value of the width property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setWidth(String value) { + this.width = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/LibVersion.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/LibVersion.java new file mode 100644 index 0000000000000..cf8072197423d --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/LibVersion.java @@ -0,0 +1,13 @@ +package org.openhab.ui.cometvisu.internal.config.beans; + +/** + * the libVersion of the XSD from wich the JAXB beans were generated from + * this must be changed manually, everytime the cometvisu´s libVersion changes after JAXB generation + * + * @author Tobias Bräutigam + * @since 2.0.0 + * + */ +public class LibVersion { + public static long no = 8; +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Line.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Line.java new file mode 100644 index 0000000000000..68210279439d2 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Line.java @@ -0,0 +1,65 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for line complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="line">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="layout" type="{}layout" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "line", propOrder = { "layout" }) +public class Line { + + protected Layout layout; + + /** + * Gets the value of the layout property. + * + * @return + * possible object is + * {@link Layout } + * + */ + public Layout getLayout() { + return layout; + } + + /** + * Sets the value of the layout property. + * + * @param value + * allowed object is + * {@link Layout } + * + */ + public void setLayout(Layout value) { + this.layout = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Mapping.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Mapping.java new file mode 100644 index 0000000000000..1b9f2d22a26a7 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Mapping.java @@ -0,0 +1,127 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for mapping complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="mapping">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="formula" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="entry" type="{}entry" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "mapping", propOrder = { "formula", "entry" }) +public class Mapping { + + protected String formula; + protected List entry; + @XmlAttribute(name = "name", required = true) + protected String name; + + /** + * Gets the value of the formula property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFormula() { + return formula; + } + + /** + * Sets the value of the formula property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFormula(String value) { + this.formula = value; + } + + /** + * Gets the value of the entry property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the entry property. + * + *

+ * For example, to add a new item, do as follows: + * + *

+     * getEntry().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Entry } + * + * + */ + public List getEntry() { + if (entry == null) { + entry = new ArrayList(); + } + return this.entry; + } + + /** + * Gets the value of the name property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getName() { + return name; + } + + /** + * Sets the value of the name property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setName(String value) { + this.name = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Mappings.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Mappings.java new file mode 100644 index 0000000000000..b756d08d7ad86 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Mappings.java @@ -0,0 +1,73 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for mappings complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="mappings">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <choice maxOccurs="unbounded" minOccurs="0">
+ *         <element name="mapping" type="{}mapping"/>
+ *       </choice>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "mappings", propOrder = { "mapping" }) +public class Mappings { + + protected List mapping; + + /** + * Gets the value of the mapping property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the mapping property. + * + *

+ * For example, to add a new item, do as follows: + * + *

+     * getMapping().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Mapping } + * + * + */ + public List getMapping() { + if (mapping == null) { + mapping = new ArrayList(); + } + return this.mapping; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Meta.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Meta.java new file mode 100644 index 0000000000000..79ed4ae27b6fc --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Meta.java @@ -0,0 +1,87 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElements; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for meta complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="meta">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <choice maxOccurs="unbounded" minOccurs="0">
+ *         <element name="plugins" type="{}plugins"/>
+ *         <element name="icons" type="{}icons"/>
+ *         <element name="mappings" type="{}mappings"/>
+ *         <element name="stylings" type="{}stylings"/>
+ *         <element name="statusbar" type="{}statusbar"/>
+ *       </choice>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "meta", propOrder = { "pluginsOrIconsOrMappings" }) +public class Meta { + + @XmlElements({ @XmlElement(name = "plugins", type = Plugins.class), @XmlElement(name = "icons", type = Icons.class), + @XmlElement(name = "mappings", type = Mappings.class), + @XmlElement(name = "stylings", type = Stylings.class), + @XmlElement(name = "statusbar", type = Statusbar.class) }) + protected List pluginsOrIconsOrMappings; + + /** + * Gets the value of the pluginsOrIconsOrMappings property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the pluginsOrIconsOrMappings property. + * + *

+ * For example, to add a new item, do as follows: + * + *

+     * getPluginsOrIconsOrMappings().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Plugins } + * {@link Icons } + * {@link Mappings } + * {@link Stylings } + * {@link Statusbar } + * + * + */ + public List getPluginsOrIconsOrMappings() { + if (pluginsOrIconsOrMappings == null) { + pluginsOrIconsOrMappings = new ArrayList(); + } + return this.pluginsOrIconsOrMappings; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Multitrigger.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Multitrigger.java new file mode 100644 index 0000000000000..64f376674c902 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Multitrigger.java @@ -0,0 +1,398 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for multitrigger complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="multitrigger">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="layout" type="{}layout" minOccurs="0"/>
+ *         <element name="label" type="{}label" minOccurs="0"/>
+ *         <element name="address" type="{}address" maxOccurs="unbounded"/>
+ *       </sequence>
+ *       <attribute name="showstatus" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="button1label" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="button1value" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="button2label" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="button2value" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="button3label" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="button3value" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="button4label" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="button4value" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute ref="{}flavour"/>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "multitrigger", propOrder = { "layout", "label", "address" }) +public class Multitrigger { + + protected Layout layout; + protected Label label; + @XmlElement(required = true) + protected List
address; + @XmlAttribute(name = "showstatus") + protected String showstatus; + @XmlAttribute(name = "button1label") + protected String button1Label; + @XmlAttribute(name = "button1value") + protected String button1Value; + @XmlAttribute(name = "button2label") + protected String button2Label; + @XmlAttribute(name = "button2value") + protected String button2Value; + @XmlAttribute(name = "button3label") + protected String button3Label; + @XmlAttribute(name = "button3value") + protected String button3Value; + @XmlAttribute(name = "button4label") + protected String button4Label; + @XmlAttribute(name = "button4value") + protected String button4Value; + @XmlAttribute(name = "flavour") + protected String flavour; + + /** + * Gets the value of the layout property. + * + * @return + * possible object is + * {@link Layout } + * + */ + public Layout getLayout() { + return layout; + } + + /** + * Sets the value of the layout property. + * + * @param value + * allowed object is + * {@link Layout } + * + */ + public void setLayout(Layout value) { + this.layout = value; + } + + /** + * Gets the value of the label property. + * + * @return + * possible object is + * {@link Label } + * + */ + public Label getLabel() { + return label; + } + + /** + * Sets the value of the label property. + * + * @param value + * allowed object is + * {@link Label } + * + */ + public void setLabel(Label value) { + this.label = value; + } + + /** + * Gets the value of the address property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the address property. + * + *

+ * For example, to add a new item, do as follows: + * + *

+     * getAddress().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Address } + * + * + */ + public List

getAddress() { + if (address == null) { + address = new ArrayList
(); + } + return this.address; + } + + /** + * Gets the value of the showstatus property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getShowstatus() { + return showstatus; + } + + /** + * Sets the value of the showstatus property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setShowstatus(String value) { + this.showstatus = value; + } + + /** + * Gets the value of the button1Label property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getButton1Label() { + return button1Label; + } + + /** + * Sets the value of the button1Label property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setButton1Label(String value) { + this.button1Label = value; + } + + /** + * Gets the value of the button1Value property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getButton1Value() { + return button1Value; + } + + /** + * Sets the value of the button1Value property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setButton1Value(String value) { + this.button1Value = value; + } + + /** + * Gets the value of the button2Label property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getButton2Label() { + return button2Label; + } + + /** + * Sets the value of the button2Label property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setButton2Label(String value) { + this.button2Label = value; + } + + /** + * Gets the value of the button2Value property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getButton2Value() { + return button2Value; + } + + /** + * Sets the value of the button2Value property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setButton2Value(String value) { + this.button2Value = value; + } + + /** + * Gets the value of the button3Label property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getButton3Label() { + return button3Label; + } + + /** + * Sets the value of the button3Label property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setButton3Label(String value) { + this.button3Label = value; + } + + /** + * Gets the value of the button3Value property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getButton3Value() { + return button3Value; + } + + /** + * Sets the value of the button3Value property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setButton3Value(String value) { + this.button3Value = value; + } + + /** + * Gets the value of the button4Label property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getButton4Label() { + return button4Label; + } + + /** + * Sets the value of the button4Label property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setButton4Label(String value) { + this.button4Label = value; + } + + /** + * Gets the value of the button4Value property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getButton4Value() { + return button4Value; + } + + /** + * Sets the value of the button4Value property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setButton4Value(String value) { + this.button4Value = value; + } + + /** + * Gets the value of the flavour property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFlavour() { + return flavour; + } + + /** + * Sets the value of the flavour property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFlavour(String value) { + this.flavour = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Navbar.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Navbar.java new file mode 100644 index 0000000000000..9db78bd0782c7 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Navbar.java @@ -0,0 +1,295 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlElementRefs; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for navbar complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="navbar">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <choice maxOccurs="unbounded" minOccurs="0">
+ *         <element name="page" type="{}page"/>
+ *         <element name="group" type="{}group"/>
+ *         <group ref="{}Widgets"/>
+ *         <group ref="{}AvailablePlugins"/>
+ *       </choice>
+ *       <attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="position" use="required" type="{}navbarPositionType" />
+ *       <attribute name="dynamic" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       <attribute name="width" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="scope" type="{http://www.w3.org/2001/XMLSchema}decimal" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "navbar", propOrder = { "pageOrGroupOrLine" }) +public class Navbar { + + @XmlElementRefs({ @XmlElementRef(name = "designtoggle", type = JAXBElement.class, required = false), + @XmlElementRef(name = "multitrigger", type = JAXBElement.class, required = false), + @XmlElementRef(name = "trigger", type = JAXBElement.class, required = false), + @XmlElementRef(name = "rss", type = JAXBElement.class, required = false), + @XmlElementRef(name = "colorchooser", type = JAXBElement.class, required = false), + @XmlElementRef(name = "toggle", type = JAXBElement.class, required = false), + @XmlElementRef(name = "imagetrigger", type = JAXBElement.class, required = false), + @XmlElementRef(name = "web", type = JAXBElement.class, required = false), + @XmlElementRef(name = "switch", type = JAXBElement.class, required = false), + @XmlElementRef(name = "slide", type = JAXBElement.class, required = false), + @XmlElementRef(name = "diagram_info", type = JAXBElement.class, required = false), + @XmlElementRef(name = "rgb", type = JAXBElement.class, required = false), + @XmlElementRef(name = "text", type = JAXBElement.class, required = false), + @XmlElementRef(name = "calendarlist", type = JAXBElement.class, required = false), + @XmlElementRef(name = "infotrigger", type = JAXBElement.class, required = false), + @XmlElementRef(name = "infoaction", type = JAXBElement.class, required = false), + @XmlElementRef(name = "refresh", type = JAXBElement.class, required = false), + @XmlElementRef(name = "upnpcontroller", type = JAXBElement.class, required = false), + @XmlElementRef(name = "group", type = JAXBElement.class, required = false), + @XmlElementRef(name = "timeout", type = JAXBElement.class, required = false), + @XmlElementRef(name = "info", type = JAXBElement.class, required = false), + @XmlElementRef(name = "break", type = JAXBElement.class, required = false), + @XmlElementRef(name = "strftime", type = JAXBElement.class, required = false), + @XmlElementRef(name = "svg", type = JAXBElement.class, required = false), + @XmlElementRef(name = "wgplugin_info", type = JAXBElement.class, required = false), + @XmlElementRef(name = "video", type = JAXBElement.class, required = false), + @XmlElementRef(name = "rsslog", type = JAXBElement.class, required = false), + @XmlElementRef(name = "reload", type = JAXBElement.class, required = false), + @XmlElementRef(name = "include", type = JAXBElement.class, required = false), + @XmlElementRef(name = "pushbutton", type = JAXBElement.class, required = false), + @XmlElementRef(name = "urltrigger", type = JAXBElement.class, required = false), + @XmlElementRef(name = "line", type = JAXBElement.class, required = false), + @XmlElementRef(name = "shade", type = JAXBElement.class, required = false), + @XmlElementRef(name = "clock", type = JAXBElement.class, required = false), + @XmlElementRef(name = "page", type = JAXBElement.class, required = false), + @XmlElementRef(name = "pagejump", type = JAXBElement.class, required = false), + @XmlElementRef(name = "audio", type = JAXBElement.class, required = false), + @XmlElementRef(name = "gauge", type = JAXBElement.class, required = false), + @XmlElementRef(name = "image", type = JAXBElement.class, required = false), + @XmlElementRef(name = "diagram", type = JAXBElement.class, required = false) }) + protected List> pageOrGroupOrLine; + @XmlAttribute(name = "name") + protected String name; + @XmlAttribute(name = "position", required = true) + protected NavbarPositionType position; + @XmlAttribute(name = "dynamic") + protected Boolean dynamic; + @XmlAttribute(name = "width") + protected String width; + @XmlAttribute(name = "scope") + protected BigDecimal scope; + + /** + * Gets the value of the pageOrGroupOrLine property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the pageOrGroupOrLine property. + * + *

+ * For example, to add a new item, do as follows: + * + *

+     * getPageOrGroupOrLine().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link JAXBElement }{@code <}{@link Designtoggle }{@code >} + * {@link JAXBElement }{@code <}{@link Trigger }{@code >} + * {@link JAXBElement }{@code <}{@link Multitrigger }{@code >} + * {@link JAXBElement }{@code <}{@link Colorchooser }{@code >} + * {@link JAXBElement }{@code <}{@link Rss }{@code >} + * {@link JAXBElement }{@code <}{@link Web }{@code >} + * {@link JAXBElement }{@code <}{@link Imagetrigger }{@code >} + * {@link JAXBElement }{@code <}{@link Toggle }{@code >} + * {@link JAXBElement }{@code <}{@link Slide }{@code >} + * {@link JAXBElement }{@code <}{@link Switch }{@code >} + * {@link JAXBElement }{@code <}{@link Rgb }{@code >} + * {@link JAXBElement }{@code <}{@link DiagramInfo }{@code >} + * {@link JAXBElement }{@code <}{@link Text }{@code >} + * {@link JAXBElement }{@code <}{@link Infotrigger }{@code >} + * {@link JAXBElement }{@code <}{@link Calendarlist }{@code >} + * {@link JAXBElement }{@code <}{@link Infoaction }{@code >} + * {@link JAXBElement }{@code <}{@link Refresh }{@code >} + * {@link JAXBElement }{@code <}{@link Upnpcontroller }{@code >} + * {@link JAXBElement }{@code <}{@link Group }{@code >} + * {@link JAXBElement }{@code <}{@link Info }{@code >} + * {@link JAXBElement }{@code <}{@link Timeout }{@code >} + * {@link JAXBElement }{@code <}{@link Break }{@code >} + * {@link JAXBElement }{@code <}{@link Strftime }{@code >} + * {@link JAXBElement }{@code <}{@link WgpluginInfo }{@code >} + * {@link JAXBElement }{@code <}{@link Svg }{@code >} + * {@link JAXBElement }{@code <}{@link Video }{@code >} + * {@link JAXBElement }{@code <}{@link Rsslog }{@code >} + * {@link JAXBElement }{@code <}{@link Include }{@code >} + * {@link JAXBElement }{@code <}{@link Reload }{@code >} + * {@link JAXBElement }{@code <}{@link Pushbutton }{@code >} + * {@link JAXBElement }{@code <}{@link Urltrigger }{@code >} + * {@link JAXBElement }{@code <}{@link Line }{@code >} + * {@link JAXBElement }{@code <}{@link Info }{@code >} + * {@link JAXBElement }{@code <}{@link Clock }{@code >} + * {@link JAXBElement }{@code <}{@link Page }{@code >} + * {@link JAXBElement }{@code <}{@link Pagejump }{@code >} + * {@link JAXBElement }{@code <}{@link Audio }{@code >} + * {@link JAXBElement }{@code <}{@link Gauge }{@code >} + * {@link JAXBElement }{@code <}{@link Image }{@code >} + * {@link JAXBElement }{@code <}{@link Diagram }{@code >} + * + * + */ + public List> getPageOrGroupOrLine() { + if (pageOrGroupOrLine == null) { + pageOrGroupOrLine = new ArrayList>(); + } + return this.pageOrGroupOrLine; + } + + /** + * Gets the value of the name property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getName() { + return name; + } + + /** + * Sets the value of the name property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setName(String value) { + this.name = value; + } + + /** + * Gets the value of the position property. + * + * @return + * possible object is + * {@link NavbarPositionType } + * + */ + public NavbarPositionType getPosition() { + return position; + } + + /** + * Sets the value of the position property. + * + * @param value + * allowed object is + * {@link NavbarPositionType } + * + */ + public void setPosition(NavbarPositionType value) { + this.position = value; + } + + /** + * Gets the value of the dynamic property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isDynamic() { + return dynamic; + } + + /** + * Sets the value of the dynamic property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setDynamic(Boolean value) { + this.dynamic = value; + } + + /** + * Gets the value of the width property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getWidth() { + return width; + } + + /** + * Sets the value of the width property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setWidth(String value) { + this.width = value; + } + + /** + * Gets the value of the scope property. + * + * @return + * possible object is + * {@link BigDecimal } + * + */ + public BigDecimal getScope() { + return scope; + } + + /** + * Sets the value of the scope property. + * + * @param value + * allowed object is + * {@link BigDecimal } + * + */ + public void setScope(BigDecimal value) { + this.scope = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/NavbarPositionType.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/NavbarPositionType.java new file mode 100644 index 0000000000000..03fab2f3c9a26 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/NavbarPositionType.java @@ -0,0 +1,61 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for navbarPositionType. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + *

+ * + *

+ * <simpleType name="navbarPositionType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="top"/>
+ *     <enumeration value="left"/>
+ *     <enumeration value="right"/>
+ *     <enumeration value="bottom"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ * + */ +@XmlType(name = "navbarPositionType") +@XmlEnum +public enum NavbarPositionType { + + @XmlEnumValue("top") TOP("top"), + @XmlEnumValue("left") LEFT("left"), + @XmlEnumValue("right") RIGHT("right"), + @XmlEnumValue("bottom") BOTTOM("bottom"); + private final String value; + + NavbarPositionType(String v) { + value = v; + } + + public String value() { + return value; + } + + public static NavbarPositionType fromValue(String v) { + for (NavbarPositionType c : NavbarPositionType.values()) { + if (c.value.equals(v)) { + return c; + } + } + throw new IllegalArgumentException(v); + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/ObjectFactory.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/ObjectFactory.java new file mode 100644 index 0000000000000..251afc8073c14 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/ObjectFactory.java @@ -0,0 +1,1687 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlElementDecl; +import javax.xml.bind.annotation.XmlRegistry; +import javax.xml.namespace.QName; + +/** + * This object contains factory methods for each + * Java content interface and Java element interface + * generated in the org.openhab.ui.cometvisu.internal.config.beans package. + *

+ * An ObjectFactory allows you to programatically + * construct new instances of the Java representation + * for XML content. The Java representation of XML + * content can consist of schema derived interfaces + * and classes representing the binding of schema + * type definitions, element declarations and model + * groups. Factory methods for each of these are + * provided in this class. + * + */ +@XmlRegistry +public class ObjectFactory { + + private final static QName _LabelIcon_QNAME = new QName("", "icon"); + private final static QName _GroupInfotrigger_QNAME = new QName("", "infotrigger"); + private final static QName _GroupMultitrigger_QNAME = new QName("", "multitrigger"); + private final static QName _GroupInfoaction_QNAME = new QName("", "infoaction"); + private final static QName _GroupRsslog_QNAME = new QName("", "rsslog"); + private final static QName _GroupDiagramInfo_QNAME = new QName("", "diagram_info"); + private final static QName _GroupLine_QNAME = new QName("", "line"); + private final static QName _GroupPagejump_QNAME = new QName("", "pagejump"); + private final static QName _GroupSwitch_QNAME = new QName("", "switch"); + private final static QName _GroupDesigntoggle_QNAME = new QName("", "designtoggle"); + private final static QName _GroupInfo_QNAME = new QName("", "info"); + private final static QName _GroupUrltrigger_QNAME = new QName("", "urltrigger"); + private final static QName _GroupBreak_QNAME = new QName("", "break"); + private final static QName _GroupPushbutton_QNAME = new QName("", "pushbutton"); + private final static QName _GroupToggle_QNAME = new QName("", "toggle"); + private final static QName _GroupPage_QNAME = new QName("", "page"); + private final static QName _GroupCalendarlist_QNAME = new QName("", "calendarlist"); + private final static QName _GroupRss_QNAME = new QName("", "rss"); + private final static QName _GroupSlide_QNAME = new QName("", "slide"); + private final static QName _GroupStrftime_QNAME = new QName("", "strftime"); + private final static QName _GroupRefresh_QNAME = new QName("", "refresh"); + private final static QName _GroupUpnpcontroller_QNAME = new QName("", "upnpcontroller"); + private final static QName _GroupVideo_QNAME = new QName("", "video"); + private final static QName _GroupTrigger_QNAME = new QName("", "trigger"); + private final static QName _GroupText_QNAME = new QName("", "text"); + private final static QName _GroupSvg_QNAME = new QName("", "svg"); + private final static QName _GroupImagetrigger_QNAME = new QName("", "imagetrigger"); + private final static QName _GroupAudio_QNAME = new QName("", "audio"); + private final static QName _GroupClock_QNAME = new QName("", "clock"); + private final static QName _GroupImage_QNAME = new QName("", "image"); + private final static QName _GroupRgb_QNAME = new QName("", "rgb"); + private final static QName _GroupWeb_QNAME = new QName("", "web"); + private final static QName _GroupColorchooser_QNAME = new QName("", "colorchooser"); + private final static QName _GroupInclude_QNAME = new QName("", "include"); + private final static QName _GroupGauge_QNAME = new QName("", "gauge"); + private final static QName _GroupDiagram_QNAME = new QName("", "diagram"); + private final static QName _GroupGroup_QNAME = new QName("", "group"); + private final static QName _GroupShade_QNAME = new QName("", "shade"); + private final static QName _GroupReload_QNAME = new QName("", "reload"); + private final static QName _GroupTimeout_QNAME = new QName("", "timeout"); + private final static QName _GroupWgpluginInfo_QNAME = new QName("", "wgplugin_info"); + private final static QName _PageNavbar_QNAME = new QName("", "navbar"); + + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: + * org.openhab.ui.cometvisu.internal.config.beans + * + */ + public ObjectFactory() { + } + + /** + * Create an instance of {@link Pages } + * + */ + public Pages createPages() { + return new Pages(); + } + + /** + * Create an instance of {@link Meta } + * + */ + public Meta createMeta() { + return new Meta(); + } + + /** + * Create an instance of {@link Page } + * + */ + public Page createPage() { + return new Page(); + } + + /** + * Create an instance of {@link Infotrigger } + * + */ + public Infotrigger createInfotrigger() { + return new Infotrigger(); + } + + /** + * Create an instance of {@link Multitrigger } + * + */ + public Multitrigger createMultitrigger() { + return new Multitrigger(); + } + + /** + * Create an instance of {@link Infoaction } + * + */ + public Infoaction createInfoaction() { + return new Infoaction(); + } + + /** + * Create an instance of {@link Widgetaction } + * + */ + public Widgetaction createWidgetaction() { + return new Widgetaction(); + } + + /** + * Create an instance of {@link DiagramInfo } + * + */ + public DiagramInfo createDiagramInfo() { + return new DiagramInfo(); + } + + /** + * Create an instance of {@link Plugin } + * + */ + public Plugin createPlugin() { + return new Plugin(); + } + + /** + * Create an instance of {@link Info } + * + */ + public Info createInfo() { + return new Info(); + } + + /** + * Create an instance of {@link Break } + * + */ + public Break createBreak() { + return new Break(); + } + + /** + * Create an instance of {@link Rss } + * + */ + public Rss createRss() { + return new Rss(); + } + + /** + * Create an instance of {@link StylingEntry } + * + */ + public StylingEntry createStylingEntry() { + return new StylingEntry(); + } + + /** + * Create an instance of {@link Refresh } + * + */ + public Refresh createRefresh() { + return new Refresh(); + } + + /** + * Create an instance of {@link Upnpcontroller } + * + */ + public Upnpcontroller createUpnpcontroller() { + return new Upnpcontroller(); + } + + /** + * Create an instance of {@link Video } + * + */ + public Video createVideo() { + return new Video(); + } + + /** + * Create an instance of {@link Text } + * + */ + public Text createText() { + return new Text(); + } + + /** + * Create an instance of {@link Imagetrigger } + * + */ + public Imagetrigger createImagetrigger() { + return new Imagetrigger(); + } + + /** + * Create an instance of {@link Status } + * + */ + public Status createStatus() { + return new Status(); + } + + /** + * Create an instance of {@link IconDefinition } + * + */ + public IconDefinition createIconDefinition() { + return new IconDefinition(); + } + + /** + * Create an instance of {@link Image } + * + */ + public Image createImage() { + return new Image(); + } + + /** + * Create an instance of {@link Label } + * + */ + public Label createLabel() { + return new Label(); + } + + /** + * Create an instance of {@link Rgb } + * + */ + public Rgb createRgb() { + return new Rgb(); + } + + /** + * Create an instance of {@link Stylings } + * + */ + public Stylings createStylings() { + return new Stylings(); + } + + /** + * Create an instance of {@link Colorchooser } + * + */ + public Colorchooser createColorchooser() { + return new Colorchooser(); + } + + /** + * Create an instance of {@link Include } + * + */ + public Include createInclude() { + return new Include(); + } + + /** + * Create an instance of {@link Diagram } + * + */ + public Diagram createDiagram() { + return new Diagram(); + } + + /** + * Create an instance of {@link Reload } + * + */ + public Reload createReload() { + return new Reload(); + } + + /** + * Create an instance of {@link WgpluginInfo } + * + */ + public WgpluginInfo createWgpluginInfo() { + return new WgpluginInfo(); + } + + /** + * Create an instance of {@link Plugins } + * + */ + public Plugins createPlugins() { + return new Plugins(); + } + + /** + * Create an instance of {@link Line } + * + */ + public Line createLine() { + return new Line(); + } + + /** + * Create an instance of {@link Rsslog } + * + */ + public Rsslog createRsslog() { + return new Rsslog(); + } + + /** + * Create an instance of {@link Mapping } + * + */ + public Mapping createMapping() { + return new Mapping(); + } + + /** + * Create an instance of {@link Switch } + * + */ + public Switch createSwitch() { + return new Switch(); + } + + /** + * Create an instance of {@link Pagejump } + * + */ + public Pagejump createPagejump() { + return new Pagejump(); + } + + /** + * Create an instance of {@link Designtoggle } + * + */ + public Designtoggle createDesigntoggle() { + return new Designtoggle(); + } + + /** + * Create an instance of {@link Urltrigger } + * + */ + public Urltrigger createUrltrigger() { + return new Urltrigger(); + } + + /** + * Create an instance of {@link Pushbutton } + * + */ + public Pushbutton createPushbutton() { + return new Pushbutton(); + } + + /** + * Create an instance of {@link Toggle } + * + */ + public Toggle createToggle() { + return new Toggle(); + } + + /** + * Create an instance of {@link Calendarlist } + * + */ + public Calendarlist createCalendarlist() { + return new Calendarlist(); + } + + /** + * Create an instance of {@link Mappings } + * + */ + public Mappings createMappings() { + return new Mappings(); + } + + /** + * Create an instance of {@link Layout } + * + */ + public Layout createLayout() { + return new Layout(); + } + + /** + * Create an instance of {@link Slide } + * + */ + public Slide createSlide() { + return new Slide(); + } + + /** + * Create an instance of {@link Strftime } + * + */ + public Strftime createStrftime() { + return new Strftime(); + } + + /** + * Create an instance of {@link Calendar } + * + */ + public Calendar createCalendar() { + return new Calendar(); + } + + /** + * Create an instance of {@link Axis } + * + */ + public Axis createAxis() { + return new Axis(); + } + + /** + * Create an instance of {@link Icon } + * + */ + public Icon createIcon() { + return new Icon(); + } + + /** + * Create an instance of {@link Trigger } + * + */ + public Trigger createTrigger() { + return new Trigger(); + } + + /** + * Create an instance of {@link Svg } + * + */ + public Svg createSvg() { + return new Svg(); + } + + /** + * Create an instance of {@link Audio } + * + */ + public Audio createAudio() { + return new Audio(); + } + + /** + * Create an instance of {@link Clock } + * + */ + public Clock createClock() { + return new Clock(); + } + + /** + * Create an instance of {@link Rrd } + * + */ + public Rrd createRrd() { + return new Rrd(); + } + + /** + * Create an instance of {@link Web } + * + */ + public Web createWeb() { + return new Web(); + } + + /** + * Create an instance of {@link Statusbar } + * + */ + public Statusbar createStatusbar() { + return new Statusbar(); + } + + /** + * Create an instance of {@link Address } + * + */ + public Address createAddress() { + return new Address(); + } + + /** + * Create an instance of {@link Entry } + * + */ + public Entry createEntry() { + return new Entry(); + } + + /** + * Create an instance of {@link Gauge } + * + */ + public Gauge createGauge() { + return new Gauge(); + } + + /** + * Create an instance of {@link Icons } + * + */ + public Icons createIcons() { + return new Icons(); + } + + /** + * Create an instance of {@link Group } + * + */ + public Group createGroup() { + return new Group(); + } + + /** + * Create an instance of {@link Widgetinfo } + * + */ + public Widgetinfo createWidgetinfo() { + return new Widgetinfo(); + } + + /** + * Create an instance of {@link Timeout } + * + */ + public Timeout createTimeout() { + return new Timeout(); + } + + /** + * Create an instance of {@link Navbar } + * + */ + public Navbar createNavbar() { + return new Navbar(); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link Icon }{@code >}} + * + */ + @XmlElementDecl(namespace = "", name = "icon", scope = Label.class) + public JAXBElement createLabelIcon(Icon value) { + return new JAXBElement(_LabelIcon_QNAME, Icon.class, Label.class, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link Infotrigger }{@code >}} + * + */ + @XmlElementDecl(namespace = "", name = "infotrigger", scope = Group.class) + public JAXBElement createGroupInfotrigger(Infotrigger value) { + return new JAXBElement(_GroupInfotrigger_QNAME, Infotrigger.class, Group.class, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link Multitrigger }{@code >}} + * + */ + @XmlElementDecl(namespace = "", name = "multitrigger", scope = Group.class) + public JAXBElement createGroupMultitrigger(Multitrigger value) { + return new JAXBElement(_GroupMultitrigger_QNAME, Multitrigger.class, Group.class, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link Infoaction }{@code >}} + * + */ + @XmlElementDecl(namespace = "", name = "infoaction", scope = Group.class) + public JAXBElement createGroupInfoaction(Infoaction value) { + return new JAXBElement(_GroupInfoaction_QNAME, Infoaction.class, Group.class, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link Rsslog }{@code >}} + * + */ + @XmlElementDecl(namespace = "", name = "rsslog", scope = Group.class) + public JAXBElement createGroupRsslog(Rsslog value) { + return new JAXBElement(_GroupRsslog_QNAME, Rsslog.class, Group.class, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link DiagramInfo }{@code >}} + * + */ + @XmlElementDecl(namespace = "", name = "diagram_info", scope = Group.class) + public JAXBElement createGroupDiagramInfo(DiagramInfo value) { + return new JAXBElement(_GroupDiagramInfo_QNAME, DiagramInfo.class, Group.class, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link Line }{@code >}} + * + */ + @XmlElementDecl(namespace = "", name = "line", scope = Group.class) + public JAXBElement createGroupLine(Line value) { + return new JAXBElement(_GroupLine_QNAME, Line.class, Group.class, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link Pagejump }{@code >}} + * + */ + @XmlElementDecl(namespace = "", name = "pagejump", scope = Group.class) + public JAXBElement createGroupPagejump(Pagejump value) { + return new JAXBElement(_GroupPagejump_QNAME, Pagejump.class, Group.class, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link Switch }{@code >}} + * + */ + @XmlElementDecl(namespace = "", name = "switch", scope = Group.class) + public JAXBElement createGroupSwitch(Switch value) { + return new JAXBElement(_GroupSwitch_QNAME, Switch.class, Group.class, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link Designtoggle }{@code >}} + * + */ + @XmlElementDecl(namespace = "", name = "designtoggle", scope = Group.class) + public JAXBElement createGroupDesigntoggle(Designtoggle value) { + return new JAXBElement(_GroupDesigntoggle_QNAME, Designtoggle.class, Group.class, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link Info }{@code >}} + * + */ + @XmlElementDecl(namespace = "", name = "info", scope = Group.class) + public JAXBElement createGroupInfo(Info value) { + return new JAXBElement(_GroupInfo_QNAME, Info.class, Group.class, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link Urltrigger }{@code >}} + * + */ + @XmlElementDecl(namespace = "", name = "urltrigger", scope = Group.class) + public JAXBElement createGroupUrltrigger(Urltrigger value) { + return new JAXBElement(_GroupUrltrigger_QNAME, Urltrigger.class, Group.class, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link Break }{@code >}} + * + */ + @XmlElementDecl(namespace = "", name = "break", scope = Group.class) + public JAXBElement createGroupBreak(Break value) { + return new JAXBElement(_GroupBreak_QNAME, Break.class, Group.class, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link Pushbutton }{@code >}} + * + */ + @XmlElementDecl(namespace = "", name = "pushbutton", scope = Group.class) + public JAXBElement createGroupPushbutton(Pushbutton value) { + return new JAXBElement(_GroupPushbutton_QNAME, Pushbutton.class, Group.class, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link Toggle }{@code >}} + * + */ + @XmlElementDecl(namespace = "", name = "toggle", scope = Group.class) + public JAXBElement createGroupToggle(Toggle value) { + return new JAXBElement(_GroupToggle_QNAME, Toggle.class, Group.class, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link Page }{@code >}} + * + */ + @XmlElementDecl(namespace = "", name = "page", scope = Group.class) + public JAXBElement createGroupPage(Page value) { + return new JAXBElement(_GroupPage_QNAME, Page.class, Group.class, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link Calendarlist }{@code >}} + * + */ + @XmlElementDecl(namespace = "", name = "calendarlist", scope = Group.class) + public JAXBElement createGroupCalendarlist(Calendarlist value) { + return new JAXBElement(_GroupCalendarlist_QNAME, Calendarlist.class, Group.class, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link Rss }{@code >}} + * + */ + @XmlElementDecl(namespace = "", name = "rss", scope = Group.class) + public JAXBElement createGroupRss(Rss value) { + return new JAXBElement(_GroupRss_QNAME, Rss.class, Group.class, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link Slide }{@code >}} + * + */ + @XmlElementDecl(namespace = "", name = "slide", scope = Group.class) + public JAXBElement createGroupSlide(Slide value) { + return new JAXBElement(_GroupSlide_QNAME, Slide.class, Group.class, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link Strftime }{@code >}} + * + */ + @XmlElementDecl(namespace = "", name = "strftime", scope = Group.class) + public JAXBElement createGroupStrftime(Strftime value) { + return new JAXBElement(_GroupStrftime_QNAME, Strftime.class, Group.class, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link Refresh }{@code >}} + * + */ + @XmlElementDecl(namespace = "", name = "refresh", scope = Group.class) + public JAXBElement createGroupRefresh(Refresh value) { + return new JAXBElement(_GroupRefresh_QNAME, Refresh.class, Group.class, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link Upnpcontroller }{@code >}} + * + */ + @XmlElementDecl(namespace = "", name = "upnpcontroller", scope = Group.class) + public JAXBElement createGroupUpnpcontroller(Upnpcontroller value) { + return new JAXBElement(_GroupUpnpcontroller_QNAME, Upnpcontroller.class, Group.class, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link Video }{@code >}} + * + */ + @XmlElementDecl(namespace = "", name = "video", scope = Group.class) + public JAXBElement

+ * Java class for page complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="page">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="layout" type="{}layout" minOccurs="0"/>
+ *         <choice maxOccurs="unbounded" minOccurs="0">
+ *           <element name="page" type="{}page"/>
+ *           <element name="group" type="{}group"/>
+ *           <element name="navbar" type="{}navbar"/>
+ *           <group ref="{}Widgets"/>
+ *           <group ref="{}AvailablePlugins"/>
+ *         </choice>
+ *       </sequence>
+ *       <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute ref="{}flavour"/>
+ *       <attribute ref="{}align"/>
+ *       <attribute name="ga" type="{}addr" />
+ *       <attribute name="visible" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       <attribute name="type">
+ *         <simpleType>
+ *           <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *             <enumeration value="text"/>
+ *             <enumeration value="2d"/>
+ *             <enumeration value="3d"/>
+ *           </restriction>
+ *         </simpleType>
+ *       </attribute>
+ *       <attribute name="size">
+ *         <simpleType>
+ *           <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *             <enumeration value="fixed"/>
+ *             <enumeration value="scaled"/>
+ *           </restriction>
+ *         </simpleType>
+ *       </attribute>
+ *       <attribute name="backdrop" type="{}uri" />
+ *       <attribute name="showtopnavigation" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       <attribute name="showfooter" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       <attribute name="shownavbar-top" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       <attribute name="shownavbar-bottom" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       <attribute name="shownavbar-left" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       <attribute name="shownavbar-right" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       <attribute ref="{}bind_click_to_widget"/>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "page", propOrder = { "layout", "pageOrGroupOrNavbar" }) +public class Page { + + protected Layout layout; + @XmlElementRefs({ @XmlElementRef(name = "strftime", type = JAXBElement.class, required = false), + @XmlElementRef(name = "diagram_info", type = JAXBElement.class, required = false), + @XmlElementRef(name = "diagram", type = JAXBElement.class, required = false), + @XmlElementRef(name = "page", type = JAXBElement.class, required = false), + @XmlElementRef(name = "wgplugin_info", type = JAXBElement.class, required = false), + @XmlElementRef(name = "pagejump", type = JAXBElement.class, required = false), + @XmlElementRef(name = "multitrigger", type = JAXBElement.class, required = false), + @XmlElementRef(name = "reload", type = JAXBElement.class, required = false), + @XmlElementRef(name = "clock", type = JAXBElement.class, required = false), + @XmlElementRef(name = "calendarlist", type = JAXBElement.class, required = false), + @XmlElementRef(name = "web", type = JAXBElement.class, required = false), + @XmlElementRef(name = "svg", type = JAXBElement.class, required = false), + @XmlElementRef(name = "pushbutton", type = JAXBElement.class, required = false), + @XmlElementRef(name = "gauge", type = JAXBElement.class, required = false), + @XmlElementRef(name = "text", type = JAXBElement.class, required = false), + @XmlElementRef(name = "toggle", type = JAXBElement.class, required = false), + @XmlElementRef(name = "infoaction", type = JAXBElement.class, required = false), + @XmlElementRef(name = "break", type = JAXBElement.class, required = false), + @XmlElementRef(name = "colorchooser", type = JAXBElement.class, required = false), + @XmlElementRef(name = "timeout", type = JAXBElement.class, required = false), + @XmlElementRef(name = "upnpcontroller", type = JAXBElement.class, required = false), + @XmlElementRef(name = "line", type = JAXBElement.class, required = false), + @XmlElementRef(name = "shade", type = JAXBElement.class, required = false), + @XmlElementRef(name = "group", type = JAXBElement.class, required = false), + @XmlElementRef(name = "include", type = JAXBElement.class, required = false), + @XmlElementRef(name = "video", type = JAXBElement.class, required = false), + @XmlElementRef(name = "designtoggle", type = JAXBElement.class, required = false), + @XmlElementRef(name = "audio", type = JAXBElement.class, required = false), + @XmlElementRef(name = "rss", type = JAXBElement.class, required = false), + @XmlElementRef(name = "refresh", type = JAXBElement.class, required = false), + @XmlElementRef(name = "infotrigger", type = JAXBElement.class, required = false), + @XmlElementRef(name = "trigger", type = JAXBElement.class, required = false), + @XmlElementRef(name = "rgb", type = JAXBElement.class, required = false), + @XmlElementRef(name = "rsslog", type = JAXBElement.class, required = false), + @XmlElementRef(name = "slide", type = JAXBElement.class, required = false), + @XmlElementRef(name = "urltrigger", type = JAXBElement.class, required = false), + @XmlElementRef(name = "navbar", type = JAXBElement.class, required = false), + @XmlElementRef(name = "switch", type = JAXBElement.class, required = false), + @XmlElementRef(name = "info", type = JAXBElement.class, required = false), + @XmlElementRef(name = "image", type = JAXBElement.class, required = false), + @XmlElementRef(name = "imagetrigger", type = JAXBElement.class, required = false) }) + protected List> pageOrGroupOrNavbar; + @XmlAttribute(name = "name", required = true) + protected String name; + @XmlAttribute(name = "flavour") + protected String flavour; + @XmlAttribute(name = "align") + protected String align; + @XmlAttribute(name = "ga") + protected String ga; + @XmlAttribute(name = "visible") + protected Boolean visible; + @XmlAttribute(name = "type") + protected String type; + @XmlAttribute(name = "size") + protected String size; + @XmlAttribute(name = "backdrop") + protected String backdrop; + @XmlAttribute(name = "showtopnavigation") + protected Boolean showtopnavigation; + @XmlAttribute(name = "showfooter") + protected Boolean showfooter; + @XmlAttribute(name = "shownavbar-top") + protected Boolean shownavbarTop; + @XmlAttribute(name = "shownavbar-bottom") + protected Boolean shownavbarBottom; + @XmlAttribute(name = "shownavbar-left") + protected Boolean shownavbarLeft; + @XmlAttribute(name = "shownavbar-right") + protected Boolean shownavbarRight; + @XmlAttribute(name = "bind_click_to_widget") + protected Boolean bindClickToWidget; + + /** + * Gets the value of the layout property. + * + * @return + * possible object is + * {@link Layout } + * + */ + public Layout getLayout() { + return layout; + } + + /** + * Sets the value of the layout property. + * + * @param value + * allowed object is + * {@link Layout } + * + */ + public void setLayout(Layout value) { + this.layout = value; + } + + /** + * Gets the value of the pageOrGroupOrNavbar property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the pageOrGroupOrNavbar property. + * + *

+ * For example, to add a new item, do as follows: + * + *

+     * getPageOrGroupOrNavbar().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link JAXBElement }{@code <}{@link DiagramInfo }{@code >} + * {@link JAXBElement }{@code <}{@link Strftime }{@code >} + * {@link JAXBElement }{@code <}{@link Page }{@code >} + * {@link JAXBElement }{@code <}{@link Diagram }{@code >} + * {@link JAXBElement }{@code <}{@link Pagejump }{@code >} + * {@link JAXBElement }{@code <}{@link WgpluginInfo }{@code >} + * {@link JAXBElement }{@code <}{@link Multitrigger }{@code >} + * {@link JAXBElement }{@code <}{@link Reload }{@code >} + * {@link JAXBElement }{@code <}{@link Clock }{@code >} + * {@link JAXBElement }{@code <}{@link Calendarlist }{@code >} + * {@link JAXBElement }{@code <}{@link Web }{@code >} + * {@link JAXBElement }{@code <}{@link Svg }{@code >} + * {@link JAXBElement }{@code <}{@link Pushbutton }{@code >} + * {@link JAXBElement }{@code <}{@link Gauge }{@code >} + * {@link JAXBElement }{@code <}{@link Text }{@code >} + * {@link JAXBElement }{@code <}{@link Toggle }{@code >} + * {@link JAXBElement }{@code <}{@link Infoaction }{@code >} + * {@link JAXBElement }{@code <}{@link Break }{@code >} + * {@link JAXBElement }{@code <}{@link Colorchooser }{@code >} + * {@link JAXBElement }{@code <}{@link Upnpcontroller }{@code >} + * {@link JAXBElement }{@code <}{@link Timeout }{@code >} + * {@link JAXBElement }{@code <}{@link Line }{@code >} + * {@link JAXBElement }{@code <}{@link Info }{@code >} + * {@link JAXBElement }{@code <}{@link Video }{@code >} + * {@link JAXBElement }{@code <}{@link Include }{@code >} + * {@link JAXBElement }{@code <}{@link Group }{@code >} + * {@link JAXBElement }{@code <}{@link Audio }{@code >} + * {@link JAXBElement }{@code <}{@link Designtoggle }{@code >} + * {@link JAXBElement }{@code <}{@link Refresh }{@code >} + * {@link JAXBElement }{@code <}{@link Rss }{@code >} + * {@link JAXBElement }{@code <}{@link Infotrigger }{@code >} + * {@link JAXBElement }{@code <}{@link Trigger }{@code >} + * {@link JAXBElement }{@code <}{@link Rgb }{@code >} + * {@link JAXBElement }{@code <}{@link Slide }{@code >} + * {@link JAXBElement }{@code <}{@link Rsslog }{@code >} + * {@link JAXBElement }{@code <}{@link Urltrigger }{@code >} + * {@link JAXBElement }{@code <}{@link Navbar }{@code >} + * {@link JAXBElement }{@code <}{@link Info }{@code >} + * {@link JAXBElement }{@code <}{@link Switch }{@code >} + * {@link JAXBElement }{@code <}{@link Imagetrigger }{@code >} + * {@link JAXBElement }{@code <}{@link Image }{@code >} + * + * + */ + public List> getPageOrGroupOrNavbar() { + if (pageOrGroupOrNavbar == null) { + pageOrGroupOrNavbar = new ArrayList>(); + } + return this.pageOrGroupOrNavbar; + } + + /** + * Gets the value of the name property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getName() { + return name; + } + + /** + * Sets the value of the name property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setName(String value) { + this.name = value; + } + + /** + * Gets the value of the flavour property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFlavour() { + return flavour; + } + + /** + * Sets the value of the flavour property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFlavour(String value) { + this.flavour = value; + } + + /** + * Gets the value of the align property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAlign() { + return align; + } + + /** + * Sets the value of the align property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAlign(String value) { + this.align = value; + } + + /** + * Gets the value of the ga property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getGa() { + return ga; + } + + /** + * Sets the value of the ga property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setGa(String value) { + this.ga = value; + } + + /** + * Gets the value of the visible property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isVisible() { + return visible; + } + + /** + * Sets the value of the visible property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setVisible(Boolean value) { + this.visible = value; + } + + /** + * Gets the value of the type property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getType() { + return type; + } + + /** + * Sets the value of the type property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setType(String value) { + this.type = value; + } + + /** + * Gets the value of the size property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSize() { + return size; + } + + /** + * Sets the value of the size property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSize(String value) { + this.size = value; + } + + /** + * Gets the value of the backdrop property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getBackdrop() { + return backdrop; + } + + /** + * Sets the value of the backdrop property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setBackdrop(String value) { + this.backdrop = value; + } + + /** + * Gets the value of the showtopnavigation property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isShowtopnavigation() { + return showtopnavigation; + } + + /** + * Sets the value of the showtopnavigation property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setShowtopnavigation(Boolean value) { + this.showtopnavigation = value; + } + + /** + * Gets the value of the showfooter property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isShowfooter() { + return showfooter; + } + + /** + * Sets the value of the showfooter property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setShowfooter(Boolean value) { + this.showfooter = value; + } + + /** + * Gets the value of the shownavbarTop property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isShownavbarTop() { + return shownavbarTop; + } + + /** + * Sets the value of the shownavbarTop property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setShownavbarTop(Boolean value) { + this.shownavbarTop = value; + } + + /** + * Gets the value of the shownavbarBottom property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isShownavbarBottom() { + return shownavbarBottom; + } + + /** + * Sets the value of the shownavbarBottom property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setShownavbarBottom(Boolean value) { + this.shownavbarBottom = value; + } + + /** + * Gets the value of the shownavbarLeft property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isShownavbarLeft() { + return shownavbarLeft; + } + + /** + * Sets the value of the shownavbarLeft property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setShownavbarLeft(Boolean value) { + this.shownavbarLeft = value; + } + + /** + * Gets the value of the shownavbarRight property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isShownavbarRight() { + return shownavbarRight; + } + + /** + * Sets the value of the shownavbarRight property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setShownavbarRight(Boolean value) { + this.shownavbarRight = value; + } + + /** + * Gets the value of the bindClickToWidget property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isBindClickToWidget() { + return bindClickToWidget; + } + + /** + * Sets the value of the bindClickToWidget property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setBindClickToWidget(Boolean value) { + this.bindClickToWidget = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Pagejump.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Pagejump.java new file mode 100644 index 0000000000000..e1923bb4750af --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Pagejump.java @@ -0,0 +1,253 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for pagejump complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="pagejump">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="layout" type="{}layout" minOccurs="0"/>
+ *         <element name="label" type="{}label" minOccurs="0"/>
+ *         <element name="widgetinfo" type="{}widgetinfo" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute ref="{}target"/>
+ *       <attribute ref="{}align"/>
+ *       <attribute ref="{}flavour"/>
+ *       <attribute ref="{}bind_click_to_widget"/>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "pagejump", propOrder = { "layout", "label", "widgetinfo" }) +public class Pagejump { + + protected Layout layout; + protected Label label; + protected Widgetinfo widgetinfo; + @XmlAttribute(name = "name") + protected String name; + @XmlAttribute(name = "target") + protected String target; + @XmlAttribute(name = "align") + protected String align; + @XmlAttribute(name = "flavour") + protected String flavour; + @XmlAttribute(name = "bind_click_to_widget") + protected Boolean bindClickToWidget; + + /** + * Gets the value of the layout property. + * + * @return + * possible object is + * {@link Layout } + * + */ + public Layout getLayout() { + return layout; + } + + /** + * Sets the value of the layout property. + * + * @param value + * allowed object is + * {@link Layout } + * + */ + public void setLayout(Layout value) { + this.layout = value; + } + + /** + * Gets the value of the label property. + * + * @return + * possible object is + * {@link Label } + * + */ + public Label getLabel() { + return label; + } + + /** + * Sets the value of the label property. + * + * @param value + * allowed object is + * {@link Label } + * + */ + public void setLabel(Label value) { + this.label = value; + } + + /** + * Gets the value of the widgetinfo property. + * + * @return + * possible object is + * {@link Widgetinfo } + * + */ + public Widgetinfo getWidgetinfo() { + return widgetinfo; + } + + /** + * Sets the value of the widgetinfo property. + * + * @param value + * allowed object is + * {@link Widgetinfo } + * + */ + public void setWidgetinfo(Widgetinfo value) { + this.widgetinfo = value; + } + + /** + * Gets the value of the name property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getName() { + return name; + } + + /** + * Sets the value of the name property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setName(String value) { + this.name = value; + } + + /** + * Gets the value of the target property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTarget() { + return target; + } + + /** + * Sets the value of the target property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTarget(String value) { + this.target = value; + } + + /** + * Gets the value of the align property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAlign() { + return align; + } + + /** + * Sets the value of the align property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAlign(String value) { + this.align = value; + } + + /** + * Gets the value of the flavour property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFlavour() { + return flavour; + } + + /** + * Sets the value of the flavour property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFlavour(String value) { + this.flavour = value; + } + + /** + * Gets the value of the bindClickToWidget property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isBindClickToWidget() { + return bindClickToWidget; + } + + /** + * Sets the value of the bindClickToWidget property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setBindClickToWidget(Boolean value) { + this.bindClickToWidget = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Pages.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Pages.java new file mode 100644 index 0000000000000..d4cd821c7ac27 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Pages.java @@ -0,0 +1,395 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import java.math.BigDecimal; +import java.math.BigInteger; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for anonymous complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="meta" type="{}meta" minOccurs="0"/>
+ *         <element name="page" type="{}page"/>
+ *       </sequence>
+ *       <attribute name="design" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute ref="{}backend"/>
+ *       <attribute ref="{}bind_click_to_widget"/>
+ *       <attribute name="scroll_speed" type="{http://www.w3.org/2001/XMLSchema}decimal" />
+ *       <attribute name="max_mobile_screen_width" type="{http://www.w3.org/2001/XMLSchema}decimal" />
+ *       <attribute name="min_column_width" type="{http://www.w3.org/2001/XMLSchema}decimal" />
+ *       <attribute name="default_columns" type="{http://www.w3.org/2001/XMLSchema}decimal" />
+ *       <attribute name="enable_column_adjustment" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       <attribute name="lib_version" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
+ *       <attribute name="screensave_time" type="{http://www.w3.org/2001/XMLSchema}decimal" />
+ *       <attribute name="screensave_page" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { "meta", "page" }) +@XmlRootElement(name = "pages") +public class Pages { + + protected Meta meta; + @XmlElement(required = true) + protected Page page; + @XmlAttribute(name = "design", required = true) + protected String design; + @XmlAttribute(name = "backend") + protected String backend; + @XmlAttribute(name = "bind_click_to_widget") + protected Boolean bindClickToWidget; + @XmlAttribute(name = "scroll_speed") + protected BigDecimal scrollSpeed; + @XmlAttribute(name = "max_mobile_screen_width") + protected BigDecimal maxMobileScreenWidth; + @XmlAttribute(name = "min_column_width") + protected BigDecimal minColumnWidth; + @XmlAttribute(name = "default_columns") + protected BigDecimal defaultColumns; + @XmlAttribute(name = "enable_column_adjustment") + protected Boolean enableColumnAdjustment; + @XmlAttribute(name = "lib_version", required = true) + protected BigInteger libVersion; + @XmlAttribute(name = "screensave_time") + protected BigDecimal screensaveTime; + @XmlAttribute(name = "screensave_page") + protected String screensavePage; + + /** + * Gets the value of the meta property. + * + * @return + * possible object is + * {@link Meta } + * + */ + public Meta getMeta() { + return meta; + } + + /** + * Sets the value of the meta property. + * + * @param value + * allowed object is + * {@link Meta } + * + */ + public void setMeta(Meta value) { + this.meta = value; + } + + /** + * Gets the value of the page property. + * + * @return + * possible object is + * {@link Page } + * + */ + public Page getPage() { + return page; + } + + /** + * Sets the value of the page property. + * + * @param value + * allowed object is + * {@link Page } + * + */ + public void setPage(Page value) { + this.page = value; + } + + /** + * Gets the value of the design property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDesign() { + return design; + } + + /** + * Sets the value of the design property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDesign(String value) { + this.design = value; + } + + /** + * Gets the value of the backend property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getBackend() { + return backend; + } + + /** + * Sets the value of the backend property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setBackend(String value) { + this.backend = value; + } + + /** + * Gets the value of the bindClickToWidget property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isBindClickToWidget() { + return bindClickToWidget; + } + + /** + * Sets the value of the bindClickToWidget property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setBindClickToWidget(Boolean value) { + this.bindClickToWidget = value; + } + + /** + * Gets the value of the scrollSpeed property. + * + * @return + * possible object is + * {@link BigDecimal } + * + */ + public BigDecimal getScrollSpeed() { + return scrollSpeed; + } + + /** + * Sets the value of the scrollSpeed property. + * + * @param value + * allowed object is + * {@link BigDecimal } + * + */ + public void setScrollSpeed(BigDecimal value) { + this.scrollSpeed = value; + } + + /** + * Gets the value of the maxMobileScreenWidth property. + * + * @return + * possible object is + * {@link BigDecimal } + * + */ + public BigDecimal getMaxMobileScreenWidth() { + return maxMobileScreenWidth; + } + + /** + * Sets the value of the maxMobileScreenWidth property. + * + * @param value + * allowed object is + * {@link BigDecimal } + * + */ + public void setMaxMobileScreenWidth(BigDecimal value) { + this.maxMobileScreenWidth = value; + } + + /** + * Gets the value of the minColumnWidth property. + * + * @return + * possible object is + * {@link BigDecimal } + * + */ + public BigDecimal getMinColumnWidth() { + return minColumnWidth; + } + + /** + * Sets the value of the minColumnWidth property. + * + * @param value + * allowed object is + * {@link BigDecimal } + * + */ + public void setMinColumnWidth(BigDecimal value) { + this.minColumnWidth = value; + } + + /** + * Gets the value of the defaultColumns property. + * + * @return + * possible object is + * {@link BigDecimal } + * + */ + public BigDecimal getDefaultColumns() { + return defaultColumns; + } + + /** + * Sets the value of the defaultColumns property. + * + * @param value + * allowed object is + * {@link BigDecimal } + * + */ + public void setDefaultColumns(BigDecimal value) { + this.defaultColumns = value; + } + + /** + * Gets the value of the enableColumnAdjustment property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isEnableColumnAdjustment() { + return enableColumnAdjustment; + } + + /** + * Sets the value of the enableColumnAdjustment property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setEnableColumnAdjustment(Boolean value) { + this.enableColumnAdjustment = value; + } + + /** + * Gets the value of the libVersion property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getLibVersion() { + return libVersion; + } + + /** + * Sets the value of the libVersion property. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setLibVersion(BigInteger value) { + this.libVersion = value; + } + + /** + * Gets the value of the screensaveTime property. + * + * @return + * possible object is + * {@link BigDecimal } + * + */ + public BigDecimal getScreensaveTime() { + return screensaveTime; + } + + /** + * Sets the value of the screensaveTime property. + * + * @param value + * allowed object is + * {@link BigDecimal } + * + */ + public void setScreensaveTime(BigDecimal value) { + this.screensaveTime = value; + } + + /** + * Gets the value of the screensavePage property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getScreensavePage() { + return screensavePage; + } + + /** + * Sets the value of the screensavePage property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setScreensavePage(String value) { + this.screensavePage = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Plugin.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Plugin.java new file mode 100644 index 0000000000000..040283582319a --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Plugin.java @@ -0,0 +1,65 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for plugin complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="plugin">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "plugin") +public class Plugin { + + @XmlAttribute(name = "name", required = true) + protected String name; + + /** + * Gets the value of the name property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getName() { + return name; + } + + /** + * Sets the value of the name property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setName(String value) { + this.name = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Plugins.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Plugins.java new file mode 100644 index 0000000000000..47cfb696f5889 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Plugins.java @@ -0,0 +1,73 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for plugins complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="plugins">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <choice maxOccurs="unbounded" minOccurs="0">
+ *         <element name="plugin" type="{}plugin"/>
+ *       </choice>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "plugins", propOrder = { "plugin" }) +public class Plugins { + + protected List plugin; + + /** + * Gets the value of the plugin property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the plugin property. + * + *

+ * For example, to add a new item, do as follows: + * + *

+     * getPlugin().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Plugin } + * + * + */ + public List getPlugin() { + if (plugin == null) { + plugin = new ArrayList(); + } + return this.plugin; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Pushbutton.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Pushbutton.java new file mode 100644 index 0000000000000..b1747d679dd5f --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Pushbutton.java @@ -0,0 +1,315 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for pushbutton complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="pushbutton">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="layout" type="{}layout" minOccurs="0"/>
+ *         <element name="label" type="{}label" minOccurs="0"/>
+ *         <element name="address" type="{}address" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="downValue" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="upValue" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute ref="{}mapping"/>
+ *       <attribute ref="{}styling"/>
+ *       <attribute ref="{}align"/>
+ *       <attribute ref="{}flavour"/>
+ *       <attribute ref="{}bind_click_to_widget"/>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "pushbutton", propOrder = { "layout", "label", "address" }) +public class Pushbutton { + + protected Layout layout; + protected Label label; + protected List
address; + @XmlAttribute(name = "downValue", required = true) + protected String downValue; + @XmlAttribute(name = "upValue", required = true) + protected String upValue; + @XmlAttribute(name = "mapping") + protected String mapping; + @XmlAttribute(name = "styling") + protected String styling; + @XmlAttribute(name = "align") + protected String align; + @XmlAttribute(name = "flavour") + protected String flavour; + @XmlAttribute(name = "bind_click_to_widget") + protected Boolean bindClickToWidget; + + /** + * Gets the value of the layout property. + * + * @return + * possible object is + * {@link Layout } + * + */ + public Layout getLayout() { + return layout; + } + + /** + * Sets the value of the layout property. + * + * @param value + * allowed object is + * {@link Layout } + * + */ + public void setLayout(Layout value) { + this.layout = value; + } + + /** + * Gets the value of the label property. + * + * @return + * possible object is + * {@link Label } + * + */ + public Label getLabel() { + return label; + } + + /** + * Sets the value of the label property. + * + * @param value + * allowed object is + * {@link Label } + * + */ + public void setLabel(Label value) { + this.label = value; + } + + /** + * Gets the value of the address property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the address property. + * + *

+ * For example, to add a new item, do as follows: + * + *

+     * getAddress().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Address } + * + * + */ + public List

getAddress() { + if (address == null) { + address = new ArrayList
(); + } + return this.address; + } + + /** + * Gets the value of the downValue property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDownValue() { + return downValue; + } + + /** + * Sets the value of the downValue property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDownValue(String value) { + this.downValue = value; + } + + /** + * Gets the value of the upValue property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getUpValue() { + return upValue; + } + + /** + * Sets the value of the upValue property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setUpValue(String value) { + this.upValue = value; + } + + /** + * Gets the value of the mapping property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getMapping() { + return mapping; + } + + /** + * Sets the value of the mapping property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setMapping(String value) { + this.mapping = value; + } + + /** + * Gets the value of the styling property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getStyling() { + return styling; + } + + /** + * Sets the value of the styling property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setStyling(String value) { + this.styling = value; + } + + /** + * Gets the value of the align property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAlign() { + return align; + } + + /** + * Sets the value of the align property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAlign(String value) { + this.align = value; + } + + /** + * Gets the value of the flavour property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFlavour() { + return flavour; + } + + /** + * Sets the value of the flavour property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFlavour(String value) { + this.flavour = value; + } + + /** + * Gets the value of the bindClickToWidget property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isBindClickToWidget() { + return bindClickToWidget; + } + + /** + * Sets the value of the bindClickToWidget property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setBindClickToWidget(Boolean value) { + this.bindClickToWidget = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Refresh.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Refresh.java new file mode 100644 index 0000000000000..6da72a03d363b --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Refresh.java @@ -0,0 +1,254 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for refresh complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="refresh">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="layout" type="{}layout" minOccurs="0"/>
+ *         <element name="label" type="{}label" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute ref="{}value use="required""/>
+ *       <attribute ref="{}mapping"/>
+ *       <attribute ref="{}styling"/>
+ *       <attribute ref="{}align"/>
+ *       <attribute ref="{}flavour"/>
+ *       <attribute ref="{}bind_click_to_widget"/>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "refresh", propOrder = { "layout", "label" }) +public class Refresh { + + protected Layout layout; + protected Label label; + @XmlAttribute(name = "value", required = true) + protected String value; + @XmlAttribute(name = "mapping") + protected String mapping; + @XmlAttribute(name = "styling") + protected String styling; + @XmlAttribute(name = "align") + protected String align; + @XmlAttribute(name = "flavour") + protected String flavour; + @XmlAttribute(name = "bind_click_to_widget") + protected Boolean bindClickToWidget; + + /** + * Gets the value of the layout property. + * + * @return + * possible object is + * {@link Layout } + * + */ + public Layout getLayout() { + return layout; + } + + /** + * Sets the value of the layout property. + * + * @param value + * allowed object is + * {@link Layout } + * + */ + public void setLayout(Layout value) { + this.layout = value; + } + + /** + * Gets the value of the label property. + * + * @return + * possible object is + * {@link Label } + * + */ + public Label getLabel() { + return label; + } + + /** + * Sets the value of the label property. + * + * @param value + * allowed object is + * {@link Label } + * + */ + public void setLabel(Label value) { + this.label = value; + } + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setValue(String value) { + this.value = value; + } + + /** + * Gets the value of the mapping property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getMapping() { + return mapping; + } + + /** + * Sets the value of the mapping property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setMapping(String value) { + this.mapping = value; + } + + /** + * Gets the value of the styling property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getStyling() { + return styling; + } + + /** + * Sets the value of the styling property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setStyling(String value) { + this.styling = value; + } + + /** + * Gets the value of the align property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAlign() { + return align; + } + + /** + * Sets the value of the align property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAlign(String value) { + this.align = value; + } + + /** + * Gets the value of the flavour property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFlavour() { + return flavour; + } + + /** + * Sets the value of the flavour property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFlavour(String value) { + this.flavour = value; + } + + /** + * Gets the value of the bindClickToWidget property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isBindClickToWidget() { + return bindClickToWidget; + } + + /** + * Sets the value of the bindClickToWidget property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setBindClickToWidget(Boolean value) { + this.bindClickToWidget = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Reload.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Reload.java new file mode 100644 index 0000000000000..a0e6b40312358 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Reload.java @@ -0,0 +1,75 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for reload complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="reload">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="address" type="{}address" maxOccurs="unbounded"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "reload", propOrder = { "address" }) +public class Reload { + + @XmlElement(required = true) + protected List
address; + + /** + * Gets the value of the address property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the address property. + * + *

+ * For example, to add a new item, do as follows: + * + *

+     * getAddress().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Address } + * + * + */ + public List

getAddress() { + if (address == null) { + address = new ArrayList
(); + } + return this.address; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Rgb.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Rgb.java new file mode 100644 index 0000000000000..a95fd0e399e5b --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Rgb.java @@ -0,0 +1,155 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for rgb complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="rgb">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="layout" type="{}layout" minOccurs="0"/>
+ *         <element name="label" type="{}label" minOccurs="0"/>
+ *         <element name="address" type="{}address" maxOccurs="unbounded" minOccurs="3"/>
+ *       </sequence>
+ *       <attribute ref="{}flavour"/>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "rgb", propOrder = { "layout", "label", "address" }) +public class Rgb { + + protected Layout layout; + protected Label label; + @XmlElement(required = true) + protected List
address; + @XmlAttribute(name = "flavour") + protected String flavour; + + /** + * Gets the value of the layout property. + * + * @return + * possible object is + * {@link Layout } + * + */ + public Layout getLayout() { + return layout; + } + + /** + * Sets the value of the layout property. + * + * @param value + * allowed object is + * {@link Layout } + * + */ + public void setLayout(Layout value) { + this.layout = value; + } + + /** + * Gets the value of the label property. + * + * @return + * possible object is + * {@link Label } + * + */ + public Label getLabel() { + return label; + } + + /** + * Sets the value of the label property. + * + * @param value + * allowed object is + * {@link Label } + * + */ + public void setLabel(Label value) { + this.label = value; + } + + /** + * Gets the value of the address property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the address property. + * + *

+ * For example, to add a new item, do as follows: + * + *

+     * getAddress().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Address } + * + * + */ + public List

getAddress() { + if (address == null) { + address = new ArrayList
(); + } + return this.address; + } + + /** + * Gets the value of the flavour property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFlavour() { + return flavour; + } + + /** + * Sets the value of the flavour property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFlavour(String value) { + this.flavour = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Rrd.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Rrd.java new file mode 100644 index 0000000000000..d78092ac0e90f --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Rrd.java @@ -0,0 +1,345 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import java.math.BigDecimal; +import java.math.BigInteger; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; + +/** + *

+ * Java class for rrd complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="rrd">
+ *   <simpleContent>
+ *     <extension base="<http://www.w3.org/2001/XMLSchema>string">
+ *       <attribute name="yaxis" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="color" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="label" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="scaling" type="{http://www.w3.org/2001/XMLSchema}decimal" />
+ *       <attribute name="steps" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       <attribute name="fill" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       <attribute name="datasourceIndex" type="{http://www.w3.org/2001/XMLSchema}integer" default="0" />
+ *       <attribute ref="{}consolidationFunction default="AVERAGE""/>
+ *       <attribute name="resolution" type="{http://www.w3.org/2001/XMLSchema}integer" />
+ *       <attribute name="offset" type="{http://www.w3.org/2001/XMLSchema}integer" />
+ *     </extension>
+ *   </simpleContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "rrd", propOrder = { "value" }) +public class Rrd { + + @XmlValue + protected String value; + @XmlAttribute(name = "yaxis") + protected String yaxis; + @XmlAttribute(name = "color") + protected String color; + @XmlAttribute(name = "label") + protected String label; + @XmlAttribute(name = "scaling") + protected BigDecimal scaling; + @XmlAttribute(name = "steps") + protected Boolean steps; + @XmlAttribute(name = "fill") + protected Boolean fill; + @XmlAttribute(name = "datasourceIndex") + protected BigInteger datasourceIndex; + @XmlAttribute(name = "consolidationFunction") + protected String consolidationFunction; + @XmlAttribute(name = "resolution") + protected BigInteger resolution; + @XmlAttribute(name = "offset") + protected BigInteger offset; + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setValue(String value) { + this.value = value; + } + + /** + * Gets the value of the yaxis property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getYaxis() { + return yaxis; + } + + /** + * Sets the value of the yaxis property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setYaxis(String value) { + this.yaxis = value; + } + + /** + * Gets the value of the color property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getColor() { + return color; + } + + /** + * Sets the value of the color property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setColor(String value) { + this.color = value; + } + + /** + * Gets the value of the label property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getLabel() { + return label; + } + + /** + * Sets the value of the label property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setLabel(String value) { + this.label = value; + } + + /** + * Gets the value of the scaling property. + * + * @return + * possible object is + * {@link BigDecimal } + * + */ + public BigDecimal getScaling() { + return scaling; + } + + /** + * Sets the value of the scaling property. + * + * @param value + * allowed object is + * {@link BigDecimal } + * + */ + public void setScaling(BigDecimal value) { + this.scaling = value; + } + + /** + * Gets the value of the steps property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isSteps() { + return steps; + } + + /** + * Sets the value of the steps property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setSteps(Boolean value) { + this.steps = value; + } + + /** + * Gets the value of the fill property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isFill() { + return fill; + } + + /** + * Sets the value of the fill property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setFill(Boolean value) { + this.fill = value; + } + + /** + * Gets the value of the datasourceIndex property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getDatasourceIndex() { + if (datasourceIndex == null) { + return new BigInteger("0"); + } else { + return datasourceIndex; + } + } + + /** + * Sets the value of the datasourceIndex property. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setDatasourceIndex(BigInteger value) { + this.datasourceIndex = value; + } + + /** + * Auswählen einer der verfügbaren Consolidation Functions des RRDTools (http://rrdtool.org). + * + * @return + * possible object is + * {@link String } + * + */ + public String getConsolidationFunction() { + if (consolidationFunction == null) { + return "AVERAGE"; + } else { + return consolidationFunction; + } + } + + /** + * Sets the value of the consolidationFunction property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setConsolidationFunction(String value) { + this.consolidationFunction = value; + } + + /** + * Gets the value of the resolution property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getResolution() { + return resolution; + } + + /** + * Sets the value of the resolution property. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setResolution(BigInteger value) { + this.resolution = value; + } + + /** + * Gets the value of the offset property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getOffset() { + return offset; + } + + /** + * Sets the value of the offset property. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setOffset(BigInteger value) { + this.offset = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Rss.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Rss.java new file mode 100644 index 0000000000000..0a8ef6ff17fa5 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Rss.java @@ -0,0 +1,463 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import java.math.BigInteger; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for rss complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="rss">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="layout" type="{}layout" minOccurs="0"/>
+ *         <element name="label" type="{}label" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="src" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="width" type="{}dimension" />
+ *       <attribute name="height" type="{}dimension" />
+ *       <attribute name="refresh" type="{http://www.w3.org/2001/XMLSchema}integer" />
+ *       <attribute name="limit" type="{http://www.w3.org/2001/XMLSchema}integer" />
+ *       <attribute name="header" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       <attribute name="date" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       <attribute name="content" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       <attribute name="snippet" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       <attribute name="showerror" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       <attribute name="ssl" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       <attribute ref="{}linktarget"/>
+ *       <attribute name="link" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       <attribute name="title" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "rss", propOrder = { "layout", "label" }) +public class Rss { + + protected Layout layout; + protected Label label; + @XmlAttribute(name = "src", required = true) + protected String src; + @XmlAttribute(name = "width") + protected String width; + @XmlAttribute(name = "height") + protected String height; + @XmlAttribute(name = "refresh") + protected BigInteger refresh; + @XmlAttribute(name = "limit") + protected BigInteger limit; + @XmlAttribute(name = "header", required = true) + protected boolean header; + @XmlAttribute(name = "date") + protected Boolean date; + @XmlAttribute(name = "content") + protected Boolean content; + @XmlAttribute(name = "snippet") + protected Boolean snippet; + @XmlAttribute(name = "showerror") + protected Boolean showerror; + @XmlAttribute(name = "ssl") + protected Boolean ssl; + @XmlAttribute(name = "linktarget") + protected String linktarget; + @XmlAttribute(name = "link") + protected Boolean link; + @XmlAttribute(name = "title") + protected Boolean title; + + /** + * Gets the value of the layout property. + * + * @return + * possible object is + * {@link Layout } + * + */ + public Layout getLayout() { + return layout; + } + + /** + * Sets the value of the layout property. + * + * @param value + * allowed object is + * {@link Layout } + * + */ + public void setLayout(Layout value) { + this.layout = value; + } + + /** + * Gets the value of the label property. + * + * @return + * possible object is + * {@link Label } + * + */ + public Label getLabel() { + return label; + } + + /** + * Sets the value of the label property. + * + * @param value + * allowed object is + * {@link Label } + * + */ + public void setLabel(Label value) { + this.label = value; + } + + /** + * Gets the value of the src property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSrc() { + return src; + } + + /** + * Sets the value of the src property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSrc(String value) { + this.src = value; + } + + /** + * Gets the value of the width property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getWidth() { + return width; + } + + /** + * Sets the value of the width property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setWidth(String value) { + this.width = value; + } + + /** + * Gets the value of the height property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getHeight() { + return height; + } + + /** + * Sets the value of the height property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setHeight(String value) { + this.height = value; + } + + /** + * Gets the value of the refresh property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getRefresh() { + return refresh; + } + + /** + * Sets the value of the refresh property. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setRefresh(BigInteger value) { + this.refresh = value; + } + + /** + * Gets the value of the limit property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getLimit() { + return limit; + } + + /** + * Sets the value of the limit property. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setLimit(BigInteger value) { + this.limit = value; + } + + /** + * Gets the value of the header property. + * + */ + public boolean isHeader() { + return header; + } + + /** + * Sets the value of the header property. + * + */ + public void setHeader(boolean value) { + this.header = value; + } + + /** + * Gets the value of the date property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isDate() { + return date; + } + + /** + * Sets the value of the date property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setDate(Boolean value) { + this.date = value; + } + + /** + * Gets the value of the content property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isContent() { + return content; + } + + /** + * Sets the value of the content property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setContent(Boolean value) { + this.content = value; + } + + /** + * Gets the value of the snippet property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isSnippet() { + return snippet; + } + + /** + * Sets the value of the snippet property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setSnippet(Boolean value) { + this.snippet = value; + } + + /** + * Gets the value of the showerror property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isShowerror() { + return showerror; + } + + /** + * Sets the value of the showerror property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setShowerror(Boolean value) { + this.showerror = value; + } + + /** + * Gets the value of the ssl property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isSsl() { + return ssl; + } + + /** + * Sets the value of the ssl property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setSsl(Boolean value) { + this.ssl = value; + } + + /** + * Gets the value of the linktarget property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getLinktarget() { + return linktarget; + } + + /** + * Sets the value of the linktarget property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setLinktarget(String value) { + this.linktarget = value; + } + + /** + * Gets the value of the link property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isLink() { + return link; + } + + /** + * Sets the value of the link property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setLink(Boolean value) { + this.link = value; + } + + /** + * Gets the value of the title property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isTitle() { + return title; + } + + /** + * Sets the value of the title property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setTitle(Boolean value) { + this.title = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/RssMode.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/RssMode.java new file mode 100644 index 0000000000000..da8e7ff0d7ff7 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/RssMode.java @@ -0,0 +1,59 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for rss_mode. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + *

+ * + *

+ * <simpleType name="rss_mode">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="first"/>
+ *     <enumeration value="last"/>
+ *     <enumeration value="rollover"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ * + */ +@XmlType(name = "rss_mode") +@XmlEnum +public enum RssMode { + + @XmlEnumValue("first") FIRST("first"), + @XmlEnumValue("last") LAST("last"), + @XmlEnumValue("rollover") ROLLOVER("rollover"); + private final String value; + + RssMode(String v) { + value = v; + } + + public String value() { + return value; + } + + public static RssMode fromValue(String v) { + for (RssMode c : RssMode.values()) { + if (c.value.equals(v)) { + return c; + } + } + throw new IllegalArgumentException(v); + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Rsslog.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Rsslog.java new file mode 100644 index 0000000000000..e2deef491736b --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Rsslog.java @@ -0,0 +1,282 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import java.math.BigInteger; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for rsslog complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="rsslog">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="layout" type="{}layout" minOccurs="0"/>
+ *         <element name="label" type="{}label" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="src" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="refresh" type="{http://www.w3.org/2001/XMLSchema}integer" />
+ *       <attribute name="limit" type="{http://www.w3.org/2001/XMLSchema}integer" />
+ *       <attribute name="mode" type="{}rss_mode" />
+ *       <attribute name="datetime" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       <attribute name="timeformat" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="filter" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "rsslog", propOrder = { "layout", "label" }) +public class Rsslog { + + protected Layout layout; + protected Label label; + @XmlAttribute(name = "src", required = true) + protected String src; + @XmlAttribute(name = "refresh") + protected BigInteger refresh; + @XmlAttribute(name = "limit") + protected BigInteger limit; + @XmlAttribute(name = "mode") + protected RssMode mode; + @XmlAttribute(name = "datetime") + protected Boolean datetime; + @XmlAttribute(name = "timeformat") + protected String timeformat; + @XmlAttribute(name = "filter") + protected String filter; + + /** + * Gets the value of the layout property. + * + * @return + * possible object is + * {@link Layout } + * + */ + public Layout getLayout() { + return layout; + } + + /** + * Sets the value of the layout property. + * + * @param value + * allowed object is + * {@link Layout } + * + */ + public void setLayout(Layout value) { + this.layout = value; + } + + /** + * Gets the value of the label property. + * + * @return + * possible object is + * {@link Label } + * + */ + public Label getLabel() { + return label; + } + + /** + * Sets the value of the label property. + * + * @param value + * allowed object is + * {@link Label } + * + */ + public void setLabel(Label value) { + this.label = value; + } + + /** + * Gets the value of the src property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSrc() { + return src; + } + + /** + * Sets the value of the src property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSrc(String value) { + this.src = value; + } + + /** + * Gets the value of the refresh property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getRefresh() { + return refresh; + } + + /** + * Sets the value of the refresh property. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setRefresh(BigInteger value) { + this.refresh = value; + } + + /** + * Gets the value of the limit property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getLimit() { + return limit; + } + + /** + * Sets the value of the limit property. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setLimit(BigInteger value) { + this.limit = value; + } + + /** + * Gets the value of the mode property. + * + * @return + * possible object is + * {@link RssMode } + * + */ + public RssMode getMode() { + return mode; + } + + /** + * Sets the value of the mode property. + * + * @param value + * allowed object is + * {@link RssMode } + * + */ + public void setMode(RssMode value) { + this.mode = value; + } + + /** + * Gets the value of the datetime property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isDatetime() { + return datetime; + } + + /** + * Sets the value of the datetime property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setDatetime(Boolean value) { + this.datetime = value; + } + + /** + * Gets the value of the timeformat property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTimeformat() { + return timeformat; + } + + /** + * Sets the value of the timeformat property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTimeformat(String value) { + this.timeformat = value; + } + + /** + * Gets the value of the filter property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFilter() { + return filter; + } + + /** + * Sets the value of the filter property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFilter(String value) { + this.filter = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/SchemaPages.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/SchemaPages.java new file mode 100644 index 0000000000000..fa008cf509e06 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/SchemaPages.java @@ -0,0 +1,32 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.03.20 at 05:23:12 PM CET +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlRootElement; + +/** + * add two attributes to the pages element that are not defined in the XSD + * but are necessary e.g for the config editor in CometVisu + * {@inheritDoc} + */ +@XmlRootElement(name = "pages") +public class SchemaPages extends Pages { + + @XmlAttribute(name = "noNamespaceSchemaLocation", namespace = "http://www.w3.org/2001/XMLSchema-instance") + protected String noNamespaceSchemaLocation = "../visu_config.xsd"; + + public String getNoNamespaceSchemaLocation() { + return noNamespaceSchemaLocation; + } + + public void setNoNamespaceSchemaLocation(String noNamespaceSchemaLocation) { + this.noNamespaceSchemaLocation = noNamespaceSchemaLocation; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Slide.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Slide.java new file mode 100644 index 0000000000000..a14ecc655cf19 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Slide.java @@ -0,0 +1,318 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for slide complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="slide">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="layout" type="{}layout" minOccurs="0"/>
+ *         <element name="label" type="{}label" minOccurs="0"/>
+ *         <element name="address" type="{}address" maxOccurs="unbounded"/>
+ *       </sequence>
+ *       <attribute ref="{}min"/>
+ *       <attribute ref="{}max"/>
+ *       <attribute ref="{}step"/>
+ *       <attribute ref="{}mapping"/>
+ *       <attribute ref="{}styling"/>
+ *       <attribute ref="{}format"/>
+ *       <attribute ref="{}flavour"/>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "slide", propOrder = { "layout", "label", "address" }) +public class Slide { + + protected Layout layout; + protected Label label; + @XmlElement(required = true) + protected List
address; + @XmlAttribute(name = "min") + protected BigDecimal min; + @XmlAttribute(name = "max") + protected BigDecimal max; + @XmlAttribute(name = "step") + protected BigDecimal step; + @XmlAttribute(name = "mapping") + protected String mapping; + @XmlAttribute(name = "styling") + protected String styling; + @XmlAttribute(name = "format") + protected String format; + @XmlAttribute(name = "flavour") + protected String flavour; + + /** + * Gets the value of the layout property. + * + * @return + * possible object is + * {@link Layout } + * + */ + public Layout getLayout() { + return layout; + } + + /** + * Sets the value of the layout property. + * + * @param value + * allowed object is + * {@link Layout } + * + */ + public void setLayout(Layout value) { + this.layout = value; + } + + /** + * Gets the value of the label property. + * + * @return + * possible object is + * {@link Label } + * + */ + public Label getLabel() { + return label; + } + + /** + * Sets the value of the label property. + * + * @param value + * allowed object is + * {@link Label } + * + */ + public void setLabel(Label value) { + this.label = value; + } + + /** + * Gets the value of the address property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the address property. + * + *

+ * For example, to add a new item, do as follows: + * + *

+     * getAddress().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Address } + * + * + */ + public List

getAddress() { + if (address == null) { + address = new ArrayList
(); + } + return this.address; + } + + /** + * Gets the value of the min property. + * + * @return + * possible object is + * {@link BigDecimal } + * + */ + public BigDecimal getMin() { + return min; + } + + /** + * Sets the value of the min property. + * + * @param value + * allowed object is + * {@link BigDecimal } + * + */ + public void setMin(BigDecimal value) { + this.min = value; + } + + /** + * Gets the value of the max property. + * + * @return + * possible object is + * {@link BigDecimal } + * + */ + public BigDecimal getMax() { + return max; + } + + /** + * Sets the value of the max property. + * + * @param value + * allowed object is + * {@link BigDecimal } + * + */ + public void setMax(BigDecimal value) { + this.max = value; + } + + /** + * Gets the value of the step property. + * + * @return + * possible object is + * {@link BigDecimal } + * + */ + public BigDecimal getStep() { + return step; + } + + /** + * Sets the value of the step property. + * + * @param value + * allowed object is + * {@link BigDecimal } + * + */ + public void setStep(BigDecimal value) { + this.step = value; + } + + /** + * Gets the value of the mapping property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getMapping() { + return mapping; + } + + /** + * Sets the value of the mapping property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setMapping(String value) { + this.mapping = value; + } + + /** + * Gets the value of the styling property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getStyling() { + return styling; + } + + /** + * Sets the value of the styling property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setStyling(String value) { + this.styling = value; + } + + /** + * Gets the value of the format property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFormat() { + return format; + } + + /** + * Sets the value of the format property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFormat(String value) { + this.format = value; + } + + /** + * Gets the value of the flavour property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFlavour() { + return flavour; + } + + /** + * Sets the value of the flavour property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFlavour(String value) { + this.flavour = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Status.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Status.java new file mode 100644 index 0000000000000..d830f87f327ae --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Status.java @@ -0,0 +1,146 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; + +/** + *

+ * Java class for status complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="status">
+ *   <simpleContent>
+ *     <extension base="<http://www.w3.org/2001/XMLSchema>string">
+ *       <attribute name="type" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="condition" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="hrefextend" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     </extension>
+ *   </simpleContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "status", propOrder = { "value" }) +public class Status { + + @XmlValue + protected String value; + @XmlAttribute(name = "type") + protected String type; + @XmlAttribute(name = "condition") + protected String condition; + @XmlAttribute(name = "hrefextend") + protected String hrefextend; + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setValue(String value) { + this.value = value; + } + + /** + * Gets the value of the type property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getType() { + return type; + } + + /** + * Sets the value of the type property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setType(String value) { + this.type = value; + } + + /** + * Gets the value of the condition property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCondition() { + return condition; + } + + /** + * Sets the value of the condition property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCondition(String value) { + this.condition = value; + } + + /** + * Gets the value of the hrefextend property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getHrefextend() { + return hrefextend; + } + + /** + * Sets the value of the hrefextend property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setHrefextend(String value) { + this.hrefextend = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Statusbar.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Statusbar.java new file mode 100644 index 0000000000000..6b4b69c0584a7 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Statusbar.java @@ -0,0 +1,73 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for statusbar complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="statusbar">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <choice maxOccurs="unbounded" minOccurs="0">
+ *         <element name="status" type="{}status"/>
+ *       </choice>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "statusbar", propOrder = { "status" }) +public class Statusbar { + + protected List status; + + /** + * Gets the value of the status property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the status property. + * + *

+ * For example, to add a new item, do as follows: + * + *

+     * getStatus().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Status } + * + * + */ + public List getStatus() { + if (status == null) { + status = new ArrayList(); + } + return this.status; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Strftime.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Strftime.java new file mode 100644 index 0000000000000..163e36c4f9c6f --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Strftime.java @@ -0,0 +1,155 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for strftime complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="strftime">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="layout" type="{}layout" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="lang">
+ *         <simpleType>
+ *           <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *             <enumeration value="en"/>
+ *             <enumeration value="de"/>
+ *             <enumeration value="fr"/>
+ *           </restriction>
+ *         </simpleType>
+ *       </attribute>
+ *       <attribute name="format" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute ref="{}class"/>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "strftime", propOrder = { "layout" }) +public class Strftime { + + protected Layout layout; + @XmlAttribute(name = "lang") + protected String lang; + @XmlAttribute(name = "format") + protected String format; + @XmlAttribute(name = "class") + protected String clazz; + + /** + * Gets the value of the layout property. + * + * @return + * possible object is + * {@link Layout } + * + */ + public Layout getLayout() { + return layout; + } + + /** + * Sets the value of the layout property. + * + * @param value + * allowed object is + * {@link Layout } + * + */ + public void setLayout(Layout value) { + this.layout = value; + } + + /** + * Gets the value of the lang property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getLang() { + return lang; + } + + /** + * Sets the value of the lang property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setLang(String value) { + this.lang = value; + } + + /** + * Gets the value of the format property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFormat() { + return format; + } + + /** + * Sets the value of the format property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFormat(String value) { + this.format = value; + } + + /** + * Gets the value of the clazz property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getClazz() { + return clazz; + } + + /** + * Sets the value of the clazz property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setClazz(String value) { + this.clazz = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/StylingEntry.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/StylingEntry.java new file mode 100644 index 0000000000000..100461d86605d --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/StylingEntry.java @@ -0,0 +1,101 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for styling_entry complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="styling_entry">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <choice maxOccurs="unbounded" minOccurs="0">
+ *         <element name="entry" type="{}entry"/>
+ *       </choice>
+ *       <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "styling_entry", propOrder = { "entry" }) +public class StylingEntry { + + protected List entry; + @XmlAttribute(name = "name", required = true) + protected String name; + + /** + * Gets the value of the entry property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the entry property. + * + *

+ * For example, to add a new item, do as follows: + * + *

+     * getEntry().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Entry } + * + * + */ + public List getEntry() { + if (entry == null) { + entry = new ArrayList(); + } + return this.entry; + } + + /** + * Gets the value of the name property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getName() { + return name; + } + + /** + * Sets the value of the name property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setName(String value) { + this.name = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Stylings.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Stylings.java new file mode 100644 index 0000000000000..844718a484f2a --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Stylings.java @@ -0,0 +1,73 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for stylings complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="stylings">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <choice maxOccurs="unbounded" minOccurs="0">
+ *         <element name="styling" type="{}styling_entry"/>
+ *       </choice>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "stylings", propOrder = { "styling" }) +public class Stylings { + + protected List styling; + + /** + * Gets the value of the styling property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the styling property. + * + *

+ * For example, to add a new item, do as follows: + * + *

+     * getStyling().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link StylingEntry } + * + * + */ + public List getStyling() { + if (styling == null) { + styling = new ArrayList(); + } + return this.styling; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Svg.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Svg.java new file mode 100644 index 0000000000000..59761c83e4113 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Svg.java @@ -0,0 +1,156 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import java.math.BigInteger; +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for svg complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="svg">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="layout" type="{}layout" minOccurs="0"/>
+ *         <element name="label" type="{}label" minOccurs="0"/>
+ *         <element name="address" type="{}address" maxOccurs="unbounded"/>
+ *       </sequence>
+ *       <attribute name="refresh" type="{http://www.w3.org/2001/XMLSchema}integer" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "svg", propOrder = { "layout", "label", "address" }) +public class Svg { + + protected Layout layout; + protected Label label; + @XmlElement(required = true) + protected List
address; + @XmlAttribute(name = "refresh") + protected BigInteger refresh; + + /** + * Gets the value of the layout property. + * + * @return + * possible object is + * {@link Layout } + * + */ + public Layout getLayout() { + return layout; + } + + /** + * Sets the value of the layout property. + * + * @param value + * allowed object is + * {@link Layout } + * + */ + public void setLayout(Layout value) { + this.layout = value; + } + + /** + * Gets the value of the label property. + * + * @return + * possible object is + * {@link Label } + * + */ + public Label getLabel() { + return label; + } + + /** + * Sets the value of the label property. + * + * @param value + * allowed object is + * {@link Label } + * + */ + public void setLabel(Label value) { + this.label = value; + } + + /** + * Gets the value of the address property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the address property. + * + *

+ * For example, to add a new item, do as follows: + * + *

+     * getAddress().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Address } + * + * + */ + public List

getAddress() { + if (address == null) { + address = new ArrayList
(); + } + return this.address; + } + + /** + * Gets the value of the refresh property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getRefresh() { + return refresh; + } + + /** + * Sets the value of the refresh property. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setRefresh(BigInteger value) { + this.refresh = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Switch.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Switch.java new file mode 100644 index 0000000000000..a7ac5f3b567df --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Switch.java @@ -0,0 +1,317 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for switch complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="switch">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="layout" type="{}layout" minOccurs="0"/>
+ *         <element name="label" type="{}label" minOccurs="0"/>
+ *         <element name="address" type="{}address" maxOccurs="unbounded"/>
+ *       </sequence>
+ *       <attribute ref="{}styling"/>
+ *       <attribute ref="{}mapping"/>
+ *       <attribute name="on_value" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="off_value" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute ref="{}align"/>
+ *       <attribute ref="{}flavour"/>
+ *       <attribute ref="{}bind_click_to_widget"/>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "switch", propOrder = { "layout", "label", "address" }) +public class Switch { + + protected Layout layout; + protected Label label; + @XmlElement(required = true) + protected List
address; + @XmlAttribute(name = "styling") + protected String styling; + @XmlAttribute(name = "mapping") + protected String mapping; + @XmlAttribute(name = "on_value") + protected String onValue; + @XmlAttribute(name = "off_value") + protected String offValue; + @XmlAttribute(name = "align") + protected String align; + @XmlAttribute(name = "flavour") + protected String flavour; + @XmlAttribute(name = "bind_click_to_widget") + protected Boolean bindClickToWidget; + + /** + * Gets the value of the layout property. + * + * @return + * possible object is + * {@link Layout } + * + */ + public Layout getLayout() { + return layout; + } + + /** + * Sets the value of the layout property. + * + * @param value + * allowed object is + * {@link Layout } + * + */ + public void setLayout(Layout value) { + this.layout = value; + } + + /** + * Gets the value of the label property. + * + * @return + * possible object is + * {@link Label } + * + */ + public Label getLabel() { + return label; + } + + /** + * Sets the value of the label property. + * + * @param value + * allowed object is + * {@link Label } + * + */ + public void setLabel(Label value) { + this.label = value; + } + + /** + * Gets the value of the address property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the address property. + * + *

+ * For example, to add a new item, do as follows: + * + *

+     * getAddress().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Address } + * + * + */ + public List

getAddress() { + if (address == null) { + address = new ArrayList
(); + } + return this.address; + } + + /** + * Gets the value of the styling property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getStyling() { + return styling; + } + + /** + * Sets the value of the styling property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setStyling(String value) { + this.styling = value; + } + + /** + * Gets the value of the mapping property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getMapping() { + return mapping; + } + + /** + * Sets the value of the mapping property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setMapping(String value) { + this.mapping = value; + } + + /** + * Gets the value of the onValue property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getOnValue() { + return onValue; + } + + /** + * Sets the value of the onValue property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setOnValue(String value) { + this.onValue = value; + } + + /** + * Gets the value of the offValue property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getOffValue() { + return offValue; + } + + /** + * Sets the value of the offValue property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setOffValue(String value) { + this.offValue = value; + } + + /** + * Gets the value of the align property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAlign() { + return align; + } + + /** + * Sets the value of the align property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAlign(String value) { + this.align = value; + } + + /** + * Gets the value of the flavour property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFlavour() { + return flavour; + } + + /** + * Sets the value of the flavour property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFlavour(String value) { + this.flavour = value; + } + + /** + * Gets the value of the bindClickToWidget property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isBindClickToWidget() { + return bindClickToWidget; + } + + /** + * Sets the value of the bindClickToWidget property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setBindClickToWidget(Boolean value) { + this.bindClickToWidget = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Text.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Text.java new file mode 100644 index 0000000000000..fe00084159b87 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Text.java @@ -0,0 +1,148 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for text complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="text">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="layout" type="{}layout" minOccurs="0"/>
+ *         <element name="label" type="{}label"/>
+ *       </sequence>
+ *       <attribute ref="{}align"/>
+ *       <attribute ref="{}flavour"/>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "text", propOrder = { "layout", "label" }) +public class Text { + + protected Layout layout; + @XmlElement(required = true) + protected Label label; + @XmlAttribute(name = "align") + protected String align; + @XmlAttribute(name = "flavour") + protected String flavour; + + /** + * Gets the value of the layout property. + * + * @return + * possible object is + * {@link Layout } + * + */ + public Layout getLayout() { + return layout; + } + + /** + * Sets the value of the layout property. + * + * @param value + * allowed object is + * {@link Layout } + * + */ + public void setLayout(Layout value) { + this.layout = value; + } + + /** + * Gets the value of the label property. + * + * @return + * possible object is + * {@link Label } + * + */ + public Label getLabel() { + return label; + } + + /** + * Sets the value of the label property. + * + * @param value + * allowed object is + * {@link Label } + * + */ + public void setLabel(Label value) { + this.label = value; + } + + /** + * Gets the value of the align property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAlign() { + return align; + } + + /** + * Sets the value of the align property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAlign(String value) { + this.align = value; + } + + /** + * Gets the value of the flavour property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFlavour() { + return flavour; + } + + /** + * Sets the value of the flavour property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFlavour(String value) { + this.flavour = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Timeout.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Timeout.java new file mode 100644 index 0000000000000..9716ec6a04b49 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Timeout.java @@ -0,0 +1,119 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for timeout complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="timeout">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="time" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute ref="{}target use="required""/>
+ *       <attribute name="debug" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "timeout") +public class Timeout { + + @XmlAttribute(name = "time") + protected String time; + @XmlAttribute(name = "target", required = true) + protected String target; + @XmlAttribute(name = "debug") + protected Boolean debug; + + /** + * Gets the value of the time property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTime() { + return time; + } + + /** + * Sets the value of the time property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTime(String value) { + this.time = value; + } + + /** + * Gets the value of the target property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTarget() { + return target; + } + + /** + * Sets the value of the target property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTarget(String value) { + this.target = value; + } + + /** + * Gets the value of the debug property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isDebug() { + return debug; + } + + /** + * Sets the value of the debug property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setDebug(Boolean value) { + this.debug = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Toggle.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Toggle.java new file mode 100644 index 0000000000000..a83c640b84720 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Toggle.java @@ -0,0 +1,236 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for toggle complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="toggle">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="layout" type="{}layout" minOccurs="0"/>
+ *         <element name="label" type="{}label" minOccurs="0"/>
+ *         <element name="address" type="{}address" maxOccurs="unbounded"/>
+ *       </sequence>
+ *       <attribute ref="{}styling"/>
+ *       <attribute ref="{}mapping"/>
+ *       <attribute ref="{}align"/>
+ *       <attribute ref="{}flavour"/>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "toggle", propOrder = { "layout", "label", "address" }) +public class Toggle { + + protected Layout layout; + protected Label label; + @XmlElement(required = true) + protected List
address; + @XmlAttribute(name = "styling") + protected String styling; + @XmlAttribute(name = "mapping") + protected String mapping; + @XmlAttribute(name = "align") + protected String align; + @XmlAttribute(name = "flavour") + protected String flavour; + + /** + * Gets the value of the layout property. + * + * @return + * possible object is + * {@link Layout } + * + */ + public Layout getLayout() { + return layout; + } + + /** + * Sets the value of the layout property. + * + * @param value + * allowed object is + * {@link Layout } + * + */ + public void setLayout(Layout value) { + this.layout = value; + } + + /** + * Gets the value of the label property. + * + * @return + * possible object is + * {@link Label } + * + */ + public Label getLabel() { + return label; + } + + /** + * Sets the value of the label property. + * + * @param value + * allowed object is + * {@link Label } + * + */ + public void setLabel(Label value) { + this.label = value; + } + + /** + * Gets the value of the address property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the address property. + * + *

+ * For example, to add a new item, do as follows: + * + *

+     * getAddress().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Address } + * + * + */ + public List

getAddress() { + if (address == null) { + address = new ArrayList
(); + } + return this.address; + } + + /** + * Gets the value of the styling property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getStyling() { + return styling; + } + + /** + * Sets the value of the styling property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setStyling(String value) { + this.styling = value; + } + + /** + * Gets the value of the mapping property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getMapping() { + return mapping; + } + + /** + * Sets the value of the mapping property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setMapping(String value) { + this.mapping = value; + } + + /** + * Gets the value of the align property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAlign() { + return align; + } + + /** + * Sets the value of the align property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAlign(String value) { + this.align = value; + } + + /** + * Gets the value of the flavour property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFlavour() { + return flavour; + } + + /** + * Sets the value of the flavour property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFlavour(String value) { + this.flavour = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Trigger.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Trigger.java new file mode 100644 index 0000000000000..fc97c7da06cbe --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Trigger.java @@ -0,0 +1,343 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for trigger complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="trigger">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="layout" type="{}layout" minOccurs="0"/>
+ *         <element name="label" type="{}label" minOccurs="0"/>
+ *         <element name="address" type="{}address" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute ref="{}value use="required""/>
+ *       <attribute name="shortvalue" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="shorttime" type="{http://www.w3.org/2001/XMLSchema}decimal" />
+ *       <attribute ref="{}mapping"/>
+ *       <attribute ref="{}styling"/>
+ *       <attribute ref="{}align"/>
+ *       <attribute ref="{}flavour"/>
+ *       <attribute ref="{}bind_click_to_widget"/>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "trigger", propOrder = { "layout", "label", "address" }) +public class Trigger { + + protected Layout layout; + protected Label label; + protected List
address; + @XmlAttribute(name = "value", required = true) + protected String value; + @XmlAttribute(name = "shortvalue") + protected String shortvalue; + @XmlAttribute(name = "shorttime") + protected BigDecimal shorttime; + @XmlAttribute(name = "mapping") + protected String mapping; + @XmlAttribute(name = "styling") + protected String styling; + @XmlAttribute(name = "align") + protected String align; + @XmlAttribute(name = "flavour") + protected String flavour; + @XmlAttribute(name = "bind_click_to_widget") + protected Boolean bindClickToWidget; + + /** + * Gets the value of the layout property. + * + * @return + * possible object is + * {@link Layout } + * + */ + public Layout getLayout() { + return layout; + } + + /** + * Sets the value of the layout property. + * + * @param value + * allowed object is + * {@link Layout } + * + */ + public void setLayout(Layout value) { + this.layout = value; + } + + /** + * Gets the value of the label property. + * + * @return + * possible object is + * {@link Label } + * + */ + public Label getLabel() { + return label; + } + + /** + * Sets the value of the label property. + * + * @param value + * allowed object is + * {@link Label } + * + */ + public void setLabel(Label value) { + this.label = value; + } + + /** + * Gets the value of the address property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the address property. + * + *

+ * For example, to add a new item, do as follows: + * + *

+     * getAddress().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Address } + * + * + */ + public List

getAddress() { + if (address == null) { + address = new ArrayList
(); + } + return this.address; + } + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setValue(String value) { + this.value = value; + } + + /** + * Gets the value of the shortvalue property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getShortvalue() { + return shortvalue; + } + + /** + * Sets the value of the shortvalue property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setShortvalue(String value) { + this.shortvalue = value; + } + + /** + * Gets the value of the shorttime property. + * + * @return + * possible object is + * {@link BigDecimal } + * + */ + public BigDecimal getShorttime() { + return shorttime; + } + + /** + * Sets the value of the shorttime property. + * + * @param value + * allowed object is + * {@link BigDecimal } + * + */ + public void setShorttime(BigDecimal value) { + this.shorttime = value; + } + + /** + * Gets the value of the mapping property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getMapping() { + return mapping; + } + + /** + * Sets the value of the mapping property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setMapping(String value) { + this.mapping = value; + } + + /** + * Gets the value of the styling property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getStyling() { + return styling; + } + + /** + * Sets the value of the styling property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setStyling(String value) { + this.styling = value; + } + + /** + * Gets the value of the align property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAlign() { + return align; + } + + /** + * Sets the value of the align property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAlign(String value) { + this.align = value; + } + + /** + * Gets the value of the flavour property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFlavour() { + return flavour; + } + + /** + * Sets the value of the flavour property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFlavour(String value) { + this.flavour = value; + } + + /** + * Gets the value of the bindClickToWidget property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isBindClickToWidget() { + return bindClickToWidget; + } + + /** + * Sets the value of the bindClickToWidget property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setBindClickToWidget(Boolean value) { + this.bindClickToWidget = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Upnpcontroller.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Upnpcontroller.java new file mode 100644 index 0000000000000..af2334f115937 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Upnpcontroller.java @@ -0,0 +1,173 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for upnpcontroller complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="upnpcontroller">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="label" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="player_ip_addr" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="player_port" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="refresh" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="debug" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "upnpcontroller") +public class Upnpcontroller { + + @XmlAttribute(name = "label", required = true) + protected String label; + @XmlAttribute(name = "player_ip_addr", required = true) + protected String playerIpAddr; + @XmlAttribute(name = "player_port") + protected String playerPort; + @XmlAttribute(name = "refresh", required = true) + protected String refresh; + @XmlAttribute(name = "debug") + protected Boolean debug; + + /** + * Gets the value of the label property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getLabel() { + return label; + } + + /** + * Sets the value of the label property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setLabel(String value) { + this.label = value; + } + + /** + * Gets the value of the playerIpAddr property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPlayerIpAddr() { + return playerIpAddr; + } + + /** + * Sets the value of the playerIpAddr property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPlayerIpAddr(String value) { + this.playerIpAddr = value; + } + + /** + * Gets the value of the playerPort property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPlayerPort() { + return playerPort; + } + + /** + * Sets the value of the playerPort property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPlayerPort(String value) { + this.playerPort = value; + } + + /** + * Gets the value of the refresh property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getRefresh() { + return refresh; + } + + /** + * Sets the value of the refresh property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setRefresh(String value) { + this.refresh = value; + } + + /** + * Gets the value of the debug property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isDebug() { + return debug; + } + + /** + * Sets the value of the debug property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setDebug(Boolean value) { + this.debug = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Urltrigger.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Urltrigger.java new file mode 100644 index 0000000000000..e0a90531ed841 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Urltrigger.java @@ -0,0 +1,308 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for urltrigger complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="urltrigger">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="layout" type="{}layout" minOccurs="0"/>
+ *         <element name="label" type="{}label" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute ref="{}value"/>
+ *       <attribute ref="{}mapping"/>
+ *       <attribute ref="{}styling"/>
+ *       <attribute ref="{}align"/>
+ *       <attribute name="url" use="required" type="{}uri" />
+ *       <attribute name="params" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute ref="{}flavour"/>
+ *       <attribute ref="{}bind_click_to_widget"/>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "urltrigger", propOrder = { "layout", "label" }) +public class Urltrigger { + + protected Layout layout; + protected Label label; + @XmlAttribute(name = "value") + protected String value; + @XmlAttribute(name = "mapping") + protected String mapping; + @XmlAttribute(name = "styling") + protected String styling; + @XmlAttribute(name = "align") + protected String align; + @XmlAttribute(name = "url", required = true) + protected String url; + @XmlAttribute(name = "params") + protected String params; + @XmlAttribute(name = "flavour") + protected String flavour; + @XmlAttribute(name = "bind_click_to_widget") + protected Boolean bindClickToWidget; + + /** + * Gets the value of the layout property. + * + * @return + * possible object is + * {@link Layout } + * + */ + public Layout getLayout() { + return layout; + } + + /** + * Sets the value of the layout property. + * + * @param value + * allowed object is + * {@link Layout } + * + */ + public void setLayout(Layout value) { + this.layout = value; + } + + /** + * Gets the value of the label property. + * + * @return + * possible object is + * {@link Label } + * + */ + public Label getLabel() { + return label; + } + + /** + * Sets the value of the label property. + * + * @param value + * allowed object is + * {@link Label } + * + */ + public void setLabel(Label value) { + this.label = value; + } + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setValue(String value) { + this.value = value; + } + + /** + * Gets the value of the mapping property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getMapping() { + return mapping; + } + + /** + * Sets the value of the mapping property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setMapping(String value) { + this.mapping = value; + } + + /** + * Gets the value of the styling property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getStyling() { + return styling; + } + + /** + * Sets the value of the styling property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setStyling(String value) { + this.styling = value; + } + + /** + * Gets the value of the align property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAlign() { + return align; + } + + /** + * Sets the value of the align property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAlign(String value) { + this.align = value; + } + + /** + * Gets the value of the url property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getUrl() { + return url; + } + + /** + * Sets the value of the url property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setUrl(String value) { + this.url = value; + } + + /** + * Gets the value of the params property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getParams() { + return params; + } + + /** + * Sets the value of the params property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setParams(String value) { + this.params = value; + } + + /** + * Gets the value of the flavour property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFlavour() { + return flavour; + } + + /** + * Sets the value of the flavour property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFlavour(String value) { + this.flavour = value; + } + + /** + * Gets the value of the bindClickToWidget property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isBindClickToWidget() { + return bindClickToWidget; + } + + /** + * Sets the value of the bindClickToWidget property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setBindClickToWidget(Boolean value) { + this.bindClickToWidget = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Video.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Video.java new file mode 100644 index 0000000000000..b272ad05cf761 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Video.java @@ -0,0 +1,227 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for video complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="video">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="layout" type="{}layout" minOccurs="0"/>
+ *         <element name="label" type="{}label" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="src" use="required" type="{}uri" />
+ *       <attribute name="width" type="{}dimension" />
+ *       <attribute name="height" type="{}dimension" />
+ *       <attribute name="autoplay" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute ref="{}flavour"/>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "video", propOrder = { "layout", "label" }) +public class Video { + + protected Layout layout; + protected Label label; + @XmlAttribute(name = "src", required = true) + protected String src; + @XmlAttribute(name = "width") + protected String width; + @XmlAttribute(name = "height") + protected String height; + @XmlAttribute(name = "autoplay") + protected String autoplay; + @XmlAttribute(name = "flavour") + protected String flavour; + + /** + * Gets the value of the layout property. + * + * @return + * possible object is + * {@link Layout } + * + */ + public Layout getLayout() { + return layout; + } + + /** + * Sets the value of the layout property. + * + * @param value + * allowed object is + * {@link Layout } + * + */ + public void setLayout(Layout value) { + this.layout = value; + } + + /** + * Gets the value of the label property. + * + * @return + * possible object is + * {@link Label } + * + */ + public Label getLabel() { + return label; + } + + /** + * Sets the value of the label property. + * + * @param value + * allowed object is + * {@link Label } + * + */ + public void setLabel(Label value) { + this.label = value; + } + + /** + * Gets the value of the src property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSrc() { + return src; + } + + /** + * Sets the value of the src property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSrc(String value) { + this.src = value; + } + + /** + * Gets the value of the width property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getWidth() { + return width; + } + + /** + * Sets the value of the width property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setWidth(String value) { + this.width = value; + } + + /** + * Gets the value of the height property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getHeight() { + return height; + } + + /** + * Sets the value of the height property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setHeight(String value) { + this.height = value; + } + + /** + * Gets the value of the autoplay property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAutoplay() { + return autoplay; + } + + /** + * Sets the value of the autoplay property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAutoplay(String value) { + this.autoplay = value; + } + + /** + * Gets the value of the flavour property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFlavour() { + return flavour; + } + + /** + * Sets the value of the flavour property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFlavour(String value) { + this.flavour = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Web.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Web.java new file mode 100644 index 0000000000000..ca63e0c9fea43 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Web.java @@ -0,0 +1,344 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import java.math.BigDecimal; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for web complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="web">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="layout" type="{}layout" minOccurs="0"/>
+ *         <element name="label" type="{}label" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="src" use="required" type="{}uri" />
+ *       <attribute name="width" type="{}dimension" />
+ *       <attribute name="height" type="{}dimension" />
+ *       <attribute name="frameborder" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="background" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="refresh" type="{http://www.w3.org/2001/XMLSchema}decimal" />
+ *       <attribute name="scrolling">
+ *         <simpleType>
+ *           <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *             <enumeration value="yes"/>
+ *             <enumeration value="no"/>
+ *             <enumeration value="auto"/>
+ *           </restriction>
+ *         </simpleType>
+ *       </attribute>
+ *       <attribute name="ga" type="{}addr" />
+ *       <attribute ref="{}flavour"/>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "web", propOrder = { "layout", "label" }) +public class Web { + + protected Layout layout; + protected Label label; + @XmlAttribute(name = "src", required = true) + protected String src; + @XmlAttribute(name = "width") + protected String width; + @XmlAttribute(name = "height") + protected String height; + @XmlAttribute(name = "frameborder") + protected String frameborder; + @XmlAttribute(name = "background") + protected String background; + @XmlAttribute(name = "refresh") + protected BigDecimal refresh; + @XmlAttribute(name = "scrolling") + protected String scrolling; + @XmlAttribute(name = "ga") + protected String ga; + @XmlAttribute(name = "flavour") + protected String flavour; + + /** + * Gets the value of the layout property. + * + * @return + * possible object is + * {@link Layout } + * + */ + public Layout getLayout() { + return layout; + } + + /** + * Sets the value of the layout property. + * + * @param value + * allowed object is + * {@link Layout } + * + */ + public void setLayout(Layout value) { + this.layout = value; + } + + /** + * Gets the value of the label property. + * + * @return + * possible object is + * {@link Label } + * + */ + public Label getLabel() { + return label; + } + + /** + * Sets the value of the label property. + * + * @param value + * allowed object is + * {@link Label } + * + */ + public void setLabel(Label value) { + this.label = value; + } + + /** + * Gets the value of the src property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSrc() { + return src; + } + + /** + * Sets the value of the src property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSrc(String value) { + this.src = value; + } + + /** + * Gets the value of the width property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getWidth() { + return width; + } + + /** + * Sets the value of the width property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setWidth(String value) { + this.width = value; + } + + /** + * Gets the value of the height property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getHeight() { + return height; + } + + /** + * Sets the value of the height property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setHeight(String value) { + this.height = value; + } + + /** + * Gets the value of the frameborder property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFrameborder() { + return frameborder; + } + + /** + * Sets the value of the frameborder property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFrameborder(String value) { + this.frameborder = value; + } + + /** + * Gets the value of the background property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getBackground() { + return background; + } + + /** + * Sets the value of the background property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setBackground(String value) { + this.background = value; + } + + /** + * Gets the value of the refresh property. + * + * @return + * possible object is + * {@link BigDecimal } + * + */ + public BigDecimal getRefresh() { + return refresh; + } + + /** + * Sets the value of the refresh property. + * + * @param value + * allowed object is + * {@link BigDecimal } + * + */ + public void setRefresh(BigDecimal value) { + this.refresh = value; + } + + /** + * Gets the value of the scrolling property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getScrolling() { + return scrolling; + } + + /** + * Sets the value of the scrolling property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setScrolling(String value) { + this.scrolling = value; + } + + /** + * Gets the value of the ga property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getGa() { + return ga; + } + + /** + * Sets the value of the ga property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setGa(String value) { + this.ga = value; + } + + /** + * Gets the value of the flavour property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFlavour() { + return flavour; + } + + /** + * Sets the value of the flavour property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFlavour(String value) { + this.flavour = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/WgpluginInfo.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/WgpluginInfo.java new file mode 100644 index 0000000000000..e3dbdbccf6b92 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/WgpluginInfo.java @@ -0,0 +1,263 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for wgplugin_info complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="wgplugin_info">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="layout" type="{}layout" minOccurs="0"/>
+ *         <element name="label" type="{}label" minOccurs="0"/>
+ *         <element name="address" type="{}address" maxOccurs="unbounded"/>
+ *       </sequence>
+ *       <attribute name="variable" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute ref="{}format"/>
+ *       <attribute ref="{}styling"/>
+ *       <attribute ref="{}align"/>
+ *       <attribute ref="{}flavour"/>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "wgplugin_info", propOrder = { "layout", "label", "address" }) +public class WgpluginInfo { + + protected Layout layout; + protected Label label; + @XmlElement(required = true) + protected List
address; + @XmlAttribute(name = "variable") + protected String variable; + @XmlAttribute(name = "format") + protected String format; + @XmlAttribute(name = "styling") + protected String styling; + @XmlAttribute(name = "align") + protected String align; + @XmlAttribute(name = "flavour") + protected String flavour; + + /** + * Gets the value of the layout property. + * + * @return + * possible object is + * {@link Layout } + * + */ + public Layout getLayout() { + return layout; + } + + /** + * Sets the value of the layout property. + * + * @param value + * allowed object is + * {@link Layout } + * + */ + public void setLayout(Layout value) { + this.layout = value; + } + + /** + * Gets the value of the label property. + * + * @return + * possible object is + * {@link Label } + * + */ + public Label getLabel() { + return label; + } + + /** + * Sets the value of the label property. + * + * @param value + * allowed object is + * {@link Label } + * + */ + public void setLabel(Label value) { + this.label = value; + } + + /** + * Gets the value of the address property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the address property. + * + *

+ * For example, to add a new item, do as follows: + * + *

+     * getAddress().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Address } + * + * + */ + public List

getAddress() { + if (address == null) { + address = new ArrayList
(); + } + return this.address; + } + + /** + * Gets the value of the variable property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getVariable() { + return variable; + } + + /** + * Sets the value of the variable property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setVariable(String value) { + this.variable = value; + } + + /** + * Gets the value of the format property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFormat() { + return format; + } + + /** + * Sets the value of the format property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFormat(String value) { + this.format = value; + } + + /** + * Gets the value of the styling property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getStyling() { + return styling; + } + + /** + * Sets the value of the styling property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setStyling(String value) { + this.styling = value; + } + + /** + * Gets the value of the align property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAlign() { + return align; + } + + /** + * Sets the value of the align property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAlign(String value) { + this.align = value; + } + + /** + * Gets the value of the flavour property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFlavour() { + return flavour; + } + + /** + * Sets the value of the flavour property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFlavour(String value) { + this.flavour = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Widget.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Widget.java new file mode 100644 index 0000000000000..8142a015d92f6 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Widget.java @@ -0,0 +1,6 @@ +package org.openhab.ui.cometvisu.internal.config.beans; + +public abstract class Widget { + public Layout layout; + public Label label; +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Widgetaction.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Widgetaction.java new file mode 100644 index 0000000000000..6de67c3800609 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Widgetaction.java @@ -0,0 +1,295 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for widgetaction complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="widgetaction">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <choice>
+ *           <group ref="{}Infoaction_WidgetActions"/>
+ *         </choice>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "widgetaction", propOrder = { "_switch", "toggle", "trigger", "pushbutton", "urltrigger", + "multitrigger", "image", "imagetrigger", "pagejump", "info" }) +public class Widgetaction { + + @XmlElement(name = "switch") + protected Switch _switch; + protected Toggle toggle; + protected Trigger trigger; + protected Pushbutton pushbutton; + protected Urltrigger urltrigger; + protected Multitrigger multitrigger; + protected Image image; + protected Imagetrigger imagetrigger; + protected Pagejump pagejump; + protected Info info; + + /** + * Gets the value of the switch property. + * + * @return + * possible object is + * {@link Switch } + * + */ + public Switch getSwitch() { + return _switch; + } + + /** + * Sets the value of the switch property. + * + * @param value + * allowed object is + * {@link Switch } + * + */ + public void setSwitch(Switch value) { + this._switch = value; + } + + /** + * Gets the value of the toggle property. + * + * @return + * possible object is + * {@link Toggle } + * + */ + public Toggle getToggle() { + return toggle; + } + + /** + * Sets the value of the toggle property. + * + * @param value + * allowed object is + * {@link Toggle } + * + */ + public void setToggle(Toggle value) { + this.toggle = value; + } + + /** + * Gets the value of the trigger property. + * + * @return + * possible object is + * {@link Trigger } + * + */ + public Trigger getTrigger() { + return trigger; + } + + /** + * Sets the value of the trigger property. + * + * @param value + * allowed object is + * {@link Trigger } + * + */ + public void setTrigger(Trigger value) { + this.trigger = value; + } + + /** + * Gets the value of the pushbutton property. + * + * @return + * possible object is + * {@link Pushbutton } + * + */ + public Pushbutton getPushbutton() { + return pushbutton; + } + + /** + * Sets the value of the pushbutton property. + * + * @param value + * allowed object is + * {@link Pushbutton } + * + */ + public void setPushbutton(Pushbutton value) { + this.pushbutton = value; + } + + /** + * Gets the value of the urltrigger property. + * + * @return + * possible object is + * {@link Urltrigger } + * + */ + public Urltrigger getUrltrigger() { + return urltrigger; + } + + /** + * Sets the value of the urltrigger property. + * + * @param value + * allowed object is + * {@link Urltrigger } + * + */ + public void setUrltrigger(Urltrigger value) { + this.urltrigger = value; + } + + /** + * Gets the value of the multitrigger property. + * + * @return + * possible object is + * {@link Multitrigger } + * + */ + public Multitrigger getMultitrigger() { + return multitrigger; + } + + /** + * Sets the value of the multitrigger property. + * + * @param value + * allowed object is + * {@link Multitrigger } + * + */ + public void setMultitrigger(Multitrigger value) { + this.multitrigger = value; + } + + /** + * Gets the value of the image property. + * + * @return + * possible object is + * {@link Image } + * + */ + public Image getImage() { + return image; + } + + /** + * Sets the value of the image property. + * + * @param value + * allowed object is + * {@link Image } + * + */ + public void setImage(Image value) { + this.image = value; + } + + /** + * Gets the value of the imagetrigger property. + * + * @return + * possible object is + * {@link Imagetrigger } + * + */ + public Imagetrigger getImagetrigger() { + return imagetrigger; + } + + /** + * Sets the value of the imagetrigger property. + * + * @param value + * allowed object is + * {@link Imagetrigger } + * + */ + public void setImagetrigger(Imagetrigger value) { + this.imagetrigger = value; + } + + /** + * Gets the value of the pagejump property. + * + * @return + * possible object is + * {@link Pagejump } + * + */ + public Pagejump getPagejump() { + return pagejump; + } + + /** + * Sets the value of the pagejump property. + * + * @param value + * allowed object is + * {@link Pagejump } + * + */ + public void setPagejump(Pagejump value) { + this.pagejump = value; + } + + /** + * Gets the value of the info property. + * + * @return + * possible object is + * {@link Info } + * + */ + public Info getInfo() { + return info; + } + + /** + * Sets the value of the info property. + * + * @param value + * allowed object is + * {@link Info } + * + */ + public void setInfo(Info value) { + this.info = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Widgetinfo.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Widgetinfo.java new file mode 100644 index 0000000000000..e3b9184b9dbc1 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/config/beans/Widgetinfo.java @@ -0,0 +1,92 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.04.17 at 05:50:37 PM CEST +// + +package org.openhab.ui.cometvisu.internal.config.beans; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; + +/** + *

+ * Java class for widgetinfo complex type. + * + *

+ * The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="widgetinfo">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <choice>
+ *           <group ref="{}Infoaction_WidgetInfos"/>
+ *         </choice>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "widgetinfo", propOrder = { "text", "info" }) +public class Widgetinfo { + + protected Text text; + protected Info info; + + /** + * Gets the value of the text property. + * + * @return + * possible object is + * {@link Text } + * + */ + public Text getText() { + return text; + } + + /** + * Sets the value of the text property. + * + * @param value + * allowed object is + * {@link Text } + * + */ + public void setText(Text value) { + this.text = value; + } + + /** + * Gets the value of the info property. + * + * @return + * possible object is + * {@link Info } + * + */ + public Info getInfo() { + return info; + } + + /** + * Sets the value of the info property. + * + * @param value + * allowed object is + * {@link Info } + * + */ + public void setInfo(Info value) { + this.info = value; + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/editor/dataprovider/beans/DataBean.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/editor/dataprovider/beans/DataBean.java new file mode 100644 index 0000000000000..4dc78a1b2d2ec --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/editor/dataprovider/beans/DataBean.java @@ -0,0 +1,20 @@ +/** + * Copyright (c) 2014-2015 openHAB UG (haftungsbeschraenkt) and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package org.openhab.ui.cometvisu.internal.editor.dataprovider.beans; + +/** + * {@link DataBean} is a helper bean used by the dataprovider-servlet + * which delivers some additional data for the CometVisu-Editor + * + * @author Tobias Bräutigam + * @since 2.0.0 + */ +public class DataBean { + public String value; + public String label; +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/editor/dataprovider/beans/ItemBean.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/editor/dataprovider/beans/ItemBean.java new file mode 100644 index 0000000000000..e6b5085659678 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/editor/dataprovider/beans/ItemBean.java @@ -0,0 +1,22 @@ +/** + * Copyright (c) 2014-2015 openHAB UG (haftungsbeschraenkt) and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package org.openhab.ui.cometvisu.internal.editor.dataprovider.beans; + +import java.util.HashMap; +import java.util.Map; + +/** + * {@link ItemBean} is a helper bean used by the dataprovider-servlet + * which delivers some additional data for the CometVisu-Editor + * + * @author Tobias Bräutigam + * @since 2.0.0 + */ +public class ItemBean extends DataBean { + public Map hints = new HashMap(); +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/editor/dataprovider/beans/TransformBean.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/editor/dataprovider/beans/TransformBean.java new file mode 100644 index 0000000000000..650a65b74da24 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/editor/dataprovider/beans/TransformBean.java @@ -0,0 +1,13 @@ +package org.openhab.ui.cometvisu.internal.editor.dataprovider.beans; + +/** + * {@link TransformBean} is a helper bean used by the dataprovider-servlet + * which delivers some additional data for the CometVisu-Editor + * + * @author Tobias Bräutigam + * @since 2.0.0 + */ +public class TransformBean { + public String value; + public String label; +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/listeners/ItemRegistryEventListener.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/listeners/ItemRegistryEventListener.java new file mode 100644 index 0000000000000..e97a494363315 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/listeners/ItemRegistryEventListener.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) 2014-2015 openHAB UG (haftungsbeschraenkt) and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package org.openhab.ui.cometvisu.internal.listeners; + +import java.util.Collection; + +import org.eclipse.smarthome.core.items.Item; +import org.eclipse.smarthome.core.items.ItemRegistry; +import org.eclipse.smarthome.core.items.ItemRegistryChangeListener; +import org.openhab.ui.cometvisu.backend.EventBroadcaster; + +/** + * Listener responsible for notifying the CometVisu backend about changes + * in the ItemRegistry + * + * @author Tobias Bräutigam - Initial Contribution and API + * @since 2.0.0 + */ +public class ItemRegistryEventListener implements ItemRegistryChangeListener { + // private static final Logger logger = LoggerFactory.getLogger(ItemRegistryEventListener.class); + + private ItemRegistry itemRegistry; + + private EventBroadcaster eventBroadcaster; + + protected void setEventBroadcaster(EventBroadcaster eventBroadcaster) { + this.eventBroadcaster = eventBroadcaster; + } + + protected void unsetEventBroadcaster(EventBroadcaster eventBroadcaster) { + this.eventBroadcaster = null; + } + + protected void setItemRegistry(ItemRegistry itemRegistry) { + this.itemRegistry = itemRegistry; + this.itemRegistry.addRegistryChangeListener(this); + } + + protected void unsetItemRegistry(ItemRegistry itemRegistry) { + this.itemRegistry.removeRegistryChangeListener(this); + this.itemRegistry = null; + } + + @Override + public void added(Item element) { + eventBroadcaster.registerItem(element); + } + + @Override + public void removed(Item element) { + eventBroadcaster.unregisterItem(element); + } + + @Override + public void updated(Item oldElement, Item element) { + eventBroadcaster.unregisterItem(oldElement); + eventBroadcaster.registerItem(element); + } + + @Override + public void allItemsChanged(Collection oldItemNames) { + // All items have changed, StateListener needs to be registered to the new Items + eventBroadcaster.registerItems(); + } +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/listeners/StateEventListener.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/listeners/StateEventListener.java new file mode 100644 index 0000000000000..05632d7771230 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/listeners/StateEventListener.java @@ -0,0 +1,81 @@ +/** + * Copyright (c) 2014-2015 openHAB UG (haftungsbeschraenkt) and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package org.openhab.ui.cometvisu.internal.listeners; + +import java.util.Map; + +import org.eclipse.smarthome.core.items.GroupItem; +import org.eclipse.smarthome.core.items.Item; +import org.eclipse.smarthome.core.items.StateChangeListener; +import org.eclipse.smarthome.core.types.State; +import org.openhab.ui.cometvisu.backend.EventBroadcaster; +import org.openhab.ui.cometvisu.backend.beans.StateBean; + +/** + * listens to state changes on items and send them to an EventBroadcaster + * + * @author Tobias Bräutigam + * @since 2.0.0 + */ +public class StateEventListener implements StateChangeListener { + + private EventBroadcaster eventBroadcaster; + + public void setEventBroadcaster(EventBroadcaster eventBroadcaster) { + this.eventBroadcaster = eventBroadcaster; + } + + protected void unsetEventBroadcaster(EventBroadcaster eventBroadcaster) { + this.eventBroadcaster = null; + } + + @Override + public void stateChanged(Item item, State oldState, State newState) { + Map> clientItems = eventBroadcaster.getClientItems(item); + if (clientItems != null && clientItems.size() > 0) { + for (String cvItemName : clientItems.keySet()) { + Class stateClass = clientItems.get(cvItemName); + StateBean stateBean = new StateBean(); + stateBean.name = cvItemName; + if (stateClass != null) + stateBean.state = item.getStateAs(stateClass).toString(); + else + stateBean.state = item.getState().toString(); + eventBroadcaster.broadcastEvent(stateBean); + } + } else { + StateBean stateBean = new StateBean(); + stateBean.name = item.getName(); + stateBean.state = newState.toString(); + eventBroadcaster.broadcastEvent(stateBean); + } + + } + + @Override + public void stateUpdated(Item item, State state) { + if (item instanceof GroupItem) { + + // group item update could be relevant for the client, although the state of switch group does not change + // wenn more the one are on, the number-groupFunction changes + Map> clientItems = eventBroadcaster.getClientItems(item); + if (clientItems != null && clientItems.size() > 0) { + for (String cvItemName : clientItems.keySet()) { + Class stateClass = clientItems.get(cvItemName); + if (stateClass != null) { + StateBean stateBean = new StateBean(); + stateBean.name = cvItemName; + stateBean.state = item.getStateAs(stateClass).toString(); + + eventBroadcaster.broadcastEvent(stateBean); + } + } + } + } + } +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/rrs/beans/Entry.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/rrs/beans/Entry.java new file mode 100644 index 0000000000000..a2d0b15261f92 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/rrs/beans/Entry.java @@ -0,0 +1,23 @@ +/** + * Copyright (c) 2014-2015 openHAB UG (haftungsbeschraenkt) and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package org.openhab.ui.cometvisu.internal.rrs.beans; + +/** + * {@link Entry} is used by the CometVisu rss-plugin + * + * @author Tobias Bräutigam + * @since 2.0.0 + */ +public class Entry { + public String id; + public String title; + public String content; + public String tags; + public String state; + public long publishedDate; +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/rrs/beans/Feed.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/rrs/beans/Feed.java new file mode 100644 index 0000000000000..fb6e67348eddb --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/rrs/beans/Feed.java @@ -0,0 +1,20 @@ +package org.openhab.ui.cometvisu.internal.rrs.beans; + +import java.util.ArrayList; +import java.util.List; + +/** + * {@link Feed} is used by the CometVisu rss-plugin + * + * @author Tobias Bräutigam + * @since 2.0.0 + */ +public class Feed { + public String feedUrl; + public String title; + public String link; + public String author; + public String description; + public String type; + public List entries = new ArrayList(); +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/rrs/beans/ResponseData.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/rrs/beans/ResponseData.java new file mode 100644 index 0000000000000..d65321e5c4881 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/rrs/beans/ResponseData.java @@ -0,0 +1,11 @@ +package org.openhab.ui.cometvisu.internal.rrs.beans; + +/** + * {@link ResponseData} is used by the CometVisu rss-plugin + * + * @author Tobias Bräutigam + * @since 2.0.0 + */ +public class ResponseData { + public Feed feed; +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/util/SseUtil.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/util/SseUtil.java new file mode 100644 index 0000000000000..cf00f03bc8c7f --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/util/SseUtil.java @@ -0,0 +1,76 @@ +/** + * Copyright (c) 2014-2015 openHAB UG (haftungsbeschraenkt) and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package org.openhab.ui.cometvisu.internal.util; + +import javax.ws.rs.core.MediaType; + +import org.glassfish.jersey.media.sse.OutboundEvent; +import org.openhab.ui.cometvisu.backend.beans.StateBean; +import org.openhab.ui.cometvisu.internal.StateBeanMessageBodyWriter; + +/** + * Utility class containing helper methods for the SSE implementation. + * + * @author Tobias Bräutigam - Initial Contribution and API + * + */ +public class SseUtil { + + /** + * Creates a new {@link OutboundEvent} object containing an + * {@link StateBean} created for the given eventType, objectIdentifier, + * eventObject. + * + * @param eventType + * - the event type for the event + * @param objectIdentifier + * - the identifier for the main event object + * @param eventObject + * - the eventObject to be included + * @return a new OutboundEvent. + */ + public static OutboundEvent buildEvent(Object eventObject) { + + OutboundEvent.Builder eventBuilder = new OutboundEvent.Builder(); + StateBeanMessageBodyWriter writer = new StateBeanMessageBodyWriter(); + // OutboundEvent event = eventBuilder.mediaType(MediaType.APPLICATION_JSON_TYPE).data(eventObject).build(); + java.util.Date date = new java.util.Date(); + OutboundEvent event = eventBuilder.mediaType(MediaType.APPLICATION_JSON_TYPE) + .data(writer.serialize(eventObject)).id(String.valueOf(date.getTime())).build(); + + return event; + } + + /** + * Used to mark our current thread(request processing) that SSE blocking + * should be enabled. + */ + private static ThreadLocal blockingSseEnabled = new ThreadLocal() { + @Override + protected Boolean initialValue() { + return false; + } + }; + + /** + * Returns true if the current thread is processing an SSE request that + * should block. + * + * @return + */ + public static boolean shouldAsyncBlock() { + return blockingSseEnabled.get().booleanValue(); + } + + /** + * Marks the current thread as processing a blocking sse request. + */ + public static void enableBlockingSse() { + blockingSseEnabled.set(true); + } +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/servlet/CometVisuApp.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/servlet/CometVisuApp.java new file mode 100644 index 0000000000000..391cc0f13f218 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/servlet/CometVisuApp.java @@ -0,0 +1,232 @@ +/** + * Copyright (c) 2014-2015 openHAB UG (haftungsbeschraenkt) and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package org.openhab.ui.cometvisu.servlet; + +import java.util.ArrayList; +import java.util.Dictionary; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Hashtable; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import javax.servlet.ServletException; + +import org.eclipse.smarthome.core.events.EventPublisher; +import org.eclipse.smarthome.core.items.ItemRegistry; +import org.eclipse.smarthome.core.persistence.PersistenceService; +import org.eclipse.smarthome.core.persistence.QueryablePersistenceService; +import org.eclipse.smarthome.model.sitemap.SitemapProvider; +import org.eclipse.smarthome.ui.icon.IconProvider; +import org.eclipse.smarthome.ui.items.ItemUIRegistry; +import org.openhab.ui.cometvisu.internal.Config; +import org.osgi.framework.BundleContext; +import org.osgi.service.cm.ConfigurationException; +import org.osgi.service.http.HttpService; +import org.osgi.service.http.NamespaceException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * registers the CometVisuServlet-Service + * + * @author Tobias Bräutigam + * @since 2.0.0 + */ +public class CometVisuApp { + + private static final Logger logger = LoggerFactory.getLogger(CometVisuApp.class); + + protected HttpService httpService; + + private ItemUIRegistry itemUIRegistry; + + private ItemRegistry itemRegistry; + + private Set sitemapProviders = new HashSet<>(); + + private List iconProviders = new ArrayList<>(); + + private EventPublisher eventPublisher; + + static protected Map persistenceServices = new HashMap(); + + protected void setEventPublisher(EventPublisher eventPublisher) { + this.eventPublisher = eventPublisher; + } + + protected void unsetEventPublisher(EventPublisher eventPublisher) { + this.eventPublisher = null; + } + + public EventPublisher getEventPublisher() { + return this.eventPublisher; + } + + public void addPersistenceService(PersistenceService service) { + if (service instanceof QueryablePersistenceService) + persistenceServices.put(service.getName(), (QueryablePersistenceService) service); + } + + public void removePersistenceService(PersistenceService service) { + persistenceServices.remove(service.getName()); + } + + static public Map getPersistenceServices() { + return persistenceServices; + } + + public List getIconProviders() { + return iconProviders; + } + + public void addIconProvider(IconProvider iconProvider) { + this.iconProviders.add(iconProvider); + } + + public void removeIconProvider(IconProvider iconProvider) { + this.iconProviders.remove(iconProvider); + } + + protected void setItemRegistry(ItemRegistry itemRegistry) { + this.itemRegistry = itemRegistry; + } + + public ItemRegistry getItemRegistry() { + return itemRegistry; + } + + protected void unsetItemRegistry(ItemRegistry itemRegistry) { + this.itemRegistry = null; + } + + public void setItemUIRegistry(ItemUIRegistry itemUIRegistry) { + this.itemUIRegistry = itemUIRegistry; + } + + public void unsetItemUIRegistry(ItemUIRegistry itemUIRegistry) { + this.itemUIRegistry = null; + } + + public void addSitemapProvider(SitemapProvider provider) { + sitemapProviders.add(provider); + } + + public void removeSitemapProvider(SitemapProvider provider) { + sitemapProviders.remove(provider); + } + + public ItemUIRegistry getItemUIRegistry() { + return itemUIRegistry; + } + + public Set getSitemapProviders() { + return sitemapProviders; + } + + protected void setHttpService(HttpService httpService) { + this.httpService = httpService; + } + + protected void unsetHttpService(HttpService httpService) { + this.httpService = null; + } + + private void readConfiguration(final Map properties) { + if (properties != null) { + if (properties.get(Config.COMETVISU_WEBFOLDER_PROPERTY) != null) { + Config.COMETVISU_WEBFOLDER = (String) properties.get(Config.COMETVISU_WEBFOLDER_PROPERTY); + } + if (properties.get(Config.COMETVISU_WEBAPP_ALIAS_PROPERTY) != null) { + Config.COMETVISU_WEBAPP_ALIAS = (String) properties.get(Config.COMETVISU_WEBAPP_ALIAS_PROPERTY); + } + for (String key : properties.keySet()) { + String[] parts = key.split(">"); + String propKey = parts.length > 1 ? parts[1] : parts[0]; + String propPid = parts.length > 1 ? parts[0] : ""; + + logger.debug("Property: {}->{}:{}, Parts {}", propPid, propKey, properties.get(key), parts.length); + if (!propPid.isEmpty()) { + if (Config.configMappings.containsKey(propPid)) { + Config.configMappings.get(propPid).put(propKey, properties.get(key)); + } + } + } + } + } + + /** + * Called by the SCR to activate the component with its configuration read + * from CAS + * + * @param bundleContext + * BundleContext of the Bundle that defines this component + * @param configuration + * Configuration properties for this component obtained from the + * ConfigAdmin service + */ + protected void activate(Map configProps) throws ConfigurationException { + readConfiguration(configProps); + registerServlet(); + logger.info("Started CometVisu UI at {} serving {}", Config.COMETVISU_WEBAPP_ALIAS, Config.COMETVISU_WEBFOLDER); + } + + public void deactivate(BundleContext componentContext) { + unregisterServlet(); + logger.info("Stopped CometVisu UI"); + } + + private void registerServlet() { + // As the alias is user configurable, we have to check if it has a + // trailing slash but no leading slash + if (!Config.COMETVISU_WEBAPP_ALIAS.startsWith("/")) + Config.COMETVISU_WEBAPP_ALIAS = "/" + Config.COMETVISU_WEBAPP_ALIAS; + + if (Config.COMETVISU_WEBAPP_ALIAS.endsWith("/")) + Config.COMETVISU_WEBAPP_ALIAS = Config.COMETVISU_WEBAPP_ALIAS.substring(0, + Config.COMETVISU_WEBAPP_ALIAS.length() - 1); + + Dictionary servletParams = new Hashtable(); + CometVisuServlet servlet = new CometVisuServlet(Config.COMETVISU_WEBFOLDER, this); + try { + httpService.registerServlet(Config.COMETVISU_WEBAPP_ALIAS, servlet, servletParams, null); + } catch (ServletException e) { + logger.error("Error during servlet startup", e); + } catch (NamespaceException e) { + logger.error("Error during servlet startup", e); + } + } + + private void unregisterServlet() { + httpService.unregister(Config.COMETVISU_WEBAPP_ALIAS); + } + + /** + * Called by the SCR when the configuration of a binding has been changed + * through the ConfigAdmin service. + * + * @param configuration + * Updated configuration properties + */ + protected void modified(Map configProps) throws ConfigurationException { + logger.info("updated({})", configProps); + if (configProps == null) + return; + if (configProps.containsKey(Config.COMETVISU_WEBFOLDER_PROPERTY) + || configProps.containsKey(Config.COMETVISU_WEBAPP_ALIAS_PROPERTY)) { + unregisterServlet(); + } + readConfiguration(configProps); + if (configProps.containsKey(Config.COMETVISU_WEBFOLDER_PROPERTY) + || configProps.containsKey(Config.COMETVISU_WEBAPP_ALIAS_PROPERTY)) { + registerServlet(); + } + } + +} diff --git a/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/servlet/CometVisuServlet.java b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/servlet/CometVisuServlet.java new file mode 100644 index 0000000000000..62ec6606c09f2 --- /dev/null +++ b/addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/servlet/CometVisuServlet.java @@ -0,0 +1,1221 @@ +/** + * Copyright (c) 2014-2015 openHAB UG (haftungsbeschraenkt) and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package org.openhab.ui.cometvisu.servlet; + +import java.io.Closeable; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FilenameFilter; +import java.io.IOException; +import java.io.OutputStream; +import java.io.RandomAccessFile; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Calendar; +import java.util.Collections; +import java.util.Comparator; +import java.util.Date; +import java.util.Iterator; +import java.util.List; +import java.util.Locale; +import java.util.Map.Entry; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import java.util.zip.GZIPOutputStream; + +import javax.servlet.ServletConfig; +import javax.servlet.ServletContext; +import javax.servlet.ServletException; +import javax.servlet.ServletOutputStream; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.ws.rs.core.MediaType; + +import org.eclipse.smarthome.core.items.Item; +import org.eclipse.smarthome.core.items.ItemNotFoundException; +import org.eclipse.smarthome.core.items.events.ItemEventFactory; +import org.eclipse.smarthome.core.library.types.StringType; +import org.eclipse.smarthome.core.persistence.FilterCriteria; +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.openhab.ui.cometvisu.internal.Config; +import org.openhab.ui.cometvisu.internal.config.ConfigHelper.Transform; +import org.openhab.ui.cometvisu.internal.config.VisuConfig; +import org.openhab.ui.cometvisu.internal.editor.dataprovider.beans.DataBean; +import org.openhab.ui.cometvisu.internal.editor.dataprovider.beans.ItemBean; +import org.openhab.ui.cometvisu.internal.rrs.beans.Feed; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.caucho.java.WorkDir; +import com.caucho.quercus.QuercusContext; +import com.caucho.quercus.QuercusDieException; +import com.caucho.quercus.QuercusEngine; +import com.caucho.quercus.QuercusErrorException; +import com.caucho.quercus.QuercusExitException; +import com.caucho.quercus.QuercusLineRuntimeException; +import com.caucho.quercus.QuercusRequestAdapter; +import com.caucho.quercus.QuercusRuntimeException; +import com.caucho.quercus.env.Env; +import com.caucho.quercus.env.QuercusValueException; +import com.caucho.quercus.env.StringValue; +import com.caucho.quercus.page.QuercusPage; +import com.caucho.quercus.servlet.api.QuercusHttpServletRequest; +import com.caucho.quercus.servlet.api.QuercusHttpServletRequestImpl; +import com.caucho.quercus.servlet.api.QuercusHttpServletResponse; +import com.caucho.quercus.servlet.api.QuercusHttpServletResponseImpl; +import com.caucho.quercus.servlet.api.QuercusServletContextImpl; +import com.caucho.util.CurrentTime; +import com.caucho.util.L10N; +import com.caucho.vfs.FilePath; +import com.caucho.vfs.Path; +import com.caucho.vfs.Vfs; +import com.caucho.vfs.WriteStream; +import com.google.gson.Gson; + +/** + * Servlet for CometVisu static + php files + * + * @author Tobias Bräutigam - initial contribution and API + * @author BalusC - code for static files (taken from FileServlet) + * @author Scott Ferguson - code for php files (taken from QuercusServletImpl) + * @see com.caucho.quercus.servlet.QuercusServletImpl + * + * @link + * http://balusc.blogspot.com/2009/02/fileservlet-supporting-resume-and.html + * @link http://quercus.caucho.com/ + */ +public class CometVisuServlet extends HttpServlet { + /** + * + */ + private static final long serialVersionUID = 4448918908615003303L; + private static final L10N L = new L10N(CometVisuServlet.class); + private static final Logger logger = LoggerFactory.getLogger(CometVisuServlet.class); + + private static final int DEFAULT_BUFFER_SIZE = 10240; // ..bytes = 10KB. + private static final long DEFAULT_EXPIRE_TIME = 604800000L; // ..ms = 1 + // week. + private static final String MULTIPART_BOUNDARY = "MULTIPART_BYTERANGES"; + + private Pattern sitemapPattern = Pattern.compile(".*/visu_config_(oh_)?([^\\.]+)\\.xml"); + + private String rrsLogPath = "/plugins/rsslog/rsslog_oh.php"; + private final String rssLogMessageSeparator = "\\|"; + private DateFormat rssPubDateFormat = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss Z", Locale.ENGLISH); + + protected String root; + protected File rootFolder; + protected File userFileFolder; + // protected String serverAlias; + protected String defaultUserDir; + protected QuercusEngine engine; + protected ServletContext _servletContext; + protected QuercusContext _quercus; + protected ServletConfig _config; + + private CometVisuApp cometVisuApp; + + public CometVisuServlet(String filesystemDir, CometVisuApp cometVisuApp) { + root = filesystemDir; + rootFolder = new File(root); + userFileFolder = new File(org.eclipse.smarthome.config.core.ConfigConstants.getConfigFolder() + + Config.COMETVISU_WEBAPP_USERFILE_FOLDER); + defaultUserDir = System.getProperty("user.dir"); + engine = new QuercusEngine(); + engine.getQuercus().setIni("include_path", ".:" + rootFolder.getAbsolutePath()); + + this.cometVisuApp = cometVisuApp; + } + + /** + * initialize the script manager. + */ + @Override + public final void init(ServletConfig config) throws ServletException { + super.init(config); + _config = config; + _servletContext = config.getServletContext(); + + checkServletAPIVersion(); + + // Path pwd = new FilePath(_servletContext.getRealPath("/")); + Path pwd = new FilePath(rootFolder.getAbsolutePath()); + Path webInfDir = pwd; + + logger.info("initial pwd " + pwd); + logger.info("initial webinf " + webInfDir); + engine.getQuercus().setPwd(pwd); + engine.getQuercus().setWebInfDir(webInfDir); + + // need to set these for non-Resin containers + if (!CurrentTime.isTest() && !engine.getQuercus().isResin()) { + Vfs.setPwd(pwd); + WorkDir.setLocalWorkDir(webInfDir.lookup("work")); + } + engine.getQuercus().init(); + engine.getQuercus().start(); + } + + /** + * {@inheritDoc} + * + * @see javax.servlet.http.HttpServlet#doPost(javax.servlet.http.HttpServletRequest, + * javax.servlet.http.HttpServletResponse) + */ + @Override + protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + File requestedFile = getRequestedFile(req); + phpService(requestedFile, req, resp); + } + + private Sitemap getSitemap(String sitemapname) { + for (SitemapProvider provider : cometVisuApp.getSitemapProviders()) { + Sitemap sitemap = provider.getSitemap(sitemapname); + if (sitemap != null) { + return sitemap; + } + } + + return null; + } + + /** + * {@inheritDoc} + * + * @see javax.servlet.http.HttpServlet#doGet(javax.servlet.http.HttpServletRequest, + * javax.servlet.http.HttpServletResponse) + */ + @Override + protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + File requestedFile = getRequestedFile(req); + + String path = req.getPathInfo() != null ? req.getPathInfo() : "/index.html"; + Matcher matcher = sitemapPattern.matcher(path); + if (!requestedFile.exists() && matcher.find()) { + + Sitemap sitemap = getSitemap(matcher.group(2)); + if (sitemap != null) { + logger.debug("reading sitemap '{}'", sitemap); + VisuConfig config = new VisuConfig(sitemap, cometVisuApp, rootFolder); + + // logger.info("response: "+config.getConfigXml()); + resp.setContentType(MediaType.APPLICATION_XML); + resp.getWriter().write(config.getConfigXml(req)); + resp.flushBuffer(); + + return; + } else { + throw new ServletException("Sitemap '" + matcher.group(1) + "' could not be found"); + } + } + + // logger.info("Path: " + req.getPathInfo()); + if (path.matches(".*editor/dataproviders/.+\\.(php|json)$") || path.matches(".*designs/get_designs\\.php$")) { + dataProviderService(requestedFile, req, resp); + } else if (path.equalsIgnoreCase(rrsLogPath)) { + processRssLogRequest(requestedFile, req, resp); + } else if (requestedFile.getName().endsWith(".php")) { + phpService(requestedFile, req, resp); + } else { + processStaticRequest(requestedFile, req, resp, true); + } + } + + protected File getRequestedFile(HttpServletRequest req) throws UnsupportedEncodingException { + String requestedFile = req.getPathInfo(); + File file = null; + + // check services folder if a file exists there + if (requestedFile != null) { + file = new File(userFileFolder, URLDecoder.decode(requestedFile, "UTF-8")); + } + // serve the file from the cometvisu src directory + if (file == null || !file.exists() || file.isDirectory()) { + file = requestedFile != null ? new File(rootFolder, URLDecoder.decode(requestedFile, "UTF-8")) : rootFolder; + } + if (file.isDirectory()) { + // search for an index file + FilenameFilter filter = new FilenameFilter() { + @Override + public boolean accept(File dir, String name) { + return name.startsWith("index.") && (name.endsWith(".php") || name.endsWith(".html")); + } + }; + for (String dirFile : file.list(filter)) { + // take the first one found + file = new File(file, dirFile); + break; + } + } + return file; + } + + /** + * serves an RSS-Feed from a persisted string item backend for the CometVisu + * rrslog-plugin + * + * @param file + * @param request + * @param response + */ + private void processRssLogRequest(File file, HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + // retrieve the item + if (request.getParameter("f") == null) + return; + + String[] itemNames = request.getParameter("f").split(","); + List items = new ArrayList(); + + for (String name : itemNames) { + try { + Item item = cometVisuApp.getItemRegistry().getItem(name); + items.add(item); + } catch (ItemNotFoundException e) { + logger.error("item '{}' not found", name); + } + } + + if (items.size() > 0) { + // Fallback to first persistenceService from list + if (!CometVisuApp.getPersistenceServices().entrySet().iterator().hasNext()) { + throw new IllegalArgumentException("No Persistence service found."); + } + + if (request.getParameter("c") != null) { + if (items.size() == 1) { + // new log message should be store + String title = request.getParameter("h"); + String message = request.getParameter("c"); + String state = request.getParameter("state"); + // Build message + Command command = new StringType(title + rssLogMessageSeparator + message + rssLogMessageSeparator + + state + rssLogMessageSeparator + items.get(0).getName()); + // Use the event publisher to store the item in the defined + // persistance services + cometVisuApp.getEventPublisher() + .post(ItemEventFactory.createCommandEvent(items.get(0).getName(), command)); + } + // send empty response?? + response.setContentType("text/plain"); + response.getWriter().write(""); + response.flushBuffer(); + } else if (request.getParameter("dump") != null) { + } else if (request.getParameter("r") != null) { + // delete all log lines older than the timestamp and optional a + // filter + // => not possible to remove data from persistence service + response.setContentType("text/plain"); + response.getWriter().write( + "Cannot execute query: It is not possible to delete data from openHAB PersistenceService"); + response.flushBuffer(); + } else if (request.getParameter("u") != null) { + // update state + response.setContentType("text/plain"); + response.getWriter().write( + "Cannot execute query: It is not possible to update data from openHAB PersistenceService"); + response.flushBuffer(); + } else if (request.getParameter("d") != null) { + // update state + response.setContentType("text/plain"); + response.getWriter().write( + "Cannot execute query: It is not possible to delete data from openHAB PersistenceService"); + response.flushBuffer(); + } else { + Feed feed = new Feed(); + feed.feedUrl = request.getRequestURL().toString(); + feed.title = "RSS supplied logs"; + feed.link = request.getRequestURL().toString(); + feed.author = ""; + feed.description = "RSS supplied logs"; + feed.type = "rss20"; + // Define the data filter + FilterCriteria filter = new FilterCriteria(); + Calendar start = Calendar.getInstance(); + // retrieve only the historic states from the last 7 days + BeginDate is required for RRD4j service + start.add(Calendar.DAY_OF_YEAR, -7); + // Date end = new Date(); + filter.setBeginDate(start.getTime()); + // filter.setEndDate(end); + filter.setPageSize(25); + filter.setOrdering(Ordering.DESCENDING); + + for (Item item : items) { + filter.setItemName(item.getName()); + Iterator> pit = CometVisuApp.getPersistenceServices() + .entrySet().iterator(); + QueryablePersistenceService persistenceService = pit.next().getValue(); + // Get the data from the persistence store + Iterable result = persistenceService.query(filter); + Iterator it = result.iterator(); + boolean forceStop = false; + while (!forceStop && !it.hasNext()) { + if (pit.hasNext()) { + persistenceService = pit.next().getValue(); + result = persistenceService.query(filter); + } else { + // no persisted data found for this item in any of + // the available persistence services + forceStop = true; + } + } + if (it.hasNext()) { + logger.debug("persisted data for item {} found in service {}", item.getName(), + persistenceService.getName()); + } + + // Iterate through the data + int i = 0; + while (it.hasNext()) { + i++; + HistoricItem historicItem = it.next(); + if (historicItem.getState() == null || historicItem.getState().toString().isEmpty()) + continue; + org.openhab.ui.cometvisu.internal.rrs.beans.Entry entry = new org.openhab.ui.cometvisu.internal.rrs.beans.Entry(); + entry.publishedDate = historicItem.getTimestamp().getTime(); + logger.info(rssPubDateFormat.format(entry.publishedDate) + ": " + historicItem.getState()); + entry.tags = historicItem.getName(); + String[] content = historicItem.getState().toString().split(rssLogMessageSeparator); + if (content.length == 0) { + entry.content = historicItem.getState().toString(); + } else if (content.length == 1) { + entry.content = content[0]; + } else if (content.length == 2) { + entry.title = content[0]; + entry.content = content[1]; + } else if (content.length == 3) { + entry.title = content[0]; + entry.content = content[1]; + entry.state = content[2]; + } else if (content.length == 4) { + entry.title = content[0]; + entry.content = content[1]; + entry.state = content[2]; + // ignore tags in content[3] as is is already known + // by item name + } + feed.entries.add(entry); + } + if ("rrd4j".equals(persistenceService.getName()) + && FilterCriteria.Ordering.DESCENDING.equals(filter.getOrdering())) { + // the RRD4j PersistenceService does not support descending ordering so we do it manually + Collections.sort(feed.entries, + new Comparator() { + @Override + public int compare(org.openhab.ui.cometvisu.internal.rrs.beans.Entry o1, + org.openhab.ui.cometvisu.internal.rrs.beans.Entry o2) { + return Long.compare(o2.publishedDate, o1.publishedDate); + } + }); + } + logger.debug("querying {} item from {} to {} => {} results on service {}", filter.getItemName(), + filter.getBeginDate(), filter.getEndDate(), i, persistenceService.getName()); + } + if (request.getParameter("j") != null) { + // request data in JSON format + response.setContentType("application/json"); + response.getWriter().write("{\"responseData\": { \"feed\": " + marshalJson(feed) + + "},\"responseDetails\":null,\"responseStatus\":200}"); + } else { + // request data in RSS format + response.setContentType(MediaType.APPLICATION_ATOM_XML); + // as the json bean structure does not map the rss structure + // we cannot just marshal an XML + String rss = "\n\n\n"; + rss += "" + feed.title + "\n"; + rss += "" + feed.link + "\n"; + rss += "" + feed.description + "\n"; + + for (org.openhab.ui.cometvisu.internal.rrs.beans.Entry entry : feed.entries) { + rss += ""; + rss += "" + entry.title + ""; + rss += "" + entry.content + ""; + Date pubDate = new Date(entry.publishedDate); + rss += "" + rssPubDateFormat.format(pubDate) + ""; + rss += "\n"; + } + + rss += ""; + response.getWriter().write(rss); + + } + response.flushBuffer(); + + } + } + + } + + /** + * Process the actual request. + * + * @param request + * The request to be processed. + * @param response + * The response to be created. + * @param content + * Whether the request body should be written (GET) or not + * (HEAD). + * @throws IOException + * If something fails at I/O level. + * + * @author BalusC + * @link + * http://balusc.blogspot.com/2009/02/fileservlet-supporting-resume-and + * .html + */ + private void processStaticRequest(File file, HttpServletRequest request, HttpServletResponse response, + boolean content) throws IOException { + // Validate the requested file + // ------------------------------------------------------------ + + if (file == null) { + // Get requested file by path info. + String requestedFile = request.getPathInfo(); + + // Check if file is actually supplied to the request URL. + if (requestedFile == null) { + // Do your thing if the file is not supplied to the request URL. + // Throw an exception, or send 404, or show default/warning + // page, or + // just ignore it. + response.sendError(HttpServletResponse.SC_NOT_FOUND); + return; + } + + // URL-decode the file name (might contain spaces and on) and + // prepare + // file object. + file = new File(rootFolder, URLDecoder.decode(requestedFile, "UTF-8")); + } + // Check if file actually exists in filesystem. + if (!file.exists()) { + // Do your thing if the file appears to be non-existing. + // Throw an exception, or send 404, or show default/warning page, or + // just ignore it. + response.sendError(HttpServletResponse.SC_NOT_FOUND); + return; + } + + // Prepare some variables. The ETag is an unique identifier of the file. + String fileName = file.getName(); + long length = file.length(); + long lastModified = file.lastModified(); + String eTag = fileName + "_" + length + "_" + lastModified; + long expires = System.currentTimeMillis() + DEFAULT_EXPIRE_TIME; + + // Validate request headers for caching + // --------------------------------------------------- + + // If-None-Match header should contain "*" or ETag. If so, then return + // 304. + String ifNoneMatch = request.getHeader("If-None-Match"); + if (ifNoneMatch != null && matches(ifNoneMatch, eTag)) { + response.setStatus(HttpServletResponse.SC_NOT_MODIFIED); + response.setHeader("ETag", eTag); // Required in 304. + response.setDateHeader("Expires", expires); // Postpone cache with 1 + // week. + return; + } + + // If-Modified-Since header should be greater than LastModified. If so, + // then return 304. + // This header is ignored if any If-None-Match header is specified. + long ifModifiedSince = request.getDateHeader("If-Modified-Since"); + if (ifNoneMatch == null && ifModifiedSince != -1 && ifModifiedSince + 1000 > lastModified) { + response.setStatus(HttpServletResponse.SC_NOT_MODIFIED); + response.setHeader("ETag", eTag); // Required in 304. + response.setDateHeader("Expires", expires); // Postpone cache with 1 + // week. + return; + } + + // Validate request headers for resume + // ---------------------------------------------------- + + // If-Match header should contain "*" or ETag. If not, then return 412. + String ifMatch = request.getHeader("If-Match"); + if (ifMatch != null && !matches(ifMatch, eTag)) { + response.sendError(HttpServletResponse.SC_PRECONDITION_FAILED); + return; + } + + // If-Unmodified-Since header should be greater than LastModified. If + // not, then return 412. + long ifUnmodifiedSince = request.getDateHeader("If-Unmodified-Since"); + if (ifUnmodifiedSince != -1 && ifUnmodifiedSince + 1000 <= lastModified) { + response.sendError(HttpServletResponse.SC_PRECONDITION_FAILED); + return; + } + + // Validate and process range + // ------------------------------------------------------------- + + // Prepare some variables. The full Range represents the complete file. + Range full = new Range(0, length - 1, length); + List ranges = new ArrayList(); + + // Validate and process Range and If-Range headers. + String range = request.getHeader("Range"); + if (range != null) { + + // Range header should match format "bytes=n-n,n-n,n-n...". If not, + // then return 416. + if (!range.matches("^bytes=\\d*-\\d*(,\\d*-\\d*)*$")) { + response.setHeader("Content-Range", "bytes */" + length); // Required + // in + // 416. + response.sendError(HttpServletResponse.SC_REQUESTED_RANGE_NOT_SATISFIABLE); + return; + } + + // If-Range header should either match ETag or be greater then + // LastModified. If not, + // then return full file. + String ifRange = request.getHeader("If-Range"); + if (ifRange != null && !ifRange.equals(eTag)) { + try { + long ifRangeTime = request.getDateHeader("If-Range"); // Throws + // IAE + // if + // invalid. + if (ifRangeTime != -1 && ifRangeTime + 1000 < lastModified) { + ranges.add(full); + } + } catch (IllegalArgumentException ignore) { + ranges.add(full); + } + } + + // If any valid If-Range header, then process each part of byte + // range. + if (ranges.isEmpty()) { + for (String part : range.substring(6).split(",")) { + // Assuming a file with length of 100, the following + // examples returns bytes at: + // 50-80 (50 to 80), 40- (40 to length=100), -20 + // (length-20=80 to length=100). + long start = sublong(part, 0, part.indexOf("-")); + long end = sublong(part, part.indexOf("-") + 1, part.length()); + + if (start == -1) { + start = length - end; + end = length - 1; + } else if (end == -1 || end > length - 1) { + end = length - 1; + } + + // Check if Range is syntactically valid. If not, then + // return 416. + if (start > end) { + response.setHeader("Content-Range", "bytes */" + length); // Required + // in + // 416. + response.sendError(HttpServletResponse.SC_REQUESTED_RANGE_NOT_SATISFIABLE); + return; + } + + // Add range. + ranges.add(new Range(start, end, length)); + } + } + } + + // Prepare and initialize response + // -------------------------------------------------------- + + // Get content type by file name and set default GZIP support and + // content disposition. + String contentType = getServletContext().getMimeType(fileName); + boolean acceptsGzip = false; + String disposition = "inline"; + + // If content type is unknown, then set the default value. + // For all content types, see: + // http://www.w3schools.com/media/media_mimeref.asp + // To add new content types, add new mime-mapping entry in web.xml. + if (contentType == null) { + contentType = "application/octet-stream"; + } + + // If content type is text, then determine whether GZIP content encoding + // is supported by + // the browser and expand content type with the one and right character + // encoding. + if (contentType.startsWith("text")) { + String acceptEncoding = request.getHeader("Accept-Encoding"); + acceptsGzip = acceptEncoding != null && accepts(acceptEncoding, "gzip"); + contentType += ";charset=UTF-8"; + } + + // Else, expect for images, determine content disposition. If content + // type is supported by + // the browser, then set to inline, else attachment which will pop a + // 'save as' dialogue. + else if (!contentType.startsWith("image")) { + String accept = request.getHeader("Accept"); + disposition = accept != null && accepts(accept, contentType) ? "inline" : "attachment"; + } + + // Initialize response. + response.reset(); + response.setBufferSize(DEFAULT_BUFFER_SIZE); + response.setHeader("Content-Disposition", disposition + ";filename=\"" + fileName + "\""); + response.setHeader("Accept-Ranges", "bytes"); + response.setHeader("ETag", eTag); + response.setDateHeader("Last-Modified", lastModified); + response.setDateHeader("Expires", expires); + + // Send requested file (part(s)) to client + // ------------------------------------------------ + + // Prepare streams. + RandomAccessFile input = null; + OutputStream output = null; + + try { + // Open streams. + input = new RandomAccessFile(file, "r"); + output = response.getOutputStream(); + + if (ranges.isEmpty() || ranges.get(0) == full) { + + // Return full file. + Range r = full; + response.setContentType(contentType); + response.setHeader("Content-Range", "bytes " + r.start + "-" + r.end + "/" + r.total); + + if (content) { + if (acceptsGzip) { + // The browser accepts GZIP, so GZIP the content. + response.setHeader("Content-Encoding", "gzip"); + output = new GZIPOutputStream(output, DEFAULT_BUFFER_SIZE); + } else { + // Content length is not directly predictable in case of + // GZIP. + // So only add it if there is no means of GZIP, else + // browser will hang. + response.setHeader("Content-Length", String.valueOf(r.length)); + } + + // Copy full range. + copy(input, output, r.start, r.length); + } + + } else if (ranges.size() == 1) { + + // Return single part of file. + Range r = ranges.get(0); + response.setContentType(contentType); + response.setHeader("Content-Range", "bytes " + r.start + "-" + r.end + "/" + r.total); + response.setHeader("Content-Length", String.valueOf(r.length)); + response.setStatus(HttpServletResponse.SC_PARTIAL_CONTENT); // 206. + + if (content) { + // Copy single part range. + copy(input, output, r.start, r.length); + } + + } else { + + // Return multiple parts of file. + response.setContentType("multipart/byteranges; boundary=" + MULTIPART_BOUNDARY); + response.setStatus(HttpServletResponse.SC_PARTIAL_CONTENT); // 206. + + if (content) { + // Cast back to ServletOutputStream to get the easy println + // methods. + ServletOutputStream sos = (ServletOutputStream) output; + + // Copy multi part range. + for (Range r : ranges) { + // Add multipart boundary and header fields for every + // range. + sos.println(); + sos.println("--" + MULTIPART_BOUNDARY); + sos.println("Content-Type: " + contentType); + sos.println("Content-Range: bytes " + r.start + "-" + r.end + "/" + r.total); + + // Copy single part range of multi part range. + copy(input, output, r.start, r.length); + } + + // End with multipart boundary. + sos.println(); + sos.println("--" + MULTIPART_BOUNDARY + "--"); + } + } + } finally { + // Gently close streams. + close(output); + close(input); + } + } + + /** + * replaces the dataproviders in + * /editor/dataproviders/*.(php|json) + + * + * @param file + * @param request + * @param response + * @throws ServletException + * @throws IOException + */ + private final void dataProviderService(File file, HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + logger.debug("dataprovider '{}' requested", file.getName()); + List beans = new ArrayList(); + if (file.getName().equals("dpt_list.json")) { + // return all transforms available for openhab + for (Transform transform : Transform.values()) { + DataBean bean = new DataBean(); + bean.label = transform.toString().toLowerCase(); + bean.value = "OH:" + bean.label; + beans.add(bean); + } + } else if (file.getName().equals("list_all_addresses.php")) { + // all item names + for (Item item : this.cometVisuApp.getItemRegistry().getItems()) { + ItemBean bean = new ItemBean(); + bean.value = item.getName(); + bean.label = item.getName(); + // TODO handle other types + bean.hints.put("transform", "OH:string"); + beans.add(bean); + } + + } else if (file.getName().equals("list_all_icons.php")) { + // all item names + File iconDir = new File(rootFolder, "icon/knx-uf-iconset/128x128_white/"); + FilenameFilter filter = new FilenameFilter() { + @Override + public boolean accept(File dir, String name) { + // TODO Auto-generated method stub + return name.endsWith(".png"); + } + }; + for (File iconFile : iconDir.listFiles(filter)) { + if (iconFile.isFile()) { + String iconName = iconFile.getName().replace(".png", ""); + DataBean bean = new DataBean(); + bean.label = iconName; + bean.value = iconName; + beans.add(bean); + } + } + } else if (file.getName().equals("list_all_plugins.php")) { + // all plugins + // all item names + File iconDir = new File(rootFolder, "plugins/"); + for (File icon : iconDir.listFiles()) { + if (icon.isDirectory()) { + DataBean bean = new DataBean(); + bean.label = icon.getName(); + bean.value = icon.getName(); + beans.add(bean); + } + } + + } else if (file.getName().equals("get_designs.php")) { + // all designs + File designDir = new File(rootFolder, "designs/"); + for (File design : designDir.listFiles()) { + if (design.isDirectory()) { + beans.add(design.getName()); + } + } + + } else if (file.getName().equals("list_all_rrds.php")) { + // all item names + + } + response.setContentType(MediaType.APPLICATION_JSON); + response.getWriter().write(marshalJson(beans)); + response.flushBuffer(); + } + + private String marshalJson(Object bean) { + Gson gson = new Gson(); + return gson.toJson(bean); + } + + /** + * Service. + */ + private final void phpService(File file, HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + Env env = null; + WriteStream ws = null; + + QuercusHttpServletRequest req = new QuercusHttpServletRequestImpl(request); + QuercusHttpServletResponse res = new QuercusHttpServletResponseImpl(response); + + try { + Path path = getPath(file, req); + logger.info("phpService path: " + path); + + QuercusPage page; + + try { + page = engine.getQuercus().parse(path); + } catch (FileNotFoundException e) { + // php/2001 + logger.debug(e.toString(), e); + + response.sendError(HttpServletResponse.SC_NOT_FOUND); + + return; + } + + ws = openWrite(response); + + // php/2002 + // for non-Resin containers + // for servlet filters that do post-request work after Quercus + ws.setDisableCloseSource(true); + + // php/6006 + ws.setNewlineString("\n"); + + QuercusContext quercus = engine.getQuercus(); + + env = quercus.createEnv(page, ws, req, res); + + // php/815d + env.setPwd(path.getParent()); + logger.info("setting user dir to " + path.getParent().getNativePath()); + System.setProperty("user.dir", path.getParent().getNativePath()); + quercus.setServletContext(new QuercusServletContextImpl(_servletContext)); + + try { + env.start(); + + // php/2030, php/2032, php/2033 + // Jetty hides server classes from web-app + // http://docs.codehaus.org/display/JETTY/Classloading + // + // env.setGlobalValue("request", env.wrapJava(request)); + // env.setGlobalValue("response", env.wrapJava(response)); + // env.setGlobalValue("servletContext", + // env.wrapJava(_servletContext)); + + StringValue prepend = quercus.getIniValue("auto_prepend_file").toStringValue(env); + if (prepend.length() > 0) { + Path prependPath = env.lookup(prepend); + + if (prependPath == null) + env.error(L.l("auto_prepend_file '{0}' not found.", prepend)); + else { + QuercusPage prependPage = engine.getQuercus().parse(prependPath); + prependPage.executeTop(env); + } + } + + env.executeTop(); + + StringValue append = quercus.getIniValue("auto_append_file").toStringValue(env); + if (append.length() > 0) { + Path appendPath = env.lookup(append); + + if (appendPath == null) + env.error(L.l("auto_append_file '{0}' not found.", append)); + else { + QuercusPage appendPage = engine.getQuercus().parse(appendPath); + appendPage.executeTop(env); + } + } + // return; + } catch (QuercusExitException e) { + throw e; + } catch (QuercusErrorException e) { + throw e; + } catch (QuercusLineRuntimeException e) { + logger.debug(e.toString(), e); + + ws.println(e.getMessage()); + // return; + } catch (QuercusValueException e) { + logger.debug(e.toString(), e); + + ws.println(e.toString()); + + // return; + } catch (StackOverflowError e) { + RuntimeException myException = new RuntimeException(L.l("StackOverflowError at {0}", env.getLocation()), + e); + + throw myException; + } catch (Throwable e) { + if (response.isCommitted()) + e.printStackTrace(ws.getPrintWriter()); + + ws = null; + + throw e; + } finally { + if (env != null) + env.close(); + + // don't want a flush for an exception + if (ws != null && env != null && env.getDuplex() == null) + ws.close(); + + System.setProperty("user.dir", defaultUserDir); + } + } catch (QuercusDieException e) { + // normal exit + logger.trace(e.getMessage(), e); + } catch (QuercusExitException e) { + // normal exit + logger.trace(e.getMessage(), e); + } catch (QuercusErrorException e) { + // error exit + logger.error(e.getMessage(), e); + } catch (RuntimeException e) { + throw e; + } catch (Throwable e) { + handleThrowable(response, e); + } + } + + protected Path getPath(File file, QuercusHttpServletRequest req) { + // php/8173 + Path pwd = engine.getQuercus().getPwd().copy(); + + String servletPath = QuercusRequestAdapter.getPageServletPath(req); + + if (servletPath.startsWith("/")) { + servletPath = servletPath.substring(1); + } + + Path path = pwd.lookupChild(servletPath); + + // php/2010, php/2011, php/2012 + if (path.isFile()) { + return path; + } + + StringBuilder sb = new StringBuilder(); + if (path.exists()) + sb.append(servletPath); + + String pathInfo = QuercusRequestAdapter.getPagePathInfo(req); + if (pathInfo != null) { + if (pathInfo.startsWith("/")) { + pathInfo = pathInfo.substring(1); + } + if (sb.length() > 1) + sb.append("/"); + sb.append(pathInfo); + + } + + String scriptPath = sb.toString(); + + path = pwd.lookupChild(scriptPath); + if (file != null && !path.isFile()) + path = path.lookupChild(file.getName()); + + logger.info("ServletPath '{}', PathInfo: '{}', ScriptPath: '{}' => Path '{}'", servletPath, pathInfo, + scriptPath, path); + + return path; + + /* + * jetty getRealPath() de-references symlinks, which causes problems + * with MergePath // php/8173 Path pwd = getQuercus().getPwd().copy(); + * + * String scriptPath = QuercusRequestAdapter.getPageServletPath(req); + * String pathInfo = QuercusRequestAdapter.getPagePathInfo(req); + * + * Path path = pwd.lookup(req.getRealPath(scriptPath)); + * + * if (path.isFile()) return path; + * + * // XXX: include + * + * String fullPath; if (pathInfo != null) fullPath = scriptPath + + * pathInfo; else fullPath = scriptPath; + * + * return pwd.lookup(req.getRealPath(fullPath)); + */ + } + + protected void handleThrowable(HttpServletResponse response, Throwable e) throws IOException, ServletException { + throw new ServletException(e); + } + + protected WriteStream openWrite(HttpServletResponse response) throws IOException { + WriteStream ws; + + OutputStream out = response.getOutputStream(); + + ws = Vfs.openWrite(out); + + return ws; + } + + /** + * Makes sure the servlet container supports Servlet API 2.4+. + */ + protected void checkServletAPIVersion() { + int major = _servletContext.getMajorVersion(); + int minor = _servletContext.getMinorVersion(); + + if (major < 2 || major == 2 && minor < 4) + throw new QuercusRuntimeException(L.l("Quercus requires Servlet API 2.4+.")); + } + + /** + * Returns true if the given accept header accepts the given value. + * + * @param acceptHeader + * The accept header. + * @param toAccept + * The value to be accepted. + * @return True if the given accept header accepts the given value. + */ + private static boolean accepts(String acceptHeader, String toAccept) { + String[] acceptValues = acceptHeader.split("\\s*(,|;)\\s*"); + Arrays.sort(acceptValues); + return Arrays.binarySearch(acceptValues, toAccept) > -1 + || Arrays.binarySearch(acceptValues, toAccept.replaceAll("/.*$", "/*")) > -1 + || Arrays.binarySearch(acceptValues, "*/*") > -1; + } + + /** + * Returns true if the given match header matches the given value. + * + * @param matchHeader + * The match header. + * @param toMatch + * The value to be matched. + * @return True if the given match header matches the given value. + */ + private static boolean matches(String matchHeader, String toMatch) { + String[] matchValues = matchHeader.split("\\s*,\\s*"); + Arrays.sort(matchValues); + return Arrays.binarySearch(matchValues, toMatch) > -1 || Arrays.binarySearch(matchValues, "*") > -1; + } + + /** + * Returns a substring of the given string value from the given begin index + * to the given end index as a long. If the substring is empty, then -1 will + * be returned + * + * @param value + * The string value to return a substring as long for. + * @param beginIndex + * The begin index of the substring to be returned as long. + * @param endIndex + * The end index of the substring to be returned as long. + * @return A substring of the given string value as long or -1 if substring + * is empty. + */ + private static long sublong(String value, int beginIndex, int endIndex) { + String substring = value.substring(beginIndex, endIndex); + return (substring.length() > 0) ? Long.parseLong(substring) : -1; + } + + /** + * Copy the given byte range of the given input to the given output. + * + * @param input + * The input to copy the given range to the given output for. + * @param output + * The output to copy the given range from the given input for. + * @param start + * Start of the byte range. + * @param length + * Length of the byte range. + * @throws IOException + * If something fails at I/O level. + */ + private static void copy(RandomAccessFile input, OutputStream output, long start, long length) throws IOException { + byte[] buffer = new byte[DEFAULT_BUFFER_SIZE]; + int read; + + if (input.length() == length) { + // Write full range. + while ((read = input.read(buffer)) > 0) { + output.write(buffer, 0, read); + } + } else { + // Write partial range. + input.seek(start); + long toRead = length; + + while ((read = input.read(buffer)) > 0) { + if ((toRead -= read) > 0) { + output.write(buffer, 0, read); + } else { + output.write(buffer, 0, (int) toRead + read); + break; + } + } + } + } + + /** + * Close the given resource. + * + * @param resource + * The resource to be closed. + */ + private static void close(Closeable resource) { + if (resource != null) { + try { + resource.close(); + } catch (IOException ignore) { + // Ignore IOException. If you want to handle this anyway, it + // might be useful to know + // that this will generally only be thrown when the client + // aborted the request. + } + } + } + + /** + * This class represents a byte range. + */ + protected class Range { + long start; + long end; + long length; + long total; + + /** + * Construct a byte range. + * + * @param start + * Start of the byte range. + * @param end + * End of the byte range. + * @param total + * Total length of the byte source. + */ + public Range(long start, long end, long total) { + this.start = start; + this.end = end; + this.length = end - start + 1; + this.total = total; + } + + } +} diff --git a/addons/ui/pom.xml b/addons/ui/pom.xml index f40ad720f9891..5c37dac1339b1 100644 --- a/addons/ui/pom.xml +++ b/addons/ui/pom.xml @@ -1,5 +1,5 @@ - - + + org.openhab.addons @@ -8,16 +8,17 @@ 4.0.0 - org.openhab.ui + org.openhab.addons.ui pom - openHAB UI Add-Ons + openHAB UI Components pom org.openhab.ui.classicui org.openhab.ui.paperui + org.openhab.ui.cometvisu - + \ No newline at end of file diff --git a/bundles/ui/org.openhab.ui.dashboard/web/img/cometvisu.png b/bundles/ui/org.openhab.ui.dashboard/web/img/cometvisu.png new file mode 100644 index 0000000000000..80247b42b0d74 Binary files /dev/null and b/bundles/ui/org.openhab.ui.dashboard/web/img/cometvisu.png differ diff --git a/distribution/openhabhome/conf/services/cometvisu.cfg b/distribution/openhabhome/conf/services/cometvisu.cfg new file mode 100644 index 0000000000000..bcda281650b33 --- /dev/null +++ b/distribution/openhabhome/conf/services/cometvisu.cfg @@ -0,0 +1,21 @@ +webFolder=../../../CometVisu/src/ +webAlias=/cometvisu + + +icons>enableMapping=true + +icons.mapping>firstfloor=control_building_int_og +icons.mapping>groundfloor=control_building_int_eg +icons.mapping>cellar=control_building_int_kg +icons.mapping>garden=scene_garden +icons.mapping>sun=weather_sun +icons.mapping>video=scene_livingroom +icons.mapping>kitchen=scene_dinner +icons.mapping>bath=scene_bath +icons.mapping>corridor=scene_hall +icons.mapping>office=scene_office +icons.mapping>boy1=scene_childs_room +icons.mapping>bedroom=scene_sleeping +icons.mapping>heating=sani_heating +icons.mapping>temperature=temp_temperature +icons.mapping>contact=fts_window_1w \ No newline at end of file