org.objectweb.jonathan.libs.kernel.decoders
Class OpenXMLDecoder
java.lang.Object
org.objectweb.jonathan.libs.kernel.decoders.OpenXMLDecoder
- File2Configuration
public class OpenXMLDecoder
extends java.lang.Object
XML to runtime components translator. Has built-in alias, atom,
assemblage, include & property decoders. May handle any other
component types as long as their specific decoders are provided.
In order to be able to decode a given custom-made component type,
a specific TagCompiler must be implemented for this type, and
provided in the
OpenXMLDecoder
configuration context
(i.e. in its constructor Context parameter) as the value of
an Element named after the component type's XML tag.
An instance of
OpenXMLDecoder
is automatically
used at startup by Jonathan's
KKernel
to decode
Jonathan's runtime configuration file. A complete configuration
of
OpenXMLDecoder
is therefore provided in
Jonathan's compiled boot configuration.
KKernel
OpenXMLDecoder
public OpenXMLDecoder()
OpenXMLDecoder
public OpenXMLDecoder(Context _decoders)
creates a new xml decoder with the given additional specific decoders
_decoders
- contains the additional specific decoders; their elements
have the name of their component types' XML tags.
importElement
public void importElement(Context _configuration,
String _xml_file_name,
ContextFactory _context_factory,
ClassPathFinder _finder)
throws JonathanException
imports an XML file in the given configuration. First reads the root
XML element, and then dispatches its decoding to a new
Dispatcher.
- importElement in interface File2Configuration
_configuration
- the destination configuration context_xml_file_name
- the XML source file name_context_factory
- used to create new Context
s_finder
- used to find the XML file (that's all??)