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
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
XValueFactory
public XValueFactory()
deserialize
public abstract Object deserialize(Context context,
String value)
serialize
public abstract String serialize(Context context,
Object value)
getElementValue
public final Object getElementValue(Context context,
Node element,
boolean trim)
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)
getValue
public static Object getValue(Context context,
Class klass,
String value)
Copyright © 2011 Nuxeo SAS. All Rights Reserved.