diff --git a/Map.csv b/Map.csv
index 46d7a06..69ab3fb 100644
--- a/Map.csv
+++ b/Map.csv
@@ -8,19 +8,22 @@ sampleCollection.id=PROJECT_ID
sampleCollection.acronym=TITLE
sampleCollection.name=name
sampleCollection.description=DESCRIPTION
-sampleCollection.collectionType=GROUP_NAME
sampleCollection.contactInformation=CONTACT_ID
study.id=STUDY_CODE
study.name=NAME
-study.description=KI_STUDY_NAME
+study.description=DESCRIPTION
study.contactInformation=CONTACT_ID
+study.studyDesign=KI_STUDY_TYPE
list.sex.Male=Sexvalue2
-list.sex.Female=Sexvalue1
-list.sex.Unknown=Sexvalue3
+list.sex.Female=Sexvalue3
+list.sex.Undifferentiated=Sexvalue1
+list.materialType.Blood=Material Typevalue1
list.materialType.Immortalized\ Cell\ Lines=Material Typevalue2
-list.materialType.Isolated\ Pathogen=Material Typevalue5
-list.materialType.Plasma=Material Typevalue4
-list.materialType.Tissue\ (FFPE)=Material Typevalue7
-list.dataCategories.Physiological/Biochemical\ measurements=DCvalue1
-list.collectionType.Twin-study=CTvalue1
-list.collectionType.Quality\ control=CTvalue2
+list.materialType.Isolated\ Pathogen=Material Typevalue4
+list.materialType.Tissue\ (Frozen)=Material Typevalue7
+list.dataCategories.Biological\ samples=DCvalue3
+list.dataCategories.Physiological/Biochemical\ measurements=DCvalue2
+list.dataCategories.Other=DCvalue1
+list.collectionType.Twin-study=CTvalue2
+list.collectionType.Population-based=CTvalue3
+list.collectionType.Disease\ specific=CTvalue4
diff --git a/build/built-jar.properties b/build/built-jar.properties
index 4d2f031..1caa836 100644
--- a/build/built-jar.properties
+++ b/build/built-jar.properties
@@ -1,4 +1,4 @@
-#Thu, 03 Mar 2016 15:10:23 +0100
-
-
-C\:\\Users\\suyama\\Documents\\NetBeansProjects\\Mapper=
+#Mon, 07 Mar 2016 14:21:51 +0100
+
+
+C\:\\Users\\suyama\\Documents\\NetBeansProjects\\Mapper=
diff --git a/build/classes/.netbeans_automatic_build b/build/classes/.netbeans_automatic_build
deleted file mode 100644
index e69de29..0000000
diff --git a/build/classes/.netbeans_update_resources b/build/classes/.netbeans_update_resources
deleted file mode 100644
index e69de29..0000000
diff --git a/build/classes/my/mapper/MapperUI$1.class b/build/classes/my/mapper/MapperUI$1.class
index 68f20fa..4a68538 100644
Binary files a/build/classes/my/mapper/MapperUI$1.class and b/build/classes/my/mapper/MapperUI$1.class differ
diff --git a/build/classes/my/mapper/MapperUI$10.class b/build/classes/my/mapper/MapperUI$10.class
index 3772999..45f27f0 100644
Binary files a/build/classes/my/mapper/MapperUI$10.class and b/build/classes/my/mapper/MapperUI$10.class differ
diff --git a/build/classes/my/mapper/MapperUI$11.class b/build/classes/my/mapper/MapperUI$11.class
index 511df56..8b4612e 100644
Binary files a/build/classes/my/mapper/MapperUI$11.class and b/build/classes/my/mapper/MapperUI$11.class differ
diff --git a/build/classes/my/mapper/MapperUI$12.class b/build/classes/my/mapper/MapperUI$12.class
index bb6383a..4c0427e 100644
Binary files a/build/classes/my/mapper/MapperUI$12.class and b/build/classes/my/mapper/MapperUI$12.class differ
diff --git a/build/classes/my/mapper/MapperUI$13.class b/build/classes/my/mapper/MapperUI$13.class
index 59f486d..bd69122 100644
Binary files a/build/classes/my/mapper/MapperUI$13.class and b/build/classes/my/mapper/MapperUI$13.class differ
diff --git a/build/classes/my/mapper/MapperUI$14.class b/build/classes/my/mapper/MapperUI$14.class
index 97a9ea5..6a8f989 100644
Binary files a/build/classes/my/mapper/MapperUI$14.class and b/build/classes/my/mapper/MapperUI$14.class differ
diff --git a/build/classes/my/mapper/MapperUI$15.class b/build/classes/my/mapper/MapperUI$15.class
index c2e79e9..3f81e1c 100644
Binary files a/build/classes/my/mapper/MapperUI$15.class and b/build/classes/my/mapper/MapperUI$15.class differ
diff --git a/build/classes/my/mapper/MapperUI$16.class b/build/classes/my/mapper/MapperUI$16.class
index aa46bd5..e131f85 100644
Binary files a/build/classes/my/mapper/MapperUI$16.class and b/build/classes/my/mapper/MapperUI$16.class differ
diff --git a/build/classes/my/mapper/MapperUI$17.class b/build/classes/my/mapper/MapperUI$17.class
index d451975..e563fd7 100644
Binary files a/build/classes/my/mapper/MapperUI$17.class and b/build/classes/my/mapper/MapperUI$17.class differ
diff --git a/build/classes/my/mapper/MapperUI$18.class b/build/classes/my/mapper/MapperUI$18.class
index 2ed33a1..bf73d94 100644
Binary files a/build/classes/my/mapper/MapperUI$18.class and b/build/classes/my/mapper/MapperUI$18.class differ
diff --git a/build/classes/my/mapper/MapperUI$19.class b/build/classes/my/mapper/MapperUI$19.class
index 83e4c1a..5b38064 100644
Binary files a/build/classes/my/mapper/MapperUI$19.class and b/build/classes/my/mapper/MapperUI$19.class differ
diff --git a/build/classes/my/mapper/MapperUI$2.class b/build/classes/my/mapper/MapperUI$2.class
index e4f9dca..e1c1e7b 100644
Binary files a/build/classes/my/mapper/MapperUI$2.class and b/build/classes/my/mapper/MapperUI$2.class differ
diff --git a/build/classes/my/mapper/MapperUI$20.class b/build/classes/my/mapper/MapperUI$20.class
index a3dd172..762df64 100644
Binary files a/build/classes/my/mapper/MapperUI$20.class and b/build/classes/my/mapper/MapperUI$20.class differ
diff --git a/build/classes/my/mapper/MapperUI$21.class b/build/classes/my/mapper/MapperUI$21.class
index be6982f..b756670 100644
Binary files a/build/classes/my/mapper/MapperUI$21.class and b/build/classes/my/mapper/MapperUI$21.class differ
diff --git a/build/classes/my/mapper/MapperUI$22.class b/build/classes/my/mapper/MapperUI$22.class
index de04e05..c997c83 100644
Binary files a/build/classes/my/mapper/MapperUI$22.class and b/build/classes/my/mapper/MapperUI$22.class differ
diff --git a/build/classes/my/mapper/MapperUI$23.class b/build/classes/my/mapper/MapperUI$23.class
index ecfc92a..bcb719d 100644
Binary files a/build/classes/my/mapper/MapperUI$23.class and b/build/classes/my/mapper/MapperUI$23.class differ
diff --git a/build/classes/my/mapper/MapperUI$24.class b/build/classes/my/mapper/MapperUI$24.class
index 30190b4..98e7fd5 100644
Binary files a/build/classes/my/mapper/MapperUI$24.class and b/build/classes/my/mapper/MapperUI$24.class differ
diff --git a/build/classes/my/mapper/MapperUI$25.class b/build/classes/my/mapper/MapperUI$25.class
index 70d082b..4c519ca 100644
Binary files a/build/classes/my/mapper/MapperUI$25.class and b/build/classes/my/mapper/MapperUI$25.class differ
diff --git a/build/classes/my/mapper/MapperUI$3.class b/build/classes/my/mapper/MapperUI$3.class
index ebe0766..2164123 100644
Binary files a/build/classes/my/mapper/MapperUI$3.class and b/build/classes/my/mapper/MapperUI$3.class differ
diff --git a/build/classes/my/mapper/MapperUI$4.class b/build/classes/my/mapper/MapperUI$4.class
index a446a4e..f2b9229 100644
Binary files a/build/classes/my/mapper/MapperUI$4.class and b/build/classes/my/mapper/MapperUI$4.class differ
diff --git a/build/classes/my/mapper/MapperUI$5.class b/build/classes/my/mapper/MapperUI$5.class
index 1b879c8..babe49d 100644
Binary files a/build/classes/my/mapper/MapperUI$5.class and b/build/classes/my/mapper/MapperUI$5.class differ
diff --git a/build/classes/my/mapper/MapperUI$6.class b/build/classes/my/mapper/MapperUI$6.class
index fc38887..e906da3 100644
Binary files a/build/classes/my/mapper/MapperUI$6.class and b/build/classes/my/mapper/MapperUI$6.class differ
diff --git a/build/classes/my/mapper/MapperUI$7.class b/build/classes/my/mapper/MapperUI$7.class
index f8d9aba..485978d 100644
Binary files a/build/classes/my/mapper/MapperUI$7.class and b/build/classes/my/mapper/MapperUI$7.class differ
diff --git a/build/classes/my/mapper/MapperUI$8.class b/build/classes/my/mapper/MapperUI$8.class
index 545ade6..c55df74 100644
Binary files a/build/classes/my/mapper/MapperUI$8.class and b/build/classes/my/mapper/MapperUI$8.class differ
diff --git a/build/classes/my/mapper/MapperUI$9.class b/build/classes/my/mapper/MapperUI$9.class
index 4726137..0ac9714 100644
Binary files a/build/classes/my/mapper/MapperUI$9.class and b/build/classes/my/mapper/MapperUI$9.class differ
diff --git a/build/classes/my/mapper/MapperUI.class b/build/classes/my/mapper/MapperUI.class
index e546d2d..133e831 100644
Binary files a/build/classes/my/mapper/MapperUI.class and b/build/classes/my/mapper/MapperUI.class differ
diff --git a/build/classes/my/mapper/MapperUI.form b/build/classes/my/mapper/MapperUI.form
deleted file mode 100644
index d3d8a9a..0000000
--- a/build/classes/my/mapper/MapperUI.form
+++ /dev/null
@@ -1,1009 +0,0 @@
-
-
-
diff --git a/dist/Mapper.jar b/dist/Mapper.jar
index 6702101..a659c13 100644
Binary files a/dist/Mapper.jar and b/dist/Mapper.jar differ
diff --git a/dist/README.TXT b/dist/README.TXT
index e6392f4..7d7bae8 100644
--- a/dist/README.TXT
+++ b/dist/README.TXT
@@ -29,4 +29,4 @@ the projects runtime path.
* To set a main class in a standard Java project, right-click the project node
in the Projects window and choose Properties. Then click Run and enter the
class name in the Main Class field. Alternatively, you can manually type the
-class name in the manifest Main-Class element.
+class name in the manifest Main-Class element.
diff --git a/nbproject/private/private.xml b/nbproject/private/private.xml
index 7c28631..1beac2b 100644
--- a/nbproject/private/private.xml
+++ b/nbproject/private/private.xml
@@ -1,12 +1,10 @@
-
-
-
-
-
- file:/C:/Users/suyama/Documents/NetBeansProjects/MapperMe/src/my/mapper/MapperMeUI.java
- file:/C:/Users/suyama/Documents/NetBeansProjects/MapperMe/Map.csv
- file:/C:/Users/suyama/Documents/NetBeansProjects/MapperMe/Standard.csv
- file:/C:/Users/suyama/Documents/NetBeansProjects/MapperMe/Standard_List_Values.csv
-
-
-
+
+
+
+
+
+ file:/C:/Users/suyama/Documents/NetBeansProjects/Mapper/Map.csv
+ file:/C:/Users/suyama/Documents/NetBeansProjects/Mapper/src/my/mapper/MapperUI.java
+
+
+
diff --git a/src/my/mapper/MapperUI.java b/src/my/mapper/MapperUI.java
index 6ee1569..5772254 100644
--- a/src/my/mapper/MapperUI.java
+++ b/src/my/mapper/MapperUI.java
@@ -13,15 +13,14 @@
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
-import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JComboBox;
import javax.swing.JFileChooser;
import javax.swing.JLabel;
+import javax.swing.JOptionPane;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;
@@ -35,8 +34,6 @@ public class MapperUI extends javax.swing.JFrame {
* Creates new form MapperUI
*/
private String refAttr = "";
- private String refEntity = "";
- String tabName="";
private static final String STANDARD_FILE_NAME = "Standard.csv";
private static final String STANDARD_LIST_VALUES_FILE_NAME = "Standard_List_Values.csv";
@@ -52,85 +49,61 @@ public MapperUI() {
@SuppressWarnings("unchecked")
public void readEntityFileInTable(JTable TheTable, JLabel TheLabel, JComboBox TheComboBox){
-
-
JFileChooser fileChooser = new JFileChooser();
fileChooser.setCurrentDirectory(new File(System.getProperty("user.home")));
int result = fileChooser.showOpenDialog(this);
if (result == JFileChooser.APPROVE_OPTION) {
File selectedFile = fileChooser.getSelectedFile();
TheLabel.setText(selectedFile.getAbsolutePath());
- System.out.println("File chosen");
- }
- else if(result == JFileChooser.CANCEL_OPTION){
- System.out.println("File not chosen");
- }
- // parse file and fill table
- String csvFile = TheLabel.getText();
- BufferedReader br = null;
- String line = "";
- String separator = (String) TheComboBox.getSelectedItem();
- if(("Tab".equals(separator))){
- separator="\t";
- }
-
- String[] term = null;
- int row = 0;
+
+ String csvFile = TheLabel.getText();
+ BufferedReader br = null;
+ String line = "";
+ String separator = (String) TheComboBox.getSelectedItem();
- DefaultTableModel myModel = (DefaultTableModel)TheTable.getModel();
- //Reset the table
- while(myModel.getRowCount()>0)
- {
- myModel.removeRow(0);
- }
+ if(("Tab".equals(separator))){
+ separator="\t";
+ }
- // read file
+ String[] term = null;
- try {
-
- Map maps = new HashMap();
-
- br = new BufferedReader(new FileReader(csvFile));
- //while ((line = br.readLine()) != null) {
- line = br.readLine();
- // use comma as separator
- term = line.split(separator);
-
- //maps.put(term[0], term[1]);
-
- //}
+ DefaultTableModel myModel = (DefaultTableModel)TheTable.getModel();
- //loop map
- int size = term.length;
+ while(myModel.getRowCount()>0){
+ myModel.removeRow(0);
+ }
+
+ try {
+ br = new BufferedReader(new FileReader(csvFile));
+ line = br.readLine();
+ term = line.split(separator);
int columnNumber = 1;
- for (String str : term) {
- //fill jTable3 - mapper talbe
- //System.out.println(str);
- //row = myModel.getRowCount()+1;
+
+ for (String str : term) {
Object[] RowData = {columnNumber,str};
-
+
myModel.addRow(RowData);
columnNumber++;
- }
-
- }
- catch (FileNotFoundException e) {
- e.printStackTrace();
- }
- catch (IOException e) {
- e.printStackTrace();
- }
- finally {
- if (br != null) {
- try {
- br.close();
- }
- catch (IOException e) {
- e.printStackTrace();
- }
- }
- }
-
+ }
+
+ }
+ catch (FileNotFoundException e) {
+ e.printStackTrace();
+ }
+ catch (IOException e) {
+ e.printStackTrace();
+ }
+ finally {
+ if (br != null) {
+ try {
+ br.close();
+ }
+ catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ }
}
@@ -152,50 +125,24 @@ public void readListValuesFileInTable(JTable TheTable, JLabel TheLabel, JComboBo
}
String[] term = null;
- int row = 0;
DefaultTableModel myModel = (DefaultTableModel)TheTable.getModel();
- //Reset the table
myModel.setRowCount(0);
- /*
- while(myModel.getRowCount()>0)
- {
- myModel.removeRow(0);
- }
- */
- // read file
-
- try
- {
+ try{
String line = "";
- //Create the file reader
+
br = new BufferedReader(new FileReader(csvFile));
-
-
-
-
- br.readLine(); // Read and skip the first line.
- //Read the file line by line
-
- while ((line = br.readLine()) != null)
- {
-
+ br.readLine();
+ while ((line = br.readLine()) != null){
term = line.split(separator);
Object[] RowData = {term[0],term[1]};
-
myModel.addRow(RowData);
-
-
}
-
-
-
}
catch (Exception e) {
e.printStackTrace();
}
- finally
- {
+ finally{
try {
br.close();
} catch (IOException e) {
@@ -203,64 +150,33 @@ public void readListValuesFileInTable(JTable TheTable, JLabel TheLabel, JComboBo
}
}
}
- else if(result == JFileChooser.CANCEL_OPTION){
- }
-
-
-
-
-
-
-
-
-
}
- private void getStandardEntityAttribute(String entity, JTable standardTable ){
-
+ private void getStandardEntityAttribute(JTable standardTable ){
int selRow = standardTable.getSelectedRow();
refAttr = (String) standardTable.getValueAt(selRow, 1);
- refEntity = entity;
-
}
- private void getStandardListValues(String entity, JTable standardTable) {
+ private void getStandardListValues(JTable standardTable) {
int selRow = standardTable.getSelectedRow();
refAttr = (String) standardTable.getValueAt(selRow, 1);
- refEntity = entity;
}
private void setStandardEntityAttribute(JTable localTable) {
- // TODO add your handling code here:
- /*
- if (refEntity != ""){
- int selRow = localTable.getSelectedRow();
- localTable.setValueAt(refEntity, selRow, 2);
- }
- */
if (refAttr != ""){
int selRow = localTable.getSelectedRow();
localTable.setValueAt(refAttr, selRow, 2);
}
- refEntity="";
refAttr="";
}
private void setStandardListValues(JTable localTable) {
- // TODO add your handling code here:
- /*
- if (refEntity != ""){
- int selRow = localTable.getSelectedRow();
- localTable.setValueAt(refEntity, selRow, 2);
- }
- */
if (refAttr != ""){
int selRow = localTable.getSelectedRow();
localTable.setValueAt(refAttr, selRow, 2);
}
- refEntity="";
refAttr="";
}
@@ -972,19 +888,15 @@ private List initEntity(String pathToFile){
DefaultTableModel tableModelEntityMap = (DefaultTableModel)TableEntityMap.getModel();
List entityNameList = new ArrayList();
String[] term = null;
- try
- {
+ try{
String line = "";
- //Create the file reader
+
fileReader = new BufferedReader(new FileReader(pathToFile));
String entity = "";
+ fileReader.readLine();
-
- fileReader.readLine(); // Read and skip the first line.
- //Read the file line by line
- while ((line = fileReader.readLine()) != null)
- {
+ while ((line = fileReader.readLine()) != null){
term = line.split(DELIMITER);
Object[] RowData = {term[0],term[1],term[2]};
@@ -1003,15 +915,11 @@ private List initEntity(String pathToFile){
tableModelEntityMap.addRow(RowDataMap);
}
-
-
-
}
catch (Exception e) {
e.printStackTrace();
}
- finally
- {
+ finally{
try {
fileReader.close();
} catch (IOException e) {
@@ -1031,20 +939,15 @@ private List initList(String pathToFile){
DefaultTableModel tableModelListValuesMap = (DefaultTableModel)TableListMap.getModel();
List listValuesNameList = new ArrayList();
String[] term = null;
- try
- {
+ try{
String line = "";
- //Create the file reader
+
fileReader = new BufferedReader(new FileReader(pathToFile));
String entity = "";
+ fileReader.readLine();
-
- fileReader.readLine(); // Read and skip the first line.
- //Read the file line by line
-
- while ((line = fileReader.readLine()) != null)
- {
+ while ((line = fileReader.readLine()) != null){
term = line.split(DELIMITER);
Object[] RowData = {term[0],term[1]};
@@ -1059,18 +962,12 @@ private List initList(String pathToFile){
}
tableModelListValuesMap.addRow(RowData);
-
-
}
-
-
-
}
catch (Exception e) {
e.printStackTrace();
}
- finally
- {
+ finally{
try {
fileReader.close();
} catch (IOException e) {
@@ -1093,38 +990,23 @@ private void populateEntityTableFromStandardFile(String entity){
tableModelEntity.setRowCount(0);
String[] term = null;
- try
- {
+ try{
String line = "";
- //Create the file reader
- fileReader = new BufferedReader(new FileReader(pathToFile));
-
-
-
- fileReader.readLine(); // Read and skip the first line.
- //Read the file line by line
- while ((line = fileReader.readLine()) != null)
- {
-
+ fileReader = new BufferedReader(new FileReader(pathToFile));
+ fileReader.readLine();
+ while ((line = fileReader.readLine()) != null){
term = line.split(DELIMITER);
Object[] RowData = {term[0],term[1],term[2]};
if (entity.equals(term[0])){
tableModelEntity.addRow(RowData);
}
-
-
-
}
-
-
-
}
catch (Exception e) {
e.printStackTrace();
}
- finally
- {
+ finally{
try {
fileReader.close();
} catch (IOException e) {
@@ -1147,38 +1029,23 @@ private void populateListValuesTableFromStandardFile(String listValue){
tableModelListValues.setRowCount(0);
String[] term = null;
- try
- {
+ try{
String line = "";
- //Create the file reader
- fileReader = new BufferedReader(new FileReader(pathToFile));
-
-
-
- fileReader.readLine(); // Read and skip the first line.
- //Read the file line by line
- while ((line = fileReader.readLine()) != null)
- {
-
+ fileReader = new BufferedReader(new FileReader(pathToFile));
+ fileReader.readLine();
+ while ((line = fileReader.readLine()) != null){
term = line.split(DELIMITER);
Object[] RowData = {term[0],term[1]};
if (listValue.equals(term[0])){
tableModelListValues.addRow(RowData);
}
-
-
-
}
-
-
-
}
catch (Exception e) {
e.printStackTrace();
}
- finally
- {
+ finally{
try {
fileReader.close();
} catch (IOException e) {
@@ -1188,7 +1055,7 @@ private void populateListValuesTableFromStandardFile(String listValue){
}
private void mapEntityAttributeResult(JTable TableLocalAttr, JComboBox ComboEntity){
- System.out.println("mapEntityAttributeResult method called");
+
DefaultTableModel tableModelLocalAttr = (DefaultTableModel)TableLocalAttr.getModel();
DefaultTableModel tableModelEntityMap = (DefaultTableModel)TableEntityMap.getModel();
String entity = ComboEntity.getSelectedItem().toString();
@@ -1208,16 +1075,15 @@ private void mapEntityAttributeResult(JTable TableLocalAttr, JComboBox ComboEnt
}
}
}
-
-
}
+ JOptionPane.showMessageDialog(null, ComboEntity.getSelectedItem().toString()+" Entity has been mapped!");
+
}
private void mapListValuesResult(JTable TableLocalValue, JComboBox ComboList){
- System.out.println("mapListValuesResult method called");
DefaultTableModel tableModelLocalValue = (DefaultTableModel)TableLocalValue.getModel();
DefaultTableModel tableModelListMap = (DefaultTableModel)TableListMap.getModel();
String attribute = ComboList.getSelectedItem().toString();
@@ -1237,17 +1103,16 @@ private void mapListValuesResult(JTable TableLocalValue, JComboBox ComboList){
}
}
}
-
-
}
+ JOptionPane.showMessageDialog(null, ComboList.getSelectedItem().toString()+" Attribute has been mapped!");
+
}
private void formWindowOpened(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowOpened
- //Select Entity tab
jTabbedPaneMain.setSelectedIndex(0);
String pathToFile;
@@ -1259,27 +1124,21 @@ private void formWindowOpened(java.awt.event.WindowEvent evt) {//GEN-FIRST:event
pathToFile = current+"\\"+STANDARD_LIST_VALUES_FILE_NAME;
ComboList.setModel(new javax.swing.DefaultComboBoxModel(initList(pathToFile).toArray()));
-
}//GEN-LAST:event_formWindowOpened
private void jButtonSaveEntityActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonSaveEntityActionPerformed
- // TODO add your handling code here:
-
mapEntityAttributeResult(TableLocalAttr, ComboEntity);
}//GEN-LAST:event_jButtonSaveEntityActionPerformed
private void setStandardEntityAttribute(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_setStandardEntityAttribute
- // TODO add your handling code here:
setStandardEntityAttribute(TableLocalAttr);
}//GEN-LAST:event_setStandardEntityAttribute
private void getStandardEntityAttribute(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_getStandardEntityAttribute
- // TODO add your handling code here:
- getStandardEntityAttribute(ComboEntity.getSelectedItem().toString(), TableStandardAttr);
+ getStandardEntityAttribute(TableStandardAttr);
}//GEN-LAST:event_getStandardEntityAttribute
private void jButtonBrowseEntityActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonBrowseEntityActionPerformed
- // TODO add your handling code here:
readEntityFileInTable(TableLocalAttr, LabelEntityFile, ComboSeparatorEntity);
}//GEN-LAST:event_jButtonBrowseEntityActionPerformed
@@ -1288,7 +1147,6 @@ private void ComboSeparatorEntityActionPerformed(java.awt.event.ActionEvent evt)
}//GEN-LAST:event_ComboSeparatorEntityActionPerformed
private void ComboEntityActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ComboEntityActionPerformed
- // TODO add your handling code here:
populateEntityTableFromStandardFile(ComboEntity.getSelectedItem().toString());
}//GEN-LAST:event_ComboEntityActionPerformed
@@ -1297,27 +1155,22 @@ private void ComboSeparatorListActionPerformed(java.awt.event.ActionEvent evt) {
}//GEN-LAST:event_ComboSeparatorListActionPerformed
private void jButtonBrowseListValuesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonBrowseListValuesActionPerformed
- // TODO add your handling code here:
readListValuesFileInTable(TableLocalValue, LabelListFile, ComboSeparatorList);
}//GEN-LAST:event_jButtonBrowseListValuesActionPerformed
private void ComboListActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ComboListActionPerformed
- // TODO add your handling code here:
populateListValuesTableFromStandardFile(ComboList.getSelectedItem().toString());
}//GEN-LAST:event_ComboListActionPerformed
private void getStandardListValues(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_getStandardListValues
- // TODO add your handling code here:
- getStandardListValues(ComboList.getSelectedItem().toString(), TableStandardValue);
+ getStandardListValues(TableStandardValue);
}//GEN-LAST:event_getStandardListValues
private void setStandardListValues(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_setStandardListValues
- // TODO add your handling code here:
setStandardListValues(TableLocalValue);
}//GEN-LAST:event_setStandardListValues
private void jButtonSaveListValuesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonSaveListValuesActionPerformed
- // TODO add your handling code here:
mapListValuesResult(TableLocalValue, ComboList);
}//GEN-LAST:event_jButtonSaveListValuesActionPerformed
@@ -1330,18 +1183,15 @@ private void TableListMapsetSCMIABIS(java.awt.event.MouseEvent evt) {//GEN-FIRST
}//GEN-LAST:event_TableListMapsetSCMIABIS
private void jButtonSaveMapActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonSaveMapActionPerformed
- // TODO add your handling code here:
saveMapToFile();
}//GEN-LAST:event_jButtonSaveMapActionPerformed
private void ComboEntityItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_ComboEntityItemStateChanged
- // TODO add your handling code here:
DefaultTableModel tableModelLocalAttr = (DefaultTableModel)TableLocalAttr.getModel();
tableModelLocalAttr.setRowCount(0);
}//GEN-LAST:event_ComboEntityItemStateChanged
private void ComboListItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_ComboListItemStateChanged
- // TODO add your handling code here:
//DefaultTableModel tableModelLocalValue = (DefaultTableModel)TableLocalValue.getModel();
//tableModelLocalValue.setRowCount(0);
}//GEN-LAST:event_ComboListItemStateChanged
@@ -1355,18 +1205,20 @@ private void saveMapToFile(){
FileWriter fw = null;
try {
mappingFile.createNewFile();
+ LabelMapFile.setText(mappingFile.getAbsolutePath());
fw = new FileWriter(mappingFile);
writeEntityMapToFile(TableEntityMap, fw);
writeListValuesMapToFile(TableListMap, fw);
+ JOptionPane.showMessageDialog(null, "The map file has been saved to the location "+mappingFile.getAbsolutePath());
} catch (IOException ex) {
Logger.getLogger(MapperUI.class.getName()).log(Level.SEVERE, null, ex);
}
finally {
if(fw != null)
try {
- fw.close();
+ fw.close();
} catch (IOException ex) {
- Logger.getLogger(MapperUI.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(MapperUI.class.getName()).log(Level.SEVERE, null, ex);
}
}
}
@@ -1559,6 +1411,4 @@ public void run() {
private javax.swing.JScrollPane jScrollPane6;
private javax.swing.JTabbedPane jTabbedPaneMain;
// End of variables declaration//GEN-END:variables
-
-
}