public final class URLContentStorage extends ContentStorage
Storage handler that supports saving arbitrary URLs to for the analysis. The URLs must be of valid image content. ImageValidator is used for performing a simple content check.
This storage service does not split tasks into smaller chunks like the other content storage services.
Modifier and Type | Class and Description |
---|---|
static class |
URLContentStorage.URLEntry
A URL entry.
|
ContentStorage.ContentStorageListener
Modifier and Type | Field and Description |
---|---|
static CAContentCore.ServiceType |
SERVICE_TYPE
Service type declaration for this storage
|
Constructor and Description |
---|
URLContentStorage() |
URLContentStorage(boolean autoSchedule) |
Modifier and Type | Method and Description |
---|---|
void |
addUrls(MediaUrlValidator.MediaType mediaType,
UserIdentity userId,
java.util.Collection<java.lang.String> urls)
Add the given list of URLs.
|
java.util.EnumSet<AnalysisBackend.Capability> |
getBackendCapabilities() |
CAContentCore.ServiceType |
getServiceType() |
java.lang.String |
getTargetUrl(AccessDetails details) |
void |
removeMetadata(UserIdentity userId,
java.util.Collection<java.lang.String> guids)
Remove the synchronized content
|
void |
removePhotoMetadata(UserIdentity userId,
java.util.Collection<java.lang.String> guids) |
void |
removeVideoMetadata(UserIdentity userId,
java.util.Collection<java.lang.String> guids) |
boolean |
synchronizeAccount(UserIdentity userId)
this will simply remove all non-existing images
|
getBackends, getBackends, getContentStorageListener, isAutoSchedule, setBackends, setBackends, setContentStorageListener
public static final CAContentCore.ServiceType SERVICE_TYPE
public URLContentStorage()
public URLContentStorage(boolean autoSchedule)
autoSchedule
- public CAContentCore.ServiceType getServiceType()
getServiceType
in class ContentStorage
public java.util.EnumSet<AnalysisBackend.Capability> getBackendCapabilities()
getBackendCapabilities
in class ContentStorage
public java.lang.String getTargetUrl(AccessDetails details)
getTargetUrl
in class ContentStorage
public void removeMetadata(UserIdentity userId, java.util.Collection<java.lang.String> guids)
ContentStorage
removeMetadata
in class ContentStorage
userId
- this user's metadata will be removed from the front-endguids
- optional list of GUIDs, if null, everything is removedpublic void removePhotoMetadata(UserIdentity userId, java.util.Collection<java.lang.String> guids)
userId
- guids
- public void removeVideoMetadata(UserIdentity userId, java.util.Collection<java.lang.String> guids)
userId
- guids
- public boolean synchronizeAccount(UserIdentity userId)
synchronizeAccount
in class ContentStorage
public void addUrls(MediaUrlValidator.MediaType mediaType, UserIdentity userId, java.util.Collection<java.lang.String> urls) throws java.lang.IllegalArgumentException, java.lang.UnsupportedOperationException
mediaType
- userId
- urls
- java.lang.IllegalArgumentException
- on bad input datajava.lang.UnsupportedOperationException
- on unsuuported media typesynchronizeAccount(UserIdentity)
Copyright © 2015 Tampere University of Technology, Pori Department.