-
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.
- Loading branch information
Showing
192 changed files
with
8,508 additions
and
9,047 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,3 +92,5 @@ pom.xml.next | |
release.properties | ||
.classpath | ||
.project | ||
Pipeline/src/main/resources/texts/ | ||
Pipeline/evaluations/ |
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 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>edu.kit.ipd.consistency_analyzer</groupId> | ||
<artifactId>AnalyzersSolvers</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
</parent> | ||
<artifactId>AnalyzerSolverInterfaces</artifactId> | ||
<name>AnalyzerSolverInterfaces</name> | ||
<dependencies> | ||
<dependency> | ||
<groupId>edu.kit.ipd.consistency_analyzer</groupId> | ||
<artifactId>TextDataStructures</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>edu.kit.ipd.consistency_analyzer</groupId> | ||
<artifactId>ConnectionDataStructures</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>edu.kit.ipd.consistency_analyzer</groupId> | ||
<artifactId>ModelDataStructures</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>edu.kit.ipd.consistency_analyzer</groupId> | ||
<artifactId>RecommendationDataStructures</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
</dependency> | ||
</dependencies> | ||
</project> |
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
23 changes: 23 additions & 0 deletions
23
...rc/main/java/edu/kit/ipd/consistency_analyzer/analyzers_solvers/AnalyzerSolverLoader.java
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,23 @@ | ||
package edu.kit.ipd.consistency_analyzer.analyzers_solvers; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
import java.util.ServiceLoader; | ||
|
||
public class AnalyzerSolverLoader { | ||
|
||
public static <A extends ILoadable> Map<String, A> loadLoadable(Class<A> classA) { | ||
|
||
ServiceLoader<A> loader = ServiceLoader.load(classA); | ||
|
||
Map<String, A> analyzers = new HashMap<>(); | ||
|
||
for (A a : loader) { | ||
analyzers.put(a.getName(), a); | ||
} | ||
|
||
return analyzers; | ||
|
||
} | ||
|
||
} |
46 changes: 46 additions & 0 deletions
46
.../src/main/java/edu/kit/ipd/consistency_analyzer/analyzers_solvers/ConnectionAnalyzer.java
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,46 @@ | ||
package edu.kit.ipd.consistency_analyzer.analyzers_solvers; | ||
|
||
import com.sun.tools.jconsole.JConsoleContext.ConnectionState; | ||
|
||
import edu.kit.ipd.consistency_analyzer.datastructures.IModelExtractionState; | ||
import edu.kit.ipd.consistency_analyzer.datastructures.IRecommendationState; | ||
import edu.kit.ipd.consistency_analyzer.datastructures.ITextExtractionState; | ||
import edu.kit.ipd.consistency_analyzer.datastructures.IWord; | ||
|
||
/** | ||
* This class represents an analyzer, that works on the level of the connection | ||
* creation. | ||
* | ||
* @author Sophie | ||
* | ||
*/ | ||
public abstract class ConnectionAnalyzer extends Analyzer implements IConnectionAnalyzer { | ||
|
||
protected ITextExtractionState textExtractionState; | ||
protected IModelExtractionState modelExtractionState; | ||
protected IRecommendationState recommendationState; | ||
protected ConnectionState connectionState; | ||
|
||
/** | ||
* Creates a new analyzer. | ||
* | ||
* @param dependencyType the dependencies of the analyzer | ||
* @param graph the PARSE graph to look up | ||
* @param textExtractionState the text extraction state to look up | ||
* @param modelExtractionState the model extraction state to look up | ||
* @param recommendationState the model extraction state to look up | ||
* @param connectionState the connection state to work with | ||
*/ | ||
protected ConnectionAnalyzer(DependencyType dependencyType, ITextExtractionState textExtractionState, IModelExtractionState modelExtractionState, // | ||
IRecommendationState recommendationState, ConnectionState connectionState) { | ||
super(dependencyType); | ||
this.textExtractionState = textExtractionState; | ||
this.modelExtractionState = modelExtractionState; | ||
this.recommendationState = recommendationState; | ||
this.connectionState = connectionState; | ||
} | ||
|
||
@Override | ||
public abstract void exec(IWord node); | ||
|
||
} |
44 changes: 44 additions & 0 deletions
44
...es/src/main/java/edu/kit/ipd/consistency_analyzer/analyzers_solvers/ConnectionSolver.java
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,44 @@ | ||
package edu.kit.ipd.consistency_analyzer.analyzers_solvers; | ||
|
||
import edu.kit.ipd.consistency_analyzer.datastructures.IConnectionState; | ||
import edu.kit.ipd.consistency_analyzer.datastructures.IModelExtractionState; | ||
import edu.kit.ipd.consistency_analyzer.datastructures.IRecommendationState; | ||
import edu.kit.ipd.consistency_analyzer.datastructures.ITextExtractionState; | ||
|
||
/** | ||
* The connection solver creates connections between the recommendation state | ||
* and the extraction state. | ||
* | ||
* @author Sophie | ||
* | ||
*/ | ||
public abstract class ConnectionSolver extends Solver implements IConnectionSolver { | ||
|
||
protected ITextExtractionState textExtractionState; | ||
protected IModelExtractionState modelExtractionState; | ||
protected IRecommendationState recommendationState; | ||
protected IConnectionState connectionState; | ||
|
||
/** | ||
* Creates a new solver. | ||
* | ||
* @param dependencyType the dependencies of the analyzer | ||
* @param graph the PARSE graph to look up | ||
* @param textExtractionState the text extraction state to look up | ||
* @param modelExtractionState the model extraction state to look up | ||
* @param recommendationState the model extraction state to look up | ||
* @param connectionState the connection state to work with | ||
*/ | ||
protected ConnectionSolver(// | ||
DependencyType dependencyType, ITextExtractionState textExtractionState, // | ||
IModelExtractionState modelExtractionState, IRecommendationState recommendationState, IConnectionState connectionState) { | ||
super(dependencyType); | ||
this.textExtractionState = textExtractionState; | ||
this.modelExtractionState = modelExtractionState; | ||
this.recommendationState = recommendationState; | ||
this.connectionState = connectionState; | ||
} | ||
|
||
@Override | ||
public abstract void exec(); | ||
} |
2 changes: 1 addition & 1 deletion
2
...n/java/modelconnector/DependencyType.java → ...zer/analyzers_solvers/DependencyType.java
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
9 changes: 9 additions & 0 deletions
9
...nterfaces/src/main/java/edu/kit/ipd/consistency_analyzer/analyzers_solvers/IAnalyzer.java
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,9 @@ | ||
package edu.kit.ipd.consistency_analyzer.analyzers_solvers; | ||
|
||
import edu.kit.ipd.consistency_analyzer.datastructures.IWord; | ||
|
||
public interface IAnalyzer extends ILoadable { | ||
|
||
void exec(IWord word); | ||
|
||
} |
13 changes: 13 additions & 0 deletions
13
...src/main/java/edu/kit/ipd/consistency_analyzer/analyzers_solvers/IConnectionAnalyzer.java
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,13 @@ | ||
package edu.kit.ipd.consistency_analyzer.analyzers_solvers; | ||
|
||
import edu.kit.ipd.consistency_analyzer.datastructures.IConnectionState; | ||
import edu.kit.ipd.consistency_analyzer.datastructures.IModelExtractionState; | ||
import edu.kit.ipd.consistency_analyzer.datastructures.IRecommendationState; | ||
import edu.kit.ipd.consistency_analyzer.datastructures.ITextExtractionState; | ||
|
||
public interface IConnectionAnalyzer extends IAnalyzer { | ||
|
||
IConnectionAnalyzer create(// | ||
ITextExtractionState textExtractionState, IModelExtractionState modelExtractionState, // | ||
IRecommendationState recommendationState, IConnectionState connectionState); | ||
} |
13 changes: 13 additions & 0 deletions
13
...s/src/main/java/edu/kit/ipd/consistency_analyzer/analyzers_solvers/IConnectionSolver.java
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,13 @@ | ||
package edu.kit.ipd.consistency_analyzer.analyzers_solvers; | ||
|
||
import edu.kit.ipd.consistency_analyzer.datastructures.IConnectionState; | ||
import edu.kit.ipd.consistency_analyzer.datastructures.IModelExtractionState; | ||
import edu.kit.ipd.consistency_analyzer.datastructures.IRecommendationState; | ||
import edu.kit.ipd.consistency_analyzer.datastructures.ITextExtractionState; | ||
|
||
public interface IConnectionSolver extends ISolver { | ||
|
||
IConnectionSolver create(// | ||
ITextExtractionState textExtractionState, IModelExtractionState modelExtractionState, // | ||
IRecommendationState recommendationState, IConnectionState connectionState); | ||
} |
6 changes: 6 additions & 0 deletions
6
...nterfaces/src/main/java/edu/kit/ipd/consistency_analyzer/analyzers_solvers/ILoadable.java
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,6 @@ | ||
package edu.kit.ipd.consistency_analyzer.analyzers_solvers; | ||
|
||
public interface ILoadable { | ||
|
||
String getName(); | ||
} |
12 changes: 12 additions & 0 deletions
12
...main/java/edu/kit/ipd/consistency_analyzer/analyzers_solvers/IRecommendationAnalyzer.java
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,12 @@ | ||
package edu.kit.ipd.consistency_analyzer.analyzers_solvers; | ||
|
||
import edu.kit.ipd.consistency_analyzer.datastructures.IModelExtractionState; | ||
import edu.kit.ipd.consistency_analyzer.datastructures.IRecommendationState; | ||
import edu.kit.ipd.consistency_analyzer.datastructures.ITextExtractionState; | ||
|
||
public interface IRecommendationAnalyzer extends IAnalyzer { | ||
|
||
IRecommendationAnalyzer create(// | ||
ITextExtractionState textExtractionState, IModelExtractionState modelExtractionState, // | ||
IRecommendationState recommendationState); | ||
} |
12 changes: 12 additions & 0 deletions
12
...c/main/java/edu/kit/ipd/consistency_analyzer/analyzers_solvers/IRecommendationSolver.java
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,12 @@ | ||
package edu.kit.ipd.consistency_analyzer.analyzers_solvers; | ||
|
||
import edu.kit.ipd.consistency_analyzer.datastructures.IModelExtractionState; | ||
import edu.kit.ipd.consistency_analyzer.datastructures.IRecommendationState; | ||
import edu.kit.ipd.consistency_analyzer.datastructures.ITextExtractionState; | ||
|
||
public interface IRecommendationSolver extends ISolver { | ||
|
||
IRecommendationSolver create(// | ||
ITextExtractionState textExtractionState, IModelExtractionState modelExtractionState, // | ||
IRecommendationState recommendationState); | ||
} |
7 changes: 7 additions & 0 deletions
7
...rInterfaces/src/main/java/edu/kit/ipd/consistency_analyzer/analyzers_solvers/ISolver.java
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,7 @@ | ||
package edu.kit.ipd.consistency_analyzer.analyzers_solvers; | ||
|
||
public interface ISolver extends ILoadable { | ||
|
||
void exec(); | ||
|
||
} |
9 changes: 9 additions & 0 deletions
9
...faces/src/main/java/edu/kit/ipd/consistency_analyzer/analyzers_solvers/ITextAnalyzer.java
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,9 @@ | ||
package edu.kit.ipd.consistency_analyzer.analyzers_solvers; | ||
|
||
import edu.kit.ipd.consistency_analyzer.datastructures.ITextExtractionState; | ||
|
||
public interface ITextAnalyzer extends IAnalyzer { | ||
|
||
ITextAnalyzer create(ITextExtractionState textExtractionState); | ||
|
||
} |
9 changes: 9 additions & 0 deletions
9
...erfaces/src/main/java/edu/kit/ipd/consistency_analyzer/analyzers_solvers/ITextSolver.java
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,9 @@ | ||
package edu.kit.ipd.consistency_analyzer.analyzers_solvers; | ||
|
||
import edu.kit.ipd.consistency_analyzer.datastructures.ITextExtractionState; | ||
|
||
public interface ITextSolver extends ISolver { | ||
|
||
ITextSolver create(ITextExtractionState textExtractionState); | ||
|
||
} |
40 changes: 40 additions & 0 deletions
40
.../main/java/edu/kit/ipd/consistency_analyzer/analyzers_solvers/RecommendationAnalyzer.java
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,40 @@ | ||
package edu.kit.ipd.consistency_analyzer.analyzers_solvers; | ||
|
||
import edu.kit.ipd.consistency_analyzer.datastructures.IModelExtractionState; | ||
import edu.kit.ipd.consistency_analyzer.datastructures.IRecommendationState; | ||
import edu.kit.ipd.consistency_analyzer.datastructures.ITextExtractionState; | ||
import edu.kit.ipd.consistency_analyzer.datastructures.IWord; | ||
|
||
/** | ||
* This class represents all analyzers that create work on recommendations. | ||
* | ||
* @author Sophie | ||
* | ||
*/ | ||
public abstract class RecommendationAnalyzer extends Analyzer implements IRecommendationAnalyzer { | ||
|
||
protected ITextExtractionState textExtractionState; | ||
protected IModelExtractionState modelExtractionState; | ||
protected IRecommendationState recommendationState; | ||
|
||
/** | ||
* Creates a new analyzer. | ||
* | ||
* @param dependencyType the dependencies of the analyzer | ||
* @param graph the PARSE graph to look up | ||
* @param textExtractionState the text extraction state to look up | ||
* @param modelExtractionState the model extraction state to look up | ||
* @param recommendationState the model extraction state to work with | ||
*/ | ||
protected RecommendationAnalyzer(// | ||
DependencyType dependencyType, ITextExtractionState textExtractionState, IModelExtractionState modelExtractionState, IRecommendationState recommendationState) { | ||
super(dependencyType); | ||
this.textExtractionState = textExtractionState; | ||
this.modelExtractionState = modelExtractionState; | ||
this.recommendationState = recommendationState; | ||
} | ||
|
||
@Override | ||
public abstract void exec(IWord node); | ||
|
||
} |
39 changes: 39 additions & 0 deletions
39
...rc/main/java/edu/kit/ipd/consistency_analyzer/analyzers_solvers/RecommendationSolver.java
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,39 @@ | ||
package edu.kit.ipd.consistency_analyzer.analyzers_solvers; | ||
|
||
import edu.kit.ipd.consistency_analyzer.datastructures.IModelExtractionState; | ||
import edu.kit.ipd.consistency_analyzer.datastructures.IRecommendationState; | ||
import edu.kit.ipd.consistency_analyzer.datastructures.ITextExtractionState; | ||
|
||
/** | ||
* A solver that creates recommendations. | ||
* | ||
* @author Sophie | ||
* | ||
*/ | ||
public abstract class RecommendationSolver extends Solver implements IRecommendationSolver { | ||
|
||
protected ITextExtractionState textExtractionState; | ||
protected IModelExtractionState modelExtractionState; | ||
protected IRecommendationState recommendationState; | ||
|
||
/** | ||
* Creates a new solver. | ||
* | ||
* @param dependencyType the dependencies of the analyzer | ||
* @param graph the PARSE graph to look up | ||
* @param textExtractionState the text extraction state to look up | ||
* @param modelExtractionState the model extraction state to look up | ||
* @param recommendationState the model extraction state to work with | ||
*/ | ||
protected RecommendationSolver(// | ||
DependencyType dependencyType, ITextExtractionState textExtractionState, // | ||
IModelExtractionState modelExtractionState, IRecommendationState recommendationState) { | ||
super(dependencyType); | ||
this.textExtractionState = textExtractionState; | ||
this.modelExtractionState = modelExtractionState; | ||
this.recommendationState = recommendationState; | ||
} | ||
|
||
@Override | ||
public abstract void exec(); | ||
} |
Oops, something went wrong.