Skip to content
Merged
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ nohup java -cp "smart-connector-rest-dist-1.4.0.jar:dependency/*" eu.knowledge.e
The Knowledge Engine can also start in distributed mode, where it connects with a remote knowledge directory and where different instances of the Knowledge Engine (each instance hosting one or more smart connectors) can communicate with each other. More information about starting the Knowledge Engine in distributed mode can be found in the [documentation](docs/docs/distributed_mode.md).

### Configuration
TNO Knowledge Engine uses the [MicroProfile Config 3.1](https://microprofile.io/specifications/config/) specification to configure its behaviour and we use [SmallRye](https://smallrye.io/smallrye-config/) as the implementation of this specification. The default configuration values can be found in the [microprofile-config.properties](./smart-connector/src/main/resources/META-INF/microprofile-config.properties) configuration file. And, as described in the specification, these configuration values can be overridden by [environment variables and system properties](https://download.eclipse.org/microprofile/microprofile-config-3.1/microprofile-config-spec-3.1.html#default_configsources). Note that environment variables can use underscores and capital letters to adhere to their naming conventions and the MicroProfile Config automatically maps those to corresponding configuration properties using [specific rules](https://download.eclipse.org/microprofile/microprofile-config-3.1/microprofile-config-spec-3.1.html#default_configsources.env.mapping).
Knowledge Engine uses the [MicroProfile Config 3.1](https://microprofile.io/specifications/config/) specification to configure its behaviour and we use [SmallRye](https://smallrye.io/smallrye-config/) as the implementation of this specification. The default configuration values can be found in the [microprofile-config.properties](./smart-connector/src/main/resources/META-INF/microprofile-config.properties) configuration file. And, as described in the specification, these configuration values can be overridden by [environment variables and system properties](https://download.eclipse.org/microprofile/microprofile-config-3.1/microprofile-config-spec-3.1.html#default_configsources). Note that environment variables can use underscores and capital letters to adhere to their naming conventions and the MicroProfile Config automatically maps those to corresponding configuration properties using [specific rules](https://download.eclipse.org/microprofile/microprofile-config-3.1/microprofile-config-spec-3.1.html#default_configsources.env.mapping).

A description of all configuration properties can be found in the [`SmartConnectorConfig`](./smart-connector-api/src/main/java/eu/knowledge/engine/smartconnector/api/SmartConnectorConfig.java) class. The rest of this section highlights some of these configuration properties.

Expand Down
306 changes: 0 additions & 306 deletions admin-ui/src/main/resources/example_result.json

This file was deleted.

27 changes: 0 additions & 27 deletions admin-ui/src/test/java/eu/knowledge/engine/admin/TestUtils.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,13 @@ public void testConnections() throws InterruptedException {

assertNotNull(list);
assertEquals(2, list.size());
assertEquals(0, list.get(0).getKnowledgeInteractions().get(0).getConnections().size());
assertEquals(1, list.get(1).getKnowledgeInteractions().get(0).getConnections().size());

for (eu.knowledge.engine.admin.model.SmartConnector sc : list)
if (sc.getKnowledgeBaseId().equals("https://www.example.org/kb1"))
assertEquals(0, sc.getKnowledgeInteractions().get(0).getConnections().size());
else if (sc.getKnowledgeBaseId().equals("https://www.example.org/kb2"))
assertEquals(1, sc.getKnowledgeInteractions().get(0).getConnections().size());

assertEquals(200, response.statusCode());

} catch (IOException | InterruptedException | URISyntaxException e) {
Expand Down Expand Up @@ -247,7 +252,7 @@ public void cleanup() {
public void startKbs() throws InterruptedException {
PrefixMappingMem prefixes = new PrefixMappingMem();
prefixes.setNsPrefixes(PrefixMapping.Standard);
prefixes.setNsPrefix("ex", "https://www.tno.nl/example/");
prefixes.setNsPrefix("ex", "https://www.example.org/example/");
kb1 = null;
int wait = 2;
final CountDownLatch kb2ReceivedData = new CountDownLatch(1);
Expand All @@ -259,16 +264,16 @@ public void smartConnectorReady(SmartConnector aSC) {
}
};

GraphPattern gp1 = new GraphPattern(prefixes, "?a <https://www.tno.nl/example/b> ?c.");
GraphPattern gp1 = new GraphPattern(prefixes, "?a <https://www.example.org/example/b> ?c.");
AnswerKnowledgeInteraction aKI = new AnswerKnowledgeInteraction(new CommunicativeAct(), gp1);
kb1.register(aKI, (AnswerHandler) (anAKI, anAnswerExchangeInfo) -> {
assertTrue(anAnswerExchangeInfo.getIncomingBindings().isEmpty(),
"Should not have bindings in this binding set.");

BindingSet bindingSet = new BindingSet();
Binding binding = new Binding();
binding.put("a", "<https://www.tno.nl/example/a>");
binding.put("c", "<https://www.tno.nl/example/c>");
binding.put("a", "<https://www.example.org/example/a>");
binding.put("c", "<https://www.example.org/example/c>");
bindingSet.add(binding);

return bindingSet;
Expand All @@ -288,7 +293,7 @@ public void smartConnectorReady(SmartConnector aSC) {

};

GraphPattern gp2 = new GraphPattern(prefixes, "?x <https://www.tno.nl/example/b> ?y.");
GraphPattern gp2 = new GraphPattern(prefixes, "?x <https://www.example.org/example/b> ?y.");
AskKnowledgeInteraction askKI = new AskKnowledgeInteraction(new CommunicativeAct(), gp2);

kb2.register(askKI);
Expand Down
Loading
Loading