org.mmbase.datatypes
Class XmlDataType

Package class diagram package XmlDataType
java.lang.Object
  extended by org.mmbase.bridge.util.AbstractDescriptor
      extended by org.mmbase.datatypes.BasicDataType<E>
          extended by org.mmbase.datatypes.AbstractLengthDataType<Document>
              extended by org.mmbase.datatypes.XmlDataType
All Implemented Interfaces:
Serializable, Cloneable, Comparable<DataType<Document>>, Descriptor, DataType<Document>, LengthDataType<Document>, PublicCloneable<AbstractDescriptor>

public class XmlDataType
extends AbstractLengthDataType<Document>

The data associated with 'XML' values (Document). At the moment this class is empty, but of course we forsee the possibility for restrictions on doc-type.

Since:
MMBase-1.8
Version:
$Id: XmlDataType.java 40187 2009-12-09 13:42:53Z michiel $
Author:
Michiel Meeuwissen
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.mmbase.datatypes.AbstractLengthDataType
AbstractLengthDataType.MaxRestriction, AbstractLengthDataType.MinRestriction
 
Nested classes/interfaces inherited from class org.mmbase.datatypes.BasicDataType
BasicDataType.AbstractRestriction<D extends Serializable>, BasicDataType.DataTypeComparator<D>, BasicDataType.EnumerationRestriction, BasicDataType.RequiredRestriction, BasicDataType.RestrictedEnumerationIterator, BasicDataType.StaticAbstractRestriction<D extends Serializable>, BasicDataType.TypeRestriction, BasicDataType.UniqueRestriction
 
Nested classes/interfaces inherited from interface org.mmbase.datatypes.DataType
DataType.Restriction<D extends Serializable>
 
Field Summary
 
Fields inherited from class org.mmbase.datatypes.AbstractLengthDataType
maxLengthRestriction, minLengthRestriction
 
Fields inherited from class org.mmbase.datatypes.BasicDataType
DATATYPE_BUNDLE, defaultValue, enumerationRestriction, origin, requiredRestriction, typeRestriction, uniqueRestriction
 
Fields inherited from class org.mmbase.bridge.util.AbstractDescriptor
description, guiName, key
 
Fields inherited from interface org.mmbase.datatypes.DataType
ENFORCE_ABSOLUTE, ENFORCE_ALWAYS, ENFORCE_NEVER, ENFORCE_ONCHANGE, ENFORCE_ONCREATE, ENFORCE_ONVALIDATE, PROCESS_GET, PROCESS_SET, VALID, XMLNS
 
Constructor Summary
XmlDataType(String name)
          Constructor for xml data type.
 
Method Summary
 String castForSearch(Object value, Node node, Field field)
          Sometimes the the representation of the value is a bit different in the database, or has a different type.
 long getLength(Object value)
          In this method should be implemented how to calculate such a length for a certain value of this datatype.
 
Methods inherited from class org.mmbase.datatypes.AbstractLengthDataType
cloneRestrictions, getEnforceStrength, getMaxLength, getMaxLengthRestriction, getMinLength, getMinLengthRestriction, inheritRestrictions, setMaxLength, setMinLength, toStringBuilder, toXml, validateCastValue, validateCastValueOrNull
 
Methods inherited from class org.mmbase.datatypes.BasicDataType
addErrorDescription, addRestriction, addRestriction, addStyleClass, cast, cast, castAndValidate, castOrException, castToPresent, castToValidate, checkType, clone, clone, compareTo, edit, equals, finish, finish, getBaseType, getBaseTypeIdentifier, getCloud, getCloud, getCommitProcessor, getComparator, getDefaultProcessor, getDefaultValue, getDefaultValue, getDeleteProcessor, getElement, getElement, getEnforceString, getEnumerationFactory, getEnumerationRestriction, getEnumerationValue, getEnumerationValues, getHandler, getHandlers, getOrigin, getProcessor, getProcessor, getProcessorWithoutDefault, getRequiredRestriction, getRestrictions, getStyleClasses, getTypeAsClass, getUniqueRestriction, hashCode, inherit, inheritProperties, isCorrectType, isFinished, isRequired, isUnique, preCast, preCast, preCast, rewrite, setCommitProcessor, setDefaultProcessor, setDefaultValue, setDeleteProcessor, setProcessor, setProcessor, setRequired, setUnique, setXml, toString, toXml, validate, validate, validateRequired, xmlValue
 
Methods inherited from class org.mmbase.bridge.util.AbstractDescriptor
getDefaultLocale, getDescription, getDescription, getGUIName, getGUIName, getLocalizedDescription, getLocalizedGUIName, getName, setDescription, setDescription, setGUIName, setGUIName, setLocalizedDescription, setLocalizedGUIName
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.mmbase.datatypes.DataType
cast, castAndValidate, castOrException, checkType, clone, clone, finish, getBaseType, getBaseTypeIdentifier, getCommitProcessor, getDefaultValue, getDefaultValue, getDeleteProcessor, getEnumerationFactory, getEnumerationRestriction, getEnumerationValue, getEnumerationValues, getHandler, getHandlers, getOrigin, getProcessor, getProcessor, getRequiredRestriction, getStyleClasses, getTypeAsClass, getUniqueRestriction, isFinished, isRequired, isUnique, preCast, rewrite, setCommitProcessor, setDefaultValue, setProcessor, setProcessor, setRequired, setUnique, toXml, validate, validate
 
Methods inherited from interface org.mmbase.bridge.Descriptor
getDescription, getDescription, getGUIName, getGUIName, getLocalizedDescription, getLocalizedGUIName, getName, setDescription, setDescription, setGUIName, setGUIName
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

XmlDataType

public XmlDataType(String name)
Constructor for xml data type.

Parameters:
name - the name of the data type
Method Detail

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<Document>
Specified by:
getLength in class AbstractLengthDataType<Document>

castForSearch

public String castForSearch(Object value,
                            Node node,
                            Field field)
Description copied from interface: DataType
Sometimes the the representation of the value is a bit different in the database, or has a different type. So when constraining a search on the value, casting is done by this. This may default to DataType.cast(Object, Node, Field).

Specified by:
castForSearch in interface DataType<Document>
Overrides:
castForSearch in class BasicDataType<Document>


MMBase2 Bridge 2.0-SNAPSHOT - 2013-03-30T06:34