be.re.repo
Interface XMLTestDifference


public interface XMLTestDifference

The interface for external modules that test if two XML version streams are different. Since the differences themselves don't have to be calculated an implementation can be quite fast. Such modules are declared in /configuration/maps.xml using the test-difference element as in the following example:

 <test-difference>
   <mime-type>* /xml</mime-type>
   <mime-type>* /*+xml</mime-type>
   <class><name>be.re.repo.mod.XMLTestDifference</name></class>
 </test-difference>
 
 

Author:
Werner Donné

Method Summary
 boolean test(XMLEventReader v1, XMLEventReader v2, String mimeType, Context context)
           
 

Method Detail

test

boolean test(XMLEventReader v1,
             XMLEventReader v2,
             String mimeType,
             Context context)
             throws IOException,
                    XMLStreamException
Parameters:
v1 - the XML-stream of the first version.
v2 - the XML-stream of the second version.
mimeType - the MIME type of the document.
context - the repository context.
Returns:
true if the versions are different, false otherwise.
Throws:
IOException
XMLStreamException