public class CAXMLObjectCreator extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DATA_GROUP_BACKEND_RESPONSE
special datagroup used for testing, creates tags with data generally returned by an analysis backend
|
Constructor and Description |
---|
CAXMLObjectCreator(java.lang.Long seed) |
public static final java.lang.String DATA_GROUP_BACKEND_RESPONSE
public CAXMLObjectCreator(java.lang.Long seed)
seed
- for random generator, or null to use default (system time in nanoseconds)public long getSeed()
public java.util.Random getRandom()
public void populateAbstractTaskDetails(java.lang.Integer backendId, AbstractTaskDetails details, java.lang.Long taskId, AsyncTask.TaskType taskType)
backendId
- details
- taskId
- taskType
- if null, generated randomlypublic AsyncTask.TaskType createTaskType()
public UserIdentity createUserIdentity()
public AsyncTask.TaskStatus createTaskStatus()
public CAContentCore.ServiceType createPhotoServiceType()
public BackendStatus createBackendStatus(java.lang.Integer backendId)
backendId
- public BackendStatusList createBackendStatusContainer(int statusCount)
statusCount
- public int createBackendId()
public AnalysisBackend createAnalysisBackend()
public AnalysisBackend.Capability createCapability()
public java.lang.String createDataGroup()
public VisualShape createVisualShape()
public VisualShape.VisualShapeType createVisualShapeType()
public MediaObject createMediaObject(java.util.Collection<PhotoParameters.AnalysisType> analysisTypes, DataGroups dataGroups, java.util.EnumSet<CAContentCore.ServiceType> serviceTypes)
MediaUrlValidator.MediaType.PHOTO
.analysisTypes
- optional analysis types the created media object should confirm todataGroups
- optional data groups the created media object should confirm toserviceTypes
- public static CAContentCore.ServiceType getRandomServiceType(java.util.Random random, java.util.EnumSet<CAContentCore.ServiceType> serviceTypes)
random
- serviceTypes
- list of service types, not null, not emptypublic MediaObject.MediaObjectType createMediaObjectType()
public MediaObject.ConfirmationStatus createConfirmationStatus()
public MediaObjectList createMediaObjectList(java.util.Collection<PhotoParameters.AnalysisType> analysisTypes, DataGroups dataGroups, Limits limits, java.util.EnumSet<CAContentCore.ServiceType> serviceTypes)
analysisTypes
- dataGroups
- limits
- serviceTypes
- public Photo createPhoto(java.util.Collection<PhotoParameters.AnalysisType> analysisTypes, DataGroups dataGroups, Limits limits, java.util.EnumSet<CAContentCore.ServiceType> serviceTypes, UserIdentity userIdentity)
analysisTypes
- dataGroups
- limits
- serviceTypes
- userIdentity
- public java.lang.String generateRedirectUrl(java.lang.String guid, CAContentCore.ServiceType type)
guid
- type
- public CAContentCore.Visibility createVisibility()
public PhotoList createPhotoList(java.util.Collection<PhotoParameters.AnalysisType> analysisTypes, DataGroups dataGroups, Limits limits, java.util.EnumSet<CAContentCore.ServiceType> serviceTypes, UserIdentity userIdentity)
analysisTypes
- dataGroups
- limits
- serviceTypes
- userIdentity
- public SimilarPhotoList createSimilarPhotoList(Limits limits)
limits
- public DissimilarPhotoList createDissimilarPhotoList(Limits limits)
limits
- public DeletedPhotoList createDeletedPhotoList(Limits limits)
limits
- public PhotoFeedbackList createFeedbackList(Limits limits)
limits
- public ReferencePhotoList createReferencePhotoList(Limits limits)
limits
- public PhotoTaskDetails createPhotoTaskDetails(java.lang.Integer backendId, DataGroups dataGroups, Limits limits, java.lang.Long taskId, AsyncTask.TaskType taskType)
backendId
- dataGroups
- limits
- taskId
- taskType
- if null, generated randomlypublic PhotoTaskResponse createTaskResponse(java.util.Collection<PhotoParameters.AnalysisType> analysisTypes, DataGroups dataGroups, Limits limits, java.lang.Long taskId, AsyncTask.TaskType taskType)
analysisTypes
- dataGroups
- limits
- taskId
- if null, value is randomly generatedtaskType
- if null, value is randomly generatedpublic static java.util.Date createRandomDate(java.util.Date latest, java.util.Random random)
latest
- the latest date possible, if null, long max will be usedrandom
- public PhotoList createSearchResults(java.lang.String guid, DataGroups dataGroups, Limits limits, java.util.EnumSet<CAContentCore.ServiceType> serviceTypes, long[] userIds, MediaObjectList mediaObjects)
guid
- dataGroups
- limits
- serviceTypes
- userIds
- mediaObjects
- public static java.lang.String createRandomUrl()
public AsyncTask.TaskType createPhotoTaskDetailsType()
public PhotoTaskDetails createPhotoTaskDetails(DataGroups dataGroups, Limits limits, AsyncTask.TaskType type) throws java.lang.UnsupportedOperationException
dataGroups
- limits
- type
- ANALYSIS, BACKEND_FEEDBACK or FEEDBACK, if null, type is chosen randomlyjava.lang.UnsupportedOperationException
- on bad typepublic java.lang.String generateFinishedCallbackUri()
public MediaObjectList createFriendlyKeywordableList()
public ResultInfo createResultInfo()
public PhotoParameters createAnalysisParameters()
Copyright © 2015 Tampere University of Technology, Pori Department.