Skip to content

Commit

Permalink
Merge pull request #47 from yngwi/master
Browse files Browse the repository at this point in the history
Add handling of escaped commas to literal converter
  • Loading branch information
yngwi authored Oct 23, 2021
2 parents 0c935d8 + ad50729 commit 98b58c9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ A number of command line parameters are available to configure the application.
| Parameter | Mandatory | Default Value | Example | Description |
| ------------------------- | --------- | ------------------------------------------- | ------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| APPLICATION_PORT | | 8080 | | The port the application will run on |
| CORE_OWL_URL | | http://purl.org/nampi/owl/core | | The location of the NAMPI-Core ontology |
| CORE_OWL_URL | | http://purl.org/nampi/owl/core | | The location of the NAMPI-Core ontology |
| 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 |
| DATA_URL | \* | | http://localhost:3030/data | The URL to the data dataset where the original data will be stored |
| DEFAULT_LIMIT | | 20 | | The default result number to return when requesting from a collection endpoint like '/persons |
Expand Down Expand Up @@ -139,3 +139,7 @@ Access Token Endpoint: `[Keycloak URL]/realms/nampi/protocol/openid-connect/toke

Authorization Endpoint: `[Keycloak URL]/auth/realms/nampi/protocol/openid-connect/auth`
Access Token Endpoint: `[Keycloak URL]/auth/realms/nampi/protocol/openid-connect/token`

## API use

Note: Comma in Literals need to be URL Encoded to %2C: instead of `Lastname, Firstname@en`, `Lastname%2C Firstname@en` needs to be used.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</parent>
<groupId>eu.nampi</groupId>
<artifactId>backend</artifactId>
<version>0.3.1</version>
<version>0.3.2</version>
<name>nampi-backend</name>
<description>The NAMPI backend</description>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public class StringToLiteralConverter implements Converter<String, Literal> {

@Override
public Literal convert(String string) {
string = string.replace("%2C", ",");
// Only tries to match languages if the string contains an "@"
if (string.contains("@")) {
// Tries a faster simple pattern
Expand Down

0 comments on commit 98b58c9

Please sign in to comment.