XIB: eXtensible Information Broker

Home ] Up ] Documents ] Wrapper Builder ] Demo ] Tools used ] Downloads ] Contact Us ]

Up

XIB Broker Builder
Input Mapping
 

    The second frame of the XIB Broker Builder allows users to define an Input Mapping.  This is done by choosing input names from information sources that map together and then giving them a common identifier.  For example, we want chaptersQuery and amazonQuery to map together because we want to shop for the same book in two different places and compare their prices.  Hence, we can change both the identifiers chaptersQuery and amazonQuery to "query" so that they map together. 

    An input mapping may be saved or loaded by pressing the appropriate buttons in the frame.  Input mappings are saved as XML documents.  Here is an example of an Input Mapping:

 

 

<?xml version="1.0"?>

<!DOCTYPE XIB_MAPPING SYSTEM "http://www.cs.toronto.edu/km/xib/data/XIB.dtd">
<XIB_MAPPING>

   <MAPPING name="AmazonSearch_ChaptersSearch">
        <elementType id="query">
            <attribute name="AmazonSearch" atttype="ENUMERATION"
                values="amazonQuery" />
            <attribute name="ChaptersSearch" atttype="ENUMERATION"
                values="chaptersQuery" />
        </elementType>
        <elementType id="queryMode">
            <attribute name="AmazonSearch" atttype="ENUMERATION"
                values="amazonMode" />
            <attribute name="ChaptersSearch" atttype="ENUMERATION"
                values="chaptersMode" />
            <attribute name="AmazonSearch-atts" atttype="ENUMERATION"
                values="modeValues amazonModeValues
                #MAPTOKEN bookName books" />
            <attribute name="ChaptersSearch-atts" atttype="ENUMERATION"
                values="modeValues chaptersModeValues
                #MAPTOKEN bookName @FullTitle" />
        </elementType>
   </MAPPING>

</XIB_MAPPING>

 

    This XML document shows the following mappings for AmazonSearch and ChaptersSearch:

 

AmazonSearch ChaptersSearch Broker
amazonQuery chaptersQuery query
amazonMode chaptersMode modeValues
amazonModeValues chaptersModeValues modeValues
books @FullTitle bookName

 

    As you can see from the table above, we are able to map input elements as well as input attributes in the input mappings.  If we choose to map two input attributes together (e.g. books and @FullTitle), we must map together the elements that those attributes belong to as well (e.g. amazonModeValues and chaptersModeValues).

Inportant Note:    When mapping two input elements together, the new identifier used must be unique.  We have this rule because it allows us to check if two elements really map together or if they just have the same identifier by coincidence.  If they have the same identifier by coincidence, we will know that they do not map together by observing that the broker name for that input is the same as the name used by the information source.  For example, this is NOT a mapping:

AmazonSearch ChaptersSearch Broker
book book book
 

    

  

ut_crest.gif (2479 bytes)
© Copyrighted University of Toronto

Maintained by Jianguo Lu