0% found this document useful (0 votes)
2 views

DataSource_EN

The document is a user manual for ClassX's DataSource technology, which allows the integration of various external data sources into graphic designs for real-time display in broadcast applications. It details the types of supported data sources, including text files, CSV, XLS, SMS, and XML, and explains how to connect and manage these sources within the ClassX applications. Additionally, it provides instructions for handling dynamic content, record IDs, and the integration of multimedia files with external data sources.

Uploaded by

Zaratos06
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

DataSource_EN

The document is a user manual for ClassX's DataSource technology, which allows the integration of various external data sources into graphic designs for real-time display in broadcast applications. It details the types of supported data sources, including text files, CSV, XLS, SMS, and XML, and explains how to connect and manage these sources within the ClassX applications. Additionally, it provides instructions for handling dynamic content, record IDs, and the integration of multimedia files with external data sources.

Uploaded by

Zaratos06
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Managing data sources

User Manual

rev. 25/06/2012
ClassX srl
Via Francesca 368/I
56020 S.Maria a Monte (PI) ITALY
Tel. Fax. ++39 0587 70 51 53
E-Mail: [email protected]
Home-Page: www.classx.it

ORIGINAL EDITION: 2006-2012

No part of this manual may be reproduced or transmitted in any form or by any means, electronic or
mechanical, including photocopying and recording, for any purpose without the express written permission of
a duly authorized representative of ClassX srl.

The information contained within this manual is believed to be true and correct at the time of publication.

ClassX, CastaliaCG, MoreCG, CoralCG, CGPlayout, LiveBoard, SGL, TemplateActions, LiveStadium,


FrameMarker are registered trademarks of ClassX srl.

All other brand names are trademarks of their respective holders.

© Copyright 2000-2011 ClassX srl. All rights reserved. Unpublished rights reserved under International
copyright laws..
1 Introduction
Use of video titling applications to scrolling is only a limit for anyone with a modern conception of graphic
television environment.
Therefore, it is increasingly necessary to take into account that the realization of a project may require the
display of graphics data is not yet known, no present or variable over time, even during the same issue. It is a
striking example of the realization of a newsticker which will be displayed in real-time news and headlines from
external suppliers in the form of files, both locally and remotely.

ClassX we have developed the DataSource, a technology that allows you to turn any graphic design (MoreCG,
CastaliaCG, CoralCG) in a template, ie a scheme, in which content can be associated with external data sources.

As can be seen from the diagram, using DataSource you can assign multiple sources of data to multiple
graphics objects within the same project. This makes it possible to create complex templates to display an
indeterminate number of independent newstickers, scroll, etc. effects. The template, being itself a graphic
design, can be arranged as desired and contain static graphics, dynamic, and everything covered by the
possibilities of MoreCG, CastaliaCG and CoralCG.

1
2 DataSource
Currently MoreCG, CastaliaCG and CoralCG support these types of data sources: text files, files in
XLS, CSV, Database, manual, SMS text messages. To connect a project to one or more data sources,
simply press the button that appears in the picture.

The panel "Data Source Editor" is divided into two parts: the left displays all objects in the project, the right
one displays the appropriate controls to manage the data source.

This area allows you to associate a data source in conjunction with one or more items (via multi-selection).
Each object and uniquely identified by the "Field ID" value assigned automatically when you save. The Field ID
allows applications ClassX to establish a unique connection between the object and its current value. This
feature allows you to save the value of the object and then reload it later.

In general, once the object selected, the user simply selects a data source list and open the file on. If the
initialization of the data source is successful, the panel shows a preview area on the underside and the controls
for customization.
Type the combobox shows all supported data sources:

 Manual: Allows you to manually edit the contents of CGPlayout.


 Text File: allows you to import txt file.
 CSV file: import the CSV file.
 XLS: You can import files in XLS format.
 SMS Text: links to the content of an SMS.
 XML File: Import XML file using tags compatible with RSS
 Database: allows you to connect to Database MySQL and SQLServer.

2
After setting the type of source, you can click on the file using the button below, depicting a folder. The black
tab allows you to view the list of recently used resources.

The buttons Cut, Copy, Paste operations allow you to do the same operations of a data source.
Using these tools along with the multi-selection of multiple objects, you can associate the
same data source to multiple objects simultaneously.te.

