Skip to content

Commit

Permalink
created the task factory and task for the import, changed the name of
Browse files Browse the repository at this point in the history
the packages and further deleted some classes to uncluster the packages
  • Loading branch information
ermismd committed Jun 21, 2023
1 parent 4021045 commit db42c09
Show file tree
Hide file tree
Showing 54 changed files with 1,604 additions and 4,591 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Expand Up @@ -5,14 +5,14 @@

<properties>
<bundle.symbolicName>mgG</bundle.symbolicName>
<bundle.namespace>uni.kul.rega.mgG.internal</bundle.namespace>
<bundle.namespace>be.kuleuven.mgG.internal</bundle.namespace>
<cytoscape.api.version>3.8.0</cytoscape.api.version>

<maven-bundle-plugin.version>3.5.0</maven-bundle-plugin.version>
<osgi.api.version>4.2.0</osgi.api.version>
</properties>

<groupId>uni.kul.rega</groupId>
<groupId>be.kuleuven</groupId>
<artifactId>mgG</artifactId>
<packaging>bundle</packaging>
<name>${bundle.symbolicName}</name>
Expand Down
@@ -1,4 +1,4 @@
package uni.kul.rega.mgG.internal;
package be.kuleuven.mgG.internal;

import static org.cytoscape.work.ServiceProperties.COMMAND;
import static org.cytoscape.work.ServiceProperties.COMMAND_DESCRIPTION;
Expand Down Expand Up @@ -45,7 +45,8 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import uni.kul.rega.mgG.internal.tasks.MicroBetaGUIImportAction;
import be.kuleuven.mgG.internal.tasks.ImportFileTaskFactory;
import be.kuleuven.mgG.internal.model.MGGManager;


//import uni.kul.rega.mgG.internal.model.ScNVManager;
Expand All @@ -58,25 +59,43 @@ public CyActivator() {
}

public void start(BundleContext bc) {
//final StreamUtil streamUtil = getService(bc, StreamUtil.class);
final StreamUtil streamUtil = getService(bc, StreamUtil.class);
final CyServiceRegistrar serviceRegistrar = getService(bc, CyServiceRegistrar.class);

//final ScNVManager scNVManager = new ScNVManager(serviceRegistrar);
final MGGManager MGGManager = new MGGManager(serviceRegistrar);



// scNVManager.addSource(new HCASource(scNVManager));
//scNVManager.addSource(new FileSource(scNVManager));
//MGGManager.addSource(new FileSource(NGGManager));


// Get services
CySwingApplication cytoscapeDesktopService = getService(bc, CySwingApplication.class);
CyApplicationManager cyApplicationManager = getService(bc, CyApplicationManager.class);
CyApplicationManager appManager = getService(bc, CyApplicationManager.class);
CySwingApplication swingApplication = getService(bc, CySwingApplication.class);



Properties props = new Properties();
props.setProperty(TITLE, "Import from file...");
props.setProperty(PREFERRED_MENU, "Apps.MGG.Load TSV/CSV[10.1]");
props.setProperty(IN_TOOL_BAR, "FALSE");
props.setProperty(IN_MENU_BAR, "TRUE");
props.setProperty(MENU_GRAVITY, "30.0");
props.setProperty(COMMAND_NAMESPACE, "MGG");
props.setProperty(COMMAND_DESCRIPTION, "Load a file from csv");
props.setProperty(COMMAND, "load csv");

// Register taskfactory
ImportFileTaskFactory mggImportFileTaskFactory = new ImportFileTaskFactory(swingApplication, appManager);

registerService(bc, mggImportFileTaskFactory, TaskFactory.class, props);
}






// Register the action
MicroBetaGUIImportAction action = new MicroBetaGUIImportAction(cytoscapeDesktopService, cyApplicationManager);
registerService(bc, action, CyAction.class);






Expand All @@ -87,5 +106,5 @@ public void start(BundleContext bc) {

// Start the thread the loads all of the species
//Species.loadSpecies(scNVManager);
}

}
@@ -1,4 +1,4 @@
package uni.kul.rega.mgG.internal.api;
package be.kuleuven.mgG.internal.matrix;

public interface DoubleMatrix extends Matrix {
public double[][] getDoubleMatrix(double missing);
Expand Down
@@ -1,4 +1,4 @@
package uni.kul.rega.mgG.internal.api;
package be.kuleuven.mgG.internal.matrix;

public interface IntegerMatrix extends Matrix {
public int[][] getIntegerMatrix(int missing);
Expand Down
@@ -1,4 +1,4 @@
package uni.kul.rega.mgG.internal.api;
package be.kuleuven.mgG.internal.matrix;

import java.util.List;

Expand Down
@@ -1,4 +1,4 @@
package uni.kul.rega.mgG.internal.api;
package be.kuleuven.mgG.internal.matrix;

public interface StringMatrix extends Matrix {
public String[][] getStringMatrix();
Expand Down

0 comments on commit db42c09

Please sign in to comment.