CaseParser

public class CaseParser<T>

Class for converting the XML passed in the constructor to the instance of the CaseXml class or domain class, which is defined bu the class parameter.

Parameters:
  • <T> – the domain class

Constructors

CaseParser

public CaseParser(Class<T> clazz, String xmlDocument)

Creates an instance of the CaseMapper class. The created object will provide methods for parsing the given xmlDocument into objects of the given clazz or the CaseXml class.

Parameters:
  • clazz – the domain class
  • xmlDocument – the case as a XML string

Methods

getCaseAction

public String getCaseAction()

parseCase

public T parseCase()

Parses the XML into an instance of the domain class defined in the class parameter.

Throws:
Returns:

the created instance

parseCase

public CaseXml parseCase(Document document)

Parses the given XML document into an instance of the CaseXml class.

Parameters:
  • document – the XML document
Returns:

the created instance