Skip to content

Commit

Permalink
Merge branch 'master' into build_integration_algorithms
Browse files Browse the repository at this point in the history
Conflicts:
	frontend/assembly.xml
	frontend/pom.xml
  • Loading branch information
jakob-zwiener committed May 1, 2014
2 parents 87d575f + 7d388d9 commit 4f89e92
Show file tree
Hide file tree
Showing 137 changed files with 6,578 additions and 6,305 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
release.properties
/.idea
*.iml
/target
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ env:
- secure: "cw80AZWTn5/TnqeRy0CMWvKiktVe84GGgK5DISFLJ9MhYdXYZwn+2r8rQk6TCguZ4GzvztStlXAzsvOIJzqOmS6bL4ZO9iT08LCsaNUb2K8vJFsTyqf9SYVHv/0Go9WTiAOIWZjvQG455FecFUdMdZxWcGgfDuScvFFx5gEmuzY="
- secure: "mWWbU2L21JPD9zIZqgiwnLZNnNcEP73firR7DQtwfYgQO2ajfEuOikjUwO6BBds4jTxi0VagHsowEC24/CEet1YJDxryYDXfkGIZZbz5oKbCv2JJDpSbGmK5lcW0BIYl5UFObGs9K6LJ7vEQAGxoo7MS8h6G0a8u53cIsVhvnJs="

install:
- sudo apt-get install texlive

script: "mvn -q clean verify"

after_success:
Expand Down
2 changes: 1 addition & 1 deletion algorithm_integration/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
~ limitations under the License.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,16 @@

/**
* Generates temporary files.
*
*
* @author Jakob Zwiener
*/
public interface FileGenerator extends Closeable {

/**
* Returns a temporary file that will be deleted on close.
*
* @return temporary file
*
/**
* Returns a temporary file that will be deleted on close.
*
* @return temporary file
* @throws FileCreationException if the file cannot be created
*/
File getTemporaryFile() throws FileCreationException;
File getTemporaryFile() throws FileCreationException;
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@

/**
* An {@link Algorithm} that takes {@link SQLInputGenerator} configuration values.
*
*
* @author Jakob Zwiener
*/
public interface SqlInputParameterAlgorithm extends Algorithm {

/**
* Sets a SQLInputGenerator configuration value on the algorithm.
*
* @param identifier the parameter's identifier
* @param values one or multiple SQLInputGenerator values
/**
* Sets a SQLInputGenerator configuration value on the algorithm.
*
* @param identifier the parameter's identifier
* @param values one or multiple SQLInputGenerator values
* @throws de.uni_potsdam.hpi.metanome.algorithm_integration.AlgorithmConfigurationException if the algorithm cannot be correctly configured using the received configuration values
*/
void setConfigurationValue(String identifier, SQLInputGenerator... values) throws AlgorithmConfigurationException;
void setConfigurationValue(String identifier, SQLInputGenerator... values) throws AlgorithmConfigurationException;

}
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,18 @@

package de.uni_potsdam.hpi.metanome.algorithm_integration.configuration;

import java.io.Serializable;

/**
* @author Jakob Zwiener
*/
public class ConfigurationSettingBoolean {
public class ConfigurationSettingBoolean implements Serializable {
private static final long serialVersionUID = 3374302400843066557L;

public boolean value;

boolean value;
public ConfigurationSettingBoolean() {
}

public ConfigurationSettingBoolean(boolean value) {
this.value = value;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
/*
* Copyright 2014 by the Metanome project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package de.uni_potsdam.hpi.metanome.algorithm_integration.configuration;


/**
* @author Jakob Zwiener
*/
public class ConfigurationSettingCsvFile extends ConfigurationSettingDataSource {
private static final long serialVersionUID = -770650561337139324L;

private String fileName;
private boolean advanced;
private char separatorChar;
private char quoteChar;
private char escapeChar;
private boolean strictQuotes;
private boolean ignoreLeadingWhiteSpace;
private int line;

public ConfigurationSettingCsvFile() {
}

public ConfigurationSettingCsvFile(String fileName, boolean advanced, char separator, char quote,
char escape, boolean strictQuotes, boolean ignoreLeadingWhiteSpace, int line) {
this.fileName = fileName;
this.advanced = advanced;
this.separatorChar = separator;
this.quoteChar = quote;
this.escapeChar = escape;
this.strictQuotes = strictQuotes;
this.ignoreLeadingWhiteSpace = ignoreLeadingWhiteSpace;
this.line = line;
}

public String getFileName() {
return fileName;
}

public void setFileName(String value) {
this.fileName = value;
}

public boolean isAdvanced() {
return advanced;
}

public void setAdvanced(boolean value) {
this.advanced = value;
}

public char getSeparatorChar() {
return separatorChar;
}

public void setSeparatorChar(char value) {
this.separatorChar = value;
}

public char getQuoteChar() {
return quoteChar;
}

public void setQuoteChar(char value) {
this.quoteChar = value;
}

public char getEscapeChar() {
return escapeChar;
}

public void setEscapeChar(char value) {
this.escapeChar = value;
}

public boolean isStrictQuotes() {
return strictQuotes;
}

public void setStrictQuotes(boolean value) {
this.strictQuotes = value;
}

public boolean isIgnoreLeadingWhiteSpace() {
return ignoreLeadingWhiteSpace;
}

public void setIgnoreLeadingWhiteSpace(boolean value) {
this.ignoreLeadingWhiteSpace = value;
}

public int getLine() {
return line;
}

public void setLine(int value) {
this.line = value;
}

public String getValueAsString() {
return fileName;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* Copyright 2014 by the Metanome project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package de.uni_potsdam.hpi.metanome.algorithm_integration.configuration;

import java.io.Serializable;


/**
* InputParameters correspond to a ConfigurationSpecification and ConfigurationValue type.
* It is used for frontend input of the configuration value, so generally, a ConfigurationSpecification
* will be converted to an InputParameter, which is used to get the user's value input, and then converted
* to the ConfigurationValue handed back to the algorithm.
*
* @author Claudia
*/
public abstract class ConfigurationSettingDataSource implements Serializable {
private static final long serialVersionUID = 8344875059579539858L;

public abstract String getValueAsString();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/*
* Copyright 2014 by the Metanome project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package de.uni_potsdam.hpi.metanome.algorithm_integration.configuration;


public class ConfigurationSettingSQLIterator extends ConfigurationSettingDataSource {
private static final long serialVersionUID = 3242593091096735218L;

private String dbUrl;
private String username;
private String password;

public ConfigurationSettingSQLIterator() {
}

public ConfigurationSettingSQLIterator(String dbUrl, String username, String password) {
this.dbUrl = dbUrl;
this.username = username;
this.password = password;
}

public String getDbUrl() {
return dbUrl;
}

public void setDbUrl(String dbUrl) {
this.dbUrl = dbUrl;
}

public String getUsername() {
return username;
}

public void setUsername(String username) {
this.username = username;
}

public String getPassword() {
return password;
}

public void setPassword(String password) {
this.password = password;
}

@Override
public String getValueAsString() {
return this.dbUrl + ";" + this.username + ";" + this.password;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,23 @@
* limitations under the License.
*/

package de.uni_potsdam.hpi.metanome.frontend.client.parameter;
package de.uni_potsdam.hpi.metanome.algorithm_integration.configuration;

import java.io.Serializable;

public class InputParameterInteger extends InputParameter {
private static final long serialVersionUID = 5161219640594711634L;

private int value;

public InputParameterInteger(){}
/**
* @author Jakob Zwiener
*/
public class ConfigurationSettingString implements Serializable {
private static final long serialVersionUID = 1753877522641977576L;

public InputParameterInteger(String identifier) {
super(identifier);
}
public String value;

// **** GETTERS & SETTERS ****
public Integer getValue() {
return value;
}

public void setValue(int value) {
this.value = value;
}
public ConfigurationSettingString() {
}

@Override
public InputParameterWidget createWrappingWidget() {
return new InputParameterIntegerWidget(this);
}
public ConfigurationSettingString(String value) {
this.value = value;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

import de.uni_potsdam.hpi.metanome.algorithm_integration.Algorithm;

import java.io.Serializable;

/**
* Represents a configuration parameter an {@link Algorithm} needs to be properly configured.
* The ConfigurationSpecification is then used to construct a configuration value that
Expand All @@ -27,12 +29,17 @@
*
* @author Jakob Zwiener
*/
public abstract class ConfigurationSpecification {

public abstract class ConfigurationSpecification implements Serializable {
public static final int ARBITRARY_NUMBER_OF_VALUES = -1;
private static final long serialVersionUID = 4312752686730530733L;
protected String identifier;
/**
* would be good to make this final, but then it would not be serialized and thus be reset to 1 in frontend
*/
protected int numberOfValues;

protected final String identifier;
protected final int numberOfValues;
public ConfigurationSpecification() {
}

/**
* Construct a configuration specification.
Expand Down Expand Up @@ -75,4 +82,7 @@ public int getNumberOfValues() {
return numberOfValues;
}

//TODO use sth more specific than object
public abstract Object[] getSettings();

}

0 comments on commit 4f89e92

Please sign in to comment.