{"id":50858,"date":"2023-05-16T00:00:00","date_gmt":"2023-05-16T07:00:00","guid":{"rendered":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/%e6%9c%aa%e5%88%86%e9%a1%9e\/creating-a-simple-data-viz-tool-with-java-and-griddb\/"},"modified":"2025-11-14T07:56:12","modified_gmt":"2025-11-14T15:56:12","slug":"creating-a-simple-data-viz-tool-with-java-and-griddb","status":"publish","type":"post","link":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/creating-a-simple-data-viz-tool-with-java-and-griddb\/","title":{"rendered":"Java\u3068GridDB\u306b\u3088\u308b\u30b7\u30f3\u30d7\u30eb\u306a\u30c7\u30fc\u30bf\u53ef\u8996\u5316\u30c4\u30fc\u30eb\u306e\u4f5c\u6210"},"content":{"rendered":"<p>\u672c\u8a18\u4e8b\u3067\u306f\u3001\u4e3b\u306bGridDB\u306e\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092Web\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u958b\u767a\u3057\u3001\u52d5\u7684\u306a\u53ef\u8996\u5316\u3092\u5b9f\u73fe\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u7d39\u4ecb\u3057\u307e\u3059\u3002\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306f\u3001GitHub\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/github.com\/jianxiang78\/DataVisualization\">https:\/\/github.com\/jianxiang78\/DataVisualization<\/a><\/p>\n<p>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u304c\u5b9f\u884c\u3055\u308c\u305f\u5f8c\u3001\u30ed\u30fc\u30ab\u30eb\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u306e\u30d6\u30e9\u30a6\u30b6\u306b\u30a2\u30c9\u30ec\u30b9 http:\/\/127.0.0.1:8080 \u3092\u5165\u529b\u3057\u307e\u3059\u3002\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8\u306e\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u52b9\u679c\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<p><a href=\"https:\/\/griddb.net\/wp-content\/uploads\/2023\/05\/DataVisualization.gif\"><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/griddb.net\/wp-content\/uploads\/2023\/05\/DataVisualization.gif\" alt=\"\" width=\"720\" height=\"314\" class=\"aligncenter size-full wp-image-29566\" \/><\/a><\/p>\n<pre><code>Technology Stack\nOperating System: Ubuntu-18.04.6\nFront-end: HTML, JavaScript, ECharts 5.4.0, WebSocket\nBack-end: Java 11.0.2, Spring Boot, WebSocket, Maven\nDevelopment tool: IntelliJ IDEA 2019\nDatabase: GridDB 5.1.0\n<\/code><\/pre>\n<p>\u3053\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306f\u3001\u30b7\u30f3\u30d7\u30eb\u3067\u5b8c\u5168\u306aWEB\u30de\u30a4\u30af\u30ed\u30b5\u30fc\u30d3\u30b9\u30b7\u30b9\u30c6\u30e0\u3067\u3059\u3002\u3053\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306f\u3001\u30e2\u30ce\u306e\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u30b7\u30ca\u30ea\u30aa\u306b\u304a\u3051\u308b\u6e29\u5ea6\u8a08\u306e\u30c7\u30fc\u30bf\u4f1d\u9001\u3092\u30b7\u30df\u30e5\u30ec\u30fc\u30c8\u3057\u3001\u30a6\u30a7\u30d6\u4e0a\u3067\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u306b\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306e\u5909\u5316\u3092\u53ef\u8996\u5316\u3057\u307e\u3059\u3002\u30a6\u30a7\u30d6\u30da\u30fc\u30b8\u3092\u958b\u3044\u305f\u5f8c\u3001\u30a6\u30a7\u30d6\u30da\u30fc\u30b8\u3092\u66f4\u65b0\u3059\u308b\u5fc5\u8981\u304c\u306a\u304f\u3001\u30c7\u30fc\u30bf\u306e\u5909\u5316\u3092\u30a6\u30a7\u30d6\u30da\u30fc\u30b8\u306b\u76f4\u63a5\u8868\u793a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u6e29\u5ea6\u8a08\u306e\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306fGridDB\u306b\u683c\u7d0d\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30b3\u30fc\u30c9\u3067\u306f\u3001\u30bf\u30a4\u30e0\u30c9\u30bf\u30b9\u30af\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\u3001GridDB\u306b\u5e38\u306b\u633f\u5165\u3055\u308c\u308b\u30e2\u30ce\u306e\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u30c7\u30d0\u30a4\u30b9\u306e\u30c7\u30fc\u30bf\u3092\u30b7\u30df\u30e5\u30ec\u30fc\u30c8\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u306f\u3001ECharts\u3092\u4f7f\u3063\u3066\u30b2\u30fc\u30b8\u3092\u8868\u793a\u3057\u3001SockJs\u3068Stomp\u3092\u4f7f\u3063\u3066WebSocket\u3067\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u3068\u901a\u4fe1\u3057\u3066\u3044\u307e\u3059\u3002\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u306fSpringBoot\u3092\u4f7f\u3063\u3066WebSocket\u306e\u30b5\u30fc\u30d0\u30fc\u30a8\u30f3\u30c9\u3092\u5b9f\u88c5\u3057\u3001GridDB\u304b\u3089\u30c7\u30fc\u30bf\u3092\u62bd\u51fa\u3057\u3001\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u306b\u30c7\u30fc\u30bf\u3092\u8ee2\u9001\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u79c1\u306e\u30ed\u30fc\u30ab\u30ebOS\u306fUbuntu &#8211; 18.04.6\u3092\u4f7f\u7528\u3057\u3066\u304a\u308a\u3001GridDB\u3092\u30ed\u30fc\u30ab\u30eb\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u624b\u9806\u306f\u3001\u516c\u5f0f\u30b5\u30a4\u30c8\u3092\u53c2\u7167\u3059\u308b\u3053\u3068\u3067\u975e\u5e38\u306b\u7c21\u5358\u306b\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u306e\u30ea\u30f3\u30af\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n<p><a href=\"https:\/\/docs.griddb.net\/gettingstarted\/using-apt\/#install-with-apt-get\">https:\/\/docs.griddb.net\/gettingstarted\/using-apt\/#install-with-apt-get<\/a><\/p>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305fGridDB\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306f5.1.0\u3067\u3059\u3002\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5f8c\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u63a5\u7d9a\u3059\u308b\u305f\u3081\u306egridstore.jar\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u7d44\u307f\u8fbc\u307e\u308c\u3066\u3044\u307e\u3059\u3002\u305d\u308c\u3092\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30b3\u30fc\u30c9\u306e &#8220;lib &#8220;\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30b3\u30d4\u30fc\u3057\u3066\u3044\u307e\u3059\u3002gridstore.jar\u30e9\u30a4\u30d6\u30e9\u30ea\u306fJDK11.0.2\u3067\u958b\u767a\u3055\u308c\u3066\u3044\u308b\u305f\u3081\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u5168\u4f53\u3067\u3082\u4e92\u63db\u6027\u306e\u305f\u3081\u306bJDK11.0.2\u3092\u4f7f\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u3067\u306e\u901a\u4fe1\u306e\u78ba\u7acb\u65b9\u6cd5<\/h2>\n<p>\u3053\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u306f\u3001\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u3068\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u304c\u30ed\u30f3\u30b0\u30ea\u30f3\u30af\u901a\u4fe1\u3092\u78ba\u7acb\u3067\u304d\u308bWebSocket\u30e2\u30fc\u30c9\u3092\u63a1\u7528\u3057\u3066\u3044\u307e\u3059\u3002\u79c1\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30d5\u30a1\u30a4\u30ebindex.html\u306b\u30013\u3064\u306eJavaScript\u30e9\u30a4\u30d6\u30e9\u30ea\u30d5\u30a1\u30a4\u30eb\u3092\u5c0e\u5165\u3057\u307e\u3059\u3002\u30b3\u30fc\u30c9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n<pre><code>&lt;script src=\".\/js\/echarts\/echarts.min.js\"&gt;&lt;\/script&gt; \n&lt;script src=\".\/js\/sockjs-0.3.4.js\"&gt;&lt;\/script&gt; \n&lt;script src=\".\/js\/stomp.js\"&gt;&lt;\/script&gt;\n<\/code><\/pre>\n<p>\u30d5\u30a1\u30a4\u30ebindex.html\u3067\u306f\u3001ECharts\u3092\u4f7f\u7528\u3057\u3066\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u3092\u8868\u793a\u3057\u3001SockJs\u3068Stomp\u3092\u4f7f\u7528\u3057\u3066WebSocket\u306e\u30ed\u30f3\u30b0\u30ea\u30f3\u30af\u3092\u5b8c\u6210\u3055\u305b\u307e\u3059\u3002\u30ab\u30b9\u30bf\u30e0\u95a2\u6570fromServer()\u3067\u30ed\u30f3\u30b0\u30ea\u30f3\u30af\u3092\u5b9f\u88c5\u3057\u3066\u3044\u307e\u3059\u3002\u30b3\u30fc\u30c9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">function fromServer() {\n        var stomp = null;\n        function connect() {\n            var socket = new SockJS('\/webSocketServer');\n            stomp = Stomp.over(socket);\n            var headers={\n                \"token\":\"data_token\"\n            };\n            stomp.connect(headers, connectCallback ,errorCallback );\n        };\n        function connectCallback (frame) {\n            \/\/Callback function after successful connection\n            console.log('Connected successful: ' + frame);\n            stomp.subscribe('\/data\/iot1', function(serverResult){\n                myChart1.setOption(JSON.parse(serverResult.body));\n            });\n            stomp.subscribe('\/data\/iot2', function(serverResult){\n                myChart2.setOption(JSON.parse(serverResult.body));\n            });\n        }\n        function errorCallback(frame){\n            \/\/The callback function after the connection fails. This function calls the connection function again\n            console.log('Connected fails: ' + frame);\n            setTimeout(connect,2000);\n        }\n        connect();\n    }<\/code><\/pre>\n<\/div>\n<p>\u4e0a\u306e\u30b3\u30fc\u30c9\u306e<\/p>\n<pre><code>  var socket = new SockJS('\/webSocketServer');\n<\/code><\/pre>\n<p>\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u306e\u30a2\u30c9\u30ec\u30b9 &#8220;\/webSocketServer&#8221; \u3068\u30cf\u30f3\u30c9\u30b7\u30a7\u30a4\u30af\u3059\u308b\u305f\u3081\u306e\u5909\u6570\u30bd\u30b1\u30c3\u30c8\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002\u3053\u306e &#8220;\/webSocketServer&#8221; \u3068\u3044\u3046\u30a2\u30c9\u30ec\u30b9\u306f\u3001\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u306eSpringBoot\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u30a2\u30af\u30bb\u30b9\u30dd\u30a4\u30f3\u30c8\u3067\u3059\u3002\u3053\u306e\u8a2d\u5b9a\u306b\u3064\u3044\u3066\u306f\u3001\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3067\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n<pre><code>  stomp = Stomp.over(socket);\n<\/code><\/pre>\n<p>\u5909\u6570stomp\u3092\u5b9a\u7fa9\u3057\u3001\u901a\u4fe1\u306bSTOMP\u30d7\u30ed\u30c8\u30b3\u30eb\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<pre><code>  stomp.connect(headers, connectCallback ,errorCallback );\n<\/code><\/pre>\n<p>\u30ea\u30f3\u30af\u306e\u78ba\u7acb\u3092\u958b\u59cb\u3057\u3001connectCallback()\u3068errorCallback()\u3068\u3044\u30462\u3064\u306e\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u95a2\u6570\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002\u305d\u308c\u305e\u308c\u63a5\u7d9a\u6210\u529f\u3068\u63a5\u7d9a\u5931\u6557\u3092\u51e6\u7406\u3057\u307e\u3059\u3002<\/p>\n<h2>\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u3067\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u8ee2\u9001\u3059\u308b\u65b9\u6cd5<\/h2>\n<p>SpringBoot\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u306f\u3001\u307e\u305aWebSocket\u306e\u30a2\u30af\u30bb\u30b9\u30dd\u30a4\u30f3\u30c8\u3092\u8a2d\u5b9a\u3059\u308b\u3002\u3053\u3053\u3067\u306f\u300c\/webSocketServer\u300d\u3068\u3044\u3046\u30a2\u30c9\u30ec\u30b9\u3092\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002WebSocketConfig.java\u3068\u3044\u3046\u30af\u30e9\u30b9\u3067\u8a2d\u5b9a\u3057\u307e\u3059\u3002\u30b3\u30fc\u30c9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">package com.auto17.dataVisualization.config;\n\nimport org.springframework.context.annotation.Configuration;\nimport org.springframework.messaging.simp.config.MessageBrokerRegistry;\nimport org.springframework.web.socket.config.annotation.EnableWebSocketMessageBroker;\nimport org.springframework.web.socket.config.annotation.StompEndpointRegistry;\nimport org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer;\n\n@Configuration\n@EnableWebSocketMessageBroker\npublic class WebSocketConfig implements WebSocketMessageBrokerConfigurer {\n\n    @Override\n    public void registerStompEndpoints(StompEndpointRegistry registry) {\n        registry.addEndpoint(\"\/webSocketServer\")\n                .setAllowedOrigins(\"*\")\n                .withSockJS();\n    }\n\n    @Override\n    public void configureMessageBroker(MessageBrokerRegistry registry) {\n        registry.enableSimpleBroker(\"\/data\");\n    }\n}<\/code><\/pre>\n<\/div>\n<p>dbConnect.java \u306f\u3001GridDB \u306e\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306e\u64cd\u4f5c\u3092\u5b9f\u88c5\u3059\u308b\u30af\u30e9\u30b9\u3067\u3059\u3002\u672c\u30af\u30e9\u30b9\u306e\u30e1\u30bd\u30c3\u30c9\u306b\u3064\u3044\u3066\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<p>getConnect() : GridDB \u306e\u63a5\u7d9a\u7372\u5f97\u3092\u5b9f\u73fe\u3059\u308b<br \/>\nclose() : GridDB \u306e\u63a5\u7d9a\u3092\u9589\u3058\u308b<br \/>\nput(String containerName, Iot iot) : \u6642\u7cfb\u5217\u30c7\u30fc\u30bf\u306e\u633f\u5165\u3092\u5b9f\u73fe\u3059\u308b<br \/>\nqueryTopOne(String containerName) : \u6642\u7cfb\u5217\u30c7\u30fc\u30bf\u306e\u6700\u65b0\u30a2\u30a4\u30c6\u30e0\u306e\u62bd\u51fa\u3092\u5b9f\u73fe\u3059\u308b<\/p>\n<p>Iot.java \u30af\u30e9\u30b9\u304c\u30c7\u30d0\u30a4\u30b9\u30c7\u30fc\u30bf\u306e\u30a8\u30f3\u30c6\u30a3\u30c6\u30a3\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u3042\u308a\u3001GridDB \u306e @RowKey \u3068\u3044\u3046\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3057\u3066\u4e3b\u30ad\u30fc\u3092\u30de\u30fc\u30af\u3057\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">package com.auto17.dataVisualization.DTO;\n\nimport com.toshiba.mwcloud.gs.RowKey;\nimport java.util.Date;\n\npublic class Iot {\n    @RowKey Date timestamp;\n    String name;\n    int value;\n    public Iot(){}\n    public String getName() {\n        return name;\n    }\n    public void setName(String name) {\n        this.name = name;\n    }\n    public int getValue() {\n        return value;\n    }\n    public void setValue(int value) {\n        this.value = value;\n    }\n}<\/code><\/pre>\n<\/div>\n<p>\u3053\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u306f\u3001Internet of Things\u30c7\u30d0\u30a4\u30b9\u304c\u9001\u4fe1\u3059\u308b\u30c7\u30fc\u30bf\u3092\u30b7\u30df\u30e5\u30ec\u30fc\u30c8\u3059\u308b\u305f\u3081\u306b\u3001\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u3055\u308c\u305f\u30bf\u30b9\u30af\u3092\u5b9f\u884c\u3059\u308b\u30af\u30e9\u30b9TaskSimulate.java\u304c\u4f5c\u6210\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u3053\u306e\u30af\u30e9\u30b9\u3067\u306f\u3001\u30bf\u30a4\u30df\u30f3\u30b0\u30bf\u30b9\u30af\u306b2\u3064\u306e\u30b7\u30df\u30e5\u30ec\u30fc\u30bf\u3092\u8868\u3059\u95a2\u6570simulator1()\u3068simulator2()\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u3089\u306e\u95a2\u6570\u306f\u3001\u30b7\u30df\u30e5\u30ec\u30fc\u30b7\u30e7\u30f3\u30c7\u30fc\u30bf\u3092\u751f\u6210\u3057\u3001GridDB\u306b\u633f\u5165\u3057\u307e\u3059\u3002\u30b3\u30fc\u30c9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">@Component\npublic class TaskSimulate {\n    ...\n    @Scheduled(cron =\"*\/3 * * * * ?\")\n    public void simulator1() {\n        ...\n    }\n\n    @Scheduled(cron =\"*\/5 * * * * ?\")\n    public void simulator2() {\n        ...\n    }\n}<\/code><\/pre>\n<\/div>\n<p>\u307e\u305f\u3001IotTask.java \u306b\u306f\u3001\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u3055\u308c\u305f\u30bf\u30b9\u30af\u3092\u5b9f\u884c\u3059\u308b IoT1() \u3068 IoT2() \u3068\u3044\u3046\u95a2\u6570\u304c\u5b58\u5728\u3057\u307e\u3059\u3002\u3053\u308c\u3089\u306e\u95a2\u6570\u306f\u3001GridDB\u304b\u3089\u5bfe\u5fdc\u3059\u308b\u30c7\u30d0\u30a4\u30b9\u306e\u30c7\u30fc\u30bf\u3092\u62bd\u51fa\u3059\u308b\u305f\u3081\u306b\u52d5\u4f5c\u3057\u307e\u3059\u3002\u5f97\u3089\u308c\u305f\u30c7\u30fc\u30bf\u306f\u3001WebSocket\u3092\u901a\u3058\u3066\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u306b\u30d7\u30c3\u30b7\u30e5\u3055\u308c\u307e\u3059\u3002\u4ee5\u4e0b\u306f\u305d\u306e\u30b3\u30fc\u30c9\u3067\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">package com.auto17.dataVisualization.iot;\n\nimport com.alibaba.fastjson.JSONArray;\nimport com.alibaba.fastjson.JSONObject;\nimport com.auto17.dataVisualization.DTO.Iot;\nimport com.auto17.dataVisualization.grid.dbConnect;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\nimport org.springframework.messaging.simp.SimpMessagingTemplate;\nimport org.springframework.scheduling.annotation.Scheduled;\nimport org.springframework.stereotype.Component;\n\n@Component\npublic class IotTask {\n    public static SimpMessagingTemplate messagingTemplate=null;\n\n    private final Logger logger = LoggerFactory.getLogger(IotTask.class);\n    private int index;\n    private Iot iot;\n\n    \/\/Execute every X seconds\n    @Scheduled(fixedRate = 1000 * 4)\n    public void IoT1(){\n        String iotName=\"iot1\";\n        iot = dbConnect.queryTopOne(iotName);\n        if(iot==null){\n            return;\n        }\n        index = iot.getValue();\n        logger.info(\"The server sends a message to the client [\"+iotName+\"]:\");\n\n        if(messagingTemplate!=null){\n            messagingTemplate.convertAndSend(\n                    \"\/data\/\"+iotName, ioTData(\"Temperature Gauge 1\",index));\n        }else {\n            logger.info(iotName+\" messagingTemplate is null\");\n        }\n    }\n\n    \/\/Execute every X seconds\n    @Scheduled(fixedRate = 1000 * 5)\n    public void IoT2(){\n        String iotName=\"iot2\";\n        iot = dbConnect.queryTopOne(iotName);\n        if(iot==null){\n            return;\n        }\n        index = iot.getValue();\n        logger.info(\"The server sends a message to the client [\"+iotName+\"]:\");\n        if(messagingTemplate!=null){\n            messagingTemplate.convertAndSend(\n                    \"\/data\/\"+iotName, ioTData(\"Temperature Gauge 2\",index));\n        }else {\n            logger.info(iotName+\" messagingTemplate is null\");\n        }\n    }\n\n    private String ioTData(String name,int value) {\n        JSONArray arrayRoot=new JSONArray();\n        JSONObject data1=new JSONObject();\n        JSONArray arrayNode1=new JSONArray();\n        JSONObject Node1=new JSONObject();\n        data1.put(\"name\",name);\n        data1.put(\"value\",value);\n        arrayNode1.add(data1);\n        Node1.put(\"data\",arrayNode1);\n        arrayRoot.add(Node1);\n\n        JSONObject data2=new JSONObject();\n        JSONArray arrayNode2=new JSONArray();\n        JSONObject Node2=new JSONObject();\n        data2.put(\"name\",name);\n        data2.put(\"value\",value);\n        arrayNode2.add(data2);\n        Node2.put(\"data\",arrayNode2);\n        arrayRoot.add(Node2);\n\n        JSONObject ioTData=new JSONObject();\n        ioTData.put(\"series\",arrayRoot);\n        return ioTData.toJSONString();\n    }\n}<\/code><\/pre>\n<\/div>\n<p>\u4e0a\u8a18\u306e\u30b3\u30fc\u30c9\u3067\u306f\u3001\u95a2\u6570 ioTData(String name, int value)\u304c\u30c7\u30fc\u30bf\u3092JSON\u5f62\u5f0f\u306b\u5909\u63db\u3057\u3066\u3044\u307e\u3059\u3002\u307e\u305f\u3001\u540c\u3058\u30c7\u30fc\u30bf\u3092\u4fdd\u5b58\u3059\u308b\u305f\u3081\u306b\u3001\u30c7\u30fc\u30bf\u7fa4\u3054\u3068\u306b2\u3064\u306e\u30ce\u30fc\u30c9\u3092\u4f5c\u6210\u3057\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u306f\u3001Echarts\u306eTemperature Gauge\u304c\u52b9\u679c\u3092\u8868\u793a\u3059\u308b\u305f\u3081\u306b\u3001\u4e00\u5ea6\u306b2\u3064\u306e\u30ce\u30fc\u30c9\u30c7\u30fc\u30bf\u3092\u5fc5\u8981\u3068\u3059\u308b\u305f\u3081\u3067\u3059\u3002<\/p>\n<p>\u672c\u7a3f\u3067\u306f\u3001GridDB\u306e\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306b\u5bfe\u3059\u308b\u30c7\u30fc\u30bf\u53ef\u8996\u5316\u306e\u7c21\u5358\u306a\u5b9f\u88c5\u306e\u6982\u8981\u3092\u8aac\u660e\u3057\u3066\u3044\u307e\u3059\u3002Internet of Things\u306e\u30d3\u30b8\u30cd\u30b9\u30b7\u30ca\u30ea\u30aa\u3067\u306f\u3001\u4f55\u5343\u3082\u306eInternet of Things\u30c7\u30d0\u30a4\u30b9\u304c\u5b58\u5728\u3057\u3001\u305d\u306e\u30c7\u30fc\u30bf\u306f\u81a8\u5927\u306a\u91cf\u306b\u306a\u308a\u307e\u3059\u3002\u672c\u8a18\u4e8b\u3067\u306f\u3001\u305d\u306e\u30a2\u30a4\u30c7\u30a2\u3092\u63d0\u4f9b\u3057\u3066\u304a\u308a\u307e\u3059\u3002\u3082\u3057\u8208\u5473\u304c\u3042\u308c\u3070\u3001GitHub\u304b\u3089\u30b3\u30fc\u30c9\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u30ed\u30fc\u30ab\u30eb\u3067\u7c21\u5358\u306b\u5b9f\u884c\u3059\u308b\u65b9\u6cd5<\/h2>\n<p>GitHub\u304b\u3089\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30b3\u30fc\u30c9\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u5f8c\u3001ZIP\u5727\u7e2e\u3055\u308c\u305f\u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u89e3\u51cd\u5f8c\u3001\u30b3\u30fc\u30c9\u306f\u300cDataVisualization\u300d\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u3042\u308a\u307e\u3059\u3002\u958b\u767a\u30c4\u30fc\u30eb\u306eIntelliJ IDEA\u3067\u3001\u30d5\u30a1\u30a4\u30eb\u2192\u65b0\u898f\u2192\u65e2\u5b58\u306e\u30bd\u30fc\u30b9\u304b\u3089\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u901a\u3057\u3066\u3001\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u300cDataVisualization\u300d\u3092\u6307\u5b9a\u3059\u308b\u3068\u3001Maven\u30e2\u30fc\u30c9\u3067\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30b3\u30fc\u30c9\u3092\u8aad\u307f\u8fbc\u3080\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u300cpom.xml\u300d\u3067\u3001Jar\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u30f3\u30b0\u69cb\u6210\u3092\u8a2d\u5b9a\u3057\u307e\u3057\u305f\u3002Maven\u3067\u300cinstall\u300d\u64cd\u4f5c\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u30b5\u30d6\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u300ctarget\u300d\u306e\u4e0b\u306b\u3001\u30e2\u30b8\u30e5\u30fc\u30eb\u300cmicro-web.jar\u300d\u304c\u751f\u6210\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u751f\u6210\u3055\u308c\u305f\u300cmicro-web.jar\u300d\u306f\u3001Tomcat\u306eWeb\u30b3\u30f3\u30c6\u30ca\u3067\u5b9f\u884c\u53ef\u80fd\u306aJar\u30e9\u30a4\u30d6\u30e9\u30ea\u3068\u306a\u308a\u307e\u3059\u3002\u30b3\u30de\u30f3\u30c9\u3092\u5165\u529b\u3057\u307e\u3059\u3002<\/p>\n<pre><code>Java -jar micro-web.jar\n<\/code><\/pre>\n<p>Web\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u8d77\u52d5\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u8d77\u52d5\u5f8c\u3001Web\u30d6\u30e9\u30a6\u30b6\u306b\u30a2\u30c9\u30ec\u30b9 &#8220;http:\/\/127.0.0.1:8080&#8221; \u3092\u5165\u529b\u3057\u307e\u3059\u3002\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30b3\u30fc\u30c9\u306e\u30c7\u30e2\u52b9\u679c\u3092\u898b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u8a18\u4e8b\u3067\u306f\u3001\u4e3b\u306bGridDB\u306e\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092Web\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u958b\u767a\u3057\u3001\u52d5\u7684\u306a\u53ef\u8996\u5316\u3092\u5b9f\u73fe\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u7d39\u4ecb\u3057\u307e\u3059\u3002\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306f\u3001GitHub\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3055\u308c\u3066\u3044\u307e\u3059\u3002 https:\/\/github. [&hellip;]<\/p>\n","protected":false},"author":41,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1005],"tags":[],"class_list":["post-50858","post","type-post","status-publish","format-standard","hentry","category-1005"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Java\u3068GridDB\u306b\u3088\u308b\u30b7\u30f3\u30d7\u30eb\u306a\u30c7\u30fc\u30bf\u53ef\u8996\u5316\u30c4\u30fc\u30eb\u306e\u4f5c\u6210 | GridDB: Open Source Time Series Database for IoT<\/title>\n<meta name=\"description\" content=\"\u672c\u8a18\u4e8b\u3067\u306f\u3001\u4e3b\u306bGridDB\u306e\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092Web\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u958b\u767a\u3057\u3001\u52d5\u7684\u306a\u53ef\u8996\u5316\u3092\u5b9f\u73fe\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u7d39\u4ecb\u3057\u307e\u3059\u3002\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306f\u3001GitHub\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/griddb.net\/ja\/\u672a\u5206\u985e\/creating-a-simple-data-viz-tool-with-java-and-griddb\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Java\u3068GridDB\u306b\u3088\u308b\u30b7\u30f3\u30d7\u30eb\u306a\u30c7\u30fc\u30bf\u53ef\u8996\u5316\u30c4\u30fc\u30eb\u306e\u4f5c\u6210 | GridDB: Open Source Time Series Database for IoT\" \/>\n<meta property=\"og:description\" content=\"\u672c\u8a18\u4e8b\u3067\u306f\u3001\u4e3b\u306bGridDB\u306e\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092Web\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u958b\u767a\u3057\u3001\u52d5\u7684\u306a\u53ef\u8996\u5316\u3092\u5b9f\u73fe\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u7d39\u4ecb\u3057\u307e\u3059\u3002\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306f\u3001GitHub\" \/>\n<meta property=\"og:url\" content=\"https:\/\/griddb.net\/ja\/\u672a\u5206\u985e\/creating-a-simple-data-viz-tool-with-java-and-griddb\/\" \/>\n<meta property=\"og:site_name\" content=\"GridDB: Open Source Time Series Database for IoT\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/griddbcommunity\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-05-16T07:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-11-14T15:56:12+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/griddb.net\/wp-content\/uploads\/2023\/05\/DataVisualization.gif\" \/>\n<meta name=\"author\" content=\"griddb-admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@GridDBCommunity\" \/>\n<meta name=\"twitter:site\" content=\"@GridDBCommunity\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"griddb-admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"4\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/creating-a-simple-data-viz-tool-with-java-and-griddb\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/creating-a-simple-data-viz-tool-with-java-and-griddb\/\"},\"author\":{\"name\":\"griddb-admin\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233\"},\"headline\":\"Java\u3068GridDB\u306b\u3088\u308b\u30b7\u30f3\u30d7\u30eb\u306a\u30c7\u30fc\u30bf\u53ef\u8996\u5316\u30c4\u30fc\u30eb\u306e\u4f5c\u6210\",\"datePublished\":\"2023-05-16T07:00:00+00:00\",\"dateModified\":\"2025-11-14T15:56:12+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/creating-a-simple-data-viz-tool-with-java-and-griddb\/\"},\"wordCount\":136,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization\"},\"image\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/creating-a-simple-data-viz-tool-with-java-and-griddb\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/griddb.net\/wp-content\/uploads\/2023\/05\/DataVisualization.gif\",\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/creating-a-simple-data-viz-tool-with-java-and-griddb\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/creating-a-simple-data-viz-tool-with-java-and-griddb\/\",\"url\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/creating-a-simple-data-viz-tool-with-java-and-griddb\/\",\"name\":\"Java\u3068GridDB\u306b\u3088\u308b\u30b7\u30f3\u30d7\u30eb\u306a\u30c7\u30fc\u30bf\u53ef\u8996\u5316\u30c4\u30fc\u30eb\u306e\u4f5c\u6210 | GridDB: Open Source Time Series Database for IoT\",\"isPartOf\":{\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/creating-a-simple-data-viz-tool-with-java-and-griddb\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/creating-a-simple-data-viz-tool-with-java-and-griddb\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/griddb.net\/wp-content\/uploads\/2023\/05\/DataVisualization.gif\",\"datePublished\":\"2023-05-16T07:00:00+00:00\",\"dateModified\":\"2025-11-14T15:56:12+00:00\",\"description\":\"\u672c\u8a18\u4e8b\u3067\u306f\u3001\u4e3b\u306bGridDB\u306e\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092Web\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u958b\u767a\u3057\u3001\u52d5\u7684\u306a\u53ef\u8996\u5316\u3092\u5b9f\u73fe\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u7d39\u4ecb\u3057\u307e\u3059\u3002\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306f\u3001GitHub\",\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/creating-a-simple-data-viz-tool-with-java-and-griddb\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/creating-a-simple-data-viz-tool-with-java-and-griddb\/#primaryimage\",\"url\":\"https:\/\/griddb.net\/wp-content\/uploads\/2023\/05\/DataVisualization.gif\",\"contentUrl\":\"https:\/\/griddb.net\/wp-content\/uploads\/2023\/05\/DataVisualization.gif\"},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#website\",\"url\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/\",\"name\":\"GridDB: Open Source Time Series Database for IoT\",\"description\":\"GridDB is an open source time-series database with the performance of NoSQL and convenience of SQL\",\"publisher\":{\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ja\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization\",\"name\":\"Fixstars\",\"url\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png\",\"contentUrl\":\"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png\",\"width\":200,\"height\":83,\"caption\":\"Fixstars\"},\"image\":{\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/griddbcommunity\/\",\"https:\/\/x.com\/GridDBCommunity\",\"https:\/\/www.linkedin.com\/company\/griddb-by-toshiba\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233\",\"name\":\"griddb-admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5bceca1cafc06886a7ba873e2f0a28011a1176c4dea59709f735b63ae30d0342?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/5bceca1cafc06886a7ba873e2f0a28011a1176c4dea59709f735b63ae30d0342?s=96&d=mm&r=g\",\"caption\":\"griddb-admin\"},\"url\":\"https:\/\/griddb.net\/ja\/author\/griddb-admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Java\u3068GridDB\u306b\u3088\u308b\u30b7\u30f3\u30d7\u30eb\u306a\u30c7\u30fc\u30bf\u53ef\u8996\u5316\u30c4\u30fc\u30eb\u306e\u4f5c\u6210 | GridDB: Open Source Time Series Database for IoT","description":"\u672c\u8a18\u4e8b\u3067\u306f\u3001\u4e3b\u306bGridDB\u306e\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092Web\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u958b\u767a\u3057\u3001\u52d5\u7684\u306a\u53ef\u8996\u5316\u3092\u5b9f\u73fe\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u7d39\u4ecb\u3057\u307e\u3059\u3002\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306f\u3001GitHub","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/griddb.net\/ja\/\u672a\u5206\u985e\/creating-a-simple-data-viz-tool-with-java-and-griddb\/","og_locale":"ja_JP","og_type":"article","og_title":"Java\u3068GridDB\u306b\u3088\u308b\u30b7\u30f3\u30d7\u30eb\u306a\u30c7\u30fc\u30bf\u53ef\u8996\u5316\u30c4\u30fc\u30eb\u306e\u4f5c\u6210 | GridDB: Open Source Time Series Database for IoT","og_description":"\u672c\u8a18\u4e8b\u3067\u306f\u3001\u4e3b\u306bGridDB\u306e\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092Web\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u958b\u767a\u3057\u3001\u52d5\u7684\u306a\u53ef\u8996\u5316\u3092\u5b9f\u73fe\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u7d39\u4ecb\u3057\u307e\u3059\u3002\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306f\u3001GitHub","og_url":"https:\/\/griddb.net\/ja\/\u672a\u5206\u985e\/creating-a-simple-data-viz-tool-with-java-and-griddb\/","og_site_name":"GridDB: Open Source Time Series Database for IoT","article_publisher":"https:\/\/www.facebook.com\/griddbcommunity\/","article_published_time":"2023-05-16T07:00:00+00:00","article_modified_time":"2025-11-14T15:56:12+00:00","og_image":[{"url":"https:\/\/griddb.net\/wp-content\/uploads\/2023\/05\/DataVisualization.gif","type":"","width":"","height":""}],"author":"griddb-admin","twitter_card":"summary_large_image","twitter_creator":"@GridDBCommunity","twitter_site":"@GridDBCommunity","twitter_misc":{"\u57f7\u7b46\u8005":"griddb-admin","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"4\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/creating-a-simple-data-viz-tool-with-java-and-griddb\/#article","isPartOf":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/creating-a-simple-data-viz-tool-with-java-and-griddb\/"},"author":{"name":"griddb-admin","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233"},"headline":"Java\u3068GridDB\u306b\u3088\u308b\u30b7\u30f3\u30d7\u30eb\u306a\u30c7\u30fc\u30bf\u53ef\u8996\u5316\u30c4\u30fc\u30eb\u306e\u4f5c\u6210","datePublished":"2023-05-16T07:00:00+00:00","dateModified":"2025-11-14T15:56:12+00:00","mainEntityOfPage":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/creating-a-simple-data-viz-tool-with-java-and-griddb\/"},"wordCount":136,"commentCount":0,"publisher":{"@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization"},"image":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/creating-a-simple-data-viz-tool-with-java-and-griddb\/#primaryimage"},"thumbnailUrl":"https:\/\/griddb.net\/wp-content\/uploads\/2023\/05\/DataVisualization.gif","inLanguage":"ja","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/creating-a-simple-data-viz-tool-with-java-and-griddb\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/creating-a-simple-data-viz-tool-with-java-and-griddb\/","url":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/creating-a-simple-data-viz-tool-with-java-and-griddb\/","name":"Java\u3068GridDB\u306b\u3088\u308b\u30b7\u30f3\u30d7\u30eb\u306a\u30c7\u30fc\u30bf\u53ef\u8996\u5316\u30c4\u30fc\u30eb\u306e\u4f5c\u6210 | GridDB: Open Source Time Series Database for IoT","isPartOf":{"@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/creating-a-simple-data-viz-tool-with-java-and-griddb\/#primaryimage"},"image":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/creating-a-simple-data-viz-tool-with-java-and-griddb\/#primaryimage"},"thumbnailUrl":"https:\/\/griddb.net\/wp-content\/uploads\/2023\/05\/DataVisualization.gif","datePublished":"2023-05-16T07:00:00+00:00","dateModified":"2025-11-14T15:56:12+00:00","description":"\u672c\u8a18\u4e8b\u3067\u306f\u3001\u4e3b\u306bGridDB\u306e\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092Web\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u958b\u767a\u3057\u3001\u52d5\u7684\u306a\u53ef\u8996\u5316\u3092\u5b9f\u73fe\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u7d39\u4ecb\u3057\u307e\u3059\u3002\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306f\u3001GitHub","inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/creating-a-simple-data-viz-tool-with-java-and-griddb\/"]}]},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/creating-a-simple-data-viz-tool-with-java-and-griddb\/#primaryimage","url":"https:\/\/griddb.net\/wp-content\/uploads\/2023\/05\/DataVisualization.gif","contentUrl":"https:\/\/griddb.net\/wp-content\/uploads\/2023\/05\/DataVisualization.gif"},{"@type":"WebSite","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#website","url":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/","name":"GridDB: Open Source Time Series Database for IoT","description":"GridDB is an open source time-series database with the performance of NoSQL and convenience of SQL","publisher":{"@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ja"},{"@type":"Organization","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization","name":"Fixstars","url":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/","logo":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/logo\/image\/","url":"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png","contentUrl":"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png","width":200,"height":83,"caption":"Fixstars"},"image":{"@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/griddbcommunity\/","https:\/\/x.com\/GridDBCommunity","https:\/\/www.linkedin.com\/company\/griddb-by-toshiba"]},{"@type":"Person","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233","name":"griddb-admin","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/5bceca1cafc06886a7ba873e2f0a28011a1176c4dea59709f735b63ae30d0342?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5bceca1cafc06886a7ba873e2f0a28011a1176c4dea59709f735b63ae30d0342?s=96&d=mm&r=g","caption":"griddb-admin"},"url":"https:\/\/griddb.net\/ja\/author\/griddb-admin\/"}]}},"_links":{"self":[{"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/posts\/50858","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/comments?post=50858"}],"version-history":[{"count":1,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/posts\/50858\/revisions"}],"predecessor-version":[{"id":51684,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/posts\/50858\/revisions\/51684"}],"wp:attachment":[{"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/media?parent=50858"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/categories?post=50858"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/tags?post=50858"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}