Skip to content

Commit

Permalink
added temporal networks to the Excel / csv converter
Browse files Browse the repository at this point in the history
  • Loading branch information
Clement Levallois committed Sep 17, 2014
1 parent ed062fe commit 6a1a948
Show file tree
Hide file tree
Showing 22 changed files with 2,849 additions and 237 deletions.
5 changes: 2 additions & 3 deletions ExcelCsvImporter/manifest.mf
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
Manifest-Version: 1.1.1
Manifest-Version: 1.3
AutoUpdate-Show-In-Client: true
OpenIDE-Module: ExcelCsvImporter/1
OpenIDE-Module-Implementation-Version: 1
OpenIDE-Module-Localizing-Bundle: ExcelCsvImporter/Bundle.properties
OpenIDE-Module-Specification-Version: 1
OpenIDE-Module-Specification-Version: 4

8 changes: 4 additions & 4 deletions ExcelCsvImporter/nbproject/genfiles.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
build.xml.data.CRC32=ac03a26c
build.xml.data.CRC32=c6402047
build.xml.script.CRC32=8ccc3ac0
build.xml.stylesheet.CRC32=a56c6a5b@2.56.1
build.xml.stylesheet.CRC32=a56c6a5b@2.67.1
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=ac03a26c
nbproject/build-impl.xml.data.CRC32=c6402047
nbproject/build-impl.xml.script.CRC32=3deb54d5
nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.56.1
nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.67.1
32 changes: 32 additions & 0 deletions ExcelCsvImporter/nbproject/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@
<code-name-base>ExcelCsvImporter</code-name-base>
<suite-component/>
<module-dependencies>
<dependency>
<code-name-base>org.gephi.core.library.wrapper</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>0.8.2</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.gephi.data.attributes.api</code-name-base>
<build-prerequisite/>
Expand All @@ -14,6 +22,14 @@
<specification-version>0.8.2</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.gephi.dynamic.api</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>0.8.2</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.gephi.graph.api</code-name-base>
<build-prerequisite/>
Expand All @@ -30,6 +46,22 @@
<specification-version>0.8.2</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.gephi.io.processor.plugin</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>0.8.2</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.gephi.project.api</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>0.8.2</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.gephi.spigot.plugin</code-name-base>
<build-prerequisite/>
Expand Down
2,012 changes: 2,012 additions & 0 deletions ExcelCsvImporter/private/Corpus Inra formation Gephi.txt

Large diffs are not rendered by default.

Binary file modified ExcelCsvImporter/private/ExcelTest.xlsx
Binary file not shown.
12 changes: 11 additions & 1 deletion ExcelCsvImporter/src/Controller/MyFileImporter.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Development and Distribution License("CDDL") (collectively, the
import Parsers.ExcelParser;
import Wizard.Panel1;
import Wizard.Panel2;
import Wizard.Panel4;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.ArrayList;
Expand Down Expand Up @@ -100,7 +101,9 @@ public class MyFileImporter implements SpigotImporter, LongTask {
public static String firstConnectorDelimiter;
public static String secondConnectorDelimiter;
public static Boolean headersPresent;
private static String[] alphabet = {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"};
public static String timeField;
public static int timeFieldIndex;
private static final String[] alphabet = {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"};

@Override
public boolean execute(ContainerLoader loader) {
Expand Down Expand Up @@ -260,6 +263,13 @@ public static void getConnectedAgents() {
secondConnectedAgentIndex = headersList.indexOf(secondConnectedAgent);
}

public static void getTimeField() {
timeField = Panel4.fieldTime;
List<String> headersList = new ArrayList();
headersList.addAll(Arrays.asList(headers));
timeFieldIndex = headersList.indexOf(timeField);
}

@Override
public ContainerLoader getContainer() {
return container;
Expand Down
15 changes: 9 additions & 6 deletions ExcelCsvImporter/src/ExcelCsvImporter/Bundle.properties
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
OpenIDE-Module-Display-Category=Network Converter
OpenIDE-Module-Long-Description=\
<h2>Convert Excel and csv files to networks</h2>\n\nThis plugin helps you import Excel files and csv files into Gephi, by transforming them into networks.\
<h2>Convert Excel and csv files to networks (including dynamic!)\
</h2>\n\nThis plugin helps you import Excel files and csv files into Gephi, by transforming them into networks.\
<br>\nIt takes the rows of your file and let you define which relations should be found in it.\
<br>\n\nPlease post issues and ask for feature request on <a href="https://github.com/seinecle/My-Plugins-for-Gephi">Github</a>.\
<br>\n\nOr contact me (Clement Levallois) via Twitter @seinecle.\n\n\n\
<b>Release History:</b>\n\nVersion 1.1.1 (March 2014)\n-> Bug fix (suggested by Wouters A.H. \
Spekkink)\nSame names in different columns of the Excel of csv files are now correctly analyzed.\n\n\
Version 1.0 (October 2014)\n-> Initial release.
<br>\n<br>\nPlease post issues and ask for feature request on <a href="https://github.com/seinecle/My-Plugins-for-Gephi">Github</a>.\
<br>\n<br>\nOr contact me (Clement Levallois) via Twitter @seinecle.\
<br>\n<br>\n\n\n<h3>Release History:</h3>\n\n<b>Version 1.4 (September 2014)</b><br>\n-> Added support for temporal networks.\
<br>\n<br>\n<b>Version 1.3 (March 2014)</b><br>\n-> Bug fix (suggested by Wouters A.H. \
Spekkink)<br>\nSame names in different columns of the Excel of csv files are now correctly analyzed.\
<br>\n<br>\n<b>Version 1.0 (October 2013)</b><br>\n-> Initial release.\
<br>
OpenIDE-Module-Name=Convert Excel and csv files to networks
OpenIDE-Module-Short-Description=Converts Excel files and csv files into networks
Panel1.jButtonSelectFile.text=select file
Expand Down
1 change: 0 additions & 1 deletion ExcelCsvImporter/src/Parsers/CsvParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*/
package Parsers;

import Controller.MyFileImporter;
import Controller.MyFileImporter;
import Utils.Utils;
import com.csvreader.CsvReader;
Expand Down
Loading

0 comments on commit 6a1a948

Please sign in to comment.