RESTful Interface Design for Entity Version

String Comparator Resource

2 min read

On this page
  1. URL: /openempi-ws-rest/1.0/string-comparators
  2. Method
  3. Responses
  4. Example
  5. Parameters
  6. Responses
  7. Example
  8. Parameters
  9. Method
  10. Responses
  11. Example

URL: /openempi-ws-rest/1.0/string-comparators

Method

GET

Returns the list of string comparators that the instance supports.

Responses

  • 200 - application/json - Returns a JSON representation of the response based on the Accept header

  • 200 - application/xml - Returns an XML representation of the response based on the Accept header

  • 404 - Returned if there is no known comparator on the instance (should never be the case)

Example

Version 1.0

http://localhost:8080/openempi-admin/openempi-ws-rest/1.0/string-comparators

Accept: applicaton/json

Return:

{
    "data": [
        "Exact",
        "Jaro",
        "JaroWinkler",
        "JaroWinklerV2",
        "Levenshtein",
        "NeedlemanWunsch",
        "SmithWaterman",
        "MongeElkan",
        "Gotoh",
        "GotohWindowedAffine",
        "Block",
        "Soundex",
        "Euclidean",
        "QGrams",
        "JaccardString",
        "Cosine",
        "DiceString",
        "Matching",
        "Overlap",
        "RegularExpression",
        "Numeric",
        "Date"
    ]
}

URL: /openempi-ws-rest/1.0/string-comparators/{comparator}/parameters

Parameters

| Parameter

|

Value Type

|

Parameter Type

|

R/O

|

Description

| | --- | --- | --- | --- | --- | | comparator | String | Path Parameter | R | The name of the string comparator for which you want to retrieve the list of parameters. |

GET

Returns the list of parameters if any that the string comparator specified in the path requires. The name of the string comparator must be one of the supported string comparators on the instance.

Responses

  • 200 - application/json - Returns a JSON representation of the response based on the Accept header

  • 200 - application/xml - Returns an XML representation of the response based on the Accept header

  • 404 - Returned if there are no required parameters for the comparator.

Example

Version 1.0

http://localhost:8080/openempi-admin/openempi-ws-rest/1.0/string-comparators/RegularExpression/parameters

Accept: applicaton/xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<stringList>
    <data>regular-expression</data>
</stringList>

URL: /openempi-ws-rest/1.0/string-comparators/{comparator}/{value1}/{value2}

Parameters

| Parameter

|

Value Type

|

Parameter Type

|

R/O

|

Description

| | --- | --- | --- | --- | --- | | comparator | String | Path Parameter | R | The name of the string comparator for which you want to retrieve the list of parameters. | | value1 | String | Path Parameter | R | The first value in the pair of values whose similarity you want to measure using the specified string comparator | | value2 | String | Path Parameter | R | The second value in the pair of values whose similarity you want to measure using the specified string comparator |

Method

GET

Returns the similarity measure between the two provided values using the string comparator specified in the path.

Responses

  • 200 - Returns the measure of similarity between the two values

  • 404 - Returned if string comparator specified is not known to the system

Example

Version 1.0

http://localhost:8080/openempi-admin/openempi-ws-rest/1.0/string-comparators/JaroWinkler/John/jon

Accept: text/plain

Return:

0.9333333333333333

Up to Entity API Documentation