org.mmbase.datatypes
Class BinaryDataType
java.lang.Object
org.mmbase.core.AbstractDescriptor
org.mmbase.datatypes.BasicDataType
org.mmbase.datatypes.AbstractLengthDataType
org.mmbase.datatypes.BinaryDataType
- All Implemented Interfaces:
- Cloneable, Comparable, DataType, Descriptor, LengthDataType, Serializable
- public class BinaryDataType
- extends AbstractLengthDataType
The datatype associated with byte arrays ('blobs').
- Since:
- MMBase-1.8
- Version:
- $Id: BinaryDataType.java,v 1.9 2006/04/29 19:37:06 michiel Exp $
- Author:
- Pierre van Rooden
- See Also:
- Serialized Form
|
Method Summary |
long |
getLength(Object value)
In this method should be implemented how to calculate such a length for a certain value of
this datatype. There does not exist a generic interface for this, so the implementation
will cast to the expected type (String, byte[]..) |
Pattern |
getValidMimeTypes()
Returns a regular expression which describes wich mime-types are valid for blobs with this
DataType. |
protected void |
inheritProperties(BasicDataType origin)
Properties are members of the datatype that can easily be copied/clones. |
void |
setValidMimeTypes(Pattern pattern)
|
| Methods inherited from class org.mmbase.datatypes.BasicDataType |
cast, cast, castToValidate, checkType, clone, clone, compareTo, edit, equals, finish, finish, getBaseType, getBaseTypeIdentifier, getCloud, getCommitProcessor, getDefaultValue, getElement, getElement, getEnumerationFactory, getEnumerationRestriction, getEnumerationValue, getEnumerationValues, getOrigin, getProcessor, getProcessor, getRequiredRestriction, getTypeAsClass, getUniqueRestriction, hashCode, inherit, isCorrectType, isFinished, isRequired, isUnique, preCast, preCast, preCast, rewrite, setCommitProcessor, setDefaultValue, setProcessor, setProcessor, setRequired, setUnique, setXml, toString, toXml, toXml, validate, validate |
| Methods inherited from class org.mmbase.core.AbstractDescriptor |
getDefaultLocale, getDescription, getDescription, getGUIName, getGUIName, getLocalizedDescription, getLocalizedGUIName, getName, setDescription, setDescription, setGUIName, setGUIName, setLocalizedDescription, setLocalizedGUIName |
| Methods inherited from interface org.mmbase.datatypes.DataType |
cast, checkType, clone, clone, finish, getBaseType, getBaseTypeIdentifier, getCommitProcessor, getDefaultValue, getEnumerationFactory, getEnumerationRestriction, getEnumerationValue, getEnumerationValues, getOrigin, getProcessor, getProcessor, getRequiredRestriction, getTypeAsClass, getUniqueRestriction, inherit, isFinished, isRequired, isUnique, preCast, rewrite, setCommitProcessor, setDefaultValue, setProcessor, setProcessor, setRequired, setUnique, toXml, toXml, validate, validate |
| Methods inherited from interface org.mmbase.bridge.Descriptor |
getDescription, getDescription, getGUIName, getGUIName, getLocalizedDescription, getLocalizedGUIName, getName, setDescription, setDescription, setGUIName, setGUIName |
validMimeTypes
protected Pattern validMimeTypes
BinaryDataType
public BinaryDataType(String name)
- Constructor for binary field.
- Parameters:
name - the name of the data type
inheritProperties
protected void inheritProperties(BasicDataType origin)
- Description copied from class:
BasicDataType
- Properties are members of the datatype that can easily be copied/clones.
- Overrides:
inheritProperties in class BasicDataType
getLength
public long getLength(Object value)
- Description copied from class:
AbstractLengthDataType
- In this method should be implemented how to calculate such a length for a certain value of
this datatype. There does not exist a generic interface for this, so the implementation
will cast to the expected type (String, byte[]..)
- Specified by:
getLength in interface LengthDataType- Specified by:
getLength in class AbstractLengthDataType
getValidMimeTypes
public Pattern getValidMimeTypes()
- Returns a regular expression which describes wich mime-types are valid for blobs with this
DataType. This is not yet available as a Restriction, only as a property.
setValidMimeTypes
public void setValidMimeTypes(Pattern pattern)
MMBase build 1.8.1.20060716