Commit c81d667f authored by Philipp Spohr's avatar Philipp Spohr
Browse files

Added skeleton for Bachelor Thesis -> Cross-linked to help system

parent d4a338c9
......@@ -59,6 +59,10 @@ import de.hhu.ba.yoshikoWrapper.core.YoshikoLoader;
import de.hhu.ba.yoshikoWrapper.gui.HintManager;
import de.hhu.ba.yoshikoWrapper.gui.MainPanel;
/**
* Entry point for the application as required by the Cytoscape API
* Registers services and sets up resources for Yoshiko
*/
public class CyActivator extends AbstractCyActivator {
public CyActivator() {
......@@ -68,12 +72,13 @@ public class CyActivator extends AbstractCyActivator {
@Override
public void start(BundleContext context) throws Exception {
//Initialize cytoscape configuration system
//This is responsible for saving/loading configuration
ConfigurationManager cm = new ConfigurationManager("yoshikoWrapper", "yoshiko.props");
Properties propsReaderServiceProps = new Properties();
propsReaderServiceProps.setProperty("cyPropertyName", "yoshiko.props");
registerAllServices(context,cm,propsReaderServiceProps);
//Create symbolic links to give other classes access
//Create symbolic links to give other classes access to Cytoscape Services
CyCore.cy = getService(context, CyApplicationManager.class);
CyCore.dialogTaskManager = getService(context, DialogTaskManager.class);
CyCore.registrar = getService(context, CyServiceRegistrar.class);
......@@ -96,10 +101,10 @@ public class CyActivator extends AbstractCyActivator {
//Store a reference to the Version
YoshUtil.version = context.getBundle().getVersion();
//Set language according to settings
//Set language according to settings -> Default to enUS
LocalizationManager.switchLanguage(cm.getProperties().getProperty("locale", "enUS"));
//Attempt to find the yoshiko lib in r a previously stored location
//Attempt to find the yoshiko lib in a previously stored location and load it
if (!YoshikoLoader.isLibraryLoaded()){
String pathToYosh = cm.getProperties().getProperty("pathToYoshiko");
if (pathToYosh != null && pathToYosh != "null") {
......@@ -108,7 +113,7 @@ public class CyActivator extends AbstractCyActivator {
}
//main panel
//Initialize and register main panel
MainPanel mainPanel = new MainPanel();
registerService(context,mainPanel,CytoPanelComponent.class, new Properties());
......@@ -121,6 +126,7 @@ public class CyActivator extends AbstractCyActivator {
registerService(context,netChangeListener, SessionLoadedListener.class, new Properties());
registerService(context,netChangeListener, SetCurrentNetworkListener.class, new Properties());
//Show Startup-Hint
HintManager.showMappingHint(Hint.FIRST_START);
}
......
......@@ -43,9 +43,13 @@ public class EditCostPanel extends JPanel {
private final JLabel icLabel;
private final JLabel dcLabel;
private final HelpButton helpButton;
public EditCostPanel() {
//Initialize components
helpButton = new HelpButton();
columnMapper = new ColumnMapper();
icField = new DoubleInputField(Double.NEGATIVE_INFINITY,0);
......@@ -57,11 +61,11 @@ public class EditCostPanel extends JPanel {
icLabel = new JLabel(LocalizationManager.get("defaultInsertion"));
dcLabel = new JLabel(LocalizationManager.get("defaultDeletion"));
//Group the labels with their text fields
//Add components
SwingUtil.addAll(this,icLabel,icField);
SwingUtil.addAll(this,dcLabel,dcField);
SwingUtil.addAll(helpButton);
SwingUtil.addAll(this,columnMapper);
......@@ -69,12 +73,14 @@ public class EditCostPanel extends JPanel {
GroupLayout layout = new GroupLayout(this);
layout.setHorizontalGroup(layout.createParallelGroup()
.addComponent(helpButton,Alignment.TRAILING)
.addComponent(columnMapper)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(Alignment.LEADING)
.addComponent(icLabel)
.addComponent(dcLabel)
)
.addGap(4)
.addGroup(layout.createParallelGroup(Alignment.LEADING)
.addComponent(icField)
.addComponent(dcField)
......@@ -83,13 +89,16 @@ public class EditCostPanel extends JPanel {
);
layout.setVerticalGroup(layout.createSequentialGroup()
.addComponent(helpButton)
.addComponent(columnMapper)
.addGroup(layout.createParallelGroup()
.addGroup(layout.createParallelGroup(Alignment.BASELINE)
.addComponent(icLabel)
.addGap(4)
.addComponent(icField)
)
.addGroup(layout.createParallelGroup()
.addGroup(layout.createParallelGroup(Alignment.BASELINE)
.addComponent(dcLabel)
.addGap(4)
.addComponent(dcField)
)
);
......
package de.hhu.ba.yoshikoWrapper.gui;
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.IOException;
import java.net.URI;
import javax.swing.JButton;
import de.hhu.ba.yoshikoWrapper.core.GraphicsLoader;
import de.hhu.ba.yoshikoWrapper.core.LocalizationManager;
import de.hhu.ba.yoshikoWrapper.help.HelpLinks;
@SuppressWarnings("serial")
public class HelpButton extends JButton{
public HelpButton() {
super(GraphicsLoader.getInfoIcon(12));
setMargin(new Insets(0,0,0,0));
setToolTipText(LocalizationManager.get("tooltip_helpButton"));
addActionListener(
new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
URI uri = HelpLinks.getHelpLink(getParent().getClass());
if (uri != null) {
try {
java.awt.Desktop.getDesktop().browse(uri);
} catch (IOException ex) {
ex.printStackTrace();
}
}
}
}
);
}
}
......@@ -96,7 +96,7 @@ public class MainPanel extends JPanel implements CytoPanelComponent {
//Initialize Swing components
header = new YoshikoHeader();
about = new JButton(GraphicsLoader.getInfoIcon(16));
about = new JButton(LocalizationManager.get("aboutButton"),GraphicsLoader.getInfoIcon(16));
about.addActionListener(new ActionListener() {
@Override
......
package de.hhu.ba.yoshikoWrapper.help;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.HashMap;
import de.hhu.ba.yoshikoWrapper.gui.EditCostPanel;
public final class HelpLinks {
private static final String docLocation = "file:///home/philipp/workspace/cs/BachelorThesis/YoshikoWrapper/thesis/tex/Thesis.pdf";
private static final HashMap <Class<?>,URI> helpLinks;
static {
helpLinks = new HashMap<Class<?>,URI>();
try {
helpLinks.put(EditCostPanel.class, (buildURI("subsubsection.2.2.1")));
} catch (URISyntaxException e) {
e.printStackTrace();
}
}
public static URI getHelpLink(Class<?> c) {
if (helpLinks.containsKey(c)) {
return helpLinks.get(c);
}
return null;
}
private static URI buildURI(String fragment) throws URISyntaxException {
return new URI(null,docLocation,fragment);
}
}
package de.hhu.ba.yoshikoWrapper.help;
\ No newline at end of file
......@@ -40,12 +40,12 @@ public class CoreAlgorithm {
return (cPtr == 0) ? null : new ClusterEditingSolutions(cPtr, false);
}
public void cancel() {
LibraryInterfaceJNI.CoreAlgorithm_cancel(swigCPtr, this);
}
public void registerCplexInformer(CplexInformer informer) {
LibraryInterfaceJNI.CoreAlgorithm_registerCplexInformer(swigCPtr, this, CplexInformer.getCPtr(informer), informer);
}
public void cancel() {
LibraryInterfaceJNI.CoreAlgorithm_cancel(swigCPtr, this);
}
}
......@@ -66,8 +66,8 @@ public class LibraryInterfaceJNI {
public final static native void CplexInformer_director_connect(CplexInformer obj, long cptr, boolean mem_own, boolean weak_global);
public final static native void CplexInformer_change_ownership(CplexInformer obj, long cptr, boolean take_or_release);
public final static native long CoreAlgorithm_run(long jarg1, CoreAlgorithm jarg1_);
public final static native void CoreAlgorithm_cancel(long jarg1, CoreAlgorithm jarg1_);
public final static native void CoreAlgorithm_registerCplexInformer(long jarg1, CoreAlgorithm jarg1_, long jarg2, CplexInformer jarg2_);
public final static native void CoreAlgorithm_cancel(long jarg1, CoreAlgorithm jarg1_);
public final static native void delete_CoreAlgorithm(long jarg1);
public final static native String getVersionString();
public final static native void setTimeLimit(int jarg1);
......
#-------------------------------------------------------------------------------
# Copyright (C) 2017 Philipp Spohr
#
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
......@@ -19,56 +19,58 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#-------------------------------------------------------------------------------
resultsPanelTitle = Yoshiko Results
yoshVersion = Yoshiko Version
wrapperVersion = Yoshiko Plugin for Cytoscape Version
resolveLibPath = Resolve Yoshiko Library Path
yoshTask = Performing Yoshiko Algorithm
solution = Solution
restartNeeded = Changes only take effect after restart!
noLibTitle = Library not loaded!
noLibMessage = There is no Yoshiko Library currently loaded! You might have to specify its location.
about = INSERT SOME AMAZING INFO ABOUT THIS APPLICATION,\n THE AUTHOR AND WHERE TO FIND MORE INFO HERE\n <a href=\"www.hhu.de\" >LINK</a>
aboutButton = About Yoshiko
aboutTitle = Yoshiko Plugin Info
cluster = Cluster
clusterSize = Cluster Size:
multFactor = Multiplicative Factor for SNR:
paidCost = Paid a total modification cost of:
clusterFound = Clusters found:
deleteSolution = Do you really want to delete this solution?
warning = Warning
timeLimitILP = Use time limit for ILP (s):
timedOutTitle = Timeout
timedOutMessage = The ILP exceeded the time-limit!
clusterSize = Cluster Size:
continueTimeout = The ILP has exceeded the given time limit. Do you want to continue? (This may take a long time)
cost = Cost:
nrSolutions = Number of Solutions:
redRuleChooserTitle = Reduction Rules
discardSolution = Discard
createMetaGraph = Create Meta-Graph
metaGraph = Meta Graph
showAdvanced = Show advanced options
editingCostPanel = Editing Costs
libraryPanel = Library
defaultInsertion = Default insertion cost:
currentGap = [ILP] Current Instance Gap
defaultDeletion = Default deletion cost:
switchLanguage = Plugin language
defaultInsertion = Default insertion cost:
deleteSolution = Do you really want to delete this solution?
disableMultiThreading = Disable Multithreading
discardSolution = Discard
editingCostPanel = Editing Costs
firstStart = Thanks for using the Yoshiko Clustering Tool!\nIt appears, that this is your first time using this tool.\nIf you want an in-depth explanation of the algorithm please refer to: [INSERT COOL LINK HERE]
gap = Gap
getYoshiko = Get Yoshiko Library
icTooltip = This value is used to determine what the algorithm pays when inserting an edge.\nExisting mappings overwrite this value.\nA higher value means that the algorithm is less likely to insert edges in order to generate a cluster.
operationMode = Operation Mode
run = Perform Algorithm
nodes = Nodes
continueTimeout = The ILP has exceeded the given time limit. Do you want to continue? (This may take a long time)
timeoutTitle = Timeout
incompleteResult = This run yielded no usable result!
optimal = Optimal Solution
notOptimal = Non-Optimal Solution
ilpMarker = ILP Properties
timeoutMarker = Timed Out
incompleteResult = This run yielded no usable result!
instance = Instance
gap = Gap
currentGap = [ILP] Current Instance Gap
disableMultiThreading = Disable Multithreading
yoshikoHint = Yoshiko Hint
aboutTitle = Yoshiko Plugin Info
getYoshiko = Get Yoshiko Library
libraryPanel = Library
metaGraph = Meta Graph
multFactor = Multiplicative Factor for SNR:
noFeasible = No feasible solution found!
noLibMessage = There is no Yoshiko Library currently loaded! You might have to specify its location.
noLibTitle = Library not loaded!
noMappingHint = You haven't mapped the cost value to a column in your edge table.\nYoshiko runs significantly faster and generates better solutions if you map values.
firstStart = Thanks for using the Yoshiko Clustering Tool!\nIt appears, that this is your first time using this tool.\nIf you want an in-depth explanation of the algorithm please refer to: [INSERT COOL LINK HERE]
about = INSERT SOME AMAZING INFO ABOUT THIS APPLICATION,\n THE AUTHOR AND WHERE TO FIND MORE INFO HERE\n <a href=\"www.hhu.de\" >LINK</a>
\ No newline at end of file
nodes = Nodes
notOptimal = Non-Optimal Solution
nrSolutions = Number of Solutions:
operationMode = Operation Mode
optimal = Optimal Solution
paidCost = Paid a total modification cost of:
redRuleChooserTitle = Reduction Rules
resolveLibPath = Resolve Yoshiko Library Path
restartNeeded = Changes only take effect after restart!
resultsPanelTitle = Yoshiko Results
run = Perform Algorithm
showAdvanced = Show advanced options
solution = Solution
switchLanguage = Plugin language
timeLimitILP = Use time limit for ILP (s):
timedOutMessage = The ILP exceeded the time-limit!
timedOutTitle = Timeout
timeoutMarker = Timed Out
timeoutTitle = Timeout
tooltip_helpButton = Show in-depth help for this component
warning = Warning
wrapperVersion = Yoshiko Plugin for Cytoscape Version
yoshTask = Performing Yoshiko Algorithm
yoshVersion = Yoshiko Version
yoshikoHint = Yoshiko Hint
\ No newline at end of file
*.out
*.aux
*.gz
*.log
*.toc
The Yoshiko Wrapper provides a clean and simple interface to generate the model.
The Yoshiko algorithm models the data as a complete graph
$G=(V,E)$
with an associated edge-cost function
$C: E \rightarrow \mathbb{R}
\cup \lbrace -\infty \rbrace
\cup \lbrace \infty \rbrace $.
As many input instances do not describe a full graph, missing edges and costs need to be modeled.
This is achieved by using default values for insertion or deletion.
A default insertion cost is used whenever the input instance does not contain an edge.
\ No newline at end of file
\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{abstract}
\usepackage{hyperref}
\hypersetup{
linktoc=all
}
\author{Philipp Spohr}
\title{Developing and evaluating a Cytoscape app for graph-based clustering}
\begin{document}
\maketitle
\cleardoublepage
\begin{abstract}
\end{abstract}
\tableofcontents
\clearpage
\section{Introduction}
\section{The Yoshiko-App for Cytoscape}
\subsection{Technical Details}
\subsection{Algorithm}
\subsubsection{Data Modeling}
\paragraph{Theory}
\input{Chapter/dm_theory}
\paragraph{Implementation}
\input{Chapter/dm_impl}
\end{document}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment