Skip to content

Commit

Permalink
Merge pull request #9 from Distributed-Noracle/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
pedela authored Jul 19, 2018
2 parents aea6284 + 88e4636 commit 7f3ec7d
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
<classpathentry kind="lib" path="lib/hamcrest-core-1.3.jar"/>
<classpathentry kind="lib" path="lib/jersey-media-json-jackson-2.25.1.jar"/>
<classpathentry kind="lib" path="servicebundle/gson-2.8.2.jar"/>
<classpathentry kind="lib" path="lib/las2peer-bundle-0.7.5.jar"/>
<classpathentry kind="lib" path="lib/las2peer-bundle-0.7.6.jar"/>
<classpathentry kind="output" path="output"/>
</classpath>
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@ This suite of microservices forms the backend of the Distributed Noracle Project
Please try out our app at: [dbis.rwth-aachen.de/noracle/](http://dbis.rwth-aachen.de/noracle/)

---------------

## Setup
1. Build the project using `ant all`
1. Copy *launcher-configuration.ini* to *etc/*
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)
2 changes: 1 addition & 1 deletion build.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<project name="Distributed-Noracle-Service" default="jar" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">

<property name="core.version" value="0.7.5" />
<property name="core.version" value="0.7.6" />

<property name="service.name" value="i5.las2peer.services.noracleService" />
<property name="service.class" value="NoracleService" />
Expand Down
11 changes: 9 additions & 2 deletions src/main/i5/las2peer/services/noracleService/NoracleService.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,19 @@
import io.swagger.annotations.SwaggerDefinition;

@Api
@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")))
@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")))
@ServicePath("/" + NoracleService.RESOURCE_NAME)
public class NoracleService extends RESTService {

public static final String RESOURCE_NAME = "distributed-noracle";
public static final String API_VERSION = "0.6";
public static final String API_VERSION = "0.7";

@Override
protected void initResources() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ public Vote putSetQuestionVote(@PathParam("spaceId") String spaceId, @PathParam(
obj.put("spaceId", spaceId);
obj.put("qId", questionId);

obj.put("functionName", "putSetVote");
obj.put("functionName", "putSetQuestionVote");
obj.put("serviceAlias", "distributed-noracle");
obj.put("uid", Context.getCurrent().getMainAgent().getIdentifier());
attributes.put("spaceId", spaceId);
attributes.put("qId", questionId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,11 @@ public Response createQuestion(@PathParam("spaceId") String questionSpaceId, @Ap
JSONObject obj = new JSONObject();
JSONObject attributes = new JSONObject();
obj.put("functionName", "createQuestion");
obj.put("serviceAlias", "distributed-noracle");
obj.put("uid", Context.getCurrent().getMainAgent().getIdentifier());
obj.put("qid", question.getQuestionId());
attributes.put("spaceId", questionSpaceId);
attributes.put("userId", Context.getCurrent().getMainAgent().getIdentifier());
attributes.put("body", p.parse(createRelationPojoJson));
attributes.put("result", question.getQuestionId());
obj.put("attributes", attributes);
Expand Down Expand Up @@ -129,6 +131,7 @@ public Response createRelatedQuestion(@PathParam("spaceId") String questionSpace
JSONObject obj = new JSONObject();
JSONObject attributes = new JSONObject();
obj.put("functionName", "createQuestion");
obj.put("serviceAlias", "distributed-noracle");
obj.put("uid", Context.getCurrent().getMainAgent().getIdentifier());
obj.put("qid", question.getQuestionId());
attributes.put("spaceId", questionSpaceId);
Expand Down

0 comments on commit 7f3ec7d

Please sign in to comment.