OfficeXml is an OXM (object to XML mapper) and is used by the OfficeCompiler to load and store the configuration of OfficeFloor. It does not force the use of any class structure and focuses on providing mapping between the XML and the java objects. It is even possible to map the XML into differing object structures and object structures into differing XML (hence its mapping nature).
On loading the mapping configuration for OfficeXml, it validates the configuration against the classes so that it provides type safe mapping. In doing so it ensures that as the object model changes the mapping configuration is changed to map to the new model. This coupling ensures that the mappings are validated at start up of application rather than during execution time, providing fail quick validation.
The mapping of the XML is based on the notion of context to allow selective mapping of the XML onto the objects. This context based mapping allows certain XML elements to be picked from the XML to be mapped onto objects ignoring the remaining XML content. This selective mapping allows OfficeFloor to load configurations that may have corrupted due to SCM merging. It also simplifies the mapping configuration as only the important XML content is mapped and the remaining is ignored.
XML configuration files are used by OfficeFloor to allow them to be stored under source code management (SCM). This means that special meta-data repositories are not required by development teams to coordinate the configuration for OfficeFloor. Development teams can store the OfficeFloor configuration in the same repositories that the text based source code files are stored within and use existing XML merge tools to manage any possible conflicts. OfficeFloor also organises configuration into small XML files and orders the elements so that there is reduced likelihood of conflicts.
As XML mapping is required by many applications, the XML mapping of OfficeXml is also provided as ManagedObjectSources. The classes providing this functionality are:
|ManagedObjectSource||Interface of object|