Mapper to driver data exchange dialog
This page describes how the process of generating an XBRL report interacts with the drivers.
All drivers must implement an interface in order to facilitate the mapper engine to interact with it.
The mapper to driver data exchange dialog has been implemented in this interface XBRLDataSource.java
The process is as follows:
- the driver is informed about a new document going to be produced. The driver will receive as parameters the instance document to be produced (empty at this stage) and an array of objects that contains data. Every driver has to evaluate if it is interested in all or some of the data received. Some drivers may copy content of the incoming data in local structures for further processing. Some other drivers may open connection with data repositories as databases at this time.
- the driver will be asked about how many fact items the driver can deliver for a specific mapping event. The driver will receive the content of the mapIdentifier attribute (the event name) as a parameter. No more information is transmitted by the mapper engine to the driver at this time. The response from the driver must be an integer indicating the number of facts that the local repository has for that specific event name. "0" indicates there is no data to be included in the instance document. A number greater than 0 indicates that the driver contains data for that particular mapping event.
- If the response of the previous question is a number greater than 0, the mapper engine informs the driver that data regarding a specific map event and concept name will be required. The process continues in step 5.
- if the response of the previous question is 0, then the mapper engine will continue processing the template and the next mapping event will be processed.
- At this time, a loop is started inside the mapper engine in order to request the driver provide the required data.
- The first question from the mapper engine to the driver is about the Context to be used for the fact item to be produced. Parameters passed through are the event name, the number of the element in the sequence and the proposed context obtained from the instance document template. The driver has the opportunity to change the context content as required by the application.
- The next question, if the concept allows nill values (this is possible only if it has nillable="true" in the taxonomy) is if the value must be is xsi:nill. If the answer is yes, then the next question will be skipped. The parameters transmitted in order to evaluate this question are the event name, the index number of the data in the set and the