public class CastorXMLUtility extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CASTOR_XML_SERIALIZER_FACTORY |
| Constructor and Description |
|---|
CastorXMLUtility(ResourceLoader aResourceLoader,
Properties aAppProperties,
URL mapURL)
Looks for a file called 'index' at the given URL, and loads every file listed in there by relative path
|
| Modifier and Type | Method and Description |
|---|---|
String |
marshall(Object obj)
Marshalls a mapped object to xml string.
|
Object |
unmarshall(String data)
Unmarshalls a mapped object from XML string.
|
public static final String CASTOR_XML_SERIALIZER_FACTORY
public CastorXMLUtility(ResourceLoader aResourceLoader, Properties aAppProperties, URL mapURL) throws InvalidDataException
aResourceLoader - the resource loader able to return the right class loaderaAppProperties - the application properties containing optional castor configurationmapURL - the root URL for the mapfilesInvalidDataExceptionpublic String marshall(Object obj) throws IOException, org.exolab.castor.mapping.MappingException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
obj - the object to be marshalledIOExceptionorg.exolab.castor.mapping.MappingExceptionorg.exolab.castor.xml.MarshalExceptionorg.exolab.castor.xml.ValidationExceptionpublic Object unmarshall(String data) throws IOException, org.exolab.castor.mapping.MappingException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
data - the string to be unmarshalledIOExceptionorg.exolab.castor.mapping.MappingExceptionorg.exolab.castor.xml.MarshalExceptionorg.exolab.castor.xml.ValidationExceptionCopyright © 1997–2019 CRISTAL-iSE. All rights reserved.