Through this instrument, and can also change the data source using the default editor from the
operating system. It important to note that the interface does not update automatically after editing the
data source. For this reason, must re-initialize the data source by pressing "Enter" in the field that
displays the file name.

The property "Use value as description" allows LiveBoard to describe the


selected record with the current value assigned to the object. The two buttons
in the picture on the right show how LiveBoard displays at the top (above the name of
the project "ballaro_ospite.ccg") a description of the current record. In this example,
the project is connected to a data source csv file and the description of the record
contains only one line of that file. By enabling the option "use value as a description of"
the current record is described by the value of eliminating all other values useless.

Each data source is assigned a unique value called "ID". This value is automatically assigned by the panel
according to the type of data source if the source data is based on a file or url, same as the ID assigned to the
file name without extension, but if you type database, ID assigned equal to the name of the database. The
automatic assignment can be turned off via the button which is located next to the text field that displays the
current ID.
The ID is used by ClassX Applications to identify one or more data sources on which to perform certain
operations that allow you to manage and update the current record data sources.

3
2.1 Text File

With this type of source data, making newstickers, charts, presentations, statistics that change their content
dynamically is very easy and fast.

Consider a newsticker made with a project that shows, in a text object is moving horizontally, all the
information. By linking this object to a txt file, you can change the content dynamically by simply changing the
associated text file as data source.
The contents of a text file can be interpreted according to these settings:

 "Ignore empty lines" if enabled, allows you to ignore empty lines.


 "Trim Line" delete spaces at the beginning and end of the line.
 "Join lines with" allows you to specify a text to be placed between a line and the other as a unifying
element.

Recordset: to interpret the contents of the text file as a sequence of records. The records are determined
based on the character of separation that can be specified in the combobox " record separator". The
separators are supported "Enter", comma "," semicolon ";". The "Trim records" allows you to skip blank
records. All records are displayed in a list in the preview area in which each record is identified by a number.
Once you set the RecordSet, it is displayed in the Preview.

4
2.2 CSV File
The CSV file format allows to manage your content organized into columns. The columns of data are identified
by a "field separator", and each row is determined by the carriage return. Following this syntax the contents of
a CSV file can be arranged in a table (see figure).

The "field separator" in a combobox shows the characters ("," ";" "Tab") that can be used to identify a
column.
The "trim fields" allows you to remove empty space at the beginning and end of the value contained in each
field.
The "text delimiter" allows you to define the character that encloses the text in each field. To better
understand the functionality of this option, consider this example:

 a, b, c, d defines a 4 columns for each value


 "A, b, c", "d" defines 2 columns. The field separators (",") contained between text delimiters ("'") are
ignored.

The selection of a column in the table defines what values we want to associate the CSV file to our graphics.
The field "Sort" option enables the sorting specified by the control column "Column".
The sort can be ascending or descending order from A to Z, or Z to A. The elements of a column are sorted
lexicographically. If the column contains only numbers, you must enable the option " As numbers" so that the
ordering is correct.

5
2.3 Record ID
For simplicity, a source of data can be organized as a table where each column contains the values to display
on the basis of each line. Each of them is considered a record. In particular, it should be noted that the change
of line is a change of values corresponding to its columns.
What is the Record ID?
The Record ID is nothing but a number that identifies which row (or record) of our table we want to use. In
particular for XLS data source is associated with the record sheet, and not to the single line of each sheet. In
this way, the change of the sheet, there is a corresponding change of data.

The Record ID for each data source is managed dynamically by the broadcast software (LiveBoard or
CGPlayout). In this way the operator, modifying the record, change the values of various objects.
The Record ID can then be dynamically ("From external") or fixed ("selected"). In the first case is the
broadcast software that selects and manages the current record in the second case the record is fixed and will
not change.
The offset value indicates an advance over the current record. In this way, if you bind to multiple objects at a
different offset, we derive the advancement of the record, the value of these objects will be the sum of the
current record plus the offset value. In this way the source can be interpreted conceptually data in consecutive
groups of records. This feature is of great importance when it becomes necessary to make an animation graphic
that displays a set of data organized into pages. Suppose you want to create a CastaliaCG template graph that
shows the weather of five cities in rotation, connected to a CSV file that also integrates data like minimum and
maximum temperature of each city.

6
Using the field offset, you can assign to our objects the value of the offset (or displacement) that the record
must make within the rising column of data.

Although the concept may be complex, its application is extremely basic.


For each cycle of the graphic template set with the help of NextRecord (via Template Action) or remotely,
the object will display the data corresponding to the record not in position +1 but position + offset. (if we are
on the record with ID or position 7, and 5 we set as an offset, the information displayed will be the one
corresponding to the record ID or position 12).
In the event that the number of records is not a multiple of the offset to a maximum set of objects, setting the
"Loop Record," will also be displayed automatically records at the beginning (if we have 17 records and want
to display data at a time 5, the 4 cycle graphic template, you will get the record with ID: 15, 16, 0, 1, 2).

DataSource used on the template in the .CSV format

Enabling the "cache of images from URL", you avoid drop frames during play contents from the web that
would take time to download. With pre-loaded operation, each image linked to a URL, it is immediately available
without any waiting time.

7
2.4 XLS File
A file in XLS format allows you to organize content in a spreadsheet that can be treated as a table composed of
cells whose value is arbitrarily defined. A XLS files can contain multiple spreadsheets each identified by a proper
name.

To exemplify the use of an XLS file as a data source we can think of a graphic designer to display the formation
of one or more football teams.
In this case, it is convenient to create an XLS file to organize the names of the players in assigned positions,
creating multiple sheets, each one for each championship team.
The objects of graphic design will then be connected each to its source, and then to his cell in our XLS.
Selecting the cells in the spreadsheet a list of values that define each object can take. Changing sheet according
to the team and keeping the selection, the associated values change accordingly.
A project is composed of a proper template and is ready to be run by CGPlayout for the final broadcast.

The combobox "Paper source" defines the source from which to read data sheet:

From external: the paper source can be changed dynamically by CGPlayout or LiveBoard.
Selected: associates as the paper source is currently selected, without any possibility of external control.

8
The red box defines the initial value to associate with the object. It can be set via the right click of the mouse.

The controls placed in the bottom allow you to import from an XLS file, not only the text of each single cell, but
also the color, font and alignment.

NOTE: If the contents of a file used as source data is changed during the assignment, simply reload the file by
pressing "Enter" in the text box that shows the name.

Tech notes
When you create an XLS file to handle such a ranking, for cells that contain numbers, you must specify the type
"Numeric". The XLS data source automatically recognizes all the formats available for a cell from a simple
numeric field, the percentage, the date and time format etc..
The data sources not currently support XLS formulas, graphs, various types of edge of a cell, and macro cells
defined with more than one font or style.

XLS components are not supported:

 Graphs
 Rich Text: refers to cells with multiple fonts and styles.
 Border: If you want different types of cell border.
 Macro

Warning: it's very important for cells that contain a numeric value to specify the number format. For
example if we consider a classification, the cells that contain points of its teams must have the format type
"Number" with "0 decimal places."

In general, if the preview does not reflect the original XLS file in the representation of cell contents, and
recommended by a program to edit the XLS file, specify the format of the appropriate cell.

2.5 SMS Text


This type of data source allows you to associate an object to the content of an SMS. In this way you can create
custom designs for use with LiveSMSPlayer, for displaying text. As for the details of using this data source,
please refer to the reading of the LiveSMS manual user.

9
2.6 XML File
A file in XML format allows you to organize data and content as if it were so many records in a database. Each
record contains more columns or fields that are determined by the XML tags used
In this case, the source XML data only recognizes XML tags compatible with RSS 2.0 and earlier: Channel, Title,
Description, Image, Link, Publication date, Category.

The data from the XML file, after being interpreted, are displayed in a table where each row represents a record
and each column represents an XML tag.
Each object in the graphic design can be connected to a column simply by selecting with the mouse.
In some cases the elements of an XML file can contain information in HTML format. By enabling the option
"Delete HTML tag" the content of the selected field will be filtered to remove all the information in HTML
format.

2.7 How to attach images, media and files with external data sources
All Supported File let you specify the DataSource data only in text format. This does not mean that you can
create templates with images or multimedia files from external data.

Image objects, QTVideo, AVIVideo can be connected to the DataSource and interpret the data as a text path
specification (either network, via a local URL) of the resource to display.

For example, we could create a CSV file with your name and photo of a player simply by dialing a list so made:

“Pippo Inzaghi”;”picture/calciatori/inzaghi.jpg”
“Alessandro Del Piero”;”picture/calciatori/delpiero.jpg”

