Package org.nuxeo.common.xmap
Class XValueFactory
- java.lang.Object
-
- org.nuxeo.common.xmap.XValueFactory
-
public abstract class XValueFactory extends Object
Value factories are used to decode values from XML strings.To register a new factory for a given XMap instance use the method
XMap.setValueFactory(Class, XValueFactory)
.- Author:
- Bogdan Stefanescu
-
-
Field Summary
Fields Modifier and Type Field Description static XValueFactory
BOOLEAN
static XValueFactory
CLASS
static XValueFactory
DATE
static XValueFactory
DOUBLE
static XValueFactory
DURATION
static XValueFactory
FILE
static XValueFactory
FLOAT
static XValueFactory
INTEGER
static XValueFactory
LONG
static XValueFactory
RESOURCE
static XValueFactory
STRING
static XValueFactory
URL
-
Constructor Summary
Constructors Constructor Description XValueFactory()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static void
addFactory(Class<?> klass, XValueFactory factory)
abstract Object
deserialize(Context context, String value)
Object
getAttributeValue(Context context, Node element, String name)
Object
getElementValue(Context context, Node element, boolean trim)
static XValueFactory
getFactory(Class<?> type)
static Object
getValue(Context context, Class<?> klass, String value)
abstract String
serialize(Context context, Object value)
-
-
-
Field Detail
-
STRING
public static final XValueFactory STRING
-
INTEGER
public static final XValueFactory INTEGER
-
LONG
public static final XValueFactory LONG
-
DOUBLE
public static final XValueFactory DOUBLE
-
FLOAT
public static final XValueFactory FLOAT
-
BOOLEAN
public static final XValueFactory BOOLEAN
-
DATE
public static final XValueFactory DATE
-
FILE
public static final XValueFactory FILE
-
URL
public static final XValueFactory URL
-
CLASS
public static final XValueFactory CLASS
-
RESOURCE
public static final XValueFactory RESOURCE
-
DURATION
public static final XValueFactory DURATION
-
-
Method Detail
-
getAttributeValue
public final Object getAttributeValue(Context context, Node element, String name)
-
addFactory
public static void addFactory(Class<?> klass, XValueFactory factory)
-
getFactory
public static XValueFactory getFactory(Class<?> type)
-
-