@HTTPService(name="carc") public class ClientService extends java.lang.Object
ContentAnalysisService
Constructor and Description |
---|
ClientService() |
Modifier and Type | Method and Description |
---|---|
Response |
deletePhotos(AuthenticationParameter authenticatedUser,
StringParameter guid)
This method is for removing photo metadata.
|
Response |
getPhotos(AuthenticationParameter authenticatedUser,
StringParameter guid,
DataGroups dataGroups,
Limits limits,
IntegerParameter serviceIds,
LongParameter userIds)
This method can be used to retrieve the metadata of one or multiple photos.
|
RedirectResponse |
r(AuthenticationParameter authenticatedUser,
IntegerParameter serviceId,
StringParameter guid)
Redirects the client to the actual photo location (i.e.
|
Response |
retrieveMediaObjects(AuthenticationParameter authenticatedUser,
DataGroups dataGroups,
Limits limits,
IntegerParameter serviceIds,
StringParameter mediaObjectIds)
This method is for retrieving a list of media objects for the currently authenticated user by providing a set of request parameters (filters).
|
Response |
searchSimilarByContent(AuthenticationParameter authenticatedUser,
StringParameter url,
StringParameter analysisType,
DataGroups dataGroups,
Limits limits,
IntegerParameter serviceIds,
LongParameter userIdFilters)
Search for photos which are similar to the photo designated by the given URL parameter.
|
Response |
searchSimilarById(AuthenticationParameter authenticatedUser,
StringParameter guid,
StringParameter analysisType,
DataGroups dataGroups,
Limits limits,
IntegerParameter serviceIds,
LongParameter userIdFilters)
Search for photos which are similar to the photo designated by the given GUID parameter.
|
Response |
searchSimilarByKeyword(AuthenticationParameter authenticatedUser,
StringParameter keywords,
DataGroups dataGroups,
Limits limits,
IntegerParameter serviceIds,
LongParameter userIdFilters)
Search for photos which contain the given keywords, or keywords closely related or associated with the keywords.
|
void |
similarityFeedback(AuthenticationParameter authenticatedUser,
InputStreamParameter xml)
The clients can use this method to deliver similarity feedback.
|
Response |
similarPhotosByObject(AuthenticationParameter authenticatedUser,
DataGroups dataGroups,
Limits limits,
IntegerParameter serviceIds,
LongParameter userIdFilters,
InputStreamParameter xml)
Search similar photos by giving a list of reference objects.
|
void |
updatePhotos(AuthenticationParameter authenticatedUser,
InputStreamParameter xml)
The clients can use this method to update the details of photos.
|
public ClientService()
@HTTPServiceMethod(name="similarPhotosByKeyword", acceptedMethods="GET") public Response searchSimilarByKeyword(@HTTPAuthenticationParameter(required=false) AuthenticationParameter authenticatedUser, @HTTPMethodParameter(name="keywords") StringParameter keywords, @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="similarPhotosByKeyword" service="carc"> <mediaList> <media> <UID>f8ef3bfe-7af7-42d6-ba7e-3c1808a81823</UID> <serviceId>1</serviceId> <visibility>PUBLIC</visibility> <objectList> <object> <mediaType>PHOTO</mediaType> <objectType>KEYWORD</objectType> <value>cute</value> </object> </objectList> <mediaType>PHOTO</mediaType> <userId>3702155645387108849</userId> <url>http://fe.example.org/rest/carc/r?uid=f8ef3bfe-7af7-42d6-ba7e-3c1808a81823&service_id=1</url> </media> </mediaList> <status>OK</status> </response>
authenticatedUser
- keywords
- any number of keywords for the search.dataGroups
- For supported data groups, see retrieveMediaObjects(AuthenticationParameter, DataGroups, Limits, IntegerParameter, StringParameter)
limits
- paging limitsserviceIds
- If given, search is targeted only to the services with the listed ids. For supported service types, see CAContentCore.ServiceType
.userIdFilters
- If given, the search will return photos owned by the given user (provided that the currently logged in user has the required permissions).PhotoList
@HTTPServiceMethod(name="similarPhotosById", acceptedMethods="GET") public Response searchSimilarById(@HTTPAuthenticationParameter(required=false) AuthenticationParameter authenticatedUser, @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="similarPhotosById" service="carc"> <mediaList> <media> <UID>708cda70-d309-4072-b58a-d6af0195a66e</UID> <serviceId>4</serviceId> <objectList> <object> <backendId>1380347793</backendId> <confidence>0.8444897154906561</confidence> <mediaObjectId>7322309124256047689</mediaObjectId> <mediaType>PHOTO</mediaType> <objectId>egEhDEBsONiLYKZyqjUgLrEmaZXspgAPftVyDmhjLXlDmlYHWBRHhsKRVqHjdNEj</objectId> <rank>965289702</rank> <serviceId>6</serviceId> <status>USER_REJECTED</status> <objectType>KEYWORD</objectType> <value>XHzFSvEyQBgxRcfwWpXbzuiPSkzTKsapNUlMMwDxqvImGLQECyXEitXkNhNWLShs</value> <visibility>PRIVATE</visibility> <userId>8959481074160969095</userId> </object> </objectList> <mediaType>PHOTO</mediaType> <userId>8959481074160969095</userId> <url>http://fe.example.org/rest/carc/r?uid=708cda70-d309-4072-b58a-d6af0195a66e&service_id=4</url> </media> </mediaList> <status>OK</status> </response>
authenticatedUser
- analysisType
- optional list of analysis types to use for the search operation PhotoParameters.AnalysisType
guid
- photo GUIDdataGroups
- For supported data groups, see retrieveMediaObjects(AuthenticationParameter, DataGroups, Limits, IntegerParameter, StringParameter)
limits
- paging limitsserviceIds
- If given, search is targeted only to the services with the listed ids. For supported service types, see CAContentCore.ServiceType
.userIdFilters
- If given, the search will return photos owned by the given user (provided that the currently logged in user has the required permissions).PhotoList
@HTTPServiceMethod(name="similarPhotosByObject", acceptedMethods="POST") public Response similarPhotosByObject(@HTTPAuthenticationParameter(required=false) AuthenticationParameter authenticatedUser, @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, @HTTPMethodParameter(name="body",bodyParameter=true) InputStreamParameter xml)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <objectList> <object> <backendId>1651433289</backendId> <confidence>0.6485498209833002</confidence> <mediaObjectId>1103212614794997932</mediaObjectId> <mediaType>PHOTO</mediaType> <objectId>khvRicNVcrvnUleyFLpoQkTuRXjYHQcLktkPcmLrMqfoaXStWDsFiSLaUcqcZPIT</objectId> <rank>742042930</rank> <serviceId>6</serviceId> <status>USER_REJECTED</status> <objectType>KEYWORD</objectType> <value>mlWNThkccGKdZcHyPoTPemsRjsTeJjoEJNZCbPtMYtCuyQDaSjofbdtdWGCJVZoQ</value> <visibility>GROUP</visibility> <userId>6164815909463926252</userId> </object> </objectList>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <response method="similarPhotosByObject" service="carc"> <mediaList> <media> <UID>9f0ee1d9-c925-4a08-bf85-bb8d093ec7e3</UID> <serviceId>1</serviceId> <visibility>PUBLIC</visibility> <objectList> <object> <backendId>1913712445</backendId> <confidence>0.7581488474183272</confidence> <mediaObjectId>6390994239157644475</mediaObjectId> <mediaType>PHOTO</mediaType> <objectId>TnGjOsTPztHhoPgmRrZfOsqWRpSYrNlFmQbjzWqPqPJJDbYBraxLLNxUDlOmVchf</objectId> <rank>1489275820</rank> <serviceId>6</serviceId> <status>NO_FRIENDLY_KEYWORD</status> <objectType>KEYWORD</objectType> <value>CRoKZMwFJQtSmqVhFVZwCkDaeRtGXnqcOYNAJDGuIWhzJbBFLgDSeQIbvyglGokA</value> <visibility>PUBLIC</visibility> <userId>864526440186440389</userId> </object> </objectList> <mediaType>PHOTO</mediaType> <userId>6668643482244390397</userId> <url>http://fe.example.org/rest/carc/r?uid=9f0ee1d9-c925-4a08-bf85-bb8d093ec7e3&service_id=1</url> </media> </mediaList> <status>OK</status> </response>
authenticatedUser
- dataGroups
- For supported data groups, see retrieveMediaObjects(AuthenticationParameter, DataGroups, Limits, IntegerParameter, StringParameter)
limits
- paging limitsserviceIds
- If given, search is targeted only to the services with the listed ids. For supported service types, see CAContentCore.ServiceType
.userIdFilters
- If given, the search will return photos owned by the given user (provided that the currently logged in user has the required permissions).xml
- See MediaObjectList
PhotoList
@HTTPServiceMethod(name="similarPhotosByContent", acceptedMethods="GET") public Response searchSimilarByContent(@HTTPAuthenticationParameter(required=false) AuthenticationParameter authenticatedUser, @HTTPMethodParameter(name="url") StringParameter url, @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="similarPhotosByContent" service="carc"> <mediaList> <media> <UID>1546903f-67c0-4b01-8ee2-4953ef66555b</UID> <serviceId>6</serviceId> <objectList> <object> <backendId>1773251317</backendId> <confidence>0.11145902269596586</confidence> <mediaObjectId>6038213807852635063</mediaObjectId> <mediaType>PHOTO</mediaType> <objectId>GtIrNFauwszWswWRgJZUTYElNtqWjACnEHKYUpXirtsqIbtpEOLGlKUVLCJYwoky</objectId> <rank>275420000</rank> <serviceId>4</serviceId> <status>BACKEND_REMOVED</status> <objectType>KEYWORD</objectType> <value>GPNEKbZYeJtwFSAQVrWPDkNxCnlNowZPCuupkSgOJBMqKcDCjlAcQqRjnXOCXOOr</value> <visibility>PUBLIC</visibility> <userId>3434003839741175355</userId> </object> </objectList> <mediaType>PHOTO</mediaType> <userId>3434003839741175355</userId> <url>http://fe.example.org/rest/carc/r?uid=1546903f-67c0-4b01-8ee2-4953ef66555b&service_id=6</url> </media> </mediaList> <status>OK</status> </response>
authenticatedUser
- url
- publicly accessible URL with photo contentanalysisType
- optional list of analysis types to use for the search operation PhotoParameters.AnalysisType
dataGroups
- For supported data groups, see retrieveMediaObjects(AuthenticationParameter, DataGroups, Limits, IntegerParameter, StringParameter)
limits
- paging limitsserviceIds
- If given, search is targeted only to the services with the listed ids. For supported service types, see CAContentCore.ServiceType
.userIdFilters
- If given, the search will return photos owned by the given user (provided that the currently logged in user has the required permissions).PhotoList
@HTTPServiceMethod(name="r", acceptedMethods="GET") public RedirectResponse r(@HTTPAuthenticationParameter(required=false) AuthenticationParameter authenticatedUser, @HTTPMethodParameter(name="service_id") IntegerParameter serviceId, @HTTPMethodParameter(name="uid") StringParameter guid)
authenticatedUser
- serviceId
- One of the supported service types, see CAContentCore.ServiceType
.guid
- photo GUID@HTTPServiceMethod(name="updatePhotos", acceptedMethods="POST") public void updatePhotos(@HTTPAuthenticationParameter(required=false) AuthenticationParameter authenticatedUser, @HTTPMethodParameter(name="body",bodyParameter=true) InputStreamParameter xml)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <mediaList> <media> <credits>vAbTjcMsqmaHavxDfJCatzNFSkoCsnQSIKIIaKuJqyWXIWZkUCOrdVkbjuEaLXyN</credits> <description>ONHwCkEvmmqefYmNrhutFPrqnGhwBVjyJqjkWtvpcfRqIFcVEfEoRdYXtbTbQMAe</description> <UID>9b909b69-4412-463b-8ae3-5eda4293bd18</UID> <name>byyUrDITdBMEQKaqSDGjjHOTdzAjpetbSkprAPhEsPfMeLZdGYgbbHULWItpXKAx</name> <serviceId>4</serviceId> <visibility>GROUP</visibility> <objectList> <object> <backendId>450920235</backendId> <confidence>0.11927362989213164</confidence> <mediaObjectId>6114837890968098906</mediaObjectId> <mediaType>PHOTO</mediaType> <objectId>jKvvjTKylDEKdosXoQcaGWCSqnQURnEwwbplOESIjouPqXcqtEVzCzkLVXWNbCog</objectId> <rank>1601349848</rank> <serviceId>6</serviceId> <status>CANDIDATE</status> <objectType>KEYWORD</objectType> <value>KwIEcwSXyUjJrVToXViFmfOWBotsXmUSzaRhXXWnMOkEzDSDbVJTZtogtZSeRvqy</value> <visibility>PUBLIC</visibility> <userId>3431330626894027969</userId> </object> </objectList> <mediaType>PHOTO</mediaType> <userId>3431330626894027969</userId> <url>http://fe.example.org/rest/carc/r?uid=9b909b69-4412-463b-8ae3-5eda4293bd18&service_id=4</url> </media> </mediaList>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <response method="updatePhotos" service="carc"> <status>OK</status> </response>
authenticatedUser
- Note: this method requires authentication, but for the reference implementation, anonymous access is granted.xml
- Only the result data should be in the body. See PhotoList
@HTTPServiceMethod(name="getPhotos", acceptedMethods="GET") public Response getPhotos(@HTTPAuthenticationParameter(required=false) AuthenticationParameter authenticatedUser, @HTTPMethodParameter(name="uid",required=false) StringParameter guid, @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 userIds)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <response method="getPhotos" service="carc"> <mediaList> <media> <UID>c4d214e7-afb5-401a-b44f-780bd22f9534</UID> <serviceId>4</serviceId> <objectList> <object> <backendId>800122924</backendId> <confidence>0.020861654713449806</confidence> <mediaObjectId>3127961786750245026</mediaObjectId> <mediaType>PHOTO</mediaType> <objectId>HmSOybwbIKuhgwGwmlSMkvBQyDXuTxzWmIGuTMHNRcOwOQZqxUkxcfHhhxSHlHSC</objectId> <rank>616779728</rank> <serviceId>6</serviceId> <status>BACKEND_REMOVED</status> <objectType>KEYWORD</objectType> <value>gNZLjDuZCBdjTCalYihHJQCLUzHQJbnPYufpyJqslxIHevodBhhHuyAVcdtuPYFI</value> <visibility>GROUP</visibility> <userId>447366094731629998</userId> </object> </objectList> <mediaType>PHOTO</mediaType> <userId>447366094731629998</userId> <url>http://fe.example.org/rest/carc/r?uid=c4d214e7-afb5-401a-b44f-780bd22f9534&service_id=4</url> </media> </mediaList> <status>OK</status> </response>
authenticatedUser
- guid
- One or more photo GUIDs for retrieval.dataGroups
- dataGroups For supported data groups, see retrieveMediaObjects(AuthenticationParameter, DataGroups, Limits, IntegerParameter, StringParameter)
limits
- paing limitsserviceIds
- If given, only photos from the given services will be returned. For supported service types, see CAContentCore.ServiceType
.userIds
- If given, the search will return photos owned by the given user (provided that the currently logged in user has the required permissions).PhotoList
@HTTPServiceMethod(name="similarityFeedback", acceptedMethods="POST") public void similarityFeedback(@HTTPAuthenticationParameter(required=false) AuthenticationParameter authenticatedUser, @HTTPMethodParameter(name="body",bodyParameter=true) InputStreamParameter xml)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <feedbackList> <dissimilarMediaList> <media> <UID>aa6f4538-660d-434a-9956-96c47ffc3758</UID> <serviceId>6</serviceId> <mediaType>PHOTO</mediaType> <userId>8922436252493651558</userId> <url>http://fe.example.org/rest/carc/r?uid=aa6f4538-660d-434a-9956-96c47ffc3758&service_id=6</url> </media> </dissimilarMediaList> <referenceMediaList> <media> <UID>d0c83626-439d-425f-9db2-376c42f7d502</UID> <serviceId>1</serviceId> <mediaType>PHOTO</mediaType> <userId>8677719502800581831</userId> <url>http://fe.example.org/rest/carc/r?uid=d0c83626-439d-425f-9db2-376c42f7d502&service_id=1</url> </media> </referenceMediaList> <similarMediaList> <media> <UID>eca22b6d-5dbf-4df6-b16d-61e32ebf6adf</UID> <serviceId>1</serviceId> <mediaType>PHOTO</mediaType> <userId>8528287332742985103</userId> <url>http://fe.example.org/rest/carc/r?uid=eca22b6d-5dbf-4df6-b16d-61e32ebf6adf&service_id=1</url> </media> </similarMediaList> </feedbackList>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <response method="similarityFeedback" service="carc"> <status>OK</status> </response>
authenticatedUser
- Note: this method requires authentication, but for the reference implementation, anonymous access is granted.xml
- Only the result data should be in the body. See PhotoFeedbackList
@HTTPServiceMethod(name="getObjects", acceptedMethods="GET") public Response retrieveMediaObjects(@HTTPAuthenticationParameter(required=false) AuthenticationParameter authenticatedUser, @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="media_object_id",required=false) StringParameter mediaObjectIds)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <response method="getObjects" service="carc"> <objectList> <object> <backendId>995244882</backendId> <confidence>0.41061678199923035</confidence> <mediaObjectId>1585950982479224716</mediaObjectId> <mediaType>PHOTO</mediaType> <objectId>RAsPYKJTKdEuMzNxiWbsRlbXcEopDAPQhBzZFvexUVZGkzIODBtbzDBwtpRPiEci</objectId> <rank>1314565987</rank> <serviceId>6</serviceId> <status>NO_FRIENDLY_KEYWORD</status> <objectType>KEYWORD</objectType> <value>QjJhSBoFPFJwlDDcOrGsuuyEuJJpAgDhNqAxLethBmAwIYEwkRYkeBfLdYeOcpkD</value> <visibility>GROUP</visibility> <userId>7656309475023325103</userId> </object> </objectList> <status>OK</status> </response>
authenticatedUser
- Note: this method requires authentication, but for the reference implementation, anonymous access is granted.dataGroups
- In addition to basic data groups the following groups are also supported: timecodes, face, keywords, metadata, object, backend_removed, candidate, user_confirmed and user_rejected.limits
- paging limitsserviceIds
- Return only objects retrieved from specific service(s). For supported service types, see CAContentCore.ServiceType
.mediaObjectIds
- Return only objects with the specified ids.MediaObjectList
@HTTPServiceMethod(name="deletePhotos", acceptedMethods="DELETE") public Response deletePhotos(@HTTPAuthenticationParameter(required=false) AuthenticationParameter authenticatedUser, @HTTPMethodParameter(name="uid") StringParameter guid)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <response method="deletePhotos" service="carc"> <status>OK</status> </response>
authenticatedUser
- Note: this method requires authentication, but for the reference implementation, anonymous access is granted.guid
- One or more photo GUIDs for deletion.Copyright © 2015 Tampere University of Technology, Pori Department.