snac-cooperative / snac

SNAC Server with WebUI and RestAPI
Other
5 stars 3 forks source link

Openrefine Suggest API and SameAs #294

Closed deternitydx closed 3 years ago

deternitydx commented 3 years ago

I know I need more comments in the ORConstellationMapper, but I'd like to get your thoughts.

glassjoseph commented 3 years ago

Yeah, I agree, maybe a few comments to explain the OR-centric terminology ('pid' = property id, 'v' = value, etc).

It looks good, and seems consistent with what little I've read of the OR Reconciliation API.

One thing that feels a little strange to me to be querying for the sameAs vocab term and mapping together a constellation rather than simply providing the inputs (name string, sameAs URL) to the ReconciliationEngine, and asking it to query the API.

On the other hand, if we do want to extend it to support dates, subjects, or similar things in the future, it'll need to be organized somehow, might as well be a constellation. Also the ReconcilliationEngine already expects a constellation.

deternitydx commented 3 years ago

Since the OpenRefine endpoint is just a client to snac, it's using the server's reconcile command which expects a Constellation object as input. As the OR endpoint was designed, it would be the interface between the OR JSON and values and snac's rest API JSON to keep the server's interface more slimmed down.