@Singleton @Path(value="/pref") public final class Preference extends AbstractOryxResource
Responds to a POST request to /pref/[userID]/[itemID]
. The first line of the request
body is parsed as a strength score for the user-item preference. If the request body is empty,
the value is 1.0.
Also responds to a DELETE request to the same path, which will signal the removal of a user-item association.
INPUT_PRODUCER_KEY, MODEL_MANAGER_KEY
Constructor and Description |
---|
Preference() |
Modifier and Type | Method and Description |
---|---|
void |
delete(String userID,
String itemID) |
void |
post(String userID,
String itemID,
Reader reader) |
check, check, checkExists, checkNotReadOnly, getServingModel, isReadOnly, maybeBuffer, maybeBuffer, maybeDecompress, parseMultipart, sendInput
getInputProducer, getServingModelManager, init
@POST @Path(value="{userID}/{itemID}") @Consumes(value={"text/plain","text/csv","application/json"}) public void post(@PathParam(value="userID") String userID, @PathParam(value="itemID") String itemID, Reader reader) throws IOException, OryxServingException
IOException
OryxServingException
@DELETE @Path(value="{userID}/{itemID}") public void delete(@PathParam(value="userID") String userID, @PathParam(value="itemID") String itemID) throws OryxServingException
OryxServingException
Copyright © 2014–2018. All rights reserved.