diff --git a/lib/mysql-connector-java-5.0.5-bin.jar b/lib/mysql-connector-java-5.0.5-bin.jar deleted file mode 100755 index af8ec67..0000000 Binary files a/lib/mysql-connector-java-5.0.5-bin.jar and /dev/null differ diff --git a/lib/mysql-connector-java-5.1.12-bin.jar b/lib/mysql-connector-java-5.1.12-bin.jar new file mode 100644 index 0000000..af5847e Binary files /dev/null and b/lib/mysql-connector-java-5.1.12-bin.jar differ diff --git a/nbproject/private/private.properties b/nbproject/private/private.properties index a726549..a753feb 100644 --- a/nbproject/private/private.properties +++ b/nbproject/private/private.properties @@ -1,6 +1,7 @@ compile.on.save=false do.depend=false do.jar=true +file.reference.mysql-connector-java-5.0.5-bin.jar=/Users/Stefano/Desktop/FreimapSte/Freimap/hg/lib/mysql-connector-java-5.1.12-bin.jar javac.debug=true javadoc.preview=true jaxbwiz.endorsed.dirs=/Applications/NetBeans/NetBeans 6.8.app/Contents/Resources/NetBeans/ide12/modules/ext/jaxb/api diff --git a/nbproject/project.properties b/nbproject/project.properties index b0a9747..74b81e1 100755 --- a/nbproject/project.properties +++ b/nbproject/project.properties @@ -27,6 +27,7 @@ file.reference.jfreechart-1.0.4.jar=lib/jfreechart-1.0.4.jar file.reference.jmdns.jar=lib/jmdns.jar file.reference.jyaml-1.3.jar=lib/jyaml-1.3.jar file.reference.mysql-connector-java-5.0.5-bin.jar=lib/mysql-connector-java-5.0.5-bin.jar +file.reference.mysql-connector-java-5.1.12-bin.jar=lib/mysql-connector-java-5.1.12-bin.jar file.reference.swing-worker.jar=lib/swing-worker.jar file.reference.swingx-bean.jar=lib/swingx-bean.jar file.reference.swingx-ws-2009_06_14.jar=lib/swingx-ws-2009_06_14.jar @@ -49,7 +50,8 @@ javac.classpath=\ ${file.reference.swingx-bean.jar}:\ ${file.reference.swingx.jar}:\ ${libs.absolutelayout.classpath}:\ - ${libs.swing-layout.classpath} + ${libs.swing-layout.classpath}:\ + ${file.reference.mysql-connector-java-5.1.12-bin.jar} # Space-separated list of extra javac options javac.compilerargs= javac.deprecation=false diff --git a/src/FileMngmt/FileMenu.java b/src/FileMngmt/FileMenu.java new file mode 100644 index 0000000..fabcd43 --- /dev/null +++ b/src/FileMngmt/FileMenu.java @@ -0,0 +1,100 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package FileMngmt; + +import java.io.BufferedReader; +import java.io.FileReader; +import javax.swing.JMenu; +import javax.swing.JMenuItem; + +/** + * + * @author stefanopilla + */ +public class FileMenu { + public FileMenu(String path){ + addRecentFile(String path); + } + + + public void addRecentFile(String path) { + if (verifyRecentFile()) { + recentMenuItem.setEnabled(true); + try { + FileReader fr = new FileReader(path); + BufferedReader reader = new BufferedReader(fr); + String line; + int i = 0; + while ((line = reader.readLine()) != null) { + final String[] result = line.split(","); + for (i = 0; i < result.length; i = i + 2) { + freimapgsoc.LayerForm.recentMenuItem = new JMenuItem(result[i]); + freimapgsoc.LayerForm.recentMenuItem.setToolTipText(result[i + 1]); + freimapgsoc.LayerForm.recentMenuItem.add(freimapgsoc.LayerForm.recentMenuItem, i); + path = result[i + 1]; + freimapgsoc.LayerForm.recentMenuItem.addActionListener(new java.awt.event.ActionListener() { + + public void actionPerformed(java.awt.event.ActionEvent evt) { + freimapgsoc.newRecentFileActionPerformed(evt, path); + } + }); + + + } + reader.close(); + fr.close(); + + } + } catch (IOException e) { + System.out.println(e.getMessage()); + } + } + } + + /* + public void addRecentFile(final String path, String name) { + try { + if (verifyRecentFile()) { + recentFilesMenu.setEnabled(true); + JMenuItem newRecentFile = new JMenuItem(name); + recentFilesMenu.add(newRecentFile, recentFilesMenu.getItemCount() - 2); + newRecentFile.addActionListener(new java.awt.event.ActionListener() { + + public void actionPerformed(java.awt.event.ActionEvent evt) { + newRecentFileActionPerformed(evt, path); + } + }); + newRecentFile.setToolTipText(path); + PrintStream output = new PrintStream(new FileOutputStream(recentFile.getPath())); + output.append(name + "," + path); + } else if (!verifyRecentFile()) { + recentFile.createNewFile(); + recentFilesMenu.setEnabled(true); + JMenuItem newRecentFile = new JMenuItem(name); + newRecentFile.addActionListener(new java.awt.event.ActionListener() { + + public void actionPerformed(java.awt.event.ActionEvent evt) { + newRecentFileActionPerformed(evt, path); + } + }); + recentFilesMenu.add(newRecentFile, recentFilesMenu.getItemCount() - 2); + newRecentFile.setToolTipText(path); + PrintStream output = new PrintStream(new FileOutputStream(recentFile.getPath())); + output.append(name + "," + path); + } + } catch (FileNotFoundException ex) { + ex.getMessage(); + } catch (IOException io) { + io.getMessage(); + } + }*/ + + private boolean verifyRecentFile() { + throw new UnsupportedOperationException("Not yet implemented"); + } + + private JMenu recentMenu; +} diff --git a/src/PopUp/PopUp.java b/src/PopUp/PopUp.java index c5a31c0..1a90777 100755 --- a/src/PopUp/PopUp.java +++ b/src/PopUp/PopUp.java @@ -40,7 +40,12 @@ */ public class PopUp extends javax.swing.JFrame implements ServiceListener, ServiceTypeListener, ListSelectionListener { - @SuppressWarnings("static-access") + /** + * + * @param ip + * @return + */ + @SuppressWarnings("static-access") public PopUp(String ip) { System.out.println("Costructor PopUP(String ip)"); initComponents(); @@ -362,11 +367,13 @@ public void deleteDuplicate(JList list) { //IMPLEMENT ME....! } - /** This method is called from within the constructor to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the Form Editor. - */ + /** + * This method is called from within the constructor to + * initialize the form. + * WARNING: Do NOT modify this code. The content of this method is + * always regenerated by the Form Editor. + * @return + */ @SuppressWarnings("unchecked") // //GEN-BEGIN:initComponents private void initComponents() { diff --git a/src/PopUp/linkInfo.java b/src/PopUp/linkInfo.java index 67076fc..c19cc42 100644 --- a/src/PopUp/linkInfo.java +++ b/src/PopUp/linkInfo.java @@ -22,11 +22,13 @@ public linkInfo() { initComponents(); } - /** This method is called from within the constructor to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the Form Editor. - */ + /** + * This method is called from within the constructor to + * initialize the form. + * WARNING: Do NOT modify this code. The content of this method is + * always regenerated by the Form Editor. + * @return + */ @SuppressWarnings("unchecked") // //GEN-BEGIN:initComponents private void initComponents() { diff --git a/src/data/freimapdump.sql b/src/data/freimapdump.sql new file mode 100644 index 0000000..ea09625 --- /dev/null +++ b/src/data/freimapdump.sql @@ -0,0 +1,126 @@ +# Sequel Pro dump +# Version 1630 +# http://code.google.com/p/sequel-pro +# +# Host: 127.0.0.1 (MySQL 5.1.44) +# Database: pinco +# Generation Time: 2010-03-20 22:56:25 +0100 +# ************************************************************ + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + + +# Dump of table FLOWS +# ------------------------------------------------------------ + +DROP TABLE IF EXISTS `FLOWS`; + +CREATE TABLE `FLOWS` ( + `RECNUM` bigint(20) unsigned zerofill NOT NULL AUTO_INCREMENT, + `PROBE` varchar(16) NOT NULL DEFAULT '', + `TIME_RECEIVED` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `FLOW_VERSION` tinyint(4) NOT NULL DEFAULT '0', + `SEQUENCE` bigint(20) unsigned zerofill NOT NULL DEFAULT '00000000000000000000', + `SOURCE_IP` varchar(16) NOT NULL DEFAULT '', + `SOURCE_PORT` int(11) NOT NULL DEFAULT '0', + `DEST_IP` varchar(16) NOT NULL DEFAULT '', + `DEST_PORT` int(11) NOT NULL DEFAULT '0', + `NEXT_HOP` varchar(16) NOT NULL DEFAULT '', + `PROTOCOL` int(11) NOT NULL DEFAULT '0', + `TCP_FLAGS` int(11) NOT NULL DEFAULT '0', + `TOS` int(11) NOT NULL DEFAULT '0', + `BYTES` bigint(20) unsigned NOT NULL DEFAULT '0', + `PACKETS` bigint(20) unsigned NOT NULL DEFAULT '0', + `FLOW_BEGIN` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `FLOW_END` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `SOURCE_AS` int(11) NOT NULL DEFAULT '0', + `DEST_AS` int(11) NOT NULL DEFAULT '0', + `SOURCE_MASK` smallint(6) NOT NULL DEFAULT '0', + `DEST_MASK` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`RECNUM`), + KEY `k_begin` (`FLOW_BEGIN`), + KEY `k_end` (`FLOW_END`), + KEY `k_time` (`TIME_RECEIVED`), + KEY `k_src` (`SOURCE_IP`), + KEY `k_dst` (`DEST_IP`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; + + + +# Dump of table Layer +# ------------------------------------------------------------ + +DROP TABLE IF EXISTS `Layer`; + +CREATE TABLE `Layer` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `srcnode` varchar(32) NOT NULL, + `clock` timestamp NULL DEFAULT NULL, + `destnode` varchar(32) NOT NULL, + PRIMARY KEY (`id`), + KEY `srcnode` (`srcnode`), + KEY `destnode` (`destnode`), + CONSTRAINT `layer_ibfk_1` FOREIGN KEY (`srcnode`) REFERENCES `links` (`src`), + CONSTRAINT `layer_ibfk_2` FOREIGN KEY (`destnode`) REFERENCES `links` (`dest`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + + + +# Dump of table links +# ------------------------------------------------------------ + +DROP TABLE IF EXISTS `links`; + +CREATE TABLE `links` ( + `clock` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `src` varchar(32) NOT NULL DEFAULT '', + `dest` varchar(32) NOT NULL DEFAULT '', + `lq` float DEFAULT NULL, + `nlq` float DEFAULT NULL, + `etx` float DEFAULT NULL, + PRIMARY KEY (`clock`,`src`,`dest`), + KEY `src` (`src`), + KEY `dest` (`dest`), + CONSTRAINT `links_ibfk_2` FOREIGN KEY (`dest`) REFERENCES `nodes` (`ip`), + CONSTRAINT `links_ibfk_1` FOREIGN KEY (`src`) REFERENCES `nodes` (`ip`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + + + +# Dump of table nodes +# ------------------------------------------------------------ + +DROP TABLE IF EXISTS `nodes`; + +CREATE TABLE `nodes` ( + `lon` float DEFAULT '12.5535', + `lat` float DEFAULT '41.8638', + `ip` varchar(32) NOT NULL, + `name` varchar(32) NOT NULL, + `isGateway` binary(1) NOT NULL, + `gatewayIp` varchar(32) NOT NULL, + `uptime` time DEFAULT NULL, + `interfaces` varchar(50) DEFAULT NULL, + PRIMARY KEY (`name`), + KEY `ip` (`ip`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + + + + + + +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; diff --git a/src/data/latlon.js b/src/data/latlon.js index 71e2676..5af31a1 100755 --- a/src/data/latlon.js +++ b/src/data/latlon.js @@ -18,16 +18,13 @@ Node('104.128.30.21',52.525982,13.314444,0,'0.0.0.0','relet'); Node('77.87.50.121',52.544476,13.352702,0,'0.0.0.0','tfh-test'); Node('77.87.50.66',52.525986,13.314315,0,'0.0.0.0','fokus-3009'); Node('77.87.50.82',52.525986,13.314317,1,'0.0.0.0','hertz'); -Node('104.128.30.21',52.525923,13.314374,0,'0.0.0.0','PincoPallino'); Node('104.128.30.8',52.533921,13.314374,1,'77.87.50.121','Prova1'); +Node('104.128.30.51',52.521927,13.374374,0,'0.0.0.0','Prova4'); Node('104.128.30.24',52.545525,13.314374,0,'0.0.0.0','Prova2'); Node('77.87.48.78',52.55925,13.324374,0,'0.0.0.0','Prova3'); -Node('104.128.30.51',52.521925,13.374374,0,'0.0.0.0','Prova4'); Link('77.87.50.121','104.128.30.8',1.000,1.000,1.000); Link('104.128.30.51','104.128.30.21',1.000,0.420,2.383); -Link('104.128.30.51','104.128.30.21',0.851,0.918,1.281); Link('77.87.48.78','77.87.48.35',0.165,0.596,10.186); -Link('104.128.30.21','104.128.30.51',0.420,1.000,2.383); Link('104.128.30.21','104.128.30.51',0.910,0.839,1.310); Link('77.87.48.78','77.87.50.66',1.000,1.000,1.000); Link('77.87.48.78','77.87.50.72',1.000,1.000,1.000); @@ -37,9 +34,7 @@ Link('77.87.50.70','77.87.48.78',1.000,1.000,1.000); Link('77.87.50.71','77.87.48.78',1.000,1.000,1.000); Link('77.87.50.72','77.87.48.78',1.000,1.000,1.000); Link('77.87.50.82','77.87.48.78',1.000,1.000,1.000); -Link('104.128.30.21','104.128.30.21',1.000,0.408,2.452); Link('77.87.50.66','104.128.30.21',0.655,0.929,1.643); -Link('104.128.30.21','104.128.30.21',0.431,1.000,2.318); Link('77.87.50.66','77.87.50.82',1.000,1.000,1.000); Link('77.87.50.70','77.87.50.82',0.988,1.000,1.012); Link('77.87.50.71','77.87.50.82',1.000,1.000,1.000); diff --git a/src/data/log.txt b/src/data/log.txt index 17d52b3..eaf83b3 100644 --- a/src/data/log.txt +++ b/src/data/log.txt @@ -1 +1 @@ -Problem with loading components in MainLayer.java: e.getmessage() \ No newline at end of file +PopUp Message: There aren't input file to draw! Open a file from File -> Open menu \ No newline at end of file diff --git a/src/data/sqlnew.spf b/src/data/sqlnew.spf new file mode 100644 index 0000000..df9a6a3 --- /dev/null +++ b/src/data/sqlnew.spf @@ -0,0 +1,237 @@ + + + + + ContentFilters + + auto_connect + + data + + connection + + database + pinco + host + 127.0.0.1 + kcid + -563484802 + name + root@127.0.0.1 + type + SPTCPIPConnection + user + root + + session + + connectionEncoding + latin1 + contentPageNumber + 1 + contentSortColIsAsc + + contentViewport + {{0, 0}, {688, 455}} + isToolbarVisible + + table + Layer + view + SP_VIEW_STRUCTURE + + + encrypted + + format + connection + queryFavorites + + queryHistory + + CREATE DATABASE IF NOT EXISTS freimap; +use freimap; +DROP TABLE IF EXISTS layer; +DROP TABLE IF EXISTS links; +DROP TABLE IF EXISTS nodes; +DROP TABLE IF EXISTS flow; +DROP TABLE IF EXISTS nodes; +CREATE TABLE nodes ( + lon float DEFAULT '12.5535', + lat float DEFAULT '41.8638', + ip varchar(32) NOT NULL, + name varchar(32) NOT NULL, + isGateway binary(1) NOT NULL, + gatewayIp varchar(32) NOT NULL, + uptime time DEFAULT NULL, + interfaces varchar(50) DEFAULT NULL, + PRIMARY KEY (name), + KEY ip (ip) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +CREATE TABLE links ( + clock timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + src varchar(32) NOT NULL DEFAULT '', + dest varchar(32) NOT NULL DEFAULT '', + lq float DEFAULT NULL, + nlq float DEFAULT NULL, + etx float DEFAULT NULL, + PRIMARY KEY (clock,src,dest), + KEY src (src), + KEY dest (dest), + CONSTRAINT links_ibfk_2 FOREIGN KEY (dest) REFERENCES nodes (ip), + CONSTRAINT links_ibfk_1 FOREIGN KEY (src) REFERENCES nodes (ip) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +CREATE TABLE Layer ( + id int(11) NOT NULL AUTO_INCREMENT, + srcnode varchar(32) NOT NULL, + clock timestamp NULL DEFAULT NULL, + destnode varchar(32) NOT NULL, + PRIMARY KEY (id), + KEY srcnode (srcnode), + KEY destnode (destnode), + CONSTRAINT layer_ibfk_1 FOREIGN KEY (srcnode) REFERENCES links (src), + CONSTRAINT layer_ibfk_2 FOREIGN KEY (destnode) REFERENCES links (dest) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +CREATE TABLE FLOWS ( + RECNUM bigint(20) unsigned zerofill NOT NULL AUTO_INCREMENT, + PROBE varchar(16) NOT NULL DEFAULT '', + TIME_RECEIVED datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + FLOW_VERSION tinyint(4) NOT NULL DEFAULT '0', + SEQUENCE bigint(20) unsigned zerofill NOT NULL DEFAULT '00000000000000000000', + SOURCE_IP varchar(16) NOT NULL DEFAULT '', + SOURCE_PORT int(11) NOT NULL DEFAULT '0', + DEST_IP varchar(16) NOT NULL DEFAULT '', + DEST_PORT int(11) NOT NULL DEFAULT '0', + NEXT_HOP varchar(16) NOT NULL DEFAULT '', + PROTOCOL int(11) NOT NULL DEFAULT '0', + TCP_FLAGS int(11) NOT NULL DEFAULT '0', + TOS int(11) NOT NULL DEFAULT '0', + BYTES bigint(20) unsigned NOT NULL DEFAULT '0', + PACKETS bigint(20) unsigned NOT NULL DEFAULT '0', + FLOW_BEGIN datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + FLOW_END datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + SOURCE_AS int(11) NOT NULL DEFAULT '0', + DEST_AS int(11) NOT NULL DEFAULT '0', + SOURCE_MASK smallint(6) NOT NULL DEFAULT '0', + DEST_MASK smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (RECNUM), + KEY k_begin (FLOW_BEGIN), + KEY k_end (FLOW_END), + KEY k_time (TIME_RECEIVED), + KEY k_src (SOURCE_IP), + KEY k_dst (DEST_IP) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 + CREATE DATABASE IF NOT EXISTS freimap; +DROP TABLE IF EXISTS layer + CREATE SCHEMA IF NOT EXISTS freimap2; +use freimap2; +CREATE SCHEMA IF NOT EXISTS freimap2; +use freimap2; +DROP TABLE IF EXISTS layer; +DROP TABLE IF EXISTS links; +DROP TABLE IF EXISTS nodes; +DROP TABLE IF EXISTS flow; +CREATE TABLE nodes1 (lon float DEFAULT '12.5535',lat float DEFAULT '41.8638',ip varchar(32) NOT NULL,name varchar(32) NOT NULL,isGateway binary(1) NOT NULL,gatewayIp varchar(32) NOT NULL,uptime time DEFAULT NULL,interfaces varchar(50) DEFAULT NULL,PRIMARY KEY (name),KEY ip (ip)) ENGINE=InnoDB DEFAULT CHARSET=latin1; +CREATE TABLE links1 (clock timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',src varchar(32) NOT NULL DEFAULT '',dest varchar(32) NOT NULL DEFAULT '',lq float DEFAULT NULL,nlq float DEFAULT NULL,etx float DEFAULT NULL,PRIMARY KEY (clock,src,dest),KEY src (src),KEY dest (dest),CONSTRAINT links_ibfk_2 FOREIGN KEY (dest) REFERENCES nodes (ip),CONSTRAINT links_ibfk_1 FOREIGN KEY (src) REFERENCES nodes (ip)) ENGINE=InnoDB DEFAULT CHARSET=latin1; +CREATE TABLE Layer1 (id int(11) NOT NULL AUTO_INCREMENT,srcnode varchar(32) NOT NULL,clock timestamp NULL DEFAULT NULL,destnode varchar(32) NOT NULL,PRIMARY KEY (id),KEY srcnode (srcnode),KEY destnode (destnode),CONSTRAINT layer_ibfk_1 FOREIGN KEY (srcnode) REFERENCES links (src),CONSTRAINT layer_ibfk_2 FOREIGN KEY (destnode) REFERENCES links (dest)) ENGINE=InnoDB DEFAULT CHARSET=latin1; +CREATE TABLE FLOWS (RECNUM bigint(20) unsigned zerofill NOT NULL AUTO_INCREMENT,PROBE varchar(16) NOT NULL DEFAULT '',TIME_RECEIVED datetime NOT NULL DEFAULT '0000-00-00 00:00:00',FLOW_VERSION tinyint(4) NOT NULL DEFAULT '0',SEQUENCE bigint(20) unsigned zerofill NOT NULL DEFAULT '00000000000000000000',SOURCE_IP varchar(16) NOT NULL DEFAULT '',SOURCE_PORT int(11) NOT NULL DEFAULT '0',DEST_IP varchar(16) NOT NULL DEFAULT '',DEST_PORT int(11) NOT NULL DEFAULT '0',NEXT_HOP varchar(16) NOT NULL DEFAULT '',PROTOCOL int(11) NOT NULL DEFAULT '0',TCP_FLAGS int(11) NOT NULL DEFAULT '0',TOS int(11) NOT NULL DEFAULT '0',BYTES bigint(20) unsigned NOT NULL DEFAULT '0',PACKETS bigint(20) unsigned NOT NULL DEFAULT '0',FLOW_BEGIN datetime NOT NULL DEFAULT '0000-00-00 00:00:00',FLOW_END datetime NOT NULL DEFAULT '0000-00-00 00:00:00',SOURCE_AS int(11) NOT NULL DEFAULT '0',DEST_AS int(11) NOT NULL DEFAULT '0',SOURCE_MASK smallint(6) NOT NULL DEFAULT '0',DEST_MASK smallint(6) NOT NULL DEFAULT '0',PRIMARY KEY (RECNUM),KEY k_begin (FLOW_BEGIN),KEY k_end (FLOW_END),KEY k_time (TIME_RECEIVED),KEY k_src (SOURCE_IP),KEY k_dst (DEST_IP)) ENGINE=MyISAM DEFAULT CHARSET=latin1DROP TABLE IF EXISTS layer; +DROP TABLE IF EXISTS links; +DROP TABLE IF EXISTS nodes; +DROP TABLE IF EXISTS flow; +CREATE TABLE nodes (lon float DEFAULT '12.5535',lat float DEFAULT '41.8638',ip varchar(32) NOT NULL,name varchar(32) NOT NULL,isGateway binary(1) NOT NULL,gatewayIp varchar(32) NOT NULL,uptime time DEFAULT NULL,interfaces varchar(50) DEFAULT NULL,PRIMARY KEY (name),KEY ip (ip)) ENGINE=InnoDB DEFAULT CHARSET=latin1; +CREATE TABLE links (clock timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',src varchar(32) NOT NULL DEFAULT '',dest varchar(32) NOT NULL DEFAULT '',lq float DEFAULT NULL,nlq float DEFAULT NULL,etx float DEFAULT NULL,PRIMARY KEY (clock,src,dest),KEY src (src),KEY dest (dest),CONSTRAINT links_ibfk_2 FOREIGN KEY (dest) REFERENCES nodes (ip),CONSTRAINT links_ibfk_1 FOREIGN KEY (src) REFERENCES nodes (ip)) ENGINE=InnoDB DEFAULT CHARSET=latin1; +CREATE TABLE Layer (id int(11) NOT NULL AUTO_INCREMENT,srcnode varchar(32) NOT NULL,clock timestamp NULL DEFAULT NULL,destnode varchar(32) NOT NULL,PRIMARY KEY (id),KEY srcnode (srcnode),KEY destnode (destnode),CONSTRAINT layer_ibfk_1 FOREIGN KEY (srcnode) REFERENCES links (src),CONSTRAINT layer_ibfk_2 FOREIGN KEY (destnode) REFERENCES links (dest)) ENGINE=InnoDB DEFAULT CHARSET=latin1; +CREATE TABLE FLOWS (RECNUM bigint(20) unsigned zerofill NOT NULL AUTO_INCREMENT,PROBE varchar(16) NOT NULL DEFAULT '',TIME_RECEIVED datetime NOT NULL DEFAULT '0000-00-00 00:00:00',FLOW_VERSION tinyint(4) NOT NULL DEFAULT '0',SEQUENCE bigint(20) unsigned zerofill NOT NULL DEFAULT '00000000000000000000',SOURCE_IP varchar(16) NOT NULL DEFAULT '',SOURCE_PORT int(11) NOT NULL DEFAULT '0',DEST_IP varchar(16) NOT NULL DEFAULT '',DEST_PORT int(11) NOT NULL DEFAULT '0',NEXT_HOP varchar(16) NOT NULL DEFAULT '',PROTOCOL int(11) NOT NULL DEFAULT '0',TCP_FLAGS int(11) NOT NULL DEFAULT '0',TOS int(11) NOT NULL DEFAULT '0',BYTES bigint(20) unsigned NOT NULL DEFAULT '0',PACKETS bigint(20) unsigned NOT NULL DEFAULT '0',FLOW_BEGIN datetime NOT NULL DEFAULT '0000-00-00 00:00:00',FLOW_END datetime NOT NULL DEFAULT '0000-00-00 00:00:00',SOURCE_AS int(11) NOT NULL DEFAULT '0',DEST_AS int(11) NOT NULL DEFAULT '0',SOURCE_MASK smallint(6) NOT NULL DEFAULT '0',DEST_MASK smallint(6) NOT NULL DEFAULT '0',PRIMARY KEY (RECNUM),KEY k_begin (FLOW_BEGIN),KEY k_end (FLOW_END),KEY k_time (TIME_RECEIVED),KEY k_src (SOURCE_IP),KEY k_dst (DEST_IP)) ENGINE=MyISAM DEFAULT CHARSET=latin1 + CREATE SCHEMA IF NOT EXISTS freimap2; +use freimap2; +DROP TABLE IF EXISTS layer; +DROP TABLE IF EXISTS links; +DROP TABLE IF EXISTS nodes; +DROP TABLE IF EXISTS flow; +CREATE TABLE nodes (lon float DEFAULT '12.5535',lat float DEFAULT '41.8638',ip varchar(32) NOT NULL,name varchar(32) NOT NULL,isGateway binary(1) NOT NULL,gatewayIp varchar(32) NOT NULL,uptime time DEFAULT NULL,interfaces varchar(50) DEFAULT NULL,PRIMARY KEY (name),KEY ip (ip)) ENGINE=InnoDB DEFAULT CHARSET=latin1; +CREATE TABLE links (clock timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',src varchar(32) NOT NULL DEFAULT '',dest varchar(32) NOT NULL DEFAULT '',lq float DEFAULT NULL,nlq float DEFAULT NULL,etx float DEFAULT NULL,PRIMARY KEY (clock,src,dest),KEY src (src),KEY dest (dest),CONSTRAINT links_ibfk_2 FOREIGN KEY (dest) REFERENCES nodes (ip),CONSTRAINT links_ibfk_1 FOREIGN KEY (src) REFERENCES nodes (ip)) ENGINE=InnoDB DEFAULT CHARSET=latin1; +CREATE TABLE Layer (id int(11) NOT NULL AUTO_INCREMENT,srcnode varchar(32) NOT NULL,clock timestamp NULL DEFAULT NULL,destnode varchar(32) NOT NULL,PRIMARY KEY (id),KEY srcnode (srcnode),KEY destnode (destnode),CONSTRAINT layer_ibfk_1 FOREIGN KEY (srcnode) REFERENCES links (src),CONSTRAINT layer_ibfk_2 FOREIGN KEY (destnode) REFERENCES links (dest)) ENGINE=InnoDB DEFAULT CHARSET=latin1; +CREATE TABLE FLOWS (RECNUM bigint(20) unsigned zerofill NOT NULL AUTO_INCREMENT,PROBE varchar(16) NOT NULL DEFAULT '',TIME_RECEIVED datetime NOT NULL DEFAULT '0000-00-00 00:00:00',FLOW_VERSION tinyint(4) NOT NULL DEFAULT '0',SEQUENCE bigint(20) unsigned zerofill NOT NULL DEFAULT '00000000000000000000',SOURCE_IP varchar(16) NOT NULL DEFAULT '',SOURCE_PORT int(11) NOT NULL DEFAULT '0',DEST_IP varchar(16) NOT NULL DEFAULT '',DEST_PORT int(11) NOT NULL DEFAULT '0',NEXT_HOP varchar(16) NOT NULL DEFAULT '',PROTOCOL int(11) NOT NULL DEFAULT '0',TCP_FLAGS int(11) NOT NULL DEFAULT '0',TOS int(11) NOT NULL DEFAULT '0',BYTES bigint(20) unsigned NOT NULL DEFAULT '0',PACKETS bigint(20) unsigned NOT NULL DEFAULT '0',FLOW_BEGIN datetime NOT NULL DEFAULT '0000-00-00 00:00:00',FLOW_END datetime NOT NULL DEFAULT '0000-00-00 00:00:00',SOURCE_AS int(11) NOT NULL DEFAULT '0',DEST_AS int(11) NOT NULL DEFAULT '0',SOURCE_MASK smallint(6) NOT NULL DEFAULT '0',DEST_MASK smallint(6) NOT NULL DEFAULT '0',PRIMARY KEY (RECNUM),KEY k_begin (FLOW_BEGIN),KEY k_end (FLOW_END),KEY k_time (TIME_RECEIVED),KEY k_src (SOURCE_IP),KEY k_dst (DEST_IP)) ENGINE=MyISAM DEFAULT CHARSET=latin1 + CREATE SCHEMA IF NOT EXISTS pinco; +use pinco; +DROP TABLE IF EXISTS layer; +DROP TABLE IF EXISTS links; +DROP TABLE IF EXISTS Flow; +DROP TABLE IF EXISTS nodes; +CREATE TABLE `nodes` (`lon` float DEFAULT '12.5535',`lat` float DEFAULT '41.8638',`ip` varchar(32) NOT NULL,`name` varchar(32) NOT NULL,`isGateway` binary(1) NOT NULL,`gatewayIp` varchar(32) NOT NULL,`uptime` time DEFAULT NULL,`interfaces` varchar(50) DEFAULT NULL,PRIMARY KEY (`name`),KEY `ip` (`ip`)) ENGINE=InnoDB DEFAULT CHARSET=latin1; +CREATE TABLE `FLOWS` (`RECNUM` bigint(20) unsigned zerofill NOT NULL AUTO_INCREMENT,`PROBE` varchar(16) NOT NULL DEFAULT '',`TIME_RECEIVED` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',`FLOW_VERSION` tinyint(4) NOT NULL DEFAULT '0',`SEQUENCE` bigint(20) unsigned zerofill NOT NULL DEFAULT '00000000000000000000',`SOURCE_IP` varchar(16) NOT NULL DEFAULT '',`SOURCE_PORT` int(11) NOT NULL DEFAULT '0',`DEST_IP` varchar(16) NOT NULL DEFAULT '',`DEST_PORT` int(11) NOT NULL DEFAULT '0',`NEXT_HOP` varchar(16) NOT NULL DEFAULT '',`PROTOCOL` int(11) NOT NULL DEFAULT '0',`TCP_FLAGS` int(11) NOT NULL DEFAULT '0',`TOS` int(11) NOT NULL DEFAULT '0',`BYTES` bigint(20) unsigned NOT NULL DEFAULT '0',`PACKETS` bigint(20) unsigned NOT NULL DEFAULT '0',`FLOW_BEGIN` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',`FLOW_END` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',`SOURCE_AS` int(11) NOT NULL DEFAULT '0',`DEST_AS` int(11) NOT NULL DEFAULT '0',`SOURCE_MASK` smallint(6) NOT NULL DEFAULT '0',`DEST_MASK` smallint(6) NOT NULL DEFAULT '0',PRIMARY KEY (`RECNUM`),KEY `k_begin` (`FLOW_BEGIN`),KEY `k_end` (`FLOW_END`),KEY `k_time` (`TIME_RECEIVED`),KEY `k_src` (`SOURCE_IP`),KEY `k_dst` (`DEST_IP`)) ENGINE=MyISAM DEFAULT CHARSET=latin1; +CREATE TABLE `links` (`clock` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',`src` varchar(32) NOT NULL DEFAULT '',`dest` varchar(32) NOT NULL DEFAULT '',`lq` float DEFAULT NULL,`nlq` float DEFAULT NULL,`etx` float DEFAULT NULL,PRIMARY KEY (`clock`,`src`,`dest`),KEY `src` (`src`),KEY `dest` (`dest`),CONSTRAINT `links_ibfk_2` FOREIGN KEY (`dest`) REFERENCES `nodes` (`ip`),CONSTRAINT `links_ibfk_1` FOREIGN KEY (`src`) REFERENCES `nodes` (`ip`)) ENGINE=InnoDB DEFAULT CHARSET=latin1; +CREATE TABLE `Layer` (`id` int(11) NOT NULL AUTO_INCREMENT,`srcnode` varchar(32) DEFAULT NULL,`clock` timestamp NULL DEFAULT NULL,`destnode` varchar(32) DEFAULT NULL,PRIMARY KEY (`id`),KEY `srcnode` (`srcnode`),KEY `destnode` (`destnode`),CONSTRAINT `layer_ibfk_2` FOREIGN KEY (`destnode`) REFERENCES `links` (`dest`),CONSTRAINT `layer_ibfk_1` FOREIGN KEY (`srcnode`) REFERENCES `links` (`src`)) ENGINE=InnoDB DEFAULT CHARSET=latin1 + CREATE SCHEMA IF NOT EXISTS pinco; +use freimap; +DROP TABLE IF EXISTS layer; +DROP TABLE IF EXISTS links; +DROP TABLE IF EXISTS Flow; +DROP TABLE IF EXISTS nodes; +CREATE TABLE `nodes` (`lon` float DEFAULT '12.5535',`lat` float DEFAULT '41.8638',`ip` varchar(32) NOT NULL,`name` varchar(32) NOT NULL,`isGateway` binary(1) NOT NULL,`gatewayIp` varchar(32) NOT NULL,`uptime` time DEFAULT NULL,`interfaces` varchar(50) DEFAULT NULL,PRIMARY KEY (`name`),KEY `ip` (`ip`)) ENGINE=InnoDB DEFAULT CHARSET=latin1; +CREATE TABLE `FLOWS` (`RECNUM` bigint(20) unsigned zerofill NOT NULL AUTO_INCREMENT,`PROBE` varchar(16) NOT NULL DEFAULT '',`TIME_RECEIVED` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',`FLOW_VERSION` tinyint(4) NOT NULL DEFAULT '0',`SEQUENCE` bigint(20) unsigned zerofill NOT NULL DEFAULT '00000000000000000000',`SOURCE_IP` varchar(16) NOT NULL DEFAULT '',`SOURCE_PORT` int(11) NOT NULL DEFAULT '0',`DEST_IP` varchar(16) NOT NULL DEFAULT '',`DEST_PORT` int(11) NOT NULL DEFAULT '0',`NEXT_HOP` varchar(16) NOT NULL DEFAULT '',`PROTOCOL` int(11) NOT NULL DEFAULT '0',`TCP_FLAGS` int(11) NOT NULL DEFAULT '0',`TOS` int(11) NOT NULL DEFAULT '0',`BYTES` bigint(20) unsigned NOT NULL DEFAULT '0',`PACKETS` bigint(20) unsigned NOT NULL DEFAULT '0',`FLOW_BEGIN` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',`FLOW_END` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',`SOURCE_AS` int(11) NOT NULL DEFAULT '0',`DEST_AS` int(11) NOT NULL DEFAULT '0',`SOURCE_MASK` smallint(6) NOT NULL DEFAULT '0',`DEST_MASK` smallint(6) NOT NULL DEFAULT '0',PRIMARY KEY (`RECNUM`),KEY `k_begin` (`FLOW_BEGIN`),KEY `k_end` (`FLOW_END`),KEY `k_time` (`TIME_RECEIVED`),KEY `k_src` (`SOURCE_IP`),KEY `k_dst` (`DEST_IP`)) ENGINE=MyISAM DEFAULT CHARSET=latin1 + CREATE SCHEMA IF NOT EXISTS freimap; +use freimap; +DROP TABLE IF EXISTS layer; +DROP TABLE IF EXISTS links; +DROP TABLE IF EXISTS Flow; +DROP TABLE IF EXISTS nodes; +CREATE TABLE `nodes` (`lon` float DEFAULT '12.5535',`lat` float DEFAULT '41.8638',`ip` varchar(32) NOT NULL,`name` varchar(32) NOT NULL,`isGateway` binary(1) NOT NULL,`gatewayIp` varchar(32) NOT NULL,`uptime` time DEFAULT NULL,`interfaces` varchar(50) DEFAULT NULL,PRIMARY KEY (`name`),KEY `ip` (`ip`)) ENGINE=InnoDB DEFAULT CHARSET=latin1; +CREATE TABLE `FLOWS` (`RECNUM` bigint(20) unsigned zerofill NOT NULL AUTO_INCREMENT,`PROBE` varchar(16) NOT NULL DEFAULT '',`TIME_RECEIVED` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',`FLOW_VERSION` tinyint(4) NOT NULL DEFAULT '0',`SEQUENCE` bigint(20) unsigned zerofill NOT NULL DEFAULT '00000000000000000000',`SOURCE_IP` varchar(16) NOT NULL DEFAULT '',`SOURCE_PORT` int(11) NOT NULL DEFAULT '0',`DEST_IP` varchar(16) NOT NULL DEFAULT '',`DEST_PORT` int(11) NOT NULL DEFAULT '0',`NEXT_HOP` varchar(16) NOT NULL DEFAULT '',`PROTOCOL` int(11) NOT NULL DEFAULT '0',`TCP_FLAGS` int(11) NOT NULL DEFAULT '0',`TOS` int(11) NOT NULL DEFAULT '0',`BYTES` bigint(20) unsigned NOT NULL DEFAULT '0',`PACKETS` bigint(20) unsigned NOT NULL DEFAULT '0',`FLOW_BEGIN` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',`FLOW_END` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',`SOURCE_AS` int(11) NOT NULL DEFAULT '0',`DEST_AS` int(11) NOT NULL DEFAULT '0',`SOURCE_MASK` smallint(6) NOT NULL DEFAULT '0',`DEST_MASK` smallint(6) NOT NULL DEFAULT '0',PRIMARY KEY (`RECNUM`),KEY `k_begin` (`FLOW_BEGIN`),KEY `k_end` (`FLOW_END`),KEY `k_time` (`TIME_RECEIVED`),KEY `k_src` (`SOURCE_IP`),KEY `k_dst` (`DEST_IP`)) ENGINE=MyISAM DEFAULT CHARSET=latin1; +CREATE TABLE `links` (`clock` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',`src` varchar(32) NOT NULL DEFAULT '',`dest` varchar(32) NOT NULL DEFAULT '',`lq` float DEFAULT NULL,`nlq` float DEFAULT NULL,`etx` float DEFAULT NULL,PRIMARY KEY (`clock`,`src`,`dest`),KEY `src` (`src`),KEY `dest` (`dest`),CONSTRAINT `links_ibfk_2` FOREIGN KEY (`dest`) REFERENCES `nodes` (`ip`),CONSTRAINT `links_ibfk_1` FOREIGN KEY (`src`) REFERENCES `nodes` (`ip`)) ENGINE=InnoDB DEFAULT CHARSET=latin1; +CREATE TABLE `Layer` (`id` int(11) NOT NULL AUTO_INCREMENT,`srcnode` varchar(32) DEFAULT NULL,`clock` timestamp NULL DEFAULT NULL,`destnode` varchar(32) DEFAULT NULL,PRIMARY KEY (`id`),KEY `srcnode` (`srcnode`),KEY `destnode` (`destnode`),CONSTRAINT `layer_ibfk_2` FOREIGN KEY (`destnode`) REFERENCES `links` (`dest`),CONSTRAINT `layer_ibfk_1` FOREIGN KEY (`srcnode`) REFERENCES `links` (`src`)) ENGINE=InnoDB DEFAULT CHARSET=latin1 + CREATE SCHEMA IF NOT EXISTS freimap; +use freimap; +DROP TABLE IF EXISTS layer; +DROP TABLE IF EXISTS links; +DROP TABLE IF EXISTS Flow; +DROP TABLE IF EXISTS nodes; +DROP TABLE IF EXISTS `nodes`; +CREATE TABLE `nodes` (`lon` float DEFAULT '12.5535',`lat` float DEFAULT '41.8638',`ip` varchar(32) NOT NULL,`name` varchar(32) NOT NULL,`isGateway` binary(1) NOT NULL,`gatewayIp` varchar(32) NOT NULL,`uptime` time DEFAULT NULL,`interfaces` varchar(50) DEFAULT NULL,PRIMARY KEY (`name`),KEY `ip` (`ip`)) ENGINE=InnoDB DEFAULT CHARSET=latin1; +DROP TABLE IF EXISTS `FLOWS`; +CREATE TABLE `FLOWS` (`RECNUM` bigint(20) unsigned zerofill NOT NULL AUTO_INCREMENT,`PROBE` varchar(16) NOT NULL DEFAULT '',`TIME_RECEIVED` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',`FLOW_VERSION` tinyint(4) NOT NULL DEFAULT '0',`SEQUENCE` bigint(20) unsigned zerofill NOT NULL DEFAULT '00000000000000000000',`SOURCE_IP` varchar(16) NOT NULL DEFAULT '',`SOURCE_PORT` int(11) NOT NULL DEFAULT '0',`DEST_IP` varchar(16) NOT NULL DEFAULT '',`DEST_PORT` int(11) NOT NULL DEFAULT '0',`NEXT_HOP` varchar(16) NOT NULL DEFAULT '',`PROTOCOL` int(11) NOT NULL DEFAULT '0',`TCP_FLAGS` int(11) NOT NULL DEFAULT '0',`TOS` int(11) NOT NULL DEFAULT '0',`BYTES` bigint(20) unsigned NOT NULL DEFAULT '0',`PACKETS` bigint(20) unsigned NOT NULL DEFAULT '0',`FLOW_BEGIN` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',`FLOW_END` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',`SOURCE_AS` int(11) NOT NULL DEFAULT '0',`DEST_AS` int(11) NOT NULL DEFAULT '0',`SOURCE_MASK` smallint(6) NOT NULL DEFAULT '0',`DEST_MASK` smallint(6) NOT NULL DEFAULT '0',PRIMARY KEY (`RECNUM`),KEY `k_begin` (`FLOW_BEGIN`),KEY `k_end` (`FLOW_END`),KEY `k_time` (`TIME_RECEIVED`),KEY `k_src` (`SOURCE_IP`),KEY `k_dst` (`DEST_IP`)) ENGINE=MyISAM DEFAULT CHARSET=latin1; +DROP TABLE IF EXISTS `links`; +CREATE TABLE `links` (`clock` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',`src` varchar(32) NOT NULL DEFAULT '',`dest` varchar(32) NOT NULL DEFAULT '',`lq` float DEFAULT NULL,`nlq` float DEFAULT NULL,`etx` float DEFAULT NULL,PRIMARY KEY (`clock`,`src`,`dest`),KEY `src` (`src`),KEY `dest` (`dest`),CONSTRAINT `links_ibfk_2` FOREIGN KEY (`dest`) REFERENCES `nodes` (`ip`),CONSTRAINT `links_ibfk_1` FOREIGN KEY (`src`) REFERENCES `nodes` (`ip`)) ENGINE=InnoDB DEFAULT CHARSET=latin1; +DROP TABLE IF EXISTS `Layer`; +CREATE TABLE `Layer` (`id` int(11) NOT NULL AUTO_INCREMENT,`srcnode` varchar(32) DEFAULT NULL,`clock` timestamp NULL DEFAULT NULL,`destnode` varchar(32) DEFAULT NULL,PRIMARY KEY (`id`),KEY `srcnode` (`srcnode`),KEY `destnode` (`destnode`),CONSTRAINT `layer_ibfk_2` FOREIGN KEY (`destnode`) REFERENCES `links` (`dest`),CONSTRAINT `layer_ibfk_1` FOREIGN KEY (`srcnode`) REFERENCES `links` (`src`)) ENGINE=InnoDB DEFAULT CHARSET=latin1 + use freimap; +DROP TABLE IF EXISTS layer; +DROP TABLE IF EXISTS links; +DROP TABLE IF EXISTS Flow; +DROP TABLE IF EXISTS nodes; +CREATE SCHEMA IF NOT EXISTS freimap; +DROP TABLE IF EXISTS `nodes`; +CREATE TABLE `nodes` (`lon` float DEFAULT '12.5535',`lat` float DEFAULT '41.8638',`ip` varchar(32) NOT NULL,`name` varchar(32) NOT NULL,`isGateway` binary(1) NOT NULL,`gatewayIp` varchar(32) NOT NULL,`uptime` time DEFAULT NULL,`interfaces` varchar(50) DEFAULT NULL,PRIMARY KEY (`name`),KEY `ip` (`ip`)) ENGINE=InnoDB DEFAULT CHARSET=latin1; +DROP TABLE IF EXISTS `links`; +CREATE TABLE `links` (`clock` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',`src` varchar(32) NOT NULL DEFAULT '',`dest` varchar(32) NOT NULL DEFAULT '',`lq` float DEFAULT NULL,`nlq` float DEFAULT NULL,`etx` float DEFAULT NULL,PRIMARY KEY (`clock`,`src`,`dest`),KEY `src` (`src`),KEY `dest` (`dest`),CONSTRAINT `links_ibfk_2` FOREIGN KEY (`dest`) REFERENCES `nodes` (`ip`),CONSTRAINT `links_ibfk_1` FOREIGN KEY (`src`) REFERENCES `nodes` (`ip`)) ENGINE=InnoDB DEFAULT CHARSET=latin1; +DROP TABLE IF EXISTS `Layer`; +DROP TABLE IF EXISTS `FLOWS`; +CREATE TABLE `FLOWS` (`RECNUM` bigint(20) unsigned zerofill NOT NULL AUTO_INCREMENT,`PROBE` varchar(16) NOT NULL DEFAULT '',`TIME_RECEIVED` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',`FLOW_VERSION` tinyint(4) NOT NULL DEFAULT '0',`SEQUENCE` bigint(20) unsigned zerofill NOT NULL DEFAULT '00000000000000000000',`SOURCE_IP` varchar(16) NOT NULL DEFAULT '',`SOURCE_PORT` int(11) NOT NULL DEFAULT '0',`DEST_IP` varchar(16) NOT NULL DEFAULT '',`DEST_PORT` int(11) NOT NULL DEFAULT '0',`NEXT_HOP` varchar(16) NOT NULL DEFAULT '',`PROTOCOL` int(11) NOT NULL DEFAULT '0',`TCP_FLAGS` int(11) NOT NULL DEFAULT '0',`TOS` int(11) NOT NULL DEFAULT '0',`BYTES` bigint(20) unsigned NOT NULL DEFAULT '0',`PACKETS` bigint(20) unsigned NOT NULL DEFAULT '0',`FLOW_BEGIN` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',`FLOW_END` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',`SOURCE_AS` int(11) NOT NULL DEFAULT '0',`DEST_AS` int(11) NOT NULL DEFAULT '0',`SOURCE_MASK` smallint(6) NOT NULL DEFAULT '0',`DEST_MASK` smallint(6) NOT NULL DEFAULT '0',PRIMARY KEY (`RECNUM`),KEY `k_begin` (`FLOW_BEGIN`),KEY `k_end` (`FLOW_END`),KEY `k_time` (`TIME_RECEIVED`),KEY `k_src` (`SOURCE_IP`),KEY `k_dst` (`DEST_IP`)) ENGINE=MyISAM DEFAULT CHARSET=latin1; +CREATE TABLE `Layer` (`id` int(11) NOT NULL AUTO_INCREMENT,`srcnode` varchar(32) DEFAULT NULL,`clock` timestamp NULL DEFAULT NULL,`destnode` varchar(32) DEFAULT NULL,PRIMARY KEY (`id`),KEY `srcnode` (`srcnode`),KEY `destnode` (`destnode`),CONSTRAINT `layer_ibfk_2` FOREIGN KEY (`destnode`) REFERENCES `links` (`dest`),CONSTRAINT `layer_ibfk_1` FOREIGN KEY (`srcnode`) REFERENCES `links` (`src`)) ENGINE=InnoDB DEFAULT CHARSET=latin1 + DROP TABLE IF EXISTS layer; +DROP TABLE IF EXISTS links; +DROP TABLE IF EXISTS Flow; +DROP TABLE IF EXISTS nodes + use freimap; +CREATE SCHEMA IF NOT EXISTS freimap; +DROP TABLE IF EXISTS `nodes` + create schema if not exists prova + use mysql + schema mysql + database mysql + select mysql + select schema mysql + select database mysql + DROP TABLE IF EXISTS `nodes`; +CREATE TABLE `nodes` (`lon` float DEFAULT '12.5535',`lat` float DEFAULT '41.8638',`ip` varchar(32) NOT NULL,`name` varchar(32) NOT NULL,`isGateway` binary(1) NOT NULL,`gatewayIp` varchar(32) NOT NULL,`uptime` time DEFAULT NULL,`interfaces` varchar(50) DEFAULT NULL,PRIMARY KEY (`name`),KEY `ip` (`ip`)) ENGINE=InnoDB DEFAULT CHARSET=latin1 + DROP TABLE IF EXISTS Layer; +CREATE TABLE `Layer` (`id` int(11) NOT NULL AUTO_INCREMENT,`srcnode` varchar(32) DEFAULT NULL,`clock` timestamp NULL DEFAULT NULL,`destnode` varchar(32) DEFAULT NULL,PRIMARY KEY (`id`),KEY `srcnode` (`srcnode`),KEY `destnode` (`destnode`),CONSTRAINT `layer_ibfk_2` FOREIGN KEY (`destnode`) REFERENCES `links` (`dest`),CONSTRAINT `layer_ibfk_1` FOREIGN KEY (`srcnode`) REFERENCES `links` (`src`)) ENGINE=InnoDB DEFAULT CHARSET=latin1 + + rdbms_type + mysql + rdbms_version + 5.1.44 + version + 1 + + diff --git a/src/freimapgsoc/Configurator.java b/src/freimapgsoc/Configurator.java deleted file mode 100755 index 1e58b08..0000000 --- a/src/freimapgsoc/Configurator.java +++ /dev/null @@ -1,228 +0,0 @@ -/* net.relet.freimap.Configurator.java - - This file is part of the freimap software available at freimap.berlios.de - - This software is copyright (c)2007 Thomas Hirsch - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License with - the Debian GNU/Linux distribution in file /doc/gpl.txt - if not, write to the Free Software Foundation, Inc., 59 Temple Place, - Suite 330, Boston, MA 02111-1307 USA -*/ - -package freimapgsoc; - -import java.io.*; -import java.util.*; -import java.awt.Color; - -import org.ho.yaml.*; - - -public class Configurator { - private static HashMap config; - - public static final String[] CONFIG_LOCATIONS = new String[]{ - "/etc/config.yaml", - //"/etc/config.yaml", -//"./freimap.cfg", - // "./.freimaprc", - // "/etc/freimap.cfg", - // "~/.freimaprc" - }; - - @SuppressWarnings("unchecked") - public Configurator() { - parseConfigFile(); - } - - @SuppressWarnings("unchecked") - public Object get(String key) { - return get(key, null); - } - - @SuppressWarnings("unchecked") - public static Object get(String key, HashMap parent) { - return get(new String[]{key}, parent); - } - - @SuppressWarnings("unchecked") - public static Object get(String[] keys) { - return get(keys, null); - } - - @SuppressWarnings("unchecked") - public static Object get(String[] keys, HashMap parent) { - - if (parent==null) parent = config; - - Object value = parent; - for (int i=0; i)value; - System.out.println("Parent Configurator.java: "+parent); - } catch (Exception ex) { - ex.printStackTrace(); - return null; - } - value = parent.get(keys[i]); - } - return value; - //Parent Configurator.java: {datasources={nodes-in-berlin={class=freimapgsoc.LatLonJsDataSource, url=file:/var/run/latlon.js}, olsrd-localhost={port=2004, nodesource=nodes-in-berlin, host=localhost, class=freimapgsoc.OlsrdDataSource}}, subversion=60, bcc-a={images=[{scale=1500000, lon=13.416420177909853, gfx=gfx/bcc-a-uni.png, lat=52.52089531804967}], type=images}, version=svn} - //it conteins all data of config.yaml - } - - //getI=GetInteger - @SuppressWarnings("unchecked") - public static int getI(String[] keys) { - return getI(keys, null); - } - - @SuppressWarnings("unchecked") - public static int getI(String key, HashMap parent) { - return getI(new String[]{key}, parent); - } - @SuppressWarnings("unchecked") - public static int getI(String[] keys, HashMap parent) { - try { - return (Integer)get(keys, parent); - } catch (Exception ex) { - } - return -1; - } - - //getD=GetDouble -@SuppressWarnings("unchecked") - public static double getD(String key) { - return getD(key, null); - } - -@SuppressWarnings("unchecked") - public static double getD(String key, HashMap parent) { - return getD(new String[]{key}, parent); - } - -@SuppressWarnings("unchecked") - public static double getD(String[] keys) { - return getD(keys, null); - } - -@SuppressWarnings("unchecked") - public static double getD(String[] keys, HashMap parent) { - try { - Object o = get(keys, parent); - if (o instanceof Double) return ((Double)o).doubleValue(); - if (o instanceof Integer) return ((Integer)o).doubleValue(); - } catch (Exception ex) { - } - return Double.NaN; - } - - //getS=GetString -@SuppressWarnings("unchecked") - public static String getS(String[] keys) { - return getS(keys, null); - } - -@SuppressWarnings("unchecked") - public static String getS(String key, HashMap parent) { - return getS(new String[]{key}, parent); - } - -@SuppressWarnings("unchecked") - public static String getS(String[] keys, HashMap parent) { - try { - return (String)get(keys, parent); - } catch (Exception ex) { - } - return null; - } - - //getB=GetBoolean -@SuppressWarnings("unchecked") - public static boolean getB(String[] keys) { - return getB(keys, null); - } - -@SuppressWarnings("unchecked") - public static boolean getB(String key, HashMap parent) { - return getB(new String[]{key}, parent); - } - -@SuppressWarnings("unchecked") - public static boolean getB(String[] keys, HashMap parent) { - try { - return ((Boolean)get(keys, parent)).booleanValue(); - } catch (Exception ex) { - } - return false; -} - - //getC=GetChar -@SuppressWarnings("unchecked") - public static Color getC(String[] keys) { - return getC(keys, null); - } - -@SuppressWarnings("unchecked") - public static Color getCOrDefault(String[] keys, int r, int g, int b, int a) { - Color c = getC(keys, null); - return (c==null)?new Color(r,g,b,a):c; - } - -@SuppressWarnings("unchecked") - public static Color getC(String key, HashMap parent) { - return getC(new String[]{key}, parent); - } - -@SuppressWarnings("unchecked") - public static Color getC(String[] keys, HashMap parent) { - try { - //int i= getI(keys, parent); - //if (i!=-1) return new Color(i, true); - //hack: apparently, jyaml does not support hex integers yet - String s = getS(keys, parent); - if (s!=null) return new Color((int)(Long.decode(s).longValue()), true); - } catch (Exception ex) { - System.err.println(ex.getMessage()); - } - return null; - } - - @SuppressWarnings("unchecked") - - void parseConfigFile() { - File found=null; - for (int i=0;i)Yaml.load(found); - System.out.println("Yaml.load(found): "+ config); - } catch (Exception ex) { - System.out.println("Failed to load configuration file "+found.getName()+". "+ex.getMessage()); - System.exit(1); - } - } - } -} diff --git a/src/freimapgsoc/CredentialRequired.java b/src/freimapgsoc/CredentialRequired.java index 3db626e..e6959ea 100644 --- a/src/freimapgsoc/CredentialRequired.java +++ b/src/freimapgsoc/CredentialRequired.java @@ -32,11 +32,13 @@ public CredentialRequired() { initComponents(); } - /** This method is called from within the constructor to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the Form Editor. - */ + /** + * This method is called from within the constructor to + * initialize the form. + * WARNING: Do NOT modify this code. The content of this method is + * always regenerated by the Form Editor. + * @return + */ @SuppressWarnings("unchecked") // //GEN-BEGIN:initComponents private void initComponents() { diff --git a/src/freimapgsoc/FindNode.java b/src/freimapgsoc/FindNode.java index 9e13bd7..c3d4a11 100755 --- a/src/freimapgsoc/FindNode.java +++ b/src/freimapgsoc/FindNode.java @@ -23,11 +23,13 @@ public FindNode() { this.setLocationRelativeTo(this); } - /** This method is called from within the constructor to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the Form Editor. - */ + /** + * This method is called from within the constructor to + * initialize the form. + * WARNING: Do NOT modify this code. The content of this method is + * always regenerated by the Form Editor. + * @return + */ @SuppressWarnings("unchecked") // //GEN-BEGIN:initComponents private void initComponents() { diff --git a/src/freimapgsoc/Flow.java b/src/freimapgsoc/Flow.java index 186c965..6cccb9d 100755 --- a/src/freimapgsoc/Flow.java +++ b/src/freimapgsoc/Flow.java @@ -47,11 +47,13 @@ public Flow() { } - /** This method is called from within the constructor to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the Form Editor. - */ + /** + * This method is called from within the constructor to + * initialize the form. + * WARNING: Do NOT modify this code. The content of this method is + * always regenerated by the Form Editor. + * @return + */ @SuppressWarnings("unchecked") // //GEN-BEGIN:initComponents private void initComponents() { diff --git a/src/freimapgsoc/FreimapGSoCAboutBox.java b/src/freimapgsoc/FreimapGSoCAboutBox.java index 14911db..9e373af 100755 --- a/src/freimapgsoc/FreimapGSoCAboutBox.java +++ b/src/freimapgsoc/FreimapGSoCAboutBox.java @@ -14,7 +14,11 @@ public FreimapGSoCAboutBox(java.awt.Frame parent) { getRootPane().setDefaultButton(closeButton); } - @Action public void closeAboutBox() { + /** + * + * @return + */ + @Action public void closeAboutBox() { dispose(); } diff --git a/src/freimapgsoc/InfoPopUp.java b/src/freimapgsoc/InfoPopUp.java index 9aac654..0cc7808 100755 --- a/src/freimapgsoc/InfoPopUp.java +++ b/src/freimapgsoc/InfoPopUp.java @@ -47,11 +47,13 @@ public InfoPopUp(String msg1, String msg2,String state) { approveButton.setText("Close"); approveButton.setIcon(new ImageIcon(getClass().getResource("/freimapgsoc/resources/close2.png"))); } } - /** This method is called from within the constructor to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the Form Editor. - */ + /** + * This method is called from within the constructor to + * initialize the form. + * WARNING: Do NOT modify this code. The content of this method is + * always regenerated by the Form Editor. + * @return + */ @SuppressWarnings("unchecked") // //GEN-BEGIN:initComponents private void initComponents() { diff --git a/src/freimapgsoc/InfoPopUpSelect.java b/src/freimapgsoc/InfoPopUpSelect.java index 797b578..23212f9 100644 --- a/src/freimapgsoc/InfoPopUpSelect.java +++ b/src/freimapgsoc/InfoPopUpSelect.java @@ -53,11 +53,13 @@ public void enableOlsrBut(){ olsrButton.setEnabled(true); } - /** This method is called from within the constructor to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the Form Editor. - */ + /** + * This method is called from within the constructor to + * initialize the form. + * WARNING: Do NOT modify this code. The content of this method is + * always regenerated by the Form Editor. + * @return + */ @SuppressWarnings("unchecked") // //GEN-BEGIN:initComponents private void initComponents() { diff --git a/src/freimapgsoc/LatLonJsDataSource.java b/src/freimapgsoc/LatLonJsDataSource.java index 1593ba8..f20a973 100755 --- a/src/freimapgsoc/LatLonJsDataSource.java +++ b/src/freimapgsoc/LatLonJsDataSource.java @@ -414,19 +414,32 @@ public Vector getLinksFromDest(String dest) { return linksfd; } - @Override + /** + * + * @return + */ + @Override public Vector getNodeList() { return nodes; } - @Override + /** + * + * @return + */ + @Override public void init() { throw new UnsupportedOperationException("Not supported yet."); } - @Override + /** + * + * @param configuration + * @return + */ + @Override public HashMap read_conf(HashMap configuration) { throw new UnsupportedOperationException("Not supported yet."); } diff --git a/src/freimapgsoc/LatLonJsToMySQL.java b/src/freimapgsoc/LatLonJsToMySQL.java index 8d45c76..39672f0 100644 --- a/src/freimapgsoc/LatLonJsToMySQL.java +++ b/src/freimapgsoc/LatLonJsToMySQL.java @@ -52,11 +52,13 @@ public LatLonJsToMySQL() { initComponents(); } - /** This method is called from within the constructor to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the Form Editor. - */ + /** + * This method is called from within the constructor to + * initialize the form. + * WARNING: Do NOT modify this code. The content of this method is + * always regenerated by the Form Editor. + * @return + */ @SuppressWarnings("unchecked") // //GEN-BEGIN:initComponents private void initComponents() { diff --git a/src/freimapgsoc/LinkInfo.java b/src/freimapgsoc/LinkInfo.java index d4fc4c1..5d9520c 100755 --- a/src/freimapgsoc/LinkInfo.java +++ b/src/freimapgsoc/LinkInfo.java @@ -177,7 +177,12 @@ public void setFlowProfile(LinkedList lp) { status = STATUS_AVAILABLE; } - @SuppressWarnings("unchecked") + /** + * + * @param plot + * @return + */ + @SuppressWarnings("unchecked") private void sexupPlot(Plot plot) { if (plot instanceof CombinedDomainXYPlot) { List subs = (List)(((CombinedDomainXYPlot)plot).getSubplots()); diff --git a/src/freimapgsoc/MainLayer.form b/src/freimapgsoc/MainLayer.form index b66fc5c..2841073 100644 --- a/src/freimapgsoc/MainLayer.form +++ b/src/freimapgsoc/MainLayer.form @@ -540,15 +540,27 @@ - + - - - + + + + + + + + + + + + + + + + + + - - - @@ -562,7 +574,13 @@ - + + + + + + + @@ -612,7 +630,6 @@ - @@ -625,23 +642,6 @@ - - - - - - - - - - - - - - - - - @@ -653,10 +653,26 @@ + + + + + + + + + + + + + + + + + - @@ -689,29 +705,28 @@ - - - - - - - - + + + + + - + + + - + + + - + + + - - - - - + @@ -747,15 +762,6 @@ - - - - - - - - - @@ -779,7 +785,7 @@ - + @@ -797,29 +803,6 @@ - - - - - - - - - - - - - - - - - - - - - - - @@ -924,15 +907,6 @@ - - - - - - - - - @@ -1010,6 +984,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1156,7 +1176,7 @@ - + @@ -1186,5 +1206,22 @@ + + + + + + + + + + + + + + + + + diff --git a/src/freimapgsoc/MainLayer.java b/src/freimapgsoc/MainLayer.java index c0e463b..d8463a7 100644 --- a/src/freimapgsoc/MainLayer.java +++ b/src/freimapgsoc/MainLayer.java @@ -22,6 +22,7 @@ import java.awt.Dimension; import java.awt.Graphics2D; import java.awt.Point; +import java.awt.Polygon; import java.awt.Rectangle; import java.awt.RenderingHints; import java.awt.Robot; @@ -118,7 +119,6 @@ public void initData() { System.out.println(l.getCurrentNodes().elementAt(i).toString()); listOfNodes.add(i, l.getCurrentNodes().elementAt(i).toString()); MouseListener mouseListener = new MouseAdapter() { - public void mouseClicked(MouseEvent mouseEvent) { JList nodeList = (JList) mouseEvent.getSource(); if (mouseEvent.getClickCount() == 2) { @@ -175,20 +175,18 @@ public void storeLatLon(Vector nodes) { } public void drawNodes(Vector nodes) { + for (int i = 0; i < nodes.size(); i++) { final GeoPosition posNode = new GeoPosition(nodes.elementAt(i).lat, nodes.elementAt(i).lon); final JButton waynode = new JButton(nodes.elementAt(i).toString()); waynode.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { System.out.println("The test2 button was clicked"); } }); waypoints.add(new SwingWaypoint(waynode, posNode)); painter.setRenderer(new WaypointRenderer() { - public boolean paintWaypoint(Graphics2D g, JXMapViewer map, Waypoint wp) { - g.setColor(Color.ORANGE); JComponent component = ((SwingWaypoint) wp).getComponent(); Point2D gp_pt = map.getTileFactory().geoToPixel(wp.getPosition(), map.getZoom()); @@ -216,24 +214,22 @@ public boolean paintWaypoint(Graphics2D g, JXMapViewer map, Waypoint wp) { g.draw(new Ellipse2D.Double(-7.0, -7.0, 20.0, 20.0)); } return true; - } }); - painter.setWaypoints(waypoints); mainMap.setOverlayPainter(painter); } - } + } + //} - public void drawNodes(Vector nodes, Double lat, Double lon) { + /*public void drawNodes(Vector nodes, Double lat, Double lon) { for (int i = 0; i < nodes.size(); i++) { GeoPosition posNode = new GeoPosition(nodes.elementAt(i).lat, nodes.elementAt(i).lon); if (nodes.elementAt(i).lat == lat && nodes.elementAt(i).lon == lon) { waypoints.add(new Waypoint(posNode)); painter.setWaypoints(waypoints); painter.setRenderer(new WaypointRenderer() { - public boolean paintWaypoint(Graphics2D g, JXMapViewer map, Waypoint wp) { g.setColor(Color.ORANGE); if (mainMap.getZoom() < 17 && mainMap.getZoom() > 7) { @@ -295,6 +291,8 @@ public boolean paintWaypoint(Graphics2D g, JXMapViewer map, Waypoint wp) { mainMap.setOverlayPainter(painter); } + * + */ //TO IMPLEMENT IT DOESN'T WORK public void drawLinks(Vector links) { @@ -302,7 +300,6 @@ public void drawLinks(Vector links) { GeoPosition posFrom = new GeoPosition(links.elementAt(i).source.lat, links.elementAt(i).source.lon); System.out.println("LinksSourceLAT:" + links.elementAt(i).source.lat); System.out.println("LinksSourceLON:" + links.elementAt(i).source.lon); - GeoPosition posTo = new GeoPosition(links.elementAt(i).dest.lat, links.elementAt(i).dest.lon); System.out.println("LinksDestLAT:" + links.elementAt(i).dest.lat); System.out.println("LinksDestLON:" + links.elementAt(i).dest.lon); @@ -364,11 +361,9 @@ public void drawAll(Vector links, Vector nodes) { countPop = 1; } } else if (nodes.size() != 0) { - //Draw Nodes and Links drawLinks(links); drawNodes(nodes); - } } @@ -427,13 +422,10 @@ private void initComponents() { SNMP = new javax.swing.JMenuItem(); jPanel1 = new javax.swing.JPanel(); longitudeValue = new javax.swing.JLabel(); - locatedLabel = new javax.swing.JLabel(); lonLabel = new javax.swing.JLabel(); latLabel = new javax.swing.JLabel(); xValue1 = new javax.swing.JLabel(); yValue = new javax.swing.JLabel(); - xValue = new javax.swing.JLabel(); - xPos1 = new javax.swing.JLabel(); latitudeValue = new javax.swing.JLabel(); locatedNodes = new javax.swing.JScrollPane(); nodeList = new JList(listOfNodes); @@ -443,7 +435,6 @@ private void initComponents() { locatedLabel1 = new javax.swing.JLabel(); upTimeValue = new javax.swing.JLabel(); fqidValue = new javax.swing.JLabel(); - locatedLabel2 = new javax.swing.JLabel(); jSeparator4 = new javax.swing.JSeparator(); rtLat = new javax.swing.JLabel(); rtLogitude = new javax.swing.JLabel(); @@ -453,6 +444,10 @@ private void initComponents() { rtyPosValue = new javax.swing.JLabel(); rtLatValue = new javax.swing.JLabel(); rtLonValue = new javax.swing.JLabel(); + connectionValue = new javax.swing.JLabel(); + osLabel = new javax.swing.JLabel(); + ConnectionLabel = new javax.swing.JLabel(); + osValue = new javax.swing.JLabel(); mapPanel = new javax.swing.JPanel(); mainMap = new org.jdesktop.swingx.JXMapViewer(); miniMap = new org.jdesktop.swingx.JXMapViewer(); @@ -461,6 +456,9 @@ private void initComponents() { zoomButtonOut = new javax.swing.JButton(); hoverLabel = new javax.swing.JLabel(); dateInfo = new javax.swing.JLabel(); + jSlider1 = new javax.swing.JSlider(); + jLabel1 = new javax.swing.JLabel(); + jLabel2 = new javax.swing.JLabel(); jMenuBar1 = new javax.swing.JMenuBar(); FileMenu = new javax.swing.JMenu(); openMenu = new javax.swing.JMenu(); @@ -570,10 +568,6 @@ private void initComponents() { longitudeValue.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); longitudeValue.setName("longitudeValue"); // NOI18N - locatedLabel.setFont(new java.awt.Font("Lucida Grande", 0, 12)); - locatedLabel.setText("Located:"); - locatedLabel.setName("locatedLabel"); // NOI18N - lonLabel.setFont(new java.awt.Font("Lucida Grande", 0, 12)); lonLabel.setText("Longitude:"); lonLabel.setName("lonLabel"); // NOI18N @@ -583,7 +577,7 @@ private void initComponents() { latLabel.setName("latLabel"); // NOI18N xValue1.setFont(new java.awt.Font("Lucida Grande", 0, 12)); - xValue1.setText("Y Position:"); + xValue1.setText("HNA:"); xValue1.setName("xValue1"); // NOI18N yValue.setFont(new java.awt.Font("Lucida Grande", 0, 12)); @@ -591,15 +585,6 @@ private void initComponents() { yValue.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); yValue.setName("yValue"); // NOI18N - xValue.setFont(new java.awt.Font("Lucida Grande", 0, 12)); - xValue.setText(" "); - xValue.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); - xValue.setName("xValue"); // NOI18N - - xPos1.setFont(new java.awt.Font("Lucida Grande", 0, 12)); - xPos1.setText("X Position:"); - xPos1.setName("xPos1"); // NOI18N - latitudeValue.setFont(new java.awt.Font("Lucida Grande", 0, 12)); latitudeValue.setText(" "); latitudeValue.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); @@ -635,10 +620,6 @@ private void initComponents() { fqidValue.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); fqidValue.setName("fqidValue"); // NOI18N - locatedLabel2.setFont(new java.awt.Font("Lucida Grande", 0, 12)); - locatedLabel2.setText("EXT:"); - locatedLabel2.setName("locatedLabel2"); // NOI18N - jSeparator4.setName("jSeparator4"); // NOI18N rtLat.setFont(new java.awt.Font("Lucida Grande", 0, 10)); @@ -673,6 +654,24 @@ private void initComponents() { rtLonValue.setText("V"); rtLonValue.setName("rtLonValue"); // NOI18N + connectionValue.setFont(new java.awt.Font("Lucida Grande", 0, 12)); + connectionValue.setText(" "); + connectionValue.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); + connectionValue.setName("connectionValue"); // NOI18N + + osLabel.setFont(new java.awt.Font("Lucida Grande", 0, 12)); + osLabel.setText("OS:"); + osLabel.setName("osLabel"); // NOI18N + + ConnectionLabel.setFont(new java.awt.Font("Lucida Grande", 0, 12)); + ConnectionLabel.setText("Connection:"); + ConnectionLabel.setName("ConnectionLabel"); // NOI18N + + osValue.setFont(new java.awt.Font("Lucida Grande", 0, 12)); + osValue.setText(" "); + osValue.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); + osValue.setName("osValue"); // NOI18N + org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( @@ -701,7 +700,6 @@ private void initComponents() { .add(rtLogitude) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(rtLonValue, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 74, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))) - .add(locatedLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 265, Short.MAX_VALUE) .add(jPanel1Layout.createSequentialGroup() .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel1Layout.createSequentialGroup() @@ -712,18 +710,6 @@ private void initComponents() { .add(fqidLabel) .add(47, 47, 47) .add(fqidValue, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 183, Short.MAX_VALUE)) - .add(jPanel1Layout.createSequentialGroup() - .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(xPos1) - .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) - .add(org.jdesktop.layout.GroupLayout.LEADING, locatedLabel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .add(org.jdesktop.layout.GroupLayout.LEADING, xValue1))) - .add(18, 18, 18) - .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) - .add(org.jdesktop.layout.GroupLayout.LEADING, xValue, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .add(yValue, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 76, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .add(upTimeValue, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 76, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))) .add(jPanel1Layout.createSequentialGroup() .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) .add(latLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) @@ -731,9 +717,21 @@ private void initComponents() { .add(18, 18, 18) .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(longitudeValue, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 183, Short.MAX_VALUE) - .add(latitudeValue, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 183, Short.MAX_VALUE)))) + .add(latitudeValue, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 183, Short.MAX_VALUE))) + .add(jPanel1Layout.createSequentialGroup() + .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(osLabel) + .add(ConnectionLabel) + .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false) + .add(locatedLabel1) + .add(xValue1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) + .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(yValue, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 76, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .add(upTimeValue, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 76, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .add(osValue, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 76, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .add(connectionValue, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 76, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))) .add(4, 4, 4)) - .add(locatedLabel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 215, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(org.jdesktop.layout.GroupLayout.TRAILING, locatedNodes, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 265, Short.MAX_VALUE) .add(jSeparator4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 265, Short.MAX_VALUE)) .addContainerGap()) @@ -759,25 +757,25 @@ private void initComponents() { .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(lonLabel) .add(longitudeValue, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 17, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) - .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(jPanel1Layout.createSequentialGroup() - .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(locatedLabel1) - .add(upTimeValue, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 17, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .add(locatedLabel1) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 12, Short.MAX_VALUE) .add(xValue1) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(xPos1)) + .add(osLabel) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 12, Short.MAX_VALUE) + .add(ConnectionLabel)) .add(jPanel1Layout.createSequentialGroup() + .add(upTimeValue, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 17, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(yValue) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(xValue))) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) - .add(locatedLabel) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(locatedLabel2) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(osValue, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 17, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .add(connectionValue))) + .add(38, 38, 38) .add(jSeparator4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(18, 18, 18) .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) @@ -865,7 +863,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { }); mainMap.add(zoomButtonOut, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 250, -1, -1)); - hoverLabel.setFont(new java.awt.Font("Lucida Grande", 0, 12)); // NOI18N + hoverLabel.setFont(new java.awt.Font("Lucida Grande", 0, 12)); hoverLabel.setText(" "); hoverLabel.setName("hoverLabel"); // NOI18N mainMap.add(hoverLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 140, -1, -1)); @@ -892,6 +890,14 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { dateInfo.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); dateInfo.setName("dateInfo"); // NOI18N + jSlider1.setName("jSlider1"); // NOI18N + + jLabel1.setText("Now"); + jLabel1.setName("jLabel1"); // NOI18N + + jLabel2.setText("Beginning"); + jLabel2.setName("jLabel2"); // NOI18N + jMenuBar1.setName("jMenuBar1"); // NOI18N FileMenu.setText("File"); @@ -1136,14 +1142,23 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() + .add(layout.createSequentialGroup() .addContainerGap() - .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) - .add(dateInfo, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 307, Short.MAX_VALUE) - .add(jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) - .add(mapPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(57, 57, 57)) + .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(layout.createSequentialGroup() + .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) + .add(dateInfo, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 307, Short.MAX_VALUE) + .add(jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) + .add(mapPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .add(57, 57, 57)) + .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() + .add(jLabel1) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(jSlider1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 702, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(jLabel2) + .add(131, 131, 131)))) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) @@ -1154,7 +1169,12 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .add(mapPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) .add(dateInfo) - .add(113, 113, 113)) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) + .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(jSlider1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .add(jLabel1) + .add(jLabel2)) + .add(79, 79, 79)) ); pack(); @@ -1198,14 +1218,16 @@ private void zoomButtonOutActionPerformed(java.awt.event.ActionEvent evt) {//GEN }//GEN-LAST:event_zoomButtonOutActionPerformed private void mainMapMouseMoved(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_mainMapMouseMoved + + System.out.println(waypoints); + GeoPosition gp = mainMap.convertPointToGeoPosition(new Point2D.Double(evt.getX(), evt.getY())); - DecimalFormat fmt = new DecimalFormat("#00.00000"); + DecimalFormat fmt = new DecimalFormat("#00.000000"); rtLatValue.setText(fmt.format(gp.getLatitude())); rtLonValue.setText(fmt.format(gp.getLongitude())); rtxPosValue.setText(String.format("%.3f", mainMap.getTileFactory().geoToPixel(gp, mainMap.getZoom()).getX())); rtyPosValue.setText(String.format("%.3f", mainMap.getTileFactory().geoToPixel(gp, mainMap.getZoom()).getY())); // TODO add your handling code here: - //convert to world bitmap Point2D gp_pt = mainMap.getTileFactory().geoToPixel(gp, mainMap.getZoom()); //convert to screen @@ -1870,6 +1892,7 @@ public MapNode getNodeByIp(String ip) { private HashMap latlon; // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JMenu AppendMenu; + private javax.swing.JLabel ConnectionLabel; private javax.swing.JMenu EditMenu; private javax.swing.JMenu FileMenu; private javax.swing.JMenu HelpMenu; @@ -1883,6 +1906,7 @@ public MapNode getNodeByIp(String ip) { private javax.swing.JMenuItem applyFilter; private javax.swing.JMenuItem centerMap; private javax.swing.JMenuItem closeItem; + private javax.swing.JLabel connectionValue; private javax.swing.JPopupMenu contestMenu; private javax.swing.JPopupMenu contestMenuNode; private javax.swing.JLabel dateInfo; @@ -1899,12 +1923,15 @@ public MapNode getNodeByIp(String ip) { private javax.swing.JComboBox ipComboBox; private javax.swing.JLabel ipLabel; private javax.swing.JCheckBoxMenuItem jCheckBoxMenuItem1; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel2; private javax.swing.JMenuBar jMenuBar1; private javax.swing.JPanel jPanel1; private javax.swing.JPopupMenu.Separator jSeparator1; private javax.swing.JPopupMenu.Separator jSeparator2; private javax.swing.JPopupMenu.Separator jSeparator3; private javax.swing.JSeparator jSeparator4; + private javax.swing.JSlider jSlider1; private javax.swing.JMenuItem jsAppendMenu; private javax.swing.JMenuItem jsOpenMenu; private javax.swing.JMenuItem jsSaveMenu; @@ -1914,9 +1941,7 @@ public MapNode getNodeByIp(String ip) { private javax.swing.JLabel latitudeValue; private javax.swing.JCheckBoxMenuItem linksMenu; private javax.swing.JCheckBoxMenuItem listCheck; - private javax.swing.JLabel locatedLabel; private javax.swing.JLabel locatedLabel1; - private javax.swing.JLabel locatedLabel2; private javax.swing.JScrollPane locatedNodes; private javax.swing.JLabel lonLabel; private javax.swing.JLabel longitudeValue; @@ -1928,6 +1953,8 @@ public MapNode getNodeByIp(String ip) { private static javax.swing.JList nodeList; private javax.swing.JCheckBoxMenuItem nodesCheck; private javax.swing.JMenu openMenu; + private javax.swing.JLabel osLabel; + private javax.swing.JLabel osValue; private javax.swing.JMenuItem preferencesItem; private javax.swing.JMenu recentFilesMenu; private javax.swing.JLabel rtLat; @@ -1949,8 +1976,6 @@ public MapNode getNodeByIp(String ip) { private javax.swing.JMenuItem txtSaveMenu; private javax.swing.JMenuItem txtSaveSelMenu; private javax.swing.JLabel upTimeValue; - private javax.swing.JLabel xPos1; - private javax.swing.JLabel xValue; private javax.swing.JLabel xValue1; private javax.swing.JMenuItem xmlAppendMenu; private javax.swing.JMenuItem xmlOpenMenu; diff --git a/src/freimapgsoc/MapNode.java b/src/freimapgsoc/MapNode.java index 79e4888..80a8d44 100644 --- a/src/freimapgsoc/MapNode.java +++ b/src/freimapgsoc/MapNode.java @@ -27,17 +27,21 @@ public MapNode(String ip, String name) { this.ip = ip; this.lat=DEFAULT_LAT; this.lon=DEFAULT_LON; + this.uptime="00:00:00"; } public MapNode(String id, double lat, double lon) { this.lat = lat; this.lon = lon; + this.uptime="00:00:00"; + } public MapNode(String ip, String name, double lat, double lon) { this.name = name; this.lat = lat; this.lon = lon; + this.uptime="00:00:00"; } public MapNode(String ip, String name, String uptime) { @@ -52,6 +56,7 @@ public MapNode(String ip, String name, double lat, double lon, Vector if this.lat=lat; this.lon=lon; this.inter=ifaces; + this.uptime="00:00:00"; } diff --git a/src/freimapgsoc/MysqlDataSource.java b/src/freimapgsoc/MysqlDataSource.java index 31379dc..1b795e4 100755 --- a/src/freimapgsoc/MysqlDataSource.java +++ b/src/freimapgsoc/MysqlDataSource.java @@ -78,26 +78,28 @@ public void parseNode() { stmt = (Statement) conn.createStatement();//create Statmente fror conn connection rss = stmt.executeQuery("SELECT * FROM nodes"); //Excute Query rss.beforeFirst(); - while (rss.next()) { - String nodeIp = rss.getString("ip"); - System.out.println(nodeIp); - Statement stmt2 = conn.createStatement(); - ResultSet rss2 = stmt2.executeQuery("SELECT * FROM interfaces WHERE mainIp=" + "\""+nodeIp+"\""); - System.out.println("SELECT * FROM interfaces WHERE mainip=" + "\""+nodeIp+"\""); - rss2.beforeFirst(); - while (rss2.next()) { - iface.add(rss2.getString(2)); - interfaces.put(rss2.getString(1), rss.getString(2)); - } + while (rss.next()) { + String nodeIp = rss.getString("ip"); //prendo l'ip della prima riga + System.out.println(nodeIp); + Statement stmt2 = conn.createStatement(); + ResultSet rss2 = stmt2.executeQuery("SELECT * FROM interfaces WHERE mainIp=" + "\"" + nodeIp + "\""); + System.out.println("SELECT * FROM interfaces WHERE mainip=" + "\"" + nodeIp + "\""); + rss2.beforeFirst(); + //tiro fuori tutte le interfacce di quel nodo...! + while (rss2.next()) { + iface.removeAllElements(); + iface.add(rss2.getString("intip")); + interfaces.put(rss2.getString("mainip"), rss2.getString("intip")); + } if (rss.getBoolean("isGateway") == true) { attributes.put("Gateway", "SELF"); } else if (rss.getBoolean("isGateway") == false) { attributes.put("Gateway", "Other:" + rss.getString("gatewayIp")); } - MapNode node = new MapNode(rss.getString("ip"), rss.getString("name"), rss.getString("uptime"), iface, rss.getDouble("lat"), rss.getDouble("lon"), attributes); - nodeList.add(node); - nodeByName.put(rss.getString("name"), node); - nodeByIp.put(rss.getString("ip"), node); + MapNode node = new MapNode(rss.getString("ip"), rss.getString("name"), rss.getString("uptime"), iface, rss.getDouble("lat"), rss.getDouble("lon"), attributes); + nodeList.add(node); + nodeByName.put(rss.getString("name"), node); + nodeByIp.put(rss.getString("ip"), node); } } @@ -138,7 +140,11 @@ public void parseInterfaces() { } } - @Override + /** + * + * @return + */ + @Override public void init() { try { System.out.println("Fetching data from Database: " + db); @@ -397,12 +403,22 @@ public void init(String path) { throw new UnsupportedOperationException("Not supported yet."); } - @Override + /** + * + * @param ip + * @return + */ + @Override public MapNode getNodeById(String ip) { return nodeByIp.get(ip); } - @Override + /** + * + * @param id + * @return + */ + @Override public Vector getLinksFromSource(String id) { Vector linkFromSrc = new Vector(); for (int i = 0; i < linkBySrc.size(); i++) { @@ -411,8 +427,13 @@ public Vector getLinksFromSource(String id) { return linkFromSrc; } - @Override - @SuppressWarnings("element-type-mismatch") + /** + * + * @param id + * @return + */ + @Override + @SuppressWarnings("element-type-mismatch") public Vector getLinksFromDest(String id) { Vector linkFromDest = new Vector(); for (int i = 0; i < linkByDest.size(); i++) { @@ -421,18 +442,32 @@ public Vector getLinksFromDest(String id) { return linkFromDest; } - @Override + /** + * + * @param ip + * @return + */ + @Override public MapNode getNodeByIp(String ip) { return nodeByIp.get(ip); } - @Override + /** + * + * @param configuration + * @return + */ + @Override public HashMap read_conf(HashMap configuration) { throw new UnsupportedOperationException("Not supported yet."); } - @Override + /** + * + * @return + */ + @Override public Vector getLinks() { return linkList; } diff --git a/src/freimapgsoc/NodeInfoFlow.java b/src/freimapgsoc/NodeInfoFlow.java index 5d15152..62d323a 100755 --- a/src/freimapgsoc/NodeInfoFlow.java +++ b/src/freimapgsoc/NodeInfoFlow.java @@ -120,11 +120,13 @@ private void sexupLayout(JFreeChart chart) { public int minLinks=Integer.MAX_VALUE, maxLinks=-1; public int status = STATUS_FETCHING; - /** This method is called from within the constructor to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the Form Editor. - */ + /** + * This method is called from within the constructor to + * initialize the form. + * WARNING: Do NOT modify this code. The content of this method is + * always regenerated by the Form Editor. + * @return + */ @SuppressWarnings("unchecked") // //GEN-BEGIN:initComponents private void initComponents() { diff --git a/src/freimapgsoc/NodeLayer.java b/src/freimapgsoc/NodeLayer.java index 4265adf..699ede9 100755 --- a/src/freimapgsoc/NodeLayer.java +++ b/src/freimapgsoc/NodeLayer.java @@ -63,7 +63,7 @@ public class NodeLayer implements DataSourceListener { long crtTime; - boolean hideUnlocated = Configurator.getB(new String[]{"display", "hideUnlocated"}); + //boolean hideUnlocated = Configurator.getB(new String[]{"display", "hideUnlocated"}); public NodeLayer(DataSource source) { this.source=source; @@ -567,7 +567,7 @@ public void mouseClicked(double lat, double lon, int button) { public void hideUnlocatedNodes(boolean hide) { - hideUnlocated = hide; +// hideUnlocated = hide; } diff --git a/src/freimapgsoc/OlsrdDataSource.java b/src/freimapgsoc/OlsrdDataSource.java index 9cd8a9f..48f5759 100755 --- a/src/freimapgsoc/OlsrdDataSource.java +++ b/src/freimapgsoc/OlsrdDataSource.java @@ -48,13 +48,13 @@ public OlsrdDataSource() { public void init(HashMap conf) { - String host = Configurator.getS("host", conf); - int port = Configurator.getI("port", conf); + String host = "localhost"; + int port = 2004; - nodefile = Configurator.getS("nodefile", conf); + // nodefile = Configurator.getS("nodefile", conf); //System.out.println("nodefile = "+nodefile); - sNodeSource = Configurator.getS("nodesource", conf); + //sNodeSource = Configurator.getS("nodesource", conf); if (port==-1) { System.err.println("invalid port parameter "+port); @@ -62,22 +62,24 @@ public void init(HashMap conf) { } dot = new DotPluginListener(host, port, this); } - /* - public void init(HashMap conf) { - String host = Configurator.getS("host", conf); - int port = Configurator.getI("port", conf); - - nodefile = Configurator.getS("nodefile", conf); - //System.out.println("nodefile = "+nodefile); - - sNodeSource = Configurator.getS("nodesource", conf); - - if (port==-1) { - System.err.println("invalid port parameter "+port); - System.exit(1); - } - dot = new DotPluginListener(host, port, this); - }*/ + /** + * public void init(HashMap conf) { + * String host = Configurator.getS("host", conf); + * int port = Configurator.getI("port", conf); + * + * nodefile = Configurator.getS("nodefile", conf); + * //System.out.println("nodefile = "+nodefile); + * + * sNodeSource = Configurator.getS("nodesource", conf); + * + * if (port==-1) { + * System.err.println("invalid port parameter "+port); + * System.exit(1); + * } + * dot = new DotPluginListener(host, port, this); + * } + * @return + */ @SuppressWarnings("unchecked") public Vector getNodeList() { @@ -236,22 +238,40 @@ public Vector getLinksFromDest(String id) { throw new UnsupportedOperationException("Not supported yet."); } - @Override + /** + * + * @param ip + * @return + */ + @Override public MapNode getNodeByIp(String ip) { throw new UnsupportedOperationException("Not supported yet."); } - @Override + /** + * + * @return + */ + @Override public void init() { throw new UnsupportedOperationException("Not supported yet."); } - @Override + /** + * + * @param configuration + * @return + */ + @Override public HashMap read_conf(HashMap configuration) { throw new UnsupportedOperationException("Not supported yet."); } - @Override + /** + * + * @return + */ + @Override public Vector getLinks() { throw new UnsupportedOperationException("Not supported yet."); } diff --git a/src/freimapgsoc/Start.form b/src/freimapgsoc/Start.form index 49a988f..e11fc62 100644 --- a/src/freimapgsoc/Start.form +++ b/src/freimapgsoc/Start.form @@ -23,49 +23,39 @@ - - - - - - - - - - + - - - - - - + + + + + + + + + + + - + + - - - - - - + - + - - - - - + + + @@ -75,7 +65,7 @@ - + @@ -124,20 +114,6 @@ - - - - - - - - - - - - - - @@ -155,5 +131,12 @@ + + + + + + + diff --git a/src/freimapgsoc/Start.java b/src/freimapgsoc/Start.java index abd541f..cb5b194 100644 --- a/src/freimapgsoc/Start.java +++ b/src/freimapgsoc/Start.java @@ -32,16 +32,18 @@ public Start() { if (check.olsr) { olsrdButton.setEnabled(true); } - if (!check.mySql && !check.nameservice && !check.olsr) { - firstLabel.setText("There aren't DataSources"); - } + //if (!check.mySql && !check.nameservice && !check.olsr) { + // firstLabel.setText("There aren't DataSources"); + //} } - /** This method is called from within the constructor to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the Form Editor. - */ + /** + * This method is called from within the constructor to + * initialize the form. + * WARNING: Do NOT modify this code. The content of this method is + * always regenerated by the Form Editor. + * @return + */ @SuppressWarnings("unchecked") // //GEN-BEGIN:initComponents private void initComponents() { @@ -50,10 +52,9 @@ private void initComponents() { mySQLButton = new javax.swing.JButton(); nameServiceButton = new javax.swing.JButton(); openFileButton = new javax.swing.JButton(); - jLabel1 = new javax.swing.JLabel(); - firstLabel = new javax.swing.JLabel(); secondLabel = new javax.swing.JLabel(); openExampleFile = new javax.swing.JButton(); + jLabel1 = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setName("Form"); // NOI18N @@ -98,14 +99,6 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { } }); - jLabel1.setFont(resourceMap.getFont("secondLabel.font")); // NOI18N - jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N - jLabel1.setName("jLabel1"); // NOI18N - - firstLabel.setFont(resourceMap.getFont("secondLabel.font")); // NOI18N - firstLabel.setText(resourceMap.getString("firstLabel.text")); // NOI18N - firstLabel.setName("firstLabel"); // NOI18N - secondLabel.setFont(resourceMap.getFont("secondLabel.font")); // NOI18N secondLabel.setText(resourceMap.getString("secondLabel.text")); // NOI18N secondLabel.setName("secondLabel"); // NOI18N @@ -119,44 +112,40 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { } }); + jLabel1.setIcon(resourceMap.getIcon("jLabel1.icon")); // NOI18N + jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N + jLabel1.setName("jLabel1"); // NOI18N + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() - .addGap(16, 16, 16) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(firstLabel) - .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 241, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addContainerGap()) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() - .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) - .addComponent(openFileButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 253, Short.MAX_VALUE) - .addComponent(mySQLButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 253, Short.MAX_VALUE) - .addComponent(olsrdButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 253, Short.MAX_VALUE) - .addComponent(nameServiceButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 253, Short.MAX_VALUE)) - .addContainerGap()) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() - .addComponent(secondLabel) - .addGap(88, 88, 88)))) - .addGroup(layout.createSequentialGroup() - .addContainerGap() - .addComponent(openExampleFile, javax.swing.GroupLayout.DEFAULT_SIZE, 253, Short.MAX_VALUE) - .addContainerGap()) + .addContainerGap() + .addComponent(jLabel1)) + .addGroup(layout.createSequentialGroup() + .addGap(48, 48, 48) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) + .addComponent(olsrdButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(nameServiceButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(mySQLButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(openExampleFile, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(openFileButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 230, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addGroup(layout.createSequentialGroup() + .addGap(109, 109, 109) + .addComponent(secondLabel))) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() - .addGap(21, 21, 21) + .addGap(20, 20, 20) .addComponent(jLabel1) - .addGap(38, 38, 38) - .addComponent(firstLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(secondLabel) - .addGap(34, 34, 34) + .addGap(18, 18, 18) + .addComponent(secondLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 13, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(7, 7, 7) .addComponent(olsrdButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(nameServiceButton) @@ -166,7 +155,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addComponent(openFileButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(openExampleFile) - .addContainerGap(25, Short.MAX_VALUE)) + .addContainerGap(16, Short.MAX_VALUE)) ); pack(); @@ -230,7 +219,6 @@ public void run() { }); } // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JLabel firstLabel; private javax.swing.JLabel jLabel1; private javax.swing.JButton mySQLButton; private javax.swing.JButton nameServiceButton; diff --git a/src/freimapgsoc/VisorFrame.java b/src/freimapgsoc/VisorFrame.java deleted file mode 100755 index d3cb3ad..0000000 --- a/src/freimapgsoc/VisorFrame.java +++ /dev/null @@ -1,550 +0,0 @@ -/* net.relet.freimap.VisorFrame.java - - This file is part of the freimap software available at freimap.berlios.de - - This software is copyright (c)2007 Thomas Hirsch - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License with - the Debian GNU/Linux distribution in file /doc/gpl.txt - if not, write to the Free Software Foundation, Inc., 59 Temple Place, - Suite 330, Boston, MA 02111-1307 USA -*/ - -package freimapgsoc; - -import java.awt.*; -import java.awt.event.*; -import java.awt.geom.*; -import java.io.File; -import java.text.DateFormat; -import java.util.*; - -import javax.swing.*; -import javax.swing.border.LineBorder; - -import org.ho.yaml.Yaml; - -/* -todo dimension -> configfile - sensible method names - rename x and y into lon and lat -*/ - -public class VisorFrame extends JPanel implements ActionListener, ComponentListener, MouseListener, MouseMotionListener, MouseWheelListener { - double scale=1.0d; // current scaling - int zoom = 0; // zoom factor, according to OSM tiling - int w=800,h=600; //screen width, hight - int cx=400, cy=300; //center of screen - - int timelinex0=w/3, timelinex1=11*w/12; - long crtTime; - boolean playing=false; - //crtTime = the second which ought to be displayed, according to user gestures or the flow of time - //adjustedTime = the above, adjusted to a nearby time which can actually be displayed - - ImageIcon logo1 = new ImageIcon(getClass().getResource("/gfx/logo1.png")); - ImageIcon logo2 = new ImageIcon(getClass().getResource("/gfx/logo2.png")); - ImageIcon play = new ImageIcon(getClass().getResource("/gfx/play.png")); - ImageIcon stop = new ImageIcon(getClass().getResource("/gfx/stop.png")); - ImageIcon visible = new ImageIcon(getClass().getResource("/gfx/eyeopen.png")); - ImageIcon dimmed = new ImageIcon(getClass().getResource("/gfx/eyedim.png")); - ImageIcon hidden = new ImageIcon(getClass().getResource("/gfx/eyeclosed.png")); - - public static Font mainfont = new Font("SansSerif", 0, 12), - mainfontbold = new Font("SansSerif", Font.BOLD, 12), - smallerfont = new Font("SansSerif", 0, 9); - - public static Color fgcolor = Configurator.getCOrDefault(new String[]{"colorscheme", "foreground"},20,200,20,255), //most lines - bgcolor = Configurator.getCOrDefault(new String[]{"colorscheme", "boxes"},64,128,64,196), //used for transparent backgrounds of most status boxes - fgcolor2 = Configurator.getCOrDefault(new String[]{"colorscheme", "foreground2"},150,150,255,255), //used for foreground of link status boxes - bgcolor2 = Configurator.getCOrDefault(new String[]{"colorscheme", "boxes2"},40,40,192,196), //used for transparent backgrounds of link status boxes - backcolor = Configurator.getCOrDefault(new String[]{"colorscheme", "background"},0,0,0,255); //the main background - - int mousex=0, mousey=0; - - int selectedTime; //a pixel value, describing the position of the mouse where it currently touches the timebar - - Runtime runtime; - - DateFormat dfdate=DateFormat.getDateInstance(DateFormat.MEDIUM, Locale.GERMANY), - dftime=DateFormat.getTimeInstance(DateFormat.MEDIUM, Locale.GERMANY); - - Vector layers = new Vector(); - Vector layerids = new Vector(); - VisorLayer activeLayer; - - Image buf; //double buffer - - Converter converter = new Converter(); - - String location = "http://relet.net/trac/freimap"; - NameFinder namefinder = new NameFinder(); - - public VisorFrame() { - - this.addComponentListener(this); - this.addMouseListener(this); - this.addMouseMotionListener(this); - this.addMouseWheelListener(this); - this.registerKeyboardAction(this, "zoomIn", KeyStroke.getKeyStroke('+'), JComponent.WHEN_FOCUSED); - this.registerKeyboardAction(this, "zoomOut", KeyStroke.getKeyStroke('-'), JComponent.WHEN_FOCUSED); - runtime=Runtime.getRuntime(); - - initDialogs(); - initZoom(0, cx, cy); - } - - public void addLayer(String id, VisorLayer layer) { - addLayer(id, layer, false); - } - public void addLayer(String id, VisorLayer layer, boolean active) { - layer.setConverter(converter); - layer.setDimension(w,h); - layer.setZoom(zoom); - if (active) activeLayer=layer; - layers.add(layer); - layerids.add(id); - } - - public void removeLayer(VisorLayer layer) { - layerids.remove(layers.indexOf(layer)); - layers.remove(layer); - } - public Dimension getPreferredSize() { - return new Dimension(w,h); - } - - public void componentHidden(ComponentEvent e) {} - public void componentMoved(ComponentEvent e) {} - public void componentShown(ComponentEvent e) {} - public void componentResized(ComponentEvent e) { - w = this.getWidth(); - h = this.getHeight(); - cx = w / 2; - cy = h / 2; - - buf=this.createImage(w,h); - - for (int i=0;i1) && (sfUT1) && (slUT>lUT)) lUT=slUT; - } - - for (int i=0;i 0 ) && (fUT != lUT)) { - int tmin = (int)Math.round((double)(fAT - fUT) / (lUT - fUT) * (x1-x0) + x0), - tmax = (int)Math.round((double)(lAT - fUT) / (lUT - fUT) * (x1-x0) + x0); - g.setPaint(fgcolor); - g.setStroke(new BasicStroke((float)3f)); - g.draw(new Line2D.Double(tmin, h-57-i*3, tmax, h-57-i*3)); - - if ((selectedTime>0) && (selectedTime < tmax)) { - g.setPaint(Color.green); - g.setStroke(new BasicStroke((float)2f)); - g.draw(new Line2D.Double(selectedTime, h-70, selectedTime, h-50)); - } - } - - g.setPaint(fgcolor); - g.setStroke(new BasicStroke((float)1f)); - g.draw(new Line2D.Double(x0, h-65, x0, h-55)); - g.draw(new Line2D.Double(x1, h-65, x1, h-55)); - g.setFont(smallerfont); - g.drawString(dfdate.format(fUT*1000), x0, h-45); - g.drawString(dftime.format(fUT*1000), x0, h-35); - g.drawString(dfdate.format(lUT*1000), x1, h-45); - g.drawString(dftime.format(lUT*1000), x1, h-35); - - g.setPaint(Color.green); - if (lUT>fUT) { - int xc = (int)Math.round((double)(crtTime - fUT) / (lUT - fUT) * (x1-x0) + x0); - g.draw(new Line2D.Double(xc, h-65, xc, h-55)); - g.drawString(dfdate.format(crtTime*1000), xc, h-75); - g.drawString(dftime.format(crtTime*1000), xc, h-65); - } - } - - //draw layer name + visibility toggle - for (int i=0;ih-100)&&(mousex >= timelinex0)&&(mousex <= timelinex1)) { - activeLayer.mouseMoved(0,0); //unset any mouse motion - selectedTime = mousex; - } else { - activeLayer.mouseMoved(lat, lon); - selectedTime = 0; - } - repaint(); - } - - public void mouseClicked(MouseEvent e) { - mousex = e.getX(); - mousey = e.getY(); - - double lon = converter.viewXToLon(mousex); - double lat = converter.viewYToLat(mousey); - - switch (e.getButton()) { - case MouseEvent.BUTTON1: { - switch (e.getClickCount()) { - case 1: { - if ((mousex>20) && (mousex<40)&& (mousey>40) && (mousey<40+layers.size()*20)) { - int selectedLayer = (mousey-40) / 20; - layers.elementAt(selectedLayer).toggleVisibility(); - } else if ((mousex>40) && (mousex<150)&& (mousey>40) && (mousey<40+layers.size()*20)) { - int selectedLayer = (mousey-40) / 20; - activeLayer.mouseMoved(0,0); - activeLayer = layers.elementAt(selectedLayer); - } else if ((mousey>h-100)&&(mousex >= timelinex0)&&(mousex <= timelinex1)) { - setCurrentTime(mousex-timelinex0); - } else if ((mousey>h-70)&&(mousey= timelinex0-30)&&(mousex <= timelinex1)) { - playing=!playing; - if (crtTime==0) setCurrentTime(0); - } - this.repaint(); - break; - } - case 2: { - //zoom=zoom+1; //DEBUG only - //initZoom(zoom, mousex, mousey); - System.out.println("Clicked on: "+lat+" "+lon); -// centerOn(e.getPoint()); - break; - } - } - break; - } - case MouseEvent.BUTTON3: { - activeLayer.mouseClicked(lat, lon, MouseEvent.BUTTON3); - } - } - } - - void setCurrentTime(int x) { - long fUT = Long.MAX_VALUE, lUT = 0; //move this to an extra function - for (int i=0;i1) && (sfUT1) && (slUT>lUT)) lUT=slUT; - } - - long time = (long)(fUT + (lUT - fUT) * ((double)x) / (timelinex1-timelinex0)); - crtTime=time; - } - - int mrefx, mrefy, mouseMode, refPosition, refZoom; - - public void mousePressed(MouseEvent e) { - mrefx = e.getX(); - mrefy = e.getY(); - mouseMode = e.getButton(); - refPosition = (mrefy-40) / 20; - refZoom = zoom; - } - - public void mouseDragged(MouseEvent e) { - mousex = e.getX(); - mousey = e.getY(); - if ((mousey>h-100)&&(mousex >= timelinex0)&&(mousex <= timelinex1)) { - setCurrentTime(mousex-timelinex0); - } else if ((mousex>20) && (mousex<150)&& (mousey>40) && (mousey<40+layers.size()*20)) { - //int targPosition = (mousey-40) / 20; - } else { - switch(mouseMode) { - case MouseEvent.BUTTON1: { - converter.setWorldRel(mrefx - mousex, mrefy - mousey); - //namefinder.setLocation(converter.viewYToLat(cy), converter.viewXToLon(cx), zoom); - - mrefx = mousex; - mrefy = mousey; - - repaint(); - - break; - } - case MouseEvent.BUTTON3: { - int steps = (mousey - mrefy) / 20; - zoom = Math.min(22, Math.max(0, refZoom + steps)); - initZoom(zoom, mrefx, mrefy); - scale = converter.getScale(); - repaint(); - } - } - } - } - - public void mouseWheelMoved(MouseWheelEvent e) { - Point p = e.getPoint(); - modifyZoom((e.getWheelRotation() < 0) ? +1 : -1, p.x, p.y); - } - - void modifyZoom(int steps) { - modifyZoom(steps, w/2, h/2); - } - void modifyZoom(int steps, int x, int y) { - saveScale(); - zoom += steps; - zoom = Math.min(22, Math.max(0, zoom)); - initZoom(zoom, x, y); - // Calculate the unit size - scale = converter.getScale(); - repaint(); - } - - public void mouseEntered(MouseEvent e) {} - public void mouseExited(MouseEvent e) {} - public void mouseReleased(MouseEvent e) { - if ((mousex>20) && (mousex<150)&& (mousey>40) && (mousey<40+layers.size()*20)) { - if (refPosition >= layers.size()) return; - int targPosition = (mousey-40) / 20; - VisorLayer ref = layers.elementAt(refPosition), - swap = layers.elementAt(targPosition); - String refID = layerids.elementAt(refPosition), - swapID = layerids.elementAt(targPosition); - layers.setElementAt(ref, targPosition); - layerids.setElementAt(refID, targPosition); - layers.setElementAt(swap, refPosition); - layerids.setElementAt(swapID, refPosition); - } - } - - public void nextFrame() { - if (playing) crtTime += 1; - boolean repaint = false; - for (int i=0; i i = layers.iterator(); - while(i.hasNext()) { - i.next().setDisplayFilter(match, filterRange.getSelectedIndex(), caseSens.isSelected(), regEx.isSelected()); - } - } else - if (e.getActionCommand().equals("Hide unlocated nodes")) { - Iterator i = layers.iterator(); - boolean hideUnlocated = ((JCheckBoxMenuItem)e.getSource()).isSelected(); - while(i.hasNext()) { - i.next().hideUnlocatedNodes(hideUnlocated); - } - } else - if (e.getActionCommand().equals("zoomIn")) { - modifyZoom(+1); - } else - if (e.getActionCommand().equals("zoomOut")) { - modifyZoom(-1); - } else - if (e.getActionCommand().equals("About")) { - about.pack(); - about.setVisible(true); - } else - if (e.getActionCommand().equals("Display Filter...")) { - filter.pack(); - filter.setVisible(true); - } - } -} diff --git a/src/freimapgsoc/VisorLayer.java b/src/freimapgsoc/VisorLayer.java deleted file mode 100755 index abc0ee6..0000000 --- a/src/freimapgsoc/VisorLayer.java +++ /dev/null @@ -1,121 +0,0 @@ -/* net.relet.freimap.VisorLayer.java - - This file is part of the freimap software available at freimap.berlios.de - - This software is copyright (c)2007 Thomas Hirsch - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License with - the Debian GNU/Linux distribution in file /doc/gpl.txt - if not, write to the Free Software Foundation, Inc., 59 Temple Place, - Suite 330, Boston, MA 02111-1307 USA -*/ - -package freimapgsoc; - -import java.awt.Graphics2D; - -public abstract class VisorLayer { - public static final int VISIBILITY_NOT = 0; - public static final int VISIBILITY_FULL = 1; - public static final int VISIBILITY_DIM = 2; - - protected Converter converter; - - /** - * Paints the layer. - * - * @param g, a Graphics2D object. - */ - public abstract void paint(Graphics2D g); - - - /** - * returns the DataSource of this layer. If the layer is just decorative, returns null. - * - * @return null or DataSource - */ - - public abstract DataSource getSource(); - - /** - * Indiciates whether this VisorLayer instance is transparent. - * - * @return true or false - */ - public boolean isTransparent() { - return false; - } - - /** - * Attempts to set transparency to this VisorLayer. - */ - - public void setTransparent(boolean t) { - } - - /** - * Sets the scaling converter for this background. - */ - - public void setConverter(Converter conv) { - converter = conv; - } - - /** - * Sets the width and height of the section the layer is - * showing. - * - *

