ContactCenters
V. 0.9.9.

umontreal.iro.lecuyer.contactcenters.msk
Class CallCenterParamsConverter

java.lang.Object
  extended by umontreal.iro.lecuyer.xmlbind.JAXBParamsConverter<CallCenterParams>
      extended by umontreal.iro.lecuyer.contactcenters.msk.CallCenterParamsConverter

public class CallCenterParamsConverter
extends JAXBParamsConverter<CallCenterParams>


Constructor Summary
CallCenterParamsConverter()
           
 
Method Summary
 JAXBContext getContext()
          Constructs and returns the JAXB context used to read parameters.
 Map<String,String> getNamespacePrefixes()
          Returns a map associating prefixes with namespace URI.
 Schema getSchema()
          Constructs and returns a schema for the document type represented by a concrete subclass.
 
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

CallCenterParamsConverter

public CallCenterParamsConverter()
Method Detail

getContext

public JAXBContext getContext()
                       throws JAXBException
Description copied from class: JAXBParamsConverter
Constructs and returns the JAXB context used to read parameters. This method should create and return a static instance of the JAXB context since the creation of the context is costly.

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.

Specified by:
getContext in class JAXBParamsConverter<CallCenterParams>
Returns:
the JAXB context to be used.
Throws:
JAXBException - if an error occurs while creating the JAXB context.

getSchema

public Schema getSchema()
                 throws SAXException
Description copied from class: JAXBParamsConverter
Constructs and returns a schema for the document type represented by a concrete subclass. If no schema is used, this method should return null. If an error occurs when reading or parsing the schema, this method should throws a SAX exception.

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.

Specified by:
getSchema in class JAXBParamsConverter<CallCenterParams>
Returns:
the schema object, or null.
Throws:
SAXException - if an error occurred during reading or parsing.

getNamespacePrefixes

public Map<String,String> getNamespacePrefixes()
Description copied from class: JAXBParamsConverter
Returns a map associating prefixes with namespace URI. Each key of the returned map corresponds to a prefix while each value denotes a URI. This map is used while marshalling in order to assign meaningful prefixes to namespace URI rather than the default prefixes. An empty map can be used to disable namespace prefix mapping.

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.

Specified by:
getNamespacePrefixes in class JAXBParamsConverter<CallCenterParams>
Returns:
the map associating namsepace prefixes to URIs.

ContactCenters
V. 0.9.9.

To submit a bug or ask questions, send an e-mail to Richard Simard.