Skip to content

Commit

Permalink
Merge pull request #201 from fmohr/dev
Browse files Browse the repository at this point in the history
Fundamental changes for the next major release
  • Loading branch information
mwever committed Jan 24, 2020
2 parents 2ea52d4 + a34969c commit ece6087
Show file tree
Hide file tree
Showing 2,395 changed files with 338,734 additions and 70,835 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
@@ -1,6 +1,6 @@
language: java
jdk:
- oraclejdk8
- oraclejdk11
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
Expand Down
159 changes: 81 additions & 78 deletions JAICore/jaicore-algorithminspector/build.gradle
@@ -1,79 +1,82 @@
plugins {
id 'java'
id 'eclipse'
//id 'org.openjfx.javafxplugin' version '0.0.5'
}
eclipse {
classpath {
downloadJavadoc = true
downloadSources = true
}
}
dependencies {
compile project(":JAICore:jaicore-basic")

compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.7'

implementation 'com.github.mwever:gs-core:2.0.2-synchrofix'
implementation 'com.github.graphstream:gs-ui-javafx:2.0-alpha'
implementation 'com.github.graphstream:gs-algo:2.0-alpha'

}
//javafx {
// modules = [ 'javafx.controls', 'javafx.swing', 'javafx.web' ]
//}
uploadArchives {
repositories {
mavenDeployer {
def ossrhUsername = project.hasProperty('ossrhUsername') ? project.property('ossrhUsername') : ""
def ossrhPassword = project.hasProperty('ossrhPassword') ? project.property('ossrhPassword') : ""

beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}

pom.project {
name 'JAICore-Graphvisualizer'
packaging 'jar'
// optionally artifactId can be defined here
description 'Thist project provides a graphical interface for visualizing algorithms (especially search and AutoML algorithms) contained in AILibs.'
url 'https://libs.ai'

scm {
connection 'scm:git:https://github.com/fmohr/AILibs.git'
developerConnection 'scm:git:https://github.com/fmohr/AILibs.git'
url 'https://github.com/fmohr/AILibs'
}

licenses {
license {
name 'GPLv3'
url 'https://www.gnu.org/licenses/gpl-3.0.en.html'
}
}

developers {
developer {
id 'fmohr'
name 'Felix Mohr'
email 'felix.mohr@upb.de'
}
developer {
id 'mwever'
name 'Marcel Wever'
email 'marcel.wever@upb.de'
}
developer {
id 'ahetzer'
name 'Alexander Tornede'
email 'alexander.tornede@upb.de'
}
}
}
}
}
plugins {
id 'java'
id 'eclipse'
id 'org.openjfx.javafxplugin' version '0.0.5'
}

eclipse {
classpath {
downloadJavadoc = true
downloadSources = true
}
}

dependencies {
compile project(":JAICore:jaicore-basic")

compile("$jsonDatabind")

compile("$gsCore")
compile("$gsUIJavaFX")
compile("$gsAlgo")
}

javafx {
modules = [ 'javafx.controls', 'javafx.swing', 'javafx.web' ]
}

uploadArchives {
repositories {
mavenDeployer {
def ossrhUsername = project.hasProperty('ossrhUsername') ? project.property('ossrhUsername') : ""
def ossrhPassword = project.hasProperty('ossrhPassword') ? project.property('ossrhPassword') : ""

beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}

pom.project {
name 'JAICore-Graphvisualizer'
packaging 'jar'
// optionally artifactId can be defined here
description 'Thist project provides a graphical interface for visualizing algorithms (especially search and AutoML algorithms) contained in AILibs.'
url 'https://libs.ai'

scm {
connection 'scm:git:https://github.com/fmohr/AILibs.git'
developerConnection 'scm:git:https://github.com/fmohr/AILibs.git'
url 'https://github.com/fmohr/AILibs'
}

licenses {
license {
name 'GPLv3'
url 'https://www.gnu.org/licenses/gpl-3.0.en.html'
}
}

developers {
developer {
id 'fmohr'
name 'Felix Mohr'
email 'felix.mohr@upb.de'
}
developer {
id 'mwever'
name 'Marcel Wever'
email 'marcel.wever@upb.de'
}
developer {
id 'ahetzer'
name 'Alexander Tornede'
email 'alexander.tornede@upb.de'
}
}
}
}
}
}
@@ -1,6 +1,6 @@
package ai.libs.jaicore.graphvisualizer.events.graph;

import ai.libs.jaicore.basic.algorithm.events.AlgorithmEvent;
import org.api4.java.algorithm.events.IAlgorithmEvent;

public interface GraphEvent extends AlgorithmEvent {
public interface GraphEvent extends IAlgorithmEvent {
}
@@ -1,13 +1,15 @@
package ai.libs.jaicore.graphvisualizer.events.graph;

import ai.libs.jaicore.basic.algorithm.events.AAlgorithmEvent;
import org.api4.java.algorithm.IAlgorithm;

import ai.libs.jaicore.basic.algorithm.AAlgorithmEvent;

public class GraphInitializedEvent<T> extends AAlgorithmEvent implements GraphEvent {

private T root;

public GraphInitializedEvent(final String algorithmId, final T root) {
super(algorithmId);
public GraphInitializedEvent(final IAlgorithm<?, ?> algorithm, final T root) {
super(algorithm);
this.root = root;
}

Expand Down
@@ -1,15 +1,17 @@
package ai.libs.jaicore.graphvisualizer.events.graph;

import ai.libs.jaicore.basic.algorithm.events.AAlgorithmEvent;
import org.api4.java.algorithm.IAlgorithm;

import ai.libs.jaicore.basic.algorithm.AAlgorithmEvent;

public class NodeAddedEvent<T> extends AAlgorithmEvent implements GraphEvent {

private final T parent;
private final T node;
private final String type;

public NodeAddedEvent(final String algorithmId, final T parent, final T node, final String type) {
super(algorithmId);
public NodeAddedEvent(final IAlgorithm<?, ?> algorithm, final T parent, final T node, final String type) {
super(algorithm);
this.parent = parent;
this.node = node;
this.type = type;
Expand Down
@@ -0,0 +1,20 @@
package ai.libs.jaicore.graphvisualizer.events.graph;

import org.api4.java.algorithm.IAlgorithm;

import ai.libs.jaicore.basic.algorithm.AAlgorithmEvent;

public class NodeInfoAlteredEvent<T> extends AAlgorithmEvent implements GraphEvent {

private final T node;

public NodeInfoAlteredEvent(final IAlgorithm<?, ?> algorithm, final T node) {
super(algorithm);
this.node = node;
}

public T getNode() {
return this.node;
}

}
@@ -1,14 +1,16 @@
package ai.libs.jaicore.graphvisualizer.events.graph;

import ai.libs.jaicore.basic.algorithm.events.AAlgorithmEvent;
import org.api4.java.algorithm.IAlgorithm;

import ai.libs.jaicore.basic.algorithm.AAlgorithmEvent;

public class NodeParentSwitchEvent<T> extends AAlgorithmEvent implements GraphEvent {
private final T node;
private final T oldParent;
private final T newParent;

public NodeParentSwitchEvent(final String algorithmEvent, final T node, final T oldParent, final T newParent) {
super(algorithmEvent);
public NodeParentSwitchEvent(final IAlgorithm<?, ?> algorithm, final T node, final T oldParent, final T newParent) {
super(algorithm);
this.node = node;
this.oldParent = oldParent;
this.newParent = newParent;
Expand Down
@@ -1,13 +1,15 @@
package ai.libs.jaicore.graphvisualizer.events.graph;

import ai.libs.jaicore.basic.algorithm.events.AAlgorithmEvent;
import org.api4.java.algorithm.IAlgorithm;

import ai.libs.jaicore.basic.algorithm.AAlgorithmEvent;

public class NodeRemovedEvent<T> extends AAlgorithmEvent implements GraphEvent {

private final T node;

public NodeRemovedEvent(final String algorithmId, final T node) {
super(algorithmId);
public NodeRemovedEvent(final IAlgorithm<?, ?> algorithm, final T node) {
super(algorithm);
this.node = node;
}

Expand Down
@@ -1,14 +1,16 @@
package ai.libs.jaicore.graphvisualizer.events.graph;

import ai.libs.jaicore.basic.algorithm.events.AAlgorithmEvent;
import org.api4.java.algorithm.IAlgorithm;

import ai.libs.jaicore.basic.algorithm.AAlgorithmEvent;

public class NodeTypeSwitchEvent<T> extends AAlgorithmEvent implements GraphEvent {

private final T node;
private final String type;

public NodeTypeSwitchEvent(final String algorithmId, final T node, final String type) {
super(algorithmId);
public NodeTypeSwitchEvent(final IAlgorithm<?, ?> algorithm, final T node, final String type) {
super(algorithm);
this.node = node;
this.type = type;
}
Expand Down
@@ -1,9 +1,9 @@
package ai.libs.jaicore.graphvisualizer.events.graph.bus;

import ai.libs.jaicore.basic.algorithm.events.AlgorithmEvent;
import org.api4.java.algorithm.events.IAlgorithmEvent;

public interface AlgorithmEventBus extends AlgorithmEventSource {

public void postEvent(AlgorithmEvent algorithmEvent);
public void postEvent(IAlgorithmEvent algorithmEvent);

}
@@ -1,11 +1,11 @@
package ai.libs.jaicore.graphvisualizer.events.graph.bus;

import com.google.common.eventbus.Subscribe;
import org.api4.java.algorithm.events.IAlgorithmEvent;

import ai.libs.jaicore.basic.algorithm.events.AlgorithmEvent;
import com.google.common.eventbus.Subscribe;

public interface AlgorithmEventListener {

@Subscribe
public void handleAlgorithmEvent(AlgorithmEvent algorithmEvent) throws HandleAlgorithmEventException;
public void handleAlgorithmEvent(IAlgorithmEvent algorithmEvent) throws HandleAlgorithmEventException;
}
@@ -0,0 +1,19 @@
package ai.libs.jaicore.graphvisualizer.events.recorder;

import java.util.Arrays;
import java.util.List;

import ai.libs.jaicore.graphvisualizer.events.recorder.property.AlgorithmEventPropertyComputer;

public abstract class AIndependentAlgorithmEventPropertyComputer implements AlgorithmEventPropertyComputer {

@Override
public List<AlgorithmEventPropertyComputer> getRequiredPropertyComputers() {
return Arrays.asList();
}

@Override
public void overwriteRequiredPropertyComputer(final AlgorithmEventPropertyComputer computer) {
throw new UnsupportedOperationException(this.getClass().getCanonicalName() + " does not rely on other property computers, so overwriting makes no sense.");
}
}

0 comments on commit ece6087

Please sign in to comment.