|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.alembik.util.OMAUtils
public class OMAUtils
The class providing utility methods manipulating the classes generated from the OMA-STI schema file.
| Field Summary | |
|---|---|
static java.lang.String |
CHANNEL_MONO
The value defining the mono channel for an audio. |
static java.lang.String |
CHANNEL_STEREO
The value defining the stereo channel for an audio. |
static java.lang.String |
COLOR_SCHEME_PALETTE_COLOR
The value defining true color scheme; if chosen the Image.ColorScheme's depth will be
the preferred number of colors in the image. |
static java.lang.String |
COLOR_SCHEME_PALETTE_GREY
The value defining true color scheme; if chosen the Image.ColorScheme's depth will be
the preferred number of colors in a grey scale for the image. |
static java.lang.String |
COLOR_SCHEME_TRUE
The value defining true color scheme; if chosen the Image.ColorScheme's depth will be
the number of bits in a color sample within a pixel. |
static java.lang.String |
RESIZE_ASPECT_RATIO
The value defining the aspect ratio resize directive. |
static java.lang.String |
RESIZE_CROP
The value defining the crop resize directive. |
static java.lang.String |
RESIZE_STRETCH
The value defining the stretch resize directive. |
| Constructor Summary | |
|---|---|
OMAUtils()
|
|
| Method Summary | |
|---|---|
static void |
addReturnResult(JobResult result,
ResultCode code,
java.lang.String message)
Creates a new return result instance of the desired code and the description text and sets it as a secondary return result of the given job result. |
static void |
addReturnResult(TranscodingResponse response,
ResultCode code,
java.lang.String message)
Creates a new return result instance of the desired code and the description text and sets it as a secondary return result of the given transcoding response. |
static Property |
createProperty(java.lang.String name,
java.lang.String value)
Creates a new property instance of the specified name and value. |
static ReturnResult |
createReturnResult(ResultCode code,
java.lang.String message)
Creates a new return result instance of the desired code and the description text. |
static Property |
findProperty(Properties properties,
java.lang.String name)
Returns a property object of the specified name from the given properties holder, if such exists. |
static Transformation |
findTransformation(Media media,
java.lang.String name)
Returns a transformation of the specified type from the given media instance, if such exists. |
static Properties |
getAttributeProperties(Transformation transformation)
Returns the attributes holder of the given transformation. |
static Properties |
getExtensionProperties(JobResult.Output output)
Returns "extension data" properties holder of the given job result's output. |
static Properties |
getExtensionProperties(JobResult result)
Returns "extension data" properties holder of the given job result. |
static Properties |
getExtensionProperties(Media media)
Returns "extension data" properties holder of the given media object. |
static Properties |
getExtensionProperties(MediaProperties mediaProperties)
Returns "extension data" properties holder of the given media properties. |
static Properties |
getExtensionProperties(TranscodingJob.Source source)
Returns "extension data" properties holder of the given transcoding job's source. |
static Properties |
getExtensionProperties(TranscodingJob.Target target)
Returns "extension data" properties holder of the given transcoding job's target. |
static Properties |
getExtensionProperties(TranscodingJob job)
Returns "extension data" properties holder of the given transcoding job. |
static Properties |
getExtensionProperties(TranscodingParams profile)
Returns "extension data" properties holder of the given transcoding profile. |
static Properties |
getExtensionProperties(TranscodingRequest request)
Returns "extension data" properties holder of the given transcoding request. |
static Media |
getMedia(TranscodingParams profile)
Returns a media object assigned to the given transcoding profile. |
static MediaProperties |
getOutputMediaProperties(JobResult result)
Returns the media properties instance of the given job result. |
static java.util.Map<java.lang.String,java.lang.String> |
getPropertiesMap(Properties properties)
Creates a map of property's {name, value} entries from the given properties holder. |
static java.util.Map<java.lang.String,java.lang.String> |
getPropertiesMap(Properties properties,
java.lang.String prefix)
Creates a map of property's {name, value} entries from the given properties holder. |
static java.lang.String |
getPropertyValue(Properties properties,
java.lang.String name)
Returns the value of a property of the given name. |
static ReturnResults |
getReturnResults(JobResult result)
Returns the holder object of secondary transcoding results of the given job result object. |
static ReturnResults |
getReturnResults(TranscodingResponse response)
Returns the holder object of secondary transcoding results of the given response object. |
static java.lang.Long |
getSizeLimit(TranscodingJob job)
Returns the size limit specified for a transcoded file of the given transcoding job. |
static Transformations |
getTransformations(Media media)
Returns the transformations holder from the given media object. |
static Transformation |
removeTransformation(Media media,
java.lang.String name)
Removes a transformation of the specified type from the given media instance, if such exists. |
static Transformation |
removeTransformation(TranscodingJob job,
java.lang.String name)
Removes a transformation of the specified type from the given transcoding job, if such exists. |
static void |
setMedia(TranscodingParams profile,
Media media)
Assigns the media type to the given transcoding profile. |
static Property |
setProperty(Properties properties,
java.lang.String name,
java.lang.String value)
Adds a property of the given name and value to the given properties holder. |
static void |
setResizeDirective(Media media,
java.lang.String directive)
Sets the desired resize directive for the media instance. |
static Transformation |
setTransformation(Media media,
java.lang.String name)
Adds a transformation of the desired type to the given media instance, if such does not exist. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String COLOR_SCHEME_TRUE
Image.ColorScheme's depth will be
the number of bits in a color sample within a pixel.
Image.ColorScheme.setScheme(String),
Constant Field Valuespublic static final java.lang.String COLOR_SCHEME_PALETTE_COLOR
Image.ColorScheme's depth will be
the preferred number of colors in the image.
Image.ColorScheme.setScheme(String),
Constant Field Valuespublic static final java.lang.String COLOR_SCHEME_PALETTE_GREY
Image.ColorScheme's depth will be
the preferred number of colors in a grey scale for the image.
Image.ColorScheme.setScheme(String),
Constant Field Valuespublic static final java.lang.String RESIZE_ASPECT_RATIO
setResizeDirective(Media, String),
Image.setResizeDirective(String),
Video.VideoVisual.setResizeDirective(String),
Constant Field Valuespublic static final java.lang.String RESIZE_CROP
setResizeDirective(Media, String),
Image.setResizeDirective(String),
Video.VideoVisual.setResizeDirective(String),
Constant Field Valuespublic static final java.lang.String RESIZE_STRETCH
setResizeDirective(Media, String),
Image.setResizeDirective(String),
Video.VideoVisual.setResizeDirective(String),
Constant Field Valuespublic static final java.lang.String CHANNEL_MONO
Audio.setChannels(String),
Video.VideoAudio.setChannels(String),
Constant Field Valuespublic static final java.lang.String CHANNEL_STEREO
Audio.setChannels(String),
Video.VideoAudio.setChannels(String),
Constant Field Values| Constructor Detail |
|---|
public OMAUtils()
| Method Detail |
|---|
public static Media getMedia(TranscodingParams profile)
profile - profile of a transcoding job
Image,
Audio,
Video,
Text,
setMedia(TranscodingParams, Media),
TranscodingJob.Target.getTranscodingParams()
public static void setMedia(TranscodingParams profile,
Media media)
profile - profile of a transcoding jobmedia - media instance to be setImage,
Audio,
Video,
Text,
getMedia(TranscodingParams),
TranscodingJob.Target.getTranscodingParams()public static Transformations getTransformations(Media media)
media - media instance
Media.getTransformations()public static ReturnResults getReturnResults(TranscodingResponse response)
response - response to a transcoding request
TranscodingResponse.getAdditionalReturnResults()public static ReturnResults getReturnResults(JobResult result)
result - job result of a transcoding job
JobResult.getAdditionalReturnResults()
public static ReturnResult createReturnResult(ResultCode code,
java.lang.String message)
code - return result codemessage - return result description
TranscodingResponse.setMainReturnResult(ReturnResult),
JobResult.setMainReturnResult(ReturnResult),
getReturnResults(TranscodingResponse),
getReturnResults(JobResult)
public static void addReturnResult(TranscodingResponse response,
ResultCode code,
java.lang.String message)
response - transcoding responsecode - return result codemessage - return result descriptioncreateReturnResult(ResultCode, String),
getReturnResults(TranscodingResponse)
public static void addReturnResult(JobResult result,
ResultCode code,
java.lang.String message)
result - job resultcode - return result codemessage - return result descriptioncreateReturnResult(ResultCode, String),
getReturnResults(JobResult)public static Properties getExtensionProperties(TranscodingRequest request)
request - transcoding request
TranscodingRequest.getExtensionData()public static Properties getExtensionProperties(TranscodingJob job)
job - transcoding job
Job.getExtensionData()public static Properties getExtensionProperties(JobResult result)
result - job result
Job.getExtensionData()public static Properties getExtensionProperties(JobResult.Output output)
output - job result's output
JobResult.Output.getExtensionData()public static Properties getExtensionProperties(TranscodingJob.Source source)
source - transcoding job's source
TranscodingJob.Source.getExtensionData()public static Properties getExtensionProperties(TranscodingJob.Target target)
target - transcoding job's target
TranscodingJob.Target.getExtensionData()public static Properties getExtensionProperties(TranscodingParams profile)
profile - transcoding profile
TranscodingParams.getExtensionData()public static Properties getExtensionProperties(Media media)
media - media instance
Media.getExtensionData()public static Properties getExtensionProperties(MediaProperties mediaProperties)
mediaProperties - job result's media properties
MediaProperties.getExtensionData(),
getOutputMediaProperties(JobResult)public static MediaProperties getOutputMediaProperties(JobResult result)
result - job result
getOutputMediaProperties(JobResult)public static Properties getAttributeProperties(Transformation transformation)
transformation - transcoding transformation
Transformation.getAttributes()
public static java.lang.String getPropertyValue(Properties properties,
java.lang.String name)
properties - properties holdername - name of the property looked up (case insensitive)
Property
public static Property createProperty(java.lang.String name,
java.lang.String value)
name - desired property namevalue - desired property value
public static Property setProperty(Properties properties,
java.lang.String name,
java.lang.String value)
properties - properites holdername - desired property name (case insensitive)value - desired property value
Properties.getProperty()
public static Property findProperty(Properties properties,
java.lang.String name)
properties - properites holdername - name of the property to be found (case insensitive)
Properties.getProperty()public static java.util.Map<java.lang.String,java.lang.String> getPropertiesMap(Properties properties)
properties - properties holder
getPropertiesMap(Properties, String),
Properties.getProperty()
public static java.util.Map<java.lang.String,java.lang.String> getPropertiesMap(Properties properties,
java.lang.String prefix)
properties - properties holderprefix - desired prefix of the properties names (case insensitive); if null
no property will be excluded
getPropertiesMap(Properties),
Properties.getProperty()public static java.lang.Long getSizeLimit(TranscodingJob job)
Returns the size limit specified for a transcoded file of the given transcoding job. The method inspects limit fields in the objects tree in the following order, returning the first non-null value found:
TranscodingJob.Target.getApplicationSizeLimit(),Media.getSizeLimit(),TranscodingParams.getSizeLimit().
job - transcoding job
public static Transformation findTransformation(Media media,
java.lang.String name)
media - media objectname - type of the transformation to be found (case insensitive)
getTransformations(Media)
public static Transformation setTransformation(Media media,
java.lang.String name)
media - media objectname - transformation type (case insensitive)
getTransformations(Media)
public static Transformation removeTransformation(Media media,
java.lang.String name)
media - media objectname - type of the transformation to be removed (case insensitive)
getTransformations(Media)
public static Transformation removeTransformation(TranscodingJob job,
java.lang.String name)
job - transcoding jobname - type of the transformation to be removed (case insensitive)
getTransformations(Media),
getMedia(TranscodingParams)
public static void setResizeDirective(Media media,
java.lang.String directive)
Sets the desired resize directive for the media instance. The acceptable values for the directive argument are:
media - media objectdirective - desired resize directiveImage.setResizeDirective(String),
Video.VideoVisual.setResizeDirective(String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||