@HTTPService(name="cars") public class ServerService extends java.lang.Object
ContentAnalysisService
Constructor and Description |
---|
ServerService() |
Modifier and Type | Method and Description |
---|---|
Response |
queryTaskDetails(IntegerParameter backendId,
LongParameter taskId,
DataGroups dataGroups,
Limits limits)
This method can be used to retrieve the up-to-date details and progress of a previously scheduled task.
|
void |
taskFinished(InputStreamParameter xml)
The request is to be sent in the body of POST method.
|
public ServerService()
@HTTPServiceMethod(name="taskFinished", acceptedMethods="POST") public void taskFinished(@HTTPMethodParameter(name="body",bodyParameter=true) InputStreamParameter xml)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <taskResults> <backendId>1451330169</backendId> <message>uiqIFeKrpkPEhPVuvbDLXCaBkYNCmwFHQbkFUWUcmdckUimaPDZmFbrqCtudMiRn</message> <status>NOT_STARTED</status> <taskId>6454670730162539352</taskId> <taskType>ANALYSIS</taskType> <mediaList> <media> <UID>858900cc-6a02-4e2c-baba-8799d50e603b</UID> <serviceId>6</serviceId> <objectList> <object> <backendId>1451330169</backendId> <confidence>0.43121354314658733</confidence> <mediaObjectId>776062905985165415</mediaObjectId> <mediaType>PHOTO</mediaType> <objectId>IXvjFAKuDPJOnOmhXmzYowrzFhHDNyHJGaOOptIZbCoSKnbUhvLkpEjHaKrvSGYt</objectId> <rank>234424966</rank> <serviceId>6</serviceId> <status>USER_REJECTED</status> <objectType>KEYWORD</objectType> <value>mwdZxaptGtYKPHQZjxYlOHvEDbTboDxdEHDVzEUZxkZFLBzsIFoBdIzEOaJdxwfI</value> <visibility>PUBLIC</visibility> <userId>1020157765518368186</userId> </object> </objectList> <mediaType>PHOTO</mediaType> <userId>1020157765518368186</userId> <url>http://fe.example.org/rest/carc/r?uid=858900cc-6a02-4e2c-baba-8799d50e603b&service_id=6</url> </media> </mediaList> </taskResults>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <response method="taskFinished" service="cars"> <status>OK</status> </response>
xml
- Only the result data should be in the body. See PhotoTaskResponse
@HTTPServiceMethod(name="queryTaskDetails", acceptedMethods="GET") public Response queryTaskDetails(@HTTPMethodParameter(name="backend_id") IntegerParameter backendId, @HTTPMethodParameter(name="task_id") LongParameter taskId, @HTTPMethodParameter(name="data_groups",required=false) DataGroups dataGroups, @HTTPMethodParameter(name="limits",required=false) Limits limits)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <response method="queryTaskDetails" service="cars"> <taskDetails> <backendId>1</backendId> <taskId>1</taskId> <taskType>ANALYSIS</taskType> <callbackUri>http://fe.example.org/rest/ca/taskFinished</callbackUri> <userId>5384471730116722558</userId> <mediaList> <media> <UID>1edbafd8-1bd5-4c14-864b-e2c78ff3334b</UID> <serviceId>4</serviceId> <objectList> <object> <backendId>197727339</backendId> <confidence>0.6537614795019214</confidence> <mediaObjectId>7007962261296526147</mediaObjectId> <mediaType>PHOTO</mediaType> <objectId>MiDtmROmGsQKfHISHHrBLOntYyRGYHfmpyCOaFelwePBsMTSRcLjbHFmZnanBJAs</objectId> <rank>24706023</rank> <serviceId>6</serviceId> <status>USER_REJECTED</status> <objectType>KEYWORD</objectType> <value>yAUYvurUgmEoZeZwEwFlLpnwKqbtEggsHWYyzEIzNfEjWRaxMZTqCDRzxGovyQEF</value> <visibility>GROUP</visibility> <userId>5384471730116722558</userId> </object> </objectList> <mediaType>PHOTO</mediaType> <userId>5384471730116722558</userId> <url>http://fe.example.org/rest/carc/r?uid=1edbafd8-1bd5-4c14-864b-e2c78ff3334b&service_id=4</url> </media> </mediaList> <userConfidence>0.9546867449051889</userConfidence> </taskDetails> <status>OK</status> </response>
taskId
- backendId
- used to provide custom task details for specific back-endsdataGroups
- For supported data groups, see ClientService.retrieveMediaObjects(core.tut.pori.http.parameters.AuthenticationParameter, DataGroups, Limits, core.tut.pori.http.parameters.IntegerParameter, core.tut.pori.http.parameters.StringParameter)
.limits
- paging limitsCopyright © 2015 Tampere University of Technology, Pori Department.