Skip to content

Commit 98b58c9

Browse files
authored
Merge pull request #47 from yngwi/master
Add handling of escaped commas to literal converter
2 parents 0c935d8 + ad50729 commit 98b58c9

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ A number of command line parameters are available to configure the application.
3939
| Parameter | Mandatory | Default Value | Example | Description |
4040
| ------------------------- | --------- | ------------------------------------------- | ------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
4141
| APPLICATION_PORT | | 8080 | | The port the application will run on |
42-
| CORE_OWL_URL | | http://purl.org/nampi/owl/core | | The location of the NAMPI-Core ontology |
42+
| CORE_OWL_URL | | http://purl.org/nampi/owl/core | | The location of the NAMPI-Core ontology |
4343
| DATA_BASE_URL | | The URL used in the current Servlet Request | https://example.com/nampi/data | The URL to use when creating internal links or new database individuals. When omitted, the current servlet request is used |
4444
| DATA_URL | \* | | http://localhost:3030/data | The URL to the data dataset where the original data will be stored |
4545
| DEFAULT_LIMIT | | 20 | | The default result number to return when requesting from a collection endpoint like '/persons |
@@ -139,3 +139,7 @@ Access Token Endpoint: `[Keycloak URL]/realms/nampi/protocol/openid-connect/toke
139139

140140
Authorization Endpoint: `[Keycloak URL]/auth/realms/nampi/protocol/openid-connect/auth`
141141
Access Token Endpoint: `[Keycloak URL]/auth/realms/nampi/protocol/openid-connect/token`
142+
143+
## API use
144+
145+
Note: Comma in Literals need to be URL Encoded to %2C: instead of `Lastname, Firstname@en`, `Lastname%2C Firstname@en` needs to be used.

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</parent>
1010
<groupId>eu.nampi</groupId>
1111
<artifactId>backend</artifactId>
12-
<version>0.3.1</version>
12+
<version>0.3.2</version>
1313
<name>nampi-backend</name>
1414
<description>The NAMPI backend</description>
1515

src/main/java/eu/nampi/backend/converter/StringToLiteralConverter.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ public class StringToLiteralConverter implements Converter<String, Literal> {
1616

1717
@Override
1818
public Literal convert(String string) {
19+
string = string.replace("%2C", ",");
1920
// Only tries to match languages if the string contains an "@"
2021
if (string.contains("@")) {
2122
// Tries a faster simple pattern

0 commit comments

Comments
 (0)