This method must be called whenever the size changes - * otherwise calculations will get incorrect and drawing problems - * may occur.

- * - * @param w - * @param h - */ - public void setDimension(int w, int h) {} - - /** - * Sets the VisorLayers zoom. - * - *

This method must be called whenever the zoom changes - * otherwise calculations will get incorrect and drawing problems - * may occur.

- * - * @param zoom - */ - public void setZoom(int zoom) {} - - /** retrieves selected layer visibility */ - public int getVisibility() { - return VISIBILITY_FULL; - } - /** toggles visibility between available modes */ - public void toggleVisibility() {} - /** sets or unsets display filter */ - public static final int FILTER_IP = 0 ; - public static final int FILTER_IDENTIFIER = 1 ; - public void setDisplayFilter(String match, int type, boolean cases, boolean regex) {} - public void hideUnlocatedNodes(boolean hide) {} - - /** - * Sets the current point in time to be displayed - * - * @param crtTime, an unix time stamp - * @return true, if the layer has to be repainted consequently - */ - public boolean setCurrentTime(long crtTime) { return false; } - - public void mouseMoved(double lat, double lon) {} - public void mouseClicked(double lat, double lon, int button) {} - -} diff --git a/src/freimapgsoc/YamlDataSource.java b/src/freimapgsoc/YamlDataSource.java deleted file mode 100755 index 2d46533..0000000 --- a/src/freimapgsoc/YamlDataSource.java +++ /dev/null @@ -1,392 +0,0 @@ -/* net.relet.freimap.DataSource.java - - This file is part of the freimap software available at freimap.berlios.de - - This software is copyright (c)2007 Thomas Hirsch - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License with - the Debian GNU/Linux distribution in file /doc/gpl.txt - if not, write to the Free Software Foundation, Inc., 59 Temple Place, - Suite 330, Boston, MA 02111-1307 USA -*/ - -package freimapgsoc; - -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; - -import org.ho.yaml.*; -import com.thoughtworks.xstream.*; - -public class YamlDataSource implements DataSource { - - private final static String[][] nullParms=new String[][]{}; - - MysqlDataSource mysqlSource; - boolean useMysqlSource = false; - - String yamlURL; - long firstUpdateTime=1, lastUpdateTime=1; - int clockCount; - LinkedList updateTimes=new LinkedList(); - HashMap nodeByID=new HashMap(); - HashMap nodeByName=new HashMap(); - Vector nodes; - - DataSourceListener listener; - - DateFormat df=new SimpleDateFormat("y-M-D H:m:s"); - - XStream xstream=new XStream();//DEBUG - - public YamlDataSource() { - } - public void init(HashMap conf) { - yamlURL = Configurator.getS("url", conf); - - //if (useMysqlSource) mysqlSource=new MysqlDataSource("localhost", "root", "", "freiberlin", true); - - try { - Object yaml=getYAML(yamlURL+"/uptime/yaml/state/overview/", nullParms); - ArrayList list = list(yaml); - firstUpdateTime=getDate(list.get(0), "startdate"); - lastUpdateTime =getDate(list.get(1), "stopdate"); - clockCount =getI(list.get(2), "count"); - } catch (Exception ex) { - ex.printStackTrace(); - } - - //fake overview getYAML by reading from a file -/* try { - ArrayList list = list(Yaml.load(new File("overview.yaml"))); - firstUpdateTime=getI(list.get(0), "startdate"); - lastUpdateTime =getI(list.get(1), "stopdate"); - clockCount =getI(list.get(2), "count"); - } catch (Exception ex) { - ex.printStackTrace(); - } -*/ //end - - fetchAvailableTimeStamps(); - } - - @SuppressWarnings("unchecked") - ArrayList list(Object o) { - if (!(o instanceof ArrayList)) return null; - return (ArrayList)o; - } - - String getS(HashMap map, String key) { - Object o = map.get(key); - try { - return (String)o; - } catch (Exception ex) { - System.out.println(o); - ex.printStackTrace(); - System.exit(1); - } - return null; - } - - long getDate(HashMap map, String key) { - try { - long timestamp = df.parse(getS(map, key)).getTime(); - return timestamp; - } catch (Exception ex) { - ex.printStackTrace(); - System.exit(1); - } - return -1; - } - - int getI(HashMap map, String key) { - Object o = map.get(key); - try { - return ((Integer)o).intValue(); - } catch (Exception ex) { - System.out.println(o); - ex.printStackTrace(); - System.exit(1); - } - return -1; - } - - Object getYAML(String surl, String[][] parms) { - //performs a HTTP POST, gunzips the content, and parses it as YAML file - try { - // Construct data - String data=""; - for(int i = 0; i < parms.length; i++) { - data += URLEncoder.encode(parms[i][0], "UTF-8") + "=" + URLEncoder.encode(parms[i][1], "UTF-8"); - if (i getNodeList() { - if (useMysqlSource) { - nodes = mysqlSource.getNodeList(); - //for (Enumeration enu = generatedNodes.keys(); enu.hasMoreElements();) { - // nodes.add(generatedNodes.get(enu.nextElement())); - //} - return nodes; - } else { - try { - //ObjectInputStream ois=new ObjectInputStream(getClass().getResourceAsStream(Configurator.get("olsrd.nodefile"))); - //nodes = (Vector)ois.readObject(); - //ois.close(); - //for (int i=0;i getNodeAvailability(long time) { - System.err.println("Not available: getNodeAvailability"); - return new HashMap(); - } - public long getLastUpdateTime() { - return lastUpdateTime; - } - public long getFirstUpdateTime() { - return firstUpdateTime; - } - public long getFirstAvailableTime() { - //TODO - return 1; - } - public long getLastAvailableTime() { - //TODO - return 1; - } - public MapNode getNodeByName(String id) { - //TODO - return null; - } - - public long getClosestUpdateTime(long time) { - long cur=-1, id=-1, closest = Long.MAX_VALUE; - Iterator ki = updateTimes.iterator(); - while (ki.hasNext()) { - YamlState state=ki.next(); - cur = state.startdate; - id = state.id; - long d=Math.abs(time-cur); - if (d getLinks(long time) { //hack. expects a yamlstate id, not a timestamp. see directly above. (...FIXME) - Vector linkList=new Vector(); - try { - //Object yaml=getYAML(yamlURL+"/uptime/yaml/state/detail/", new String[][]{{"id",""+time}}); - HashMap yaml=(HashMap)Yaml.load(new File("detail.yaml")); - - Iterator entries=yaml.keySet().iterator(); - HashMap info=(HashMap)yaml.get(entries.next()); //startdate + stopdate, ignored - ArrayList conns=(ArrayList)(yaml.get(entries.next())); //connection infos - for(int i = 0; i < conns.size(); i++) { - HashMap conn=conns.get(i); - Integer srcid=(Integer)conn.get("from"); - Integer destid=(Integer)conn.get("to"); - MapNode srcnode=nodeByID.get(srcid); - MapNode destnode=nodeByID.get(destid); - if (srcnode==null) { - srcnode = getNode(srcid); - } - if (destnode==null) { - destnode = getNode(destid); - } - Double lq = (Double)conn.get("lq"); - Double nlq = (Double)conn.get("nlq"); - Link link=new Link(srcnode, destnode, lq.floatValue(), nlq.floatValue(), false); //TODO HNA? - linkList.remove(link); - linkList.add(link); - } - } catch (Exception ex) { - ex.printStackTrace(); - } - return linkList; - - //System.err.println("Not available: getLinks "+time); - //return null; - } - - @SuppressWarnings("unchecked") - public MapNode getNode(Integer id) { - //fetches full node info by id. - //updates nodes' status - //adds node to nodeByID - //returns node object - - HashMap yaml=(HashMap)getYAML(yamlURL+"/uptime/yaml/list/", new String[][]{{"id",""+id}, {"fields", "*"}}); - try { - //HashMap yaml=Yaml.load(new File("node.yaml")); - HashMap nodedata = yaml.get(id.toString()); - String ip=(String)nodedata.get("ip"); - MapNode node=nodeByName.get(ip); - //System.out.println("getNode "+id); - //System.out.println(xstream.toXML(yaml)); - //System.out.println(xstream.toXML(nodedata)); - System.exit(0); - - - } catch (Exception ex) { - ex.printStackTrace(); - } - - return null; - } - - //threaded information fetching - public void addDataSourceListener(DataSourceListener dsl) { - listener=dsl; - } - //some optional methods - public void getLinkProfile(Link link, LinkInfo info) { - System.err.println("Not available: getLinkProfile"); - } - public void getLinkCountProfile(MapNode node, NodeInfo info) { - System.err.println("Not available: getLinkCountProfile"); - } - - public void init(String path) { - throw new UnsupportedOperationException("Not supported yet."); - } - - public MapNode getNodeById(String id) { - throw new UnsupportedOperationException("Not supported yet."); - } - - public Vector getLinksFromSource(String id) { - throw new UnsupportedOperationException("Not supported yet."); - } - - public Vector getLinksFromDest(String id) { - throw new UnsupportedOperationException("Not supported yet."); - } - - @Override - public MapNode getNodeByIp(String ip) { - throw new UnsupportedOperationException("Not supported yet."); - } - - @Override - public void init() { - throw new UnsupportedOperationException("Not supported yet."); - } - - @Override - public HashMap read_conf(HashMap configuration) { - throw new UnsupportedOperationException("Not supported yet."); - } - - @Override - public Vector getLinks() { - throw new UnsupportedOperationException("Not supported yet."); - } - - - - class TimeStampFetcher implements Runnable { //use an own connection for concurrency! - private final static int OFFSET = 1000; - private final static int SLEEP = 10; - - long offsetTime; - - public TimeStampFetcher () { - long realOffset=Math.max(OFFSET, clockCount); - offsetTime=(lastUpdateTime-firstUpdateTime)*realOffset/clockCount; - new Thread(this).start(); - } - - @SuppressWarnings("unchecked") - public void run() { - long offset = firstUpdateTime; - try { - while (true) { - HashMap yaml=(HashMap)getYAML(yamlURL+"/uptime/yaml/state/list/", new String[][]{{"timerange",offset+"-"+(offset+offsetTime-1)}}); - //HashMap yaml = (HashMap)Yaml.load(new File("list.yaml")); - - boolean hasResults=false; - long stamp=0; - Iterator ids=yaml.keySet().iterator(); - while (ids.hasNext()) { - hasResults=true; - String yamlid=ids.next(); - HashMap entry=yaml.get(yamlid); - stamp=entry.get("startdate").intValue(); - int stop=entry.get("stopdate").intValue(); - Long clock=new Long(stamp); - updateTimes.add(new YamlState(Integer.parseInt(yamlid), stamp, stop)); - Thread.yield(); - } - if (!hasResults) break; - if (listener!=null) listener.timeRangeAvailable(firstUpdateTime, stamp); - - offset+=offsetTime; - if (offset>lastUpdateTime) break; - Thread.sleep(SLEEP); - } - - } catch (Exception ex) { - ex.printStackTrace(); - } - } - } -} diff --git a/src/freimapgsoc/YamlState.java b/src/freimapgsoc/YamlState.java deleted file mode 100755 index 1a63732..0000000 --- a/src/freimapgsoc/YamlState.java +++ /dev/null @@ -1,11 +0,0 @@ -package freimapgsoc; - -public class YamlState { - long id, startdate, stopdate; - - public YamlState(long id, long start, long stop) { - this.id=id; - startdate=start; - stopdate=stop; - } -} diff --git a/src/freimapgsoc/addServices.java b/src/freimapgsoc/addServices.java index fa3c128..0af0ad4 100644 --- a/src/freimapgsoc/addServices.java +++ b/src/freimapgsoc/addServices.java @@ -31,11 +31,13 @@ public addServices(DefaultListModel types, JmDNS jmdns) { this.types=types; } - /** This method is called from within the constructor to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the Form Editor. - */ + /** + * This method is called from within the constructor to + * initialize the form. + * WARNING: Do NOT modify this code. The content of this method is + * always regenerated by the Form Editor. + * @return + */ @SuppressWarnings("unchecked") // //GEN-BEGIN:initComponents private void initComponents() { diff --git a/src/freimapgsoc/goHere.java b/src/freimapgsoc/goHere.java index 29ca5f3..25441c7 100755 --- a/src/freimapgsoc/goHere.java +++ b/src/freimapgsoc/goHere.java @@ -27,11 +27,13 @@ public goHere(JXMapViewer map) { this.map=map; } - /** This method is called from within the constructor to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the Form Editor. - */ + /** + * This method is called from within the constructor to + * initialize the form. + * WARNING: Do NOT modify this code. The content of this method is + * always regenerated by the Form Editor. + * @return + */ @SuppressWarnings("unchecked") // //GEN-BEGIN:initComponents private void initComponents() { diff --git a/src/freimapgsoc/resources/Start.properties b/src/freimapgsoc/resources/Start.properties index bddce84..ebcb177 100644 --- a/src/freimapgsoc/resources/Start.properties +++ b/src/freimapgsoc/resources/Start.properties @@ -1,14 +1,15 @@ -jLabel1.text=Welcome in Freimap.... nameServiceButton.text=NameService mySQLButton.text=MySQL openFileButton.text=Open file... -firstLabel.text=I've found more than one DataSource, olsrdButton.text=Olsr #NOI18N nameServiceButton.font=Lucida Grande-Plain-10 openExampleFile.text=Open Example File... #NOI18N openExampleFile.font=Lucida Grande 10 Plain -secondLabel.text=please choose one: +secondLabel.text=Avalable DataSources: #NOI18N secondLabel.font=Lucida Grande-Plain-10 +jLabel1.text= +#NOI18N +jLabel1.icon=aboutfreimap.png diff --git a/src/freimapgsoc/resources/aboutfreimap.png b/src/freimapgsoc/resources/aboutfreimap.png new file mode 100755 index 0000000..60e239f Binary files /dev/null and b/src/freimapgsoc/resources/aboutfreimap.png differ diff --git a/src/freimapgsoc/resources/freimap-logo-tn.png b/src/freimapgsoc/resources/freimap-logo-tn.png new file mode 100755 index 0000000..6f3f5ae Binary files /dev/null and b/src/freimapgsoc/resources/freimap-logo-tn.png differ diff --git a/src/freimapgsoc/resources/iconwebstart.png b/src/freimapgsoc/resources/iconwebstart.png new file mode 100755 index 0000000..28000ec Binary files /dev/null and b/src/freimapgsoc/resources/iconwebstart.png differ diff --git a/src/freimapgsoc/xmlDataSource.java b/src/freimapgsoc/xmlDataSource.java index 52ee097..cb46e2b 100644 --- a/src/freimapgsoc/xmlDataSource.java +++ b/src/freimapgsoc/xmlDataSource.java @@ -31,7 +31,7 @@ public class xmlDataSource implements DataSource { public void init(HashMap configuration) { String sServerURL = null; try { - sServerURL = Configurator.getS("url", configuration); + // sServerURL = Configurator.getS("url", configuration); URL serverURL = new URL(sServerURL); System.out.println("fetching node data from URL: " + serverURL); @@ -235,22 +235,40 @@ public Vector getLinksFromDest(String id) { throw new UnsupportedOperationException("Not supported yet."); } - @Override + /** + * + * @param ip + * @return + */ + @Override public MapNode getNodeByIp(String ip) { throw new UnsupportedOperationException("Not supported yet."); } - @Override + /** + * + * @return + */ + @Override public void init() { throw new UnsupportedOperationException("Not supported yet."); } - @Override + /** + * + * @param configuration + * @return + */ + @Override public HashMap read_conf(HashMap configuration) { throw new UnsupportedOperationException("Not supported yet."); } - @Override + /** + * + * @return + */ + @Override public Vector getLinks() { throw new UnsupportedOperationException("Not supported yet."); } diff --git a/test/freimapgsoc/LayerForm.java b/test/freimapgsoc/LayerForm.java index e514999..9ec58e2 100644 --- a/test/freimapgsoc/LayerForm.java +++ b/test/freimapgsoc/LayerForm.java @@ -206,11 +206,13 @@ public void showMiniMap() { } - /** This method is called from within the constructor to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the Form Editor. - */ + /** + * This method is called from within the constructor to + * initialize the form. + * WARNING: Do NOT modify this code. The content of this method is + * always regenerated by the Form Editor. + * @return + */ @SuppressWarnings("unchecked") // //GEN-BEGIN:initComponents private void initComponents() { @@ -999,12 +1001,21 @@ public MapNode getNodeByIp(String ip) { throw new UnsupportedOperationException("Not supported yet."); } - @Override + /** + * + * @return + */ + @Override public void init() { throw new UnsupportedOperationException("Not supported yet."); } - @Override + /** + * + * @param configuration + * @return + */ + @Override public HashMap read_conf(HashMap configuration) { throw new UnsupportedOperationException("Not supported yet."); } diff --git a/test/Test.java b/test/freimapgsoc/Test.java similarity index 100% rename from test/Test.java rename to test/freimapgsoc/Test.java diff --git a/test/freimapgsoc/addNode.java b/test/freimapgsoc/addNode.java index 042123a..de74e38 100644 --- a/test/freimapgsoc/addNode.java +++ b/test/freimapgsoc/addNode.java @@ -37,11 +37,13 @@ public void initData(Layer l) { } } - /** This method is called from within the constructor to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the Form Editor. - */ + /** + * This method is called from within the constructor to + * initialize the form. + * WARNING: Do NOT modify this code. The content of this method is + * always regenerated by the Form Editor. + * @return + */ @SuppressWarnings("unchecked") // //GEN-BEGIN:initComponents private void initComponents() { diff --git a/vpproject/Class Diagram1.jpg b/vpproject/Class Diagram1.jpg new file mode 100644 index 0000000..b0cb59a Binary files /dev/null and b/vpproject/Class Diagram1.jpg differ diff --git a/vpproject/hg.vpp b/vpproject/hg.vpp new file mode 100644 index 0000000..580fe91 Binary files /dev/null and b/vpproject/hg.vpp differ diff --git a/vpproject/hg.vpppath b/vpproject/hg.vpppath new file mode 100644 index 0000000..7d4ce3a --- /dev/null +++ b/vpproject/hg.vpppath @@ -0,0 +1 @@ +/Users/Stefano/Desktop/FreimapSte/Freimap/hg/vpproject/hg.vpp \ No newline at end of file