@HTTPService(name="vcarb") public class BackendService extends java.lang.Object
Constructor and Description |
---|
BackendService() |
Modifier and Type | Method and Description |
---|---|
void |
addTask(InputStreamParameter xml)
The request is to be sent in the body of POST method.
|
Response |
queryTaskStatus(LongParameter taskId,
DataGroups dataGroups,
Limits limits)
This method can be used to query the current status of an analysis task from the back-end.
|
Response |
similarVideosById(StringParameter guid,
StringParameter analysisType,
DataGroups dataGroups,
Limits limits,
IntegerParameter serviceIds,
LongParameter userIdFilters)
This method is applicable for analysis back-ends that store the GUID and user information.
|
public BackendService()
@HTTPServiceMethod(name="addTask", acceptedMethods="POST") public void addTask(@HTTPMethodParameter(name="body",bodyParameter=true) InputStreamParameter xml)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <taskDetails> <backendId>461343645</backendId> <taskId>1257414844111897135</taskId> <taskType>ANALYSIS</taskType> <callbackUri>http://fe.example.org/rest/vcars/taskFinished</callbackUri> <taskParameters> <analysisTypeList> <analysisType>AUDIO</analysisType> <analysisType>FACE_DETECTION</analysisType> <analysisType>KEYWORD_EXTRACTION</analysisType> <analysisType>VISUAL</analysisType> </analysisTypeList> <sequenceType>FULL</sequenceType> </taskParameters> <userId>2267127231408991454</userId> <mediaList> <media> <credits>uklEoAVhKOqSbXeOcTLRedKdbPZFiaOJaqXEkYmQvcDxZoDzpFnjEeUKqRvsDkZk</credits> <description>baOjoAyPYeeUywVBUaHSlvQEnsGIZagpmrGnodXPyvigZbPoAeoYMfBlWRqrKgSP</description> <UID>2cfa211c-18d3-4487-84ec-9c6dd1240558</UID> <name>xNwRdECLuRpoosyhCFArriaXIrncqzPqCgIWJlZdUrPUzYlBUuLHezRjIRdFksuj</name> <serviceId>1</serviceId> <visibility>PUBLIC</visibility> <objectList> <object> <backendId>782223633</backendId> <confidence>0.2627646101100918</confidence> <mediaObjectId>8623347594533841626</mediaObjectId> <mediaType>VIDEO</mediaType> <objectId>zsSArsVzsmDLTBdLbpIzSMUPUkHeCZQEnVFBogWBBhvuQwlfojsOASPrHkcZIEWA</objectId> <rank>1426648293</rank> <serviceId>1</serviceId> <status>CANDIDATE</status> <objectType>KEYWORD</objectType> <value>JYOQrWtkHNJfqLXWMSIIjhkKNIJJmzTeNvlqPYfJJdIelcpcJAUoUgGGnncUCMAo</value> <visibility>GROUP</visibility> <timeCodeList> <timeCode> <to>1071.5519149753525</to> <from>200.94282516812186</from> </timeCode> </timeCodeList> <userId>2267127231408991454</userId> </object> </objectList> <mediaType>VIDEO</mediaType> <userId>2267127231408991454</userId> <url>http://fe.example.org/rest/vcarc/r?uid=2cfa211c-18d3-4487-84ec-9c6dd1240558&service_id=1</url> </media> </mediaList> </taskDetails>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <response method="addTask" service="vcarb"> <status>OK</status> </response>
xml
- Only the workload data should be in the body. See VideoTaskDetails
@HTTPServiceMethod(name="queryTaskStatus", acceptedMethods="GET") public Response queryTaskStatus(@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="queryTaskStatus" service="vcarb"> <taskResults> <backendId>705593560</backendId> <message>PTjVdtYmknycWFvsPgRjXFwKTYVitslATQdpwSRLMusGYUNSPFyRSthMKZeZUbtI</message> <status>NOT_STARTED</status> <taskId>1</taskId> <taskType>ANALYSIS</taskType> <mediaList> <media> <UID>c9b82bb6-f89a-4f19-9e03-b74cc585c4f7</UID> <serviceId>1</serviceId> <objectList> <object> <backendId>705593560</backendId> <confidence>0.12132696537239263</confidence> <mediaObjectId>6943864877320266457</mediaObjectId> <mediaType>PHOTO</mediaType> <objectId>mliqZfDrHcPVVfgvqzegIBLpwwErLIKWUsbgIpvaHmWMlvXwSAfWmgcUOCHFEvmL</objectId> <rank>1217735800</rank> <serviceId>6</serviceId> <status>CANDIDATE</status> <objectType>KEYWORD</objectType> <value>dRnoUhavOLTUWdAvKEuDfynGghjKGaHKccwRnYdpVorRDquEtqCKbyknThkHxMLV</value> <visibility>GROUP</visibility> <userId>5097110457765704259</userId> </object> </objectList> <mediaType>VIDEO</mediaType> <userId>5097110457765704259</userId> <url>http://fe.example.org/rest/vcarc/r?uid=c9b82bb6-f89a-4f19-9e03-b74cc585c4f7&service_id=1</url> </media> </mediaList> </taskResults> <status>OK</status> </response>
taskId
- dataGroups
- 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 limitsPhotoTaskResponse
@HTTPServiceMethod(name="similarVideosById", acceptedMethods="GET") public Response similarVideosById(@HTTPMethodParameter(name="uid") StringParameter guid, @HTTPMethodParameter(name="analysis_type",required=false) StringParameter analysisType, @HTTPMethodParameter(name="data_groups",required=false) DataGroups dataGroups, @HTTPMethodParameter(name="limits",required=false) Limits limits, @HTTPMethodParameter(name="service_id",required=false) IntegerParameter serviceIds, @HTTPMethodParameter(name="user_id",required=false) LongParameter userIdFilters)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <response method="similarVideosById" service="vcarb"> <mediaList> <media> <UID>06ab1c66-21f2-41c9-8f97-a3115bdae5c7</UID> <serviceId>1</serviceId> <objectList> <object> <backendId>551661084</backendId> <confidence>0.9429960319038083</confidence> <mediaObjectId>3775298163407094994</mediaObjectId> <mediaType>PHOTO</mediaType> <objectId>SFsPkiTPHxRiWIAxIibSzRIDFRXmkcwVBSKelhVxLRXjcjlGvuEPxzegCituFAov</objectId> <rank>937177328</rank> <serviceId>1</serviceId> <status>USER_REJECTED</status> <objectType>KEYWORD</objectType> <value>sqykpQtfiFkoukmbFmnCISorbTUrOyLnUbCBKbeWszTOFPYRrOIBivgfaIjoaNjy</value> <visibility>GROUP</visibility> <userId>7876641804995386672</userId> </object> </objectList> <mediaType>VIDEO</mediaType> <userId>7876641804995386672</userId> <url>http://fe.example.org/rest/vcarc/r?uid=06ab1c66-21f2-41c9-8f97-a3115bdae5c7&service_id=1</url> </media> </mediaList> <status>OK</status> </response>
guid
- video GUIDanalysisType
- optional list of analysis types to use for the search operation PhotoParameters.AnalysisType
dataGroups
- 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 limitsserviceIds
- serviceIds If given, search is targeted only to the services with the listed ids. For supported service types, see CAContentCore.ServiceType
.userIdFilters
- If parameter is missing, search should be targeted only to publicly available photos.PhotoList
Copyright © 2015 Tampere University of Technology, Pori Department.