|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectumontreal.iro.lecuyer.xmlbind.JAXBParamsConverter<ContactCenterEvalResultsParams>
umontreal.iro.lecuyer.contactcenters.app.ContactCenterEvalResultsConverter
public class ContactCenterEvalResultsConverter
Converter for marshalling and unmarshalling objects containing evaluation results.
Constructor Summary | |
---|---|
ContactCenterEvalResultsConverter()
|
Methods inherited from class umontreal.iro.lecuyer.xmlbind.JAXBParamsConverter |
---|
getEventHandler, getJAXBObject, getValue, hasErrors, hasFatalErrors, hasWarnings, initMarshaller, initUnmarshaller, isValidating, locatorToString, marshal, marshal, marshal, marshal, marshalAndGZip, marshalAndGZipOrExit, marshalOrExit, readSchema, setEventHandler, setValidating, unmarshal, unmarshal, unmarshal, unmarshal, unmarshalGZipped, unmarshalGZipped, unmarshalOrExit, validationEventsToString, validationEventToString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ContactCenterEvalResultsConverter()
Method Detail |
---|
public JAXBContext getContext() throws JAXBException
JAXBParamsConverter
Any concrete subclass should define a static field
of type JAXBContext
.
If the field is non-null, the method returns
its value.
Otherwise, it initializes the field using
JAXBContext.newInstance(String)
,
and returns the resulting context.
The arguments given to JAXB depends on the
JAXB-derived class associated with the concrete subclass.
getContext
in class JAXBParamsConverter<ContactCenterEvalResultsParams>
JAXBException
- if an error occurs while creating the JAXB context.public Schema getSchema() throws SAXException
JAXBParamsConverter
It is recommended to use SchemaFactory
to create the
Schema
object, and to store it in a static variable for future
use, because loading and parsing the schema might be costly.
If the schema is stored at the same location as class files,
Class.getResourceAsStream(String)
can be used
to obtain a stream for the schema.
getSchema
in class JAXBParamsConverter<ContactCenterEvalResultsParams>
SAXException
- if an error occurred during reading or parsing.public Map<String,String> getNamespacePrefixes()
JAXBParamsConverter
When using namespaces, each XML element and attribute can be qualified
with a namespace URI which is referred to, in the XML document, using a
prefix. These prefixes, which are not unique in contrast with URIs, can be
chosen arbitrarily, but they should be human-readable for clearer
documents. However, by default, JAXB generates its own prefix each time it
finds a new namespace URI during marshalling; there is no standard way to
impose prefixes. This map can be used to bind user-defined prefixes to the
URIs used by the XML document. When this method returns a non-empty map,
the marshalling mechanism of this class uses the
RemappingContentHandler
to perform the namespace prefix mapping in
a way independent from the JAXB implementation.
getNamespacePrefixes
in class JAXBParamsConverter<ContactCenterEvalResultsParams>
public ContactCenterEvalResults unmarshalToEval(File file) throws JAXBException
JAXBParamsConverter.unmarshal(File)
to unmarshal the given file to
a parameter object,
and ContactCenterEvalResults.createFromParams(ContactCenterEvalResultsParams)
to create the final object containing results.
file
- the input file.
JAXBException
- if an exception occurs
during unmarshalling.public ContactCenterEvalResults unmarshalToEval(File file, boolean reportPropertiesToEvalInfo) throws JAXBException
unmarshalToEval(File)
, but uses
ContactCenterEvalResults.createFromParams(ContactCenterEvalResultsParams,boolean)
instead of
ContactCenterEvalResults.createFromParams(ContactCenterEvalResultsParams)
.
file
- the input filereportPropertiesToEvalInfo
- determines if report properties
are copied to evaluation information.
JAXBException
- if an exception occurs
during unmarshalling.public ContactCenterEvalResults unmarshalGZippedToEval(File file) throws JAXBException
unmarshalToEval(File)
,
but calls JAXBParamsConverter.unmarshalGZipped(File)
for unmarshalling.
file
- the input file.
JAXBException
- if an error occurs during the unmarshalling.public ContactCenterEvalResults unmarshalGZippedToEval(File file, boolean reportPropertiesToEvalInfo) throws JAXBException
unmarshalToEval(File,boolean)
,
but calls JAXBParamsConverter.unmarshalGZipped(File)
for unmarshalling.
file
- the input filereportPropertiesToEvalInfo
- determines if report properties
are copied to evaluation information.
JAXBException
- if an error occurs during the unmarshalling.public ContactCenterEvalResults unmarshalGZippedToEval(URL url) throws JAXBException
unmarshalToEval(URL)
,
but calls JAXBParamsConverter.unmarshalGZipped(URL)
for unmarshalling.
url
- the input URL.
JAXBException
- if an error occurs during the unmarshalling.public ContactCenterEvalResults unmarshalGZippedToEval(URL url, boolean reportPropertiesToEvalInfo) throws JAXBException
unmarshalToEval(URL,boolean)
but calls JAXBParamsConverter.unmarshalGZipped(URL)
for
unmarshalling.
url
- the input URL.reportPropertiesToEvalInfo
- determines if report properties
are copied to evaluation information.
JAXBException
- if an error occurs during the unmarshalling.public ContactCenterEvalResults unmarshalToEval(URL url) throws JAXBException
unmarshalToEval(File)
,
with an URL instead of a file.
url
- the URL of the XML data.
JAXBException
- if an exception occurs
during unmarshalling.public ContactCenterEvalResults unmarshalToEval(URL url, boolean reportPropertiesToEvalInfo) throws JAXBException
unmarshalToEval(File,boolean)
,
with an URL instead of a file.
url
- the input URL of the XML data.reportPropertiesToEvalInfo
- determines if report properties
are copied to evaluation information.
JAXBException
- if an error occurs during unmarshalling.public ContactCenterEvalResults unmarshalToEval(Node node) throws JAXBException
unmarshalToEval(File)
,
with a node instead of a file.
node
- the input node.
JAXBException
- if an exception occurs
during unmarshalling.public ContactCenterEvalResults unmarshalToEval(Node node, boolean reportPropertiesToEvalInfo) throws JAXBException
unmarshalToEval(File,boolean)
with a node instead of a file.
node
- the input node.reportPropertiesToEvalInfo
- determines if report properties
are copied to evaluation information.
JAXBException
- if an exception occurs during
unmarshalling.public ContactCenterEvalResults unmarshalToEval(Source source) throws JAXBException
unmarshalToEval(File)
,
with a source instead of a file.
source
- the input source to read XML from.
JAXBException
- if an exception occurs
during unmarshalling.public ContactCenterEvalResults unmarshalToEval(Source source, boolean reportPropertiesToEvalInfo) throws JAXBException
unmarshalToEval(File,boolean)
,
with a source instead of a file.
source
- the input source to read XML from.reportPropertiesToEvalInfo
- determines if report properties
are copied to evaluation information.
JAXBException
- if an exception occurs during
unmarshalling.public ContactCenterEvalResults unmarshalToEvalOrExit(File file)
unmarshalToEval(File)
,
but calls JAXBParamsConverter.unmarshalOrExit(File)
to perform unmarshalling.
This method should be used in simple programs
with no graphical user interface, because
it can print information on the standard output,
and exit the program if an error occurs.
file
- the input file.
public ContactCenterEvalResults unmarshalToEvalOrExit(File file, boolean reportPropertiesToEvalInfo)
unmarshalToEval(File,boolean)
,
but calls JAXBParamsConverter.unmarshalOrExit(File)
to perform unmarshalling.
file
- the input file.reportPropertiesToEvalInfo
- determines if report properties
are copied to evaluation information.
public void marshalEval(ContactCenterEvalResults res, ContentHandler handler) throws JAXBException
ContactCenterEvalResults.createParams()
to create a parameter object from the evaluation results,
and uses
JAXBParamsConverter.marshal(Object,ContentHandler)
to marshal the parameters to XML.
res
- the object containing evaluation results.handler
- the target content handler receiving XML events.
JAXBException
- if an exception occurs during
marshalling.public void marshalEval(ContactCenterEvalResults res, Result result) throws JAXBException
marshalEval(ContactCenterEvalResults,ContentHandler)
, but
uses JAXBParamsConverter.marshal(Object,Result)
for marshalling instead.
res
- the object containing evaluation results.result
- the output result for the XML contents.
JAXBException
- if an error occurs during
marshalling.public void marshalEval(ContactCenterEvalResults res, File file) throws JAXBException
marshalEval(ContactCenterEvalResults,ContentHandler)
, but
uses JAXBParamsConverter.marshal(Object,File)
for marshalling into a file instead.
res
- the object containing evaluation results.file
- the output file.
JAXBException
- if an error occurs during
marshalling.public void marshalEvalAndGZip(ContactCenterEvalResults res, File file) throws JAXBException
marshalEval(ContactCenterEvalResults,File)
,
but calls JAXBParamsConverter.marshalAndGZip(Object,File)
.
res
- the object to be marshalled.file
- the output file.
JAXBException
- if an error occurs during the process.public void marshalEval(ContactCenterEvalResults res, Node node) throws JAXBException
marshalEval(ContactCenterEvalResults,ContentHandler)
, but
uses JAXBParamsConverter.marshal(Object,Node)
for marshalling instead.
res
- the object containing evaluation results.node
- the output node.
JAXBException
- if an error occurs during
marshalling.public void marshalEvalOrExit(ContactCenterEvalResults res, File file)
marshalEval(ContactCenterEvalResults,File)
,
but uses JAXBParamsConverter.marshalOrExit(Object,File)
for marshalling.
This method should be used in simple programs
with no graphical user interface, because
it can print information on the standard output,
and exit the program if an error occurs.
res
- file
- public void marshalEvalAndGZipOrExit(ContactCenterEvalResults res, File file)
marshalEvalOrExit(ContactCenterEvalResults,File)
,
but calls JAXBParamsConverter.marshalAndGZipOrExit(Object,File)
.
res
- the object to be marshalled.file
- the output file.
|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |