-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
164 lines (136 loc) · 7.87 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Rapid Mashup Challenge 2016 Demo</title>
<script>Polymer = {dom: 'shadow'};</script>
<script src="smartcomposition/bower_components/webcomponentsjs/webcomponents.min.js"></script>
<link rel="import" href="smartcomposition/bower_components/polymer/polymer.html">
<link rel="import" href="smartcomposition/SmartComponent.html">
<link rel="import" href="smartcomposition/AttributeLink.html">
<link rel="import" href="smartcomposition/MessagingService.html">
<link rel="import" href="components/all.html">
<link rel="import" href="components/attribute-linker.html">
<link rel="stylesheet" href="normalize.css">
<link rel="stylesheet" href="style.css">
<link href='https://fonts.googleapis.com/css?family=Roboto:400,300,100,500' rel='stylesheet' type='text/css'>
</head>
<body>
<attribute-linker></attribute-linker>
<input type="text" id="inpDeviceName" placeholder="Device Name" onchange="this.setAttribute('value', this.value)">
<component-selector>
<option value="text-input">TEXT INPUT</option>
<option value="simple-chart">SIMPLE CHART</option>
<option value="nytimes-news">NY TIMES NEWS</option>
<option value="translate-text">TRANSLATE TEXT</option>
<option value="semantic-extraction">SEMANTIC EXTRACTION</option>
<option value="youtube-search">YOUTUBE SEARCH</option>
<option value="smart-video">SMART VIDEO</option>
<option value="flickr-images">FLICKR IMAGES</option>
<option value="google-geocoder">GOOGLE GEOCODER</option>
<option value="google-map">GOOGLE MAP</option>
<option value="wikipedia-extract">WIKIPEDIA EXTRACT</option>
<option value="twitter-tweets">TWITTER TWEETS</option>
<option value="current-weather">CURRENT WEATHER</option>
<option value="philips-hue">PHILIPS HUE</option>
</component-selector><br>
<attribute-link source="#inpDeviceName@value" target="messaging-service@client-name"></attribute-link>
<attribute-link target="#inpDeviceName@value" source="messaging-service@client-name"></attribute-link>
<div class="row">
<div class="col app">
<!--<smart-video><source src="cars2.mkv" type="video/mp4" /></smart-video>-->
<!--<smart-video youtube-url="https://www.youtube.com/watch?v=zsg0aSTkkWY"></smart-video>-->
<smart-video youtube-url="https://www.youtube.com/watch?v=5O7ajur4eLo"></smart-video>
</div>
<div class="col col-30 app">
<youtube-search query="Lugano"></youtube-search>
</div>
</div>
<div class="row">
<div class="col group">
<h2>Geographical Information</h2>
<div class="row">
<div class="col horizontal app" style="white-space: nowrap;">
<google-map id="gmap1" lat="52.1" lng="12.3" zoom="11"></google-map>
</div>
<div class="col app">
<simple-chart id="chart3" type="temperature" value="25" min="-10" max="50" style="width:30px;height:200px"></simple-chart><br>
<input id="inpTemp" type="text" readonly value="25 Degrees" style="width:90px; text-align:center; border:none"><br>
<select id="cityselect" onchange="this.setAttribute('value', this.value)">
<option>Chemnitz</option>
<option>Lugano</option>
<option>New York</option>
<option>London</option>
</select><br>
<input id="inpText" type="text" placeholder="Location" onchange="this.setAttribute('value', this.value)">
</div>
<div class="col app"">
<google-map id="gmap2" lat="52.1" lng="12.3" map-type="satellite"></google-map>
</div>
</div>
</div>
<div class="col group">
<h2>Images</h2>
<div class="app" style="width:calc(100% - 2em - 3px)">
<flickr-images></flickr-images>
</div>
</div>
</div>
<div class="row">
<div class="col app">
<h2>Wikipedia</h2>
<wikipedia-extract></wikipedia-extract>
</div>
<div class="col app">
<h2>Twitter</h2>
<twitter-tweets></twitter-tweets>
</div>
<div class="col app">
<h2>New York Times</h2>
<nytimes-news></nytimes-news>
</div>
</div>
<div class="row">
<div class="col col-25 app">
<philips-hue></philips-hue>
</div>
</div>
<!-- data processing components / no UI -->
<translate-text from="de" to="en"></translate-text>
<google-geocoder id="geocode"></google-geocoder>
<google-geocoder id="geocode_reverse" reverse></google-geocoder>
<current-weather></current-weather>
<semantic-extraction></semantic-extraction>
<!-- declarative inter component communication -->
<messaging-service endpoint="http://localhost:9001">
<attribute-link source="#gmap1@lat" target="#gmap2@lat"></attribute-link>
<attribute-link source="#gmap1@lng" target="#gmap2@lng"></attribute-link>
<attribute-link source="#gmap1@zoom" target="#gmap2@zoom"></attribute-link>
<attribute-link source="#cityselect@value" target="#inpText@value"></attribute-link>
<attribute-link source="#inpText@value" target="#geocode@address"></attribute-link>
<attribute-link source="#inpText@value" target="current-weather@city"></attribute-link>
<attribute-link source="#inpText@value" target="wikipedia-extract@query"></attribute-link>
<attribute-link source="current-weather@temperature" target="#chart3@value"></attribute-link>
<attribute-link source="current-weather@temperature" target="#inpTemp@value" transformation="source + ' Degrees'"></attribute-link>
<attribute-link source="#geocode@lat" target="#gmap1@lat"></attribute-link>
<attribute-link source="#geocode@lng" target="#gmap1@lng"></attribute-link>
<attribute-link source="nytimes-news@text" target="semantic-extraction@text"></attribute-link>
<attribute-link source="youtube-search@video-url" target="smart-video@youtube-url"></attribute-link>
<attribute-link source="smart-video@text_en" target="semantic-extraction@text"></attribute-link>
<attribute-link source="smart-video@text_de" target="translate-text@text"></attribute-link>
<attribute-link source="translate-text@translated-text" target="semantic-extraction@text"></attribute-link>
<attribute-link source="smart-video@current-color" target="philips-hue@color"></attribute-link>
<attribute-link source="semantic-extraction@location" target="youtube-search@query" transformation="(JSON.parse(source))[0]"></attribute-link>
<attribute-link source="semantic-extraction@person" target="youtube-search@query" transformation="(JSON.parse(source))[0]"></attribute-link>
<attribute-link source="semantic-extraction@organization" target="youtube-search@query" transformation="(JSON.parse(source))[0]"></attribute-link>
<attribute-link source="semantic-extraction@location" target="#inpText@value" transformation="(JSON.parse(source))[0]"></attribute-link>
<attribute-link source="semantic-extraction@location" target="flickr-images@query" transformation="(JSON.parse(source))[0]"></attribute-link>
<attribute-link source="semantic-extraction@location" target="wikipedia-extract@query" transformation="(JSON.parse(source))[0]"></attribute-link>
<attribute-link source="semantic-extraction@location" target="twitter-tweets@query" transformation="(JSON.parse(source))[0]"></attribute-link>
<attribute-link source="semantic-extraction@person" target="flickr-images@query" transformation="(JSON.parse(source))[0]"></attribute-link>
<attribute-link source="semantic-extraction@organization" target="wikipedia-extract@query" transformation="(JSON.parse(source))[0]"></attribute-link>
<attribute-link source="semantic-extraction@organization" target="twitter-tweets@query" transformation="(JSON.parse(source))[1] || (JSON.parse(source))[0]"></attribute-link>
</messaging-service>
</body>
</html>