Once the source data is interpreted, each graphical object connected to it trying to display data according to its
kind: a text object will show the name of the player, an image object will show the photo of the player playing
as the data path image file to upload.

In the specific file paths for images and multimedia data in general and can use absolute paths, relative or
support network where:

for
path absolute: “C:\grafica\picture\calciatori\inzaghi.jpg”

10
path relative: “picture\calciatori\delpiero.jpg”
path of network: “http://www.classx.it/logo.jpg”

the resolution of relative paths to the following rules:

1) the resource is sought in the application directory (editor) who created the template (eg MoreCG or
CastaliaCG).
2) If not present, the resource is looked for in the current application directory (typically the playout
graph: CGPlayout, LiveBoard).
3) If not present, the resource is looked up in the directory of resources shared by applications.

We decided to further facilitate the task of those who will produce files of data sources connected to external
files by introducing particular variables (MACRO) that will be interpreted (EXPANDED) ready to use:

MACRO EXPANDED

{shared.dir} → c:\programmi\classx\shared
{user.dir} → c:\programmi\classx\<applicazione>
{base.dir} → c:\programmi\classx

Therefore, the paths may be written as follows:

path absolute: “C:\grafica\picture\calciatori\inzaghi.jpg”


path relative: “{user.dir}\picture\calciatori\delpiero.jpg”
path shared: “{shared.dir}\picture\calciatori\delpiero.jpg”
path of network: “http://www.classx.it/logo.jpg”

2.8 Histograms with the SHAPE object


The objects of type Shape (ObjShape) can be connected to data sources in order to quickly create histograms
and graphical displays for data and statistics in general. In this case, the data from the DataSource are
interpreted as a numerical percentage value (from 0 to 100) on the horizontal dimension (Width) set in the
object during its creation.

Warning: The number formatting for decimal separators, and dozens have to follow the English
localization: comma "," for separators, period "." For decimals. Any syntax errors in formatting will not allow
the recognition of numbers.

11
2.9 Database
This type of data source provides access to MySQL and SQLServer databases. The connection is by specifying
host, port, user, password, database name.

Once the connection parameters have been entered to do is insert the "Query" and press the button
representing the play icon to display the result. If the query fails the application displays the error found in a
window. Conversely, if the query is successful it will be displayed at the bottom in a table.

Each object in the graphic design can be connected to a column simply by selecting with the mouse. By
enabling the option "selected" in the combobox 'Source Record' and you can choose which line to use in the
selected column. If you select this option instead of "outdoor" line will be managed dynamically by the
broadcast graphics software that will use the graphic design that we are changing.

The "trim field” allows you to remove empty space at the beginning and end of the value contained in each
field.

12
2.10 Social Network
The Social Network DataSource allows you to read the information contained in a Twitter profile or a "Like"
page on Facebook.
The operation is very simple. Once selected from the list the type of social networks (Twitter or Facebook), you
must enter the user name of the source page.
For this field is proper to make a distinction between two types of social network:

• Twitter: You can enter the username with or without the "@" (ex.: "@ classxdev" or "classxdev").
• Facebook: You can enter the page ID or unique name that identifies it (ex.: "179161458793927" or
"ASUS").

In the settings panel, "Load new messages" displays only the new messages, and not to recycle existing
already transmitted.

From row "Order", you can instead choose to sort messages, for example by date in ascending or by author,
using every available field.

13
General Index
1 INTRODUCTION................................................................................................................................................ 1

2 DATASOURCE................................................................................................................................................... 2
2.1 TEXT FILE....................................................................................................................................................... 4
2.2 CSV FILE....................................................................................................................................................... 5
2.3 RECORD ID.................................................................................................................................................... 6
2.4 XLS FILE....................................................................................................................................................... 8
2.5 SMS TEXT..................................................................................................................................................... 9
2.6 XML FILE....................................................................................................................................................... 9
2.7 HOW TO ATTACH IMAGES, MEDIA AND FILES WITH EXTERNAL DATA SOURCES............................................................10
2.8 HISTOGRAMS WITH THE SHAPE OBJECT.......................................................................................................... 11
2.9 DATABASE..................................................................................................................................................... 11
2.10 SOCIAL NETWORK........................................................................................................................................ 12

14

You might also like