Skip to content

Commit 7f3ec7d

Browse files
author
Peter de Lange
authored
Merge pull request #9 from Distributed-Noracle/develop
Develop
2 parents aea6284 + 88e4636 commit 7f3ec7d

File tree

6 files changed

+21
-5
lines changed

6 files changed

+21
-5
lines changed

.classpath

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
<classpathentry kind="lib" path="lib/hamcrest-core-1.3.jar"/>
88
<classpathentry kind="lib" path="lib/jersey-media-json-jackson-2.25.1.jar"/>
99
<classpathentry kind="lib" path="servicebundle/gson-2.8.2.jar"/>
10-
<classpathentry kind="lib" path="lib/las2peer-bundle-0.7.5.jar"/>
10+
<classpathentry kind="lib" path="lib/las2peer-bundle-0.7.6.jar"/>
1111
<classpathentry kind="output" path="output"/>
1212
</classpath>

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,8 @@ This suite of microservices forms the backend of the Distributed Noracle Project
77
Please try out our app at: [dbis.rwth-aachen.de/noracle/](http://dbis.rwth-aachen.de/noracle/)
88

99
---------------
10+
11+
## Setup
12+
1. Build the project using `ant all`
13+
1. Copy *launcher-configuration.ini* to *etc/*
14+
1. Start using `./start-local.sh` for starting in the same shell (useful for testing), or `./start-node.sh` for starting Noracle in a screen (useful for production)

build.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<project name="Distributed-Noracle-Service" default="jar" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">
22

3-
<property name="core.version" value="0.7.5" />
3+
<property name="core.version" value="0.7.6" />
44

55
<property name="service.name" value="i5.las2peer.services.noracleService" />
66
<property name="service.class" value="NoracleService" />

src/main/i5/las2peer/services/noracleService/NoracleService.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,19 @@
1414
import io.swagger.annotations.SwaggerDefinition;
1515

1616
@Api
17-
@SwaggerDefinition(info = @Info(title = "Noracle Service", version = NoracleService.API_VERSION, description = "A bundle service for the distributed Noracle system", license = @License(name = "BSD-3", url = "https://github.com/Distributed-Noracle/Distributed-Noracle-Backend/blob/master/LICENSE.txt")))
17+
@SwaggerDefinition(
18+
info = @Info(
19+
title = "Noracle Service",
20+
version = NoracleService.API_VERSION,
21+
description = "A bundle service for the distributed Noracle system",
22+
license = @License(
23+
name = "BSD-3",
24+
url = "https://github.com/Distributed-Noracle/Distributed-Noracle-Backend/blob/master/LICENSE.txt")))
1825
@ServicePath("/" + NoracleService.RESOURCE_NAME)
1926
public class NoracleService extends RESTService {
2027

2128
public static final String RESOURCE_NAME = "distributed-noracle";
22-
public static final String API_VERSION = "0.6";
29+
public static final String API_VERSION = "0.7";
2330

2431
@Override
2532
protected void initResources() {

src/main/i5/las2peer/services/noracleService/resources/QuestionVotesResource.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ public Vote putSetQuestionVote(@PathParam("spaceId") String spaceId, @PathParam(
7272
obj.put("spaceId", spaceId);
7373
obj.put("qId", questionId);
7474

75-
obj.put("functionName", "putSetVote");
75+
obj.put("functionName", "putSetQuestionVote");
76+
obj.put("serviceAlias", "distributed-noracle");
7677
obj.put("uid", Context.getCurrent().getMainAgent().getIdentifier());
7778
attributes.put("spaceId", spaceId);
7879
attributes.put("qId", questionId);

src/main/i5/las2peer/services/noracleService/resources/QuestionsResource.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,11 @@ public Response createQuestion(@PathParam("spaceId") String questionSpaceId, @Ap
8282
JSONObject obj = new JSONObject();
8383
JSONObject attributes = new JSONObject();
8484
obj.put("functionName", "createQuestion");
85+
obj.put("serviceAlias", "distributed-noracle");
8586
obj.put("uid", Context.getCurrent().getMainAgent().getIdentifier());
8687
obj.put("qid", question.getQuestionId());
8788
attributes.put("spaceId", questionSpaceId);
89+
attributes.put("userId", Context.getCurrent().getMainAgent().getIdentifier());
8890
attributes.put("body", p.parse(createRelationPojoJson));
8991
attributes.put("result", question.getQuestionId());
9092
obj.put("attributes", attributes);
@@ -129,6 +131,7 @@ public Response createRelatedQuestion(@PathParam("spaceId") String questionSpace
129131
JSONObject obj = new JSONObject();
130132
JSONObject attributes = new JSONObject();
131133
obj.put("functionName", "createQuestion");
134+
obj.put("serviceAlias", "distributed-noracle");
132135
obj.put("uid", Context.getCurrent().getMainAgent().getIdentifier());
133136
obj.put("qid", question.getQuestionId());
134137
attributes.put("spaceId", questionSpaceId);

0 commit comments

Comments
 (0)