projects
/
iot2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cleaning up code for runtime, installer, RMI, compiler for the Java side
[iot2.git]
/
iotjava
/
iotinstaller
/
IoTInstaller.java
diff --git
a/iotjava/iotinstaller/IoTInstaller.java
b/iotjava/iotinstaller/IoTInstaller.java
index 7a93963f88f11ef6afee235908ac358ad5187228..e281c9e9ec111a7d2f517708840923e2e56a0570 100644
(file)
--- a/
iotjava/iotinstaller/IoTInstaller.java
+++ b/
iotjava/iotinstaller/IoTInstaller.java
@@
-98,10
+98,6
@@
public final class IoTInstaller {
// Parse configuration file
// Assumption here is that .config file is written with the correct syntax (need typechecking)
// Parse configuration file
// Assumption here is that .config file is written with the correct syntax (need typechecking)
- //File file = new File(strCfgFileName);
- //Scanner scanFile = new Scanner(new FileReader(file));
- //System.out.println("IoTInstaller: Extracting information from config file: " + strCfgFileName);
-
// Initialize String for ID and TYPE
String strID = "";
String strType = "";
// Initialize String for ID and TYPE
String strID = "";
String strType = "";
@@
-219,7
+215,6
@@
public final class IoTInstaller {
*/
public void extractTableAndInstall(String strCfgFileName) {
// TO DO: WE PROBABLY NEED TO IMPROVE THE FILE PARSING BUT FOR NOW KEEP IT MINIMUM
*/
public void extractTableAndInstall(String strCfgFileName) {
// TO DO: WE PROBABLY NEED TO IMPROVE THE FILE PARSING BUT FOR NOW KEEP IT MINIMUM
-
try {
// Parse configuration file
try {
// Parse configuration file
@@
-321,7
+316,6
@@
public final class IoTInstaller {
strFields[iFieldCnt++] = scanFile.next();
}
strFields[iFieldCnt++] = scanFile.next();
}
-
// Create a new installer object
tbl.setTableName(STR_COMM_TABLE_NAME);
tbl.insertEntry(strFields);
// Create a new installer object
tbl.setTableName(STR_COMM_TABLE_NAME);
tbl.insertEntry(strFields);
@@
-428,7
+422,6
@@
public final class IoTInstaller {
// Insert new address entry
tbl.insertEntry(strFieldsAddress);
// Insert new address entry
tbl.insertEntry(strFieldsAddress);
-
System.out.println("IoTInstaller: Installing a new device/entity address into the system");
}
System.out.println("IoTInstaller: Installing a new device/entity address into the system");
}
@@
-448,7
+441,6
@@
public final class IoTInstaller {
File file = new File(strCfgFileName);
FileInputStream fis = new FileInputStream(file);
System.out.println("IoTInstaller: Extracting information from config file: " + strCfgFileName);
File file = new File(strCfgFileName);
FileInputStream fis = new FileInputStream(file);
System.out.println("IoTInstaller: Extracting information from config file: " + strCfgFileName);
-
installDeviceAddressCore(fis);
} catch (FileNotFoundException ex) {
installDeviceAddressCore(fis);
} catch (FileNotFoundException ex) {
@@
-508,7
+500,6
@@
public final class IoTInstaller {
// Insert new address entry
tbl.insertEntry(strFieldsAddress);
// Insert new address entry
tbl.insertEntry(strFieldsAddress);
-
System.out.println("IoTInstaller: Installing a new device/entity address into the system");
} catch (FileNotFoundException ex) {
System.out.println("IoTInstaller: Installing a new device/entity address into the system");
} catch (FileNotFoundException ex) {
@@
-568,7
+559,6
@@
public final class IoTInstaller {
// Insert new address entry
tbl.insertEntry(strFieldsAddress);
// Insert new address entry
tbl.insertEntry(strFieldsAddress);
-
System.out.println("IoTInstaller: Installing a new device/entity address into the system");
} catch (FileNotFoundException ex) {
System.out.println("IoTInstaller: Installing a new device/entity address into the system");
} catch (FileNotFoundException ex) {
@@
-607,7
+597,6
@@
public final class IoTInstaller {
// Create a new installer object
tbl.setTableName(STR_HOST_TABLE_NAME);
tbl.insertEntry(strFields);
// Create a new installer object
tbl.setTableName(STR_HOST_TABLE_NAME);
tbl.insertEntry(strFields);
-
System.out.println("IoTInstaller: Installing a new host into the system");
} catch (FileNotFoundException ex) {
System.out.println("IoTInstaller: Installing a new host into the system");
} catch (FileNotFoundException ex) {
@@
-629,7
+618,6
@@
public final class IoTInstaller {
tbl.setTableName(STR_HOST_TABLE_NAME);
String strWhere = "HOSTADDRESS='" + strHostAddress + "';";
tbl.deleteEntry(strWhere);
tbl.setTableName(STR_HOST_TABLE_NAME);
String strWhere = "HOSTADDRESS='" + strHostAddress + "';";
tbl.deleteEntry(strWhere);
-
System.out.println("IoTInstaller: Deleting a host from the system");
}
System.out.println("IoTInstaller: Deleting a host from the system");
}
@@
-648,7
+636,6
@@
public final class IoTInstaller {
String strWhere = "ID='" + strEntID + "';";
tbl.deleteEntry(strWhere);
System.out.println("IoTInstaller: Removing entity from table " + STR_MAIN_TABLE_NAME);
String strWhere = "ID='" + strEntID + "';";
tbl.deleteEntry(strWhere);
System.out.println("IoTInstaller: Removing entity from table " + STR_MAIN_TABLE_NAME);
-
// Delete from table with type name, e.g. Camera
tbl.setTableName(strEntType);
strWhere = "ID='" + strEntID + "';";
// Delete from table with type name, e.g. Camera
tbl.setTableName(strEntType);
strWhere = "ID='" + strEntID + "';";
@@
-688,7
+675,6
@@
public final class IoTInstaller {
tbl.setTableName(strEntAddType + strEntID);
tbl.dropTable();
System.out.println("IoTInstaller: Dropping class constructor table...");
tbl.setTableName(strEntAddType + strEntID);
tbl.dropTable();
System.out.println("IoTInstaller: Dropping class constructor table...");
-
System.out.println("IoTInstaller: Deleting an entry from the system...");
}
System.out.println("IoTInstaller: Deleting an entry from the system...");
}