-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Towards even more sophisticated PEBL.
- Loading branch information
1 parent
fc2041a
commit 66e41ed
Showing
28 changed files
with
351 additions
and
266 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package pebl.feature; | ||
|
||
import javax.xml.bind.annotation.XmlAccessType; | ||
import javax.xml.bind.annotation.XmlAccessorType; | ||
import javax.xml.bind.annotation.XmlElement; | ||
|
||
import org.eclipse.persistence.oxm.annotations.XmlCDATA; | ||
|
||
@XmlAccessorType(XmlAccessType.NONE) | ||
public class ComputedMetric extends Metric { | ||
|
||
public static final String SCRIPT_MAX = "MAX"; | ||
public static final String SCRIPT_COUNT_TRUE = "COUNT_TRUE"; | ||
public static final String SCRIPT_SUM = "SUM"; | ||
|
||
@XmlElement(required = true) | ||
@XmlCDATA | ||
private final String groovyScript; | ||
|
||
public ComputedMetric() { | ||
super(); | ||
groovyScript = ""; | ||
} | ||
|
||
public ComputedMetric(ValueType type, String name, String description, String unit, String idPrefix, | ||
String groovyScript) { | ||
super(type, name, description, unit, idPrefix); | ||
this.groovyScript = groovyScript; | ||
} | ||
|
||
public String getGroovyScript() { | ||
return groovyScript; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package pebl.feature; | ||
|
||
import java.util.Objects; | ||
|
||
import javax.xml.bind.annotation.XmlElement; | ||
|
||
/** | ||
* Idea: only primitive types, aggregated as a special type (could be removed as well) | ||
*/ | ||
public class ValueType { | ||
|
||
public static final ValueType BOOLEAN = new ValueType("BOOLEAN"); | ||
public static final ValueType LONG = new ValueType("LONG"); | ||
public static final ValueType STRING = new ValueType("STRING"); | ||
public static final ValueType DOUBLE = new ValueType("DOUBLE"); | ||
public static final ValueType AGGREGATED = new ValueType("AGGREGATED"); | ||
|
||
@XmlElement(required = true) | ||
private final String type; | ||
|
||
ValueType() { | ||
this(""); | ||
} | ||
|
||
public ValueType(String type) { | ||
this.type = Objects.requireNonNull(type); | ||
} | ||
|
||
public String getType() { | ||
return type; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return type; | ||
} | ||
} |
11 changes: 0 additions & 11 deletions
11
pebl/src/main/java/pebl/feature/aggregation/AggregatedMetric.java
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
pebl/src/main/java/pebl/feature/aggregation/AggregationAlgorithm.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package pebl.result; | ||
|
||
import javax.xml.bind.annotation.XmlAccessType; | ||
import javax.xml.bind.annotation.XmlAccessorType; | ||
import javax.xml.bind.annotation.XmlElement; | ||
import javax.xml.bind.annotation.XmlIDREF; | ||
|
||
import pebl.feature.Metric; | ||
|
||
@XmlAccessorType(XmlAccessType.NONE) | ||
public class Measurement { | ||
|
||
@XmlIDREF | ||
@XmlElement(required = true) | ||
private final Metric metric; | ||
|
||
@XmlElement(required = true) | ||
private final Value value; | ||
|
||
Measurement() { | ||
this(new Metric(), new Value()); | ||
} | ||
|
||
public Measurement(Metric metric, Value value) { | ||
this.metric = metric; | ||
this.value = value; | ||
} | ||
|
||
public Value getValue() { | ||
return value; | ||
} | ||
|
||
public Metric getMetric() { | ||
return metric; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.