public class MetaImage extends MetaFile
CALIBRATION_LEVEL, HIERARCHY_LEVEL, SPECTRUM_LEVEL| Modifier | Constructor and Description |
|---|---|
protected |
MetaImage()
default constructor
|
protected |
MetaImage(attribute attr)
constructor from an attribute definition
|
protected |
MetaImage(attribute attr,
java.lang.Object meta_value) |
protected |
MetaImage(java.lang.String category_name,
java.lang.String category_value,
java.lang.Object meta_value)
constructor from category name and value
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
allows_multi_insert()
returns "true" to indicate that images can be inserted monolithic statements
|
java.lang.String |
getDefaultFilenameExtension()
returns ".jpg" because we only write JPEG files
|
boolean |
hasEqualValue(MetaParameter mp) |
void |
readValue(java.io.InputStream is,
java.lang.String mimeType)
read the meta-parameter value from an input stream
|
static java.awt.image.BufferedImage |
resizeImage(java.awt.Image image,
int width,
int height)
This function resizes the image file and returns a BufferedImage object
Based on: http://stackoverflow.com/questions/24745147/java-resize-image-without-losing-quality
|
void |
setEmptyValue()
initialise the meta-parameter with an empty value
|
void |
setValue(java.lang.Object value) |
static boolean |
supportsValue(java.lang.Object value) |
java.lang.String |
valueAsString()
return the value as a string
|
void |
writeValue(java.io.OutputStream os)
write the meta-parameter value to an output stream
|
getAnnotation, getAttributeId, getAttributeName, getBlob_lazy_loading, getBlob_size_in_MB, getBlob_size, getCategoryName, getCategoryValue, getDefaultStorageField, getDefaultUnitId, getDescription, getEavId, getEAVValue, getFieldPos, getIsBooleanValue, getLevel, getUnitId, getUnitName, getValue, newInstance, newInstance, newInstance, setAnnotation, setAttributeId, setAttributeName, setBlob_lazy_loading, setBlob_size, setCategoryName, setCategoryValue, setDefaultStorageField, setDefaultUnitId, setDescription, setEavId, setIsBooleanValue, setLevel, setUnitId, setUnitName, setUnits, setValueprotected MetaImage()
protected MetaImage(attribute attr)
protected MetaImage(attribute attr, java.lang.Object meta_value) throws MetaParameterFormatException
MetaParameterFormatExceptionprotected MetaImage(java.lang.String category_name,
java.lang.String category_value,
java.lang.Object meta_value)
throws MetaParameterFormatException
MetaParameterFormatExceptionpublic boolean allows_multi_insert()
allows_multi_insert in class MetaParameterpublic boolean hasEqualValue(MetaParameter mp)
hasEqualValue in class MetaParameterpublic java.lang.String getDefaultFilenameExtension()
getDefaultFilenameExtension in class MetaFilepublic void readValue(java.io.InputStream is,
java.lang.String mimeType)
throws java.io.IOException
public static java.awt.image.BufferedImage resizeImage(java.awt.Image image,
int width,
int height)
public void setEmptyValue()
setEmptyValue in class MetaParameterpublic void setValue(java.lang.Object value)
throws MetaParameterFormatException
setValue in class MetaParameterMetaParameterFormatExceptionpublic static boolean supportsValue(java.lang.Object value)
public java.lang.String valueAsString()
valueAsString in class MetaParameterpublic void writeValue(java.io.OutputStream os)
throws java.io.IOException
writeValue in class MetaFileos - the output streamjava.io.IOException - write error