Applications often use data that needs to be stored. Some data is onlyrelevant to a specific instance of the application (i.e. local settings),other data is relevant to all instances of the application (i.e. chat data)and some data is relevant to some instances (i.e. user preferences for a userwho has a number of devices).
Gluon CloudLink Client is the component that manages data on the client. Itprovides an API that allows users to store and synchronize data and providesa number of options for developers to choose from for each data entity:
Almost all mobile applications that exist today interact with a back endinfrastructure for managing their data. In theory, an application can directlymake requests to these back ends, but there are a number of drawbacks for doingthis:
When working with XML data format parsing and serializing is a common task. XML structures are parsed to a DOM (DocumentObject Model) representation in order to process elements, attributes and text nodes. DOM node objects get serialized to aString message payload representation. The XML parser and serializer is customizable to a certain level. By default, Citrususes the DOM Level 3 Load and Save implementation with following settings:
In addition to defining message payloads as normal Strings and via external file resource (classpath and file system) you can alsouse model objects as payload data in Java DSL. The object will get serialized autoamtically with a marshaller or object mapper loadedfrom the Citrus context.
Timers are very useful containers when you wish to execute a collection of test actions several times at regular intervals. The timer component generates an event which in turn triggers the execution of the nested test actions associated with timer. This can be useful in a number of test scenarios for example when Citrus needs to simulate a heart beat or if you are debugging a test and you wist to query the contents of the database, to mention just a few. The following code sample should demonstrate the power and flexibility of timers:
The Color Mapping Parameters group of properties provides additionalcontrol over the color transfer function, including control over the colorinterpolation space, which is either RGB, HSV, Lab, Diverging, or Lab/CIEDE2000.To color data values falling below or above the range of the color map with special colors, enable theadvanced Use Below Range Color and Use Above Range Color options,respectively. You can choose different colors for data falling on either side ofthe range. When color mapping floating point arrays with NaNs, you can selectthe color and opacity to use for NaN values. You can also affect whether the color transferfunction uses smooth interpolation or discretizes the map into a fixednumber of colors.
Fig. 3.22 shows the various components of the colorlegend. By default, the title is typically the name of the array (and componentnumber or magnitude for non-scalar data arrays) being mapped. Automatically generatedlabels appear on one side of the color legend, while on the other side are annotations,optionally including start and end annotations depicting the minimum and maximumof the color legend range.
The and buttons can be used to fill theannotations widget with unique discrete values from a data array, ifpossible. Based on the number of distinct values present in the dataarray, this may not yield any result (Instead, a warning message willbe shown). The data array values come either from the selected source objectif you use the button or it comes fromthe visible pipeline objects if you use the button.
Categorical color maps are designed for data arrays with enumerations, which aretypically integer arrays. However, they can be used for arrays with floatingpoint numbers as well. With floating point numbers, the value specifiedfor annotation may not match the value in the dataset exactly, even when the userexpects it to match. In that case, the NaN color will be used. 153554b96e