Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor for extension #58

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ language: java
install: true
jdk: oraclejdk8

cache:
directories:
- $HOME/.m2
- $HOME/.gradle

env:
matrix:
- TERM=dumb
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 Michael Hoffer <[email protected]>. All rights reserved.
* Copyright 2012-2017 Michael Hoffer <[email protected]>. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
Expand Down
2 changes: 1 addition & 1 deletion VWorkflows-Core/gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
publishJars = true
publishJars=true
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 Michael Hoffer <[email protected]>. All rights reserved.
* Copyright 2012-2017 Michael Hoffer <[email protected]>. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
Expand Down Expand Up @@ -41,7 +41,6 @@
import javafx.event.EventType;

/**
*
* @author Michael Hoffer &lt;[email protected]&gt;
*/
public class ClickEvent extends Event {
Expand Down Expand Up @@ -80,6 +79,5 @@ public Object getEvent() {
return event;
}



}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 Michael Hoffer <[email protected]>. All rights reserved.
* Copyright 2012-2017 Michael Hoffer <[email protected]>. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
Expand Down Expand Up @@ -35,10 +35,13 @@

/**
* This interface describes whether two connectors are compatible for a connection.
*
* @author Michael Hoffer &lt;[email protected]&gt;
*/
public interface CompatibilityResult {
boolean isCompatible();

String getMessage();

String getStatus();
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 Michael Hoffer <[email protected]>. All rights reserved.
* Copyright 2012-2017 Michael Hoffer <[email protected]>. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
Expand Down Expand Up @@ -35,27 +35,33 @@

/**
* This interface defines a connection between two connectors.
*
* @author Michael Hoffer &lt;[email protected]&gt;
*/
public interface Connection extends Model{
// public String getSenderId();
// public void setSenderId(String id);
// public String getReceiverId();
// public void setReceiverId(String id);
public void setSender(Connector s);
public void setReceiver(Connector r);
public Connector getReceiver();
public Connector getSender();

public String getId();
public void setId(String id);

public String getType();

public Connections getConnections();
public interface Connection extends Model {
// String getSenderId();
// void setSenderId(String id);
// String getReceiverId();
// void setReceiverId(String id);
void setSender(Connector s);

void setReceiver(Connector r);

Connector getReceiver();

Connector getSender();

String getId();

void setId(String id);

String getType();

Connections getConnections();

@Override
public void setVisualizationRequest(VisualizationRequest vReq);
void setVisualizationRequest(VisualizationRequest vReq);

@Override
public VisualizationRequest getVisualizationRequest();
VisualizationRequest getVisualizationRequest();
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 Michael Hoffer <[email protected]>. All rights reserved.
* Copyright 2012-2017 Michael Hoffer <[email protected]>. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
Expand Down Expand Up @@ -43,6 +43,7 @@
/**
* This class defines a connection event. A connection event is fired when a
* connection is made between two connectors.
*
* @author Michael Hoffer &lt;[email protected]&gt;
*/
public class ConnectionEvent extends Event {
Expand Down Expand Up @@ -76,7 +77,6 @@ public Connector getReceiverConnector() {
}

/**
*
* @return the connection
*/
public Connection getConnection() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 Michael Hoffer <[email protected]>. All rights reserved.
* Copyright 2012-2017 Michael Hoffer <[email protected]>. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
Expand Down Expand Up @@ -35,20 +35,23 @@

/**
* This interface defines the result of an attempt to connect two {@code Connector}s
*
* @author Michael Hoffer &lt;[email protected]&gt;
*/
public interface ConnectionResult {

/**
* Get the connection object for the connection being attempted
*
* @return the connection
*/
Connection getConnection();
// List<Connection> getPath();

// List<Connection> getPath();

/**
* Get the status of the connection.
* Get the status of the connection.
*
* @return the status of the connection
*/
CompatibilityResult getStatus();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 Michael Hoffer <[email protected]>. All rights reserved.
* Copyright 2012-2017 Michael Hoffer <[email protected]>. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
Expand Down Expand Up @@ -49,63 +49,67 @@ public interface Connections extends Model {
*
* @param c the connection to add
*/
public void add(Connection c);
void add(Connection c);

/**
* Adds the connection defined by the specified connectors.
*
* @param s sender connector
* @param r receiver connector
*
* @return connection that has been added
*/
public Connection add(Connector s, Connector r);
Connection add(Connector s, Connector r);

/**
* Adds the connection defined by the specified connectors.
*
* @param id the id of the connection that shall be added
* @param s the sender connector
* @param r the receiver connector
* @param id the id of the connection that shall be added
* @param s the sender connector
* @param r the receiver connector
* @param vReq the visualization request of the connection
*
* @return connection that has been added
*/
public Connection add(String id, Connector s, Connector r, VisualizationRequest vReq);
Connection add(String id, Connector s, Connector r, VisualizationRequest vReq);

/**
* Removes the specified connection from this collection
*
* @param c connection to remove
*/
public void remove(Connection c);
void remove(Connection c);

/**
* Returns the specified connection.
*
* @param id id of the connection to be returned
* @param s sender connector
* @param r receiver connector
* @param s sender connector
* @param r receiver connector
*
* @return the requested connection or <code>null</code> if no such
* connection exists
*/
public Connection get(String id, Connector s, Connector r);
Connection get(String id, Connector s, Connector r);

/**
* Returns all connections betwenn the specified connectors.
*
* @param s sender connector
* @param r receiver connector
*
* @return all connections betwenn the specified connectors
*/
public Collection<Connection> getAll(Connector s, Connector r);
Collection<Connection> getAll(Connector s, Connector r);

/**
* Removes the specified connection from this collection.
*
* @param id connection id
* @param s sender connector
* @param r receiver connector
* @param s sender connector
* @param r receiver connector
*/
public void remove(String id, Connector s, Connector r);
void remove(String id, Connector s, Connector r);

/**
* Removes all connections between the specified connectors from this
Expand All @@ -114,78 +118,69 @@ public interface Connections extends Model {
* @param s sender connector
* @param r receiver connector
*/
public void removeAll(Connector s, Connector r);

/**
* Defines the connection implementation class that shall be used.
*
* @param cls connection implementation class
*/
public void setConnectionClass(Class<? extends Connection> cls);

/**
* Returns the connection implementation class.
*
* @return the connection implementation class
*/
public Class<? extends Connection> getConnectionClass();
void removeAll(Connector s, Connector r);

/**
* Returns the connections defined by this collection.
*
* @return the connections defined by this collection
*/
public ObservableList<Connection> getConnections();
ObservableList<Connection> getConnections();

/**
* Returns all connections that are connected to the specified connector.
*
* @param c connector
*
* @return all connections that are connected to the specified connector
*/
public Collection<Connection> getAllWith(Connector c);
Collection<Connection> getAllWith(Connector c);

/**
* Returns all connections that are connected to the specified node.
*
* @param n node
*
* @return all connections that are connected to the specified node
*/
public Collection<Connection> getAllWithNode(VNode n);
Collection<Connection> getAllWithNode(VNode n);

/**
* Determines whether the specified input connector is connected.
*
* @param id connector id
*
* @return <code>true</code> if the specified input connector is connected;
* <code>false</code> otherwise
*/
public boolean isInputConnected(Connector id);
boolean isInputConnected(Connector id);

/**
* Determines whether the specified output connector is connected.
*
* @param id connector id
*
* @return <code>true</code> if the specified output connector is connected;
* <code>false</code> otherwise
*/
public boolean isOutputConnected(Connector id);
boolean isOutputConnected(Connector id);

/**
* Determines if a connection exists between the specified connectors.
*
* @param s sender connector
* @param r receiver connector
*
* @return <code>true</code> if a connection between the specified
* connectors exists; <code>false</code> otherwise
*/
public boolean contains(Connector s, Connector r);
boolean contains(Connector s, Connector r);

/**
* Returns the connection type of this collection.
*
* @return connection type (e.g. <code>"control"</code> or
* <code>"data"</code>)
*/
public String getType();
String getType();
}
Loading