public class Photo extends Media
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <media> <credits>JpARFpKzCWfrNOWmWSHIzHdyFzHDVYSUzkScIGmlNgcoJCqqXXCivhsvqsCOoVdb</credits> <description>ndNqnkwModQGnGxGRYDGRoWmzqxBAGeCpqfnRpczBYwYWBBKwbLMzEehFHctCLXC</description> <UID>ef6b901b-0253-470c-8ca2-36ac7bb52533</UID> <name>XNQmSaQlMTTpTiHAJVemcmxnFfKqjTdSUcVHQYRyvFewzLbDmSAQVkUFQdgZjvCw</name> <serviceId>4</serviceId> <visibility>PUBLIC</visibility> <objectList> <object> <backendId>196503983</backendId> <confidence>0.9103115364950308</confidence> <mediaObjectId>3414249424978964565</mediaObjectId> <mediaType>PHOTO</mediaType> <objectId>fAKxXhlOJPYWGLyYZsdEMkvHtBsvrajrxXzAWasOTrxbdYZDRBTsvzkBZPKQVRHZ</objectId> <rank>1505192548</rank> <serviceId>6</serviceId> <status>USER_REJECTED</status> <objectType>KEYWORD</objectType> <value>GNVkCMrtJXsnNERrxjRiSkspOqaMUoyBbseqyRDeTyfEpjDdnMNpqWdEEKsRSvvC</value> <visibility>GROUP</visibility> <userId>3421680948487249354</userId> </object> </objectList> <mediaType>PHOTO</mediaType> <userId>3421680948487249354</userId> <url>http://fe.example.org/rest/carc/r?uid=ef6b901b-0253-470c-8ca2-36ac7bb52533&service_id=4</url> </media>
BackendStatusList
,
MediaObjectList
Modifier and Type | Field and Description |
---|---|
static MediaUrlValidator.MediaType |
MEDIA_TYPE
Default media type for photo
|
Constructor and Description |
---|
Photo()
for serialization, must be public for solr.
|
Photo(java.lang.String guid) |
Photo(java.lang.String guid,
UserIdentity ownerUserId,
CAContentCore.ServiceType serviceType,
CAContentCore.Visibility visibility) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getUrl()
If URL is not set, this will try to generate default redirect URL with serviceId, and GUID,
finally, returns null if the required information is not available.
|
void |
setMediaType(MediaUrlValidator.MediaType mediaType) |
addackendStatus, addMediaObject, addMediaObjects, getBackendStatus, getCredits, getDescription, getGUID, getMediaObjects, getMediaType, getMediaTypeValue, getName, getOwnerUserId, getOwnerUserIdValue, getServiceId, getServiceType, getUpdated, getVisibility, getVisibilityValue, isValid, setBackendStatus, setCredits, setDescription, setGUID, setMediaObjects, setName, setOwnerUserId, setServiceType, setUpdated, setUrl, setVisibility
public static final MediaUrlValidator.MediaType MEDIA_TYPE
public Photo()
public Photo(java.lang.String guid)
guid
- public Photo(java.lang.String guid, UserIdentity ownerUserId, CAContentCore.ServiceType serviceType, CAContentCore.Visibility visibility)
guid
- ownerUserId
- serviceType
- visibility
- public java.lang.String getUrl()
getUrl
in class Media
Media.setUrl(String)
public void setMediaType(MediaUrlValidator.MediaType mediaType) throws java.lang.IllegalArgumentException
setMediaType
in class Media
mediaType
- if null, the default media type will be usedjava.lang.IllegalArgumentException
- on bad media type, i.e. not the default media or nullMEDIA_TYPE
Copyright © 2015 Tampere University of Technology, Pori Department.