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, setValue
protected MetaImage()
protected MetaImage(attribute attr)
protected MetaImage(attribute attr, java.lang.Object meta_value) throws MetaParameterFormatException
MetaParameterFormatException
protected MetaImage(java.lang.String category_name, java.lang.String category_value, java.lang.Object meta_value) throws MetaParameterFormatException
MetaParameterFormatException
public boolean allows_multi_insert()
allows_multi_insert
in class MetaParameter
public boolean hasEqualValue(MetaParameter mp)
hasEqualValue
in class MetaParameter
public java.lang.String getDefaultFilenameExtension()
getDefaultFilenameExtension
in class MetaFile
public 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 MetaParameter
public void setValue(java.lang.Object value) throws MetaParameterFormatException
setValue
in class MetaParameter
MetaParameterFormatException
public static boolean supportsValue(java.lang.Object value)
public java.lang.String valueAsString()
valueAsString
in class MetaParameter
public void writeValue(java.io.OutputStream os) throws java.io.IOException
writeValue
in class MetaFile
os
- the output streamjava.io.IOException
- write error