|
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<SimParams>
umontreal.iro.lecuyer.contactcenters.app.SimParamsConverter
public class SimParamsConverter
Parameter converter for
SimParams
.
Constructor Summary | |
---|---|
SimParamsConverter()
|
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 |
---|
public SimParamsConverter()
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<SimParams>
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<SimParams>
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<SimParams>
|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |