com.deltaxml.core
Class PipelinedComparator

java.lang.Object
  extended by com.deltaxml.core.PipelinedComparator

public class PipelinedComparator
extends Object

Provides a Pipeline abstraction for the Comparator.

Each of the two comparator input streams is passed through a number of input filters and the comparator output is fed through a chain of output filters. Filters can be used for input processing or cleaning (removing unnecessary whitespace or elements not significant for comparison), keying, or output report generation. They could be implemented using XSLT or Java. The current implementation also supports filter parameterization using String parameters.

Note: This class instantiates the underlying pipeline components including SAX parsers and XSLT transformers using the JAXP factory mechanisms. Reconfiguring the factories so as to change the underlying factory implementation classes during the existance of a PipelinedComparator is not supported and may result in unpredictable results.

Note: A single instance of this class should not be used by multiple threads. Different instances may be used by different threads.

Version:
$Id: PipelinedComparator.java 4950 2009-04-01 13:21:31Z nigelw $
Author:
Nigel Whitaker, Tristan Mitchell, Christopher Cormack

Constructor Summary
PipelinedComparator()
          Creates a new instance of PipelinedComparator
PipelinedComparator(boolean bypassJAXPFactories)
          Creates a new instance of PipelinedComparator
 
Method Summary
 void compare(File f1, File f2, File result)
          Compares two File inputs and writes the result to a File.
 void compare(InputStream is1, InputStream is2, OutputStream result)
          Compares two InputStream inputs and writes the result to an OutputStream.
 void compare(Reader r1, Reader r2, Writer result)
          Compares two Reader inputs and writes the result to a Writer.
 void compare(Source s1, Source s2, Result r)
          Compares two Source inputs and writes the result to a Result.
 void compare(String s1, String s2, StringBuffer result)
          Compares two String inputs and writes the result to a StringBuffer.
 void compare(URL u1, URL u2, File result)
          Compares two URL inputs and writes the result to a File.
 void compare(URL u1, URL u2, URL result)
          Compares two URL inputs and writes the result to a URL.
 boolean getComparatorFeature(String name)
          Allows the current settings of comparator features to be determined.
 Object getComparatorProperty(String name)
          Allows the current settings of the comparator properties to be determined
 String getOutputProperty(String name)
          Allows the current settings of the output properties to be determined.
 boolean getParserFeature(String featureName)
          Allows the current settings of parser features to be determined.
 Object getParserProperty(String name)
          Allows the current settings of parser properties to be determined.
 URIResolver getURIResolver()
           
 boolean isEqual(File f1, File f2)
          Compares two File inputs and returns whether they're equal.
 boolean isEqual(InputStream is1, InputStream is2)
          Compares two InputStream inputs and returns whether they're equal.
 boolean isEqual(Reader r1, Reader r2)
          Compares two Reader inputs and returns whether they're equal.
 boolean isEqual(Source s1, Source s2)
          Compares two Source inputs and returns whether they're equal.
 boolean isEqual(String s1, String s2)
          Compares two String inputs and returns whether they're equal.
 boolean isEqual(URL u1, URL u2)
          Compares two URL inputs and returns whether they're equal.
 void setComparatorFeature(String name, boolean value)
          Sets a Feature (or option) associated with the comparator at the centre of the pipeline.
 void setComparatorProperty(String name, Object value)
          Configures comparator properties for the pipeline.
 void setInput1Filters(Class[] filters)
          Allows SAX event filters to be specified in terms of classes which implement the XMLFilter interface.
 void setInput1Filters(File[] filters)
          Allows SAX event filters to be specified in terms of File objects that reference XSL filters.
 void setInput1Filters(List filters)
          Allows SAX event filters to be specified in a mixed List of any of the valid object types: Class, File, URL, Templates or ParameterizedFilter.
 void setInput1Filters(ParameterizedFilter[] filters)
          Allows SAX event filters to be specified in terms of ParameterizedFilter objects..
 void setInput1Filters(Templates[] filters)
          Allows SAX event filters to be specified in terms of Templates objects.
 void setInput1Filters(URL[] filters)
          Allows SAX event filters to be specified in terms of URL pointers that reference XSL filters.
 void setInput2Filters(Class[] filters)
          Allows SAX event filters to be specified in terms of classes which implement the XMLFilter interface.
 void setInput2Filters(File[] filters)
          Allows SAX event filters to be specified in terms of File objects that reference XSL filters.
 void setInput2Filters(List filters)
          Allows SAX event filters to be specified in a mixed List of any of the valid object types: Class, File, URL, Templates or ParameterizedFilter.
 void setInput2Filters(ParameterizedFilter[] filters)
          Allows SAX event filters to be specified in terms of ParameterizedFilter objects..
 void setInput2Filters(Templates[] filters)
          Allows SAX event filters to be specified in terms of Templates objects.
 void setInput2Filters(URL[] filters)
          Allows SAX event filters to be specified in terms of URL pointers that reference XSL filters.
 void setInputFilters(Class[] filters)
          Allows SAX event filters to be specified in terms of classes which implement the XMLFilter interface.
 void setInputFilters(File[] filters)
          Allows SAX event filters to be specified in terms of File objects that reference XSL filters.
 void setInputFilters(List filters)
          Allows SAX event filters to be specified in a mixed List of any of the valid object types: Class, File, URL, Templates or ParameterizedFilter.
 void setInputFilters(ParameterizedFilter[] filters)
          Allows SAX event filters to be specified in terms of ParameterizedFilter objects.
 void setInputFilters(Templates[] filters)
          Allows SAX event filters to be specified in terms of Templates objects.
 void setInputFilters(URL[] filters)
          Allows SAX event filters to be specified in terms of URL pointers that reference XSL filters.
 void setOutputFilters(Class[] filters)
          Allows SAX event filters to be specified in terms of classes.
 void setOutputFilters(File[] filters)
          Allows SAX event filters to be specified in terms of File objects that reference XSL filters.
 void setOutputFilters(List filters)
          Allows SAX event filters to be specified in a mixed List of any of the valid object types: Class, File, URL, Templates or ParameterizedFilter.
 void setOutputFilters(ParameterizedFilter[] filters)
          Allows SAX event filters to be specified in terms of ParameterizedFilter objects.
 void setOutputFilters(Templates[] templates)
          Allows SAX event filters to be specified in terms of Templates objects.
 void setOutputFilters(URL[] filters)
          Allows SAX event filters to be specified in terms of URL pointers that reference XSL filters.
 void setOutputProperty(String name, String value)
          Configures output formatting and control.
 void setParserFeature(String featureName, boolean value)
          Modifies the parsing behaviour of a pipeline.
 void setParserProperty(String name, Object value)
          Configures parser properties for the pipeline input parsers.
 void setURIResolver(URIResolver resolver)
          Sets a resolver for use by all XSLT based input and output filters in the pipeline.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PipelinedComparator

public PipelinedComparator()
                    throws ParserInstantiationException,
                           TransformerInstantiationException

Creates a new instance of PipelinedComparator

This constructor uses the stanard JAXP Factory mechansims to locate an XSLT transformer and SAX Parser.

Throws:
ParserInstantiationException
TransformerInstantiationException

PipelinedComparator

public PipelinedComparator(boolean bypassJAXPFactories)
                    throws ParserInstantiationException,
                           TransformerInstantiationException

Creates a new instance of PipelinedComparator

This constructor allows the JAXP factory mechansims to be bypassed. While not normally recommended for general use, this feature may be useful in certain application server contexts where the default classloader delegation order ('parent first') will often return an XSLT processor or SAX Parser used by the application server generally and not that included with the jar files of a specific application or servlet. Rather than using the JAXP factory newInstance() method the corresponding factory implementation class is instantiated through reflection. These classes are net.sf.saxon.TransformerFactoryImpl and org.apache.xerces.jaxp.SAXParserFactoryImpl for the XSLT Transformer and SAX Parser respectively. The reflection code will attempt to use both the 'context classloader' and the 'current classloader', so for example the following effective methods would be used to locate Saxon:

Class.forName("net.sf.saxon.TransformerFactoryImpl", true, Thread.currentThread().getContextClassLoader());

Class.forName("net.sf.saxon.TransformerFactoryImpl", true, this.getClass().getClassLoader());

The context classloader is tried first and then the current classloader. If the class is not found or if any other error occurs (see the Javadoc for Class.forName()) then the code will throw a TransformerInstantiationException.

Please note: the bypass mechanism instantiates Xerces-J using the 'org.apache.xerces.jaxp.SAXParserFactoryImpl' classname. This may not be the same classname as used by the version of xerces often included in the Java runtime. However, it does correspond to the class found in xercesImpl.jar included with the DeltaXML release and the separate Xerces-J downloads.

Parameters:
bypassJAXPFactories - when true directly instaniates Saxon and Xerces rather than using JAXP Factory mechanisms
Throws:
ParserInstantiationException
TransformerInstantiationException
Since:
5.3.5
See Also:
Class.forName(String, boolean, ClassLoader)
Method Detail

setURIResolver

public void setURIResolver(URIResolver resolver)
Sets a resolver for use by all XSLT based input and output filters in the pipeline. This resolver is then used during transformation to determine the location of URIs associated with the <xsl:import>, <xml:include> and document() constructs

Parameters:
resolver - An implementation of the URIResolver interface, or null
Since:
4.3.4
See Also:
TransformerFactory.setURIResolver(URIResolver), Transformer.setURIResolver(URIResolver)

getURIResolver

public URIResolver getURIResolver()
Returns:
The current resolver in use, or null if one hasn't been set or if it was previously nulled.
Since:
4.3.4
See Also:
TransformerFactory.getURIResolver()

setParserFeature

public void setParserFeature(String featureName,
                             boolean value)
                      throws FeatureSettingNotSupportedException,
                             FeatureNotRecognizedException,
                             IllegalArgumentException

Modifies the parsing behaviour of a pipeline. In particular features relating to input validation, schema and DTD handling can be controlled. The features which can be controlled are features of the underlying SAX parser used in the pipeline. If the SAX parser being used is Apache Xerces, the features which can be set are both the generic SAX features and Apache specific ones.

These features are only appropriate and will only be applied when StreamSource input is provided to the pipeline. When SAXSource or other forms of Source are provided the input has already been parsed.

The following list includes some of the features which we consider useful in conjuction with a pipelined comparator architecture:

The following table lists features that can only be set to specific values. These fixed settings are necessary for this pipelined architecture to operate properly. This is because by default it uses Saxon which requires particular feature settings to be used and supported by setFeature. Any attempt to set values other than those shown below will result in a FeatureSettingNotSupportedException being thrown.

Featurefixed/permissible value
http://xml.org/sax/features/namespaces true
http://xml.org/sax/features/namespace-prefixes false

Parameters:
featureName - the name of the feature to be set
value - the new value for the feature
Throws:
FeatureSettingNotSupportedException - if the feature cannot be set to the specific value
FeatureNotRecognizedException - if the featureName is not recognized
IllegalArgumentException - if the argument is null
See Also:
XMLReader.setFeature(String, boolean)

getParserFeature

public boolean getParserFeature(String featureName)
                         throws FeatureNotRecognizedException,
                                IllegalArgumentException
Allows the current settings of parser features to be determined.

Parameters:
featureName - the name of the feature whose value is being queried
Returns:
the current value of the feature
Throws:
FeatureNotRecognizedException - if the featureName is not recognized
IllegalArgumentException - if the argument is null
See Also:
setParserFeature(String, boolean)

setParserProperty

public void setParserProperty(String name,
                              Object value)
                       throws PropertyNotRecognizedException,
                              PropertySettingNotSupportedException,
                              IllegalArgumentException

Configures parser properties for the pipeline input parsers.

Allows properties of the underlying parser to be configured. If using Apache Xerces-J the following properties may prove useful in comparator pipelines:

Parameters:
name - the name of the property to set
value - the new value for the property
Throws:
PropertySettingNotSupportedException - if the property cannot be set to the specific value
PropertyNotRecognizedException - if the property name is not recognized
IllegalArgumentException - if an argument is null
See Also:
getParserProperty(String), XMLReader.setProperty(java.lang.String, java.lang.Object)

getParserProperty

public Object getParserProperty(String name)
                         throws PropertyNotRecognizedException,
                                IllegalArgumentException
Allows the current settings of parser properties to be determined.

Parameters:
name - the name of the property whose value is being queried
Returns:
an Object representing the current value of the property
Throws:
PropertyNotRecognizedException - if the property name is not recognized
IllegalArgumentException - if the argument is null
See Also:
setParserProperty(String, Object)

setComparatorFeature

public void setComparatorFeature(String name,
                                 boolean value)
                          throws FeatureNotRecognizedException,
                                 IllegalArgumentException
Sets a Feature (or option) associated with the comparator at the centre of the pipeline. The precise feature name strings which can be used are specified in the com.deltaxml.api package documentation.

Parameters:
name - the name of the feature whose value is being configured
value - the new value for the feature
Throws:
IllegalArgumentException - when the feature name parameter is null
FeatureNotRecognizedException - if the feature name is not recognized
See Also:
getComparatorFeature(String), XMLComparator.setFeature(String, boolean)

getComparatorFeature

public boolean getComparatorFeature(String name)
                             throws FeatureNotRecognizedException,
                                    IllegalArgumentException
Allows the current settings of comparator features to be determined.

Parameters:
name - the name of the feature whose value is being queried
Returns:
the current value of the feature
Throws:
IllegalArgumentException - when the feature name parameter is null
FeatureNotRecognizedException - if the feature name is not recognized
See Also:
setComparatorFeature(String, boolean), XMLComparator.getFeature(String)

setComparatorProperty

public void setComparatorProperty(String name,
                                  Object value)
                           throws PropertyNotRecognizedException,
                                  IllegalArgumentException
Configures comparator properties for the pipeline.

Parameters:
name - the name of the property to be set
value - the Object representing the value of the property
Throws:
PropertyNotRecognizedException - if the property name is not recognized
IllegalArgumentException - if a parameter is null
See Also:
getComparatorProperty(String), XMLComparator.setProperty(String, Object)

getComparatorProperty

public Object getComparatorProperty(String name)
                             throws PropertyNotRecognizedException,
                                    IllegalArgumentException
Allows the current settings of the comparator properties to be determined

Parameters:
name - the name of the property whose value is being queried
Returns:
an Object representing the value of the property
Throws:
PropertyNotRecognizedException - if the property name is not recognized
IllegalArgumentException - if the property name is null
See Also:
setComparatorProperty(String, Object), XMLComparator.getFeature(String)

setOutputProperty

public void setOutputProperty(String name,
                              String value)
                       throws PropertyNotRecognizedException,
                              IllegalArgumentException

Configures output formatting and control.

Any properties set here are then passed to the serializer when the compare method is invoked. Earlier releases supported only a limited subset of the common properties. The drawback of the new approach is that PropertyNotRecognized exceptions cannot be reported immediately when the property is set.

NOTE The Saxon XSLT processor will throw an XPathException which inturn will be presented as an PipelineProcessingException when "omit-xml-declaration" has the value "yes" and standalone has either of the values "yes" or "no". Saxon does however support setting the "standalone" property to "omit" as described in the XSLT2 serialization specification.

Output properties should ideally be set using the OutputKeys static fields as follows:

 PipelinedComparator pc= new PipelinedComparator();
 ...
 pc.setOutputProperty(OutputKeys.INDENT, "yes");
 

Parameters:
name - the name of the property to set
value - the new value for the property
Throws:
IllegalArgumentException - if a parameter is null
PropertyNotRecognizedException - this exception is no longer thrown. An IllegalArgumentException is now thrown by the compare method itself.
See Also:
Transformer.setOutputProperties(Properties), Properties.setProperty(String, String), OutputKeys, XSLT 2.0 and XQuery 1.0 Serialization, section 5.1.5

getOutputProperty

public String getOutputProperty(String name)
                         throws PropertyNotRecognizedException,
                                IllegalArgumentException
Allows the current settings of the output properties to be determined.

Parameters:
name - the name of the output property whose value is being queried
Returns:
the value of the property
Throws:
IllegalArgumentException - if the property name is null
PropertyNotRecognizedException - this exception is no longer thrown. The behaviour of this method is now symmetrical to that of Properties.getProperty(String).
See Also:
Transformer.getOutputProperty(java.lang.String), OutputKeys

setInputFilters

public void setInputFilters(Templates[] filters)
                     throws FilterConfigurationException,
                            IllegalArgumentException
Allows SAX event filters to be specified in terms of Templates objects. We would recommend the use of Array initializers, for example:
 TransformerFactory tf= ...;
 Templates filter1= tf.newTemplates(new StreamSource(new File("/path/to/filters/filter1.xsl")));
 Templates filter2= tf.newTemplates(new StreamSource(new File("/path/to/filters/filter2.xsl")));
 PipelinedComparator pc= ...;
 pc.setInputFilters(new Templates[] { filter1, filter2 });
 
The filters are applied in array-order, with the first filter applied to the SAX events produced by the parser. The Templates objects are converted to XMLFilter classes. Two instances of each class are instantiated, one for each Comparator input. Note: All of the templates in the parameter must have been produced by the same TransformerFactory that is in effect. It is not possible to manipulate the javax.xml.transformer.TransformerFactory system property so that different filters use different XSLT processors.

Parameters:
filters - the Templates array to be set as the input filters for this PipelinedComparator
Throws:
FilterConfigurationException - when there is a problem converting a Templates object to an XMLFilter
IllegalArgumentException - if the filter array is null
See Also:
TransformerFactory.newTemplates(Source)

setInput1Filters

public void setInput1Filters(Templates[] filters)
                      throws FilterConfigurationException,
                             IllegalArgumentException
Allows SAX event filters to be specified in terms of Templates objects.

Filters added using this method are applied to input 1 only. See setInputFilters(Templates[]) for more details.

Parameters:
filters - the Templates array to be set as the input filters on input 1 for this PipelinedComparator
Throws:
FilterConfigurationException - when there is a problem converting a Templates object to an XMLFilter
IllegalArgumentException - if the filter array is null
See Also:
setInputFilters(Templates[]), TransformerFactory.newTemplates(Source)

setInput2Filters

public void setInput2Filters(Templates[] filters)
                      throws FilterConfigurationException,
                             IllegalArgumentException
Allows SAX event filters to be specified in terms of Templates objects.

Filters added using this method are applied to input 2 only. See setInputFilters(Templates[]) for more details.

Parameters:
filters - the Templates array to be set as the input filters on input 2 for this PipelinedComparator
Throws:
FilterConfigurationException - when there is a problem converting a Templates object to an XMLFilter
IllegalArgumentException - if the filter array is null
See Also:
setInputFilters(Templates[]), TransformerFactory.newTemplates(Source)

setInputFilters

public void setInputFilters(Class[] filters)
                     throws FilterClassIncompatibilityException,
                            FilterClassInstantiationException,
                            IllegalArgumentException
Allows SAX event filters to be specified in terms of classes which implement the XMLFilter interface. Any class objects, which can be class literals, can be used at runtime. We would also recommend the use of Array initializers, for example:
 import com.deltaxml.pipe.filters.NormalizeSpace;
 import com.deltaxml.pipe.filters.XSDKey;
 ...
 PipelinedComparator pc= ...;
 pc.setInputFilters(new Class[] { NormalizeSpace.class, XSDKey.class });
 
The filters are applied in array-order, with the first filter applied to the SAX events produced by the parser. Two instances of each specified class are instantiated, one for each Comparator input.

Parameters:
filters - the Class array to be set as input filters for this PipelinedComparator
Throws:
FilterClassIncompatibilityException - if the supplied class is not assignment compatible with those required
FilterClassInstantiationException - when there is a problem instantiating the supplied class(es)
IllegalArgumentException - if the filter array is null

setInput1Filters

public void setInput1Filters(Class[] filters)
                      throws FilterClassIncompatibilityException,
                             FilterClassInstantiationException,
                             IllegalArgumentException
Allows SAX event filters to be specified in terms of classes which implement the XMLFilter interface.

Filters added using this method will be applied to input 1 only. See setInputFilters(Class[]) for more details

Parameters:
filters - the Class array to be set as input filters on input 1 for this PipelinedComparator
Throws:
FilterClassIncompatibilityException - if the supplied class is not assignment compatible with those required
FilterClassInstantiationException - when there is a problem instantiating the supplied class(es)
IllegalArgumentException - if the filter array is null
See Also:
setInputFilters(Class[])

setInput2Filters

public void setInput2Filters(Class[] filters)
                      throws FilterClassIncompatibilityException,
                             FilterClassInstantiationException,
                             IllegalArgumentException
Allows SAX event filters to be specified in terms of classes which implement the XMLFilter interface.

Filters added using this method will be applied to input 2 only. See setInputFilters(Class[]) for more details

Parameters:
filters - the Class array to be set as input filters on input 2 for this PipelinedComparator
Throws:
FilterClassIncompatibilityException - if the supplied class is not assignment compatible with those required
FilterClassInstantiationException - when there is a problem instantiating the supplied class(es)
IllegalArgumentException - if the filter array is null
See Also:
setInputFilters(Class[])

setInputFilters

public void setInputFilters(List filters)
                     throws FilterClassInstantiationException,
                            FilterClassIncompatibilityException,
                            UnsupportedFilterListMemberException,
                            FilterConfigurationException,
                            IllegalArgumentException,
                            FilterParameterizationException,
                            FilterParameterizationNotSupportedException
Allows SAX event filters to be specified in a mixed List of any of the valid object types: Class, File, URL, Templates or ParameterizedFilter. The filters are applied in the order in which they appear in the List. Two instances of each filter are instantiated, one for each Comaprator input.

Parameters:
filters - the List object to be set as the input filters for this PipelinedComparator
Throws:
FilterClassIncompatibilityException - if the supplied class is not assignment compatible with those required
FilterClassInstantiationException - when there is a problem instantiating the supplied class(es)
UnsupportedFilterListMemberException - if a list member is not a supported filter type
FilterConfigurationException - if there is a problem instantiating or configuring an XSLT based filter
IllegalArgumentException - if the filter List is null
FilterParameterizationException - if there is a problem setting parameters on a Java filter
FilterParameterizationNotSupportedException - if the underlying XSLT processor does not allow access to the transformer and thus parameter setting.
See Also:
setInputFilters(Class[]), setInputFilters(File[]), setInputFilters(URL[]), setInputFilters(Templates[]), setInputFilters(ParameterizedFilter[])

setInput1Filters

public void setInput1Filters(List filters)
                      throws FilterClassInstantiationException,
                             FilterClassIncompatibilityException,
                             UnsupportedFilterListMemberException,
                             FilterConfigurationException,
                             FilterParameterizationException,
                             FilterParameterizationNotSupportedException,
                             IllegalArgumentException
Allows SAX event filters to be specified in a mixed List of any of the valid object types: Class, File, URL, Templates or ParameterizedFilter.

Filters added using this method will be applied to input 1 only. See setInputFilters(List) for more details.

Parameters:
filters - the List object to be set as the input filters on input 1 for this PipelinedComparator
Throws:
FilterClassIncompatibilityException - if the supplied class is not assignment compatible with those required
FilterClassInstantiationException - when there is a problem instantiating the supplied class(es)
UnsupportedFilterListMemberException - if a list member is not a supported filter type
FilterConfigurationException - if there is a problem instantiating or configuring an XSLT based filter
IllegalArgumentException - if the filter List is null
FilterParameterizationException - if there is a problem setting parameters on a Java filter
FilterParameterizationNotSupportedException - if the underlying XSLT processor does not support allow access to the transformer and thus parameter setting.
See Also:
setInputFilters(List), setInput1Filters(Class[]), setInput1Filters(File[]), setInput1Filters(URL[]), setInput1Filters(Templates[])

setInput2Filters

public void setInput2Filters(List filters)
                      throws FilterClassInstantiationException,
                             FilterClassIncompatibilityException,
                             UnsupportedFilterListMemberException,
                             FilterConfigurationException,
                             FilterParameterizationException,
                             FilterParameterizationNotSupportedException,
                             IllegalArgumentException
Allows SAX event filters to be specified in a mixed List of any of the valid object types: Class, File, URL, Templates or ParameterizedFilter.

Filters added using this method will be applied to input 2 only. See setInputFilters(List) for more details.

Parameters:
filters - the List object to be set as the input filters on input 2 for this PipelinedComparator
Throws:
FilterClassIncompatibilityException - if the supplied class is not assignment compatible with those required
FilterClassInstantiationException - when there is a problem instantiating the supplied class(es)
UnsupportedFilterListMemberException - if a list member is not a supported filter type
FilterConfigurationException - if there is a problem instantiating or configuring an XSLT based filter
IllegalArgumentException - if the filter List is null
FilterParameterizationException - if there is a problem setting parameters on a Java filter
FilterParameterizationNotSupportedException - if the underlying XSLT processor does not support allow access to the transformer and thus parameter setting.
See Also:
setInputFilters(List), setInput2Filters(Class[]), setInput2Filters(File[]), setInput2Filters(URL[]), setInput2Filters(Templates[])

setInputFilters

public void setInputFilters(URL[] filters)
                     throws FilterConfigurationException,
                            IllegalArgumentException
Allows SAX event filters to be specified in terms of URL pointers that reference XSL filters. Any URL objects can be used at runtime. We would also recommend the use of Array initializers, for example:
 URL filter1= new URL("file://path/to/filter/filter1.xsl");
 URL filter2= new URL("http://my.server.com/filters/filter2.xsl");
 PipelinedComparator pc= ...;
 pc.setInputFilters(new URL[] { filter1, filter2 });
 
The filters are applied in array-order, with the first filter applied to the SAX events produced by the parser. The XSL filters are converted to XMLFilter classes. Two instances of each class are instantiated, one for each Comparator input.

Parameters:
filters - the URL array to be set as the input filters for this PipelinedComparator
Throws:
FilterConfigurationException - If there is a problem setting up the filter from the URL
IllegalArgumentException - if the filter array is null

setInput1Filters

public void setInput1Filters(URL[] filters)
                      throws FilterConfigurationException,
                             IllegalArgumentException
Allows SAX event filters to be specified in terms of URL pointers that reference XSL filters.

Filters added using this method will be applied to input 1 only. See setInputFilters(URL[]) for more details.

Parameters:
filters - the URL array to be set as the input filters on input 1 for this PipelinedComparator
Throws:
FilterConfigurationException - If there is a problem setting up the filter from the URL
IllegalArgumentException - if the filter array is null
See Also:
setInputFilters(URL[])

setInput2Filters

public void setInput2Filters(URL[] filters)
                      throws FilterConfigurationException,
                             IllegalArgumentException
Allows SAX event filters to be specified in terms of URL pointers that reference XSL filters.

Filters added using this method will be applied to input 2 only. See setInputFilters(URL[]) for more details.

Parameters:
filters - the URL array to be set as the input filters on input 2 for this PipelinedComparator
Throws:
FilterConfigurationException - If there is a problem setting up the filter from the URL
IllegalArgumentException - if the filter array is null
See Also:
setInputFilters(URL[])

setInputFilters

public void setInputFilters(File[] filters)
                     throws FilterConfigurationException,
                            IllegalArgumentException
Allows SAX event filters to be specified in terms of File objects that reference XSL filters. Any File objects can be used at runtime. We would also recommend the use of Array initializers, for example:
 File filter1= new File("/path/to/filter/filter1.xsl");
 File filter2= new File("/path/to/filter/filter2.xsl");
 PipelinedComparator pc= ...;
 pc.setInputFilters(new File[] { filter1, filter2 });
 
The filters are applied in array-order, with the first filter applied to the SAX events produced by the parser. The XSL filters are converted to XMLFilter classes. Two instances of each class are instantiated, one for each Comparator input.

Parameters:
filters - the File array to be set as the input filters for this PipelinedComparator
Throws:
FilterConfigurationException - if there is a problem setting up the filter from the File
IllegalArgumentException - if the filter array is null

setInput1Filters

public void setInput1Filters(File[] filters)
                      throws FilterConfigurationException,
                             IllegalArgumentException
Allows SAX event filters to be specified in terms of File objects that reference XSL filters.

Filters added using this method will be applied to input 1 only. See setInputFilters(File[]) for more details.

Parameters:
filters - the File array to be set as the input filters on input 1 for this PipelinedComparator
Throws:
FilterConfigurationException - if there is a problem setting up the filter from the File
IllegalArgumentException - if the filter array is null
See Also:
setInputFilters(File[])

setInput2Filters

public void setInput2Filters(File[] filters)
                      throws FilterConfigurationException,
                             IllegalArgumentException
Allows SAX event filters to be specified in terms of File objects that reference XSL filters.

Filters added using this method will be applied to input 2 only. See setInputFilters(File[]) for more details.

Parameters:
filters - the File array to be set as the input filters on input 2 for this PipelinedComparator
Throws:
FilterConfigurationException - if there is a problem setting up the filter from the File
IllegalArgumentException - if the filter array is null
See Also:
setInputFilters(File[])

setInputFilters

public void setInputFilters(ParameterizedFilter[] filters)
                     throws FilterClassInstantiationException,
                            FilterParameterizationNotSupportedException,
                            FilterClassIncompatibilityException,
                            FilterConfigurationException,
                            FilterParameterizationException
Allows SAX event filters to be specified in terms of ParameterizedFilter objects. We would also recommend the use of Array initializers, for example:
 ParameterizedFilter filter1= new ParameterizedFilter(MyFilter1.class);
 ParameterizedFilter filter2= new ParameterizedFilter("path/to/filter/myfilter2.xsl");
 PipelinedComparator pc= ...;
 pc.setInputFilters(new ParameterizedFilter[] { filter1, filter2 });
 
Parameters must be set on the filters before adding them to the PipelinedComparator. Filters are applied in the order in which they appear in the array. Two instances of each filter are instantiated, one for each of the Comparator inputs.

Parameters:
filters - the ParameterizedFilter array to be set as the input filters for this PipelinedComparator
Throws:
FilterClassInstantiationException - when there is a problem instantiating the supplied class(es)
FilterParameterizationNotSupportedException - if the underlying XSLT processor does not allow access to the transformer and thus parameter setting
FilterClassIncompatibilityException - if the supplied class is not assignment compatible with those required
FilterConfigurationException - if there is a problem instantiating or configuring an XSLT based filter
FilterParameterizationException - if there is a problem setting parameters on a Java filter
See Also:
ParameterizedFilter, ParameterizedFilter.setStringParameter(String, String)

setInput1Filters

public void setInput1Filters(ParameterizedFilter[] filters)
                      throws FilterClassInstantiationException,
                             FilterParameterizationNotSupportedException,
                             FilterClassIncompatibilityException,
                             FilterConfigurationException,
                             FilterParameterizationException
Allows SAX event filters to be specified in terms of ParameterizedFilter objects..

Filters added using this method will be applied to input 1 only. See setInputFilters(ParameterizedFilter[]) for more details.

Parameters:
filters - the ParameterizedFilter array to be set as the input filters on input 1 for this PipelinedComparator
Throws:
FilterClassInstantiationException - when there is a problem instantiating the supplied class(es)
FilterParameterizationNotSupportedException - if the underlying XSLT processor does not allow access to the transformer and thus parameter setting
FilterClassIncompatibilityException - if the supplied class is not assignment compatible with those required
FilterConfigurationException - if there is a problem instantiating or configuring an XSLT based filter
FilterParameterizationException - if there is a problem setting parameters on a Java filter
See Also:
setInputFilters(ParameterizedFilter[]), ParameterizedFilter, ParameterizedFilter.setStringParameter(String, String)

setInput2Filters

public void setInput2Filters(ParameterizedFilter[] filters)
                      throws FilterClassInstantiationException,
                             FilterParameterizationNotSupportedException,
                             FilterClassIncompatibilityException,
                             FilterConfigurationException,
                             FilterParameterizationException
Allows SAX event filters to be specified in terms of ParameterizedFilter objects..

Filters added using this method will be applied to input 2 only. See setInputFilters(ParameterizedFilter[]) for more details.

Parameters:
filters - the ParameterizedFilter array to be set as the input filters on input 2 for this PipelinedComparator
Throws:
FilterClassInstantiationException - when there is a problem instantiating the supplied class(es)
FilterParameterizationNotSupportedException - if the underlying XSLT processor does not allow access to the transformer and thus parameter setting
FilterClassIncompatibilityException - if the supplied class is not assignment compatible with those required
FilterConfigurationException - if there is a problem instantiating or configuring an XSLT based filter
FilterParameterizationException - if there is a problem setting parameters on a Java filter
See Also:
setInputFilters(ParameterizedFilter[]), ParameterizedFilter, ParameterizedFilter.setStringParameter(String, String)

setOutputFilters

public void setOutputFilters(Templates[] templates)
                      throws FilterConfigurationException
Allows SAX event filters to be specified in terms of Templates objects. We would recommend the use of Array initializers, for example:
 TransformerFactory tf= ...;
 Templates filter1= tf.newTemplates(new StreamSource(new File("/path/to/filters/filter1.xsl")));
 Templates filter2= tf.newTemplates(new StreamSource(new File("/path/to/filters/filter2.xsl")));
 PipelinedComparator pc= ...;
 pc.setOutputFilters(new Templates[] { filter1, filter2 });
 
The filters are applied in array-order, with the first filter applied to the SAX events produced by the Comparator. Note: All of the templates in the parameter must have been produced by the same TransformerFactory that is in effect. It is not possible to manipulate the javax.xml.transformer.TransformerFactory system property so that different filters use different XSLT processors.

Parameters:
templates - the Templates array to be set as the output filters for this PipelinedComparator
Throws:
FilterConfigurationException - if there is a problem converting the filter to a TransformerHandler
IllegalArgumentException - if the templates array is null
See Also:
TransformerFactory.newTemplates(Source)

setOutputFilters

public void setOutputFilters(Class[] filters)
                      throws IllegalArgumentException,
                             FilterClassIncompatibilityException,
                             FilterClassInstantiationException
Allows SAX event filters to be specified in terms of classes. Each class must be assignment compatible (implement or extend) with XMLPushFilter or XMLFilterImpl. Any class objects, which can be class literals, can be used at runtime. We would also recommend the use of Array initializers, for example:
 import com.deltaxml.pipe.filters.WordByWordOutfilter1;
 import com.deltaxml.pipe.filters.WordByWordOutfilter2;
 ...
 PipelinedComparator pc= ...;
 pc.setOutputFilters(new Class[] { WordByWordOutfilter1.class, WordByWordOutfilter2.class });
 
The filters are applied in array-order, with the first filter receiving SAX events produced by the comparator.

Parameters:
filters - the Class array to be set as the output filters for this PipelinedComparator
Throws:
IllegalArgumentException - if the array is null
FilterClassIncompatibilityException - if the supplied class is not assignment compatible with those required
FilterClassInstantiationException - when there is a problem instantiating the supplied class(es)
See Also:
XMLFilterImpl, XMLPushFilter

setOutputFilters

public void setOutputFilters(ParameterizedFilter[] filters)
                      throws FilterClassIncompatibilityException,
                             FilterConfigurationException,
                             FilterClassInstantiationException,
                             FilterParameterizationException,
                             FilterParameterizationNotSupportedException
Allows SAX event filters to be specified in terms of ParameterizedFilter objects. We would also recommend the use of Array initializers, for example:
 ParameterizedFilter filter1= new ParameterizedFilter(MyFilter1.class);
 ParameterizedFilter filter2= new ParameterizedFilter("path/to/filter/myfilter2.xsl");
 PipelinedComparator pc= ...;
 pc.setOutputFilters(new ParameterizedFilter[] { filter1, filter2 });
 
Parameters must be set on the filters before adding them to the PipelinedComparator. Filters are applied in the order in which they appear in the array.

Parameters:
filters - the ParameterizedFilter array to be set as the output filters for this PipelinedComparator
Throws:
FilterClassInstantiationException - when there is a problem instantiating the supplied class(es)
FilterParameterizationNotSupportedException - if the underlying XSLT processor does not allow access to the transformer and thus parameter setting
FilterClassIncompatibilityException - if the supplied class is not assignment compatible with those required
FilterConfigurationException - if there is a problem instantiating or configuring an XSLT based filter
FilterParameterizationException - if there is a problem setting parameters on a Java filter
See Also:
ParameterizedFilter, ParameterizedFilter.setStringParameter(String, String)

setOutputFilters

public void setOutputFilters(List filters)
                      throws FilterClassIncompatibilityException,
                             FilterClassInstantiationException,
                             UnsupportedFilterListMemberException,
                             FilterConfigurationException,
                             IllegalArgumentException,
                             FilterParameterizationException
Allows SAX event filters to be specified in a mixed List of any of the valid object types: Class, File, URL, Templates or ParameterizedFilter. The filters are applied in the order in which they appear in the List.

Parameters:
filters - the List object to be set as the output filters for this PipelinedComparator
Throws:
IllegalArgumentException - if the List is null
FilterClassIncompatibilityException - if the supplied class is not assignment compatible with those required
FilterClassInstantiationException - when there is a problem instantiating the supplied class(es)
UnsupportedFilterListMemberException - if a list member is not a supported filter type
FilterConfigurationException - if there is a problem instantiating or configuring an XSLT based filter
FilterParameterizationException - if there is a problem setting parameters on a Java filter
See Also:
setOutputFilters(Class[]), setOutputFilters(File[]), setOutputFilters(URL[]), setOutputFilters(Templates[]), setInputFilters(ParameterizedFilter[])

setOutputFilters

public void setOutputFilters(URL[] filters)
                      throws FilterConfigurationException
Allows SAX event filters to be specified in terms of URL pointers that reference XSL filters. Any URL objects can be used at runtime. We would also recommend the use of Array initializers, for example:
 URL filter1= new URL("file://path/to/filter/filter1.xsl");
 URL filter2= new URL("http://my.server.com/filters/filter2.xsl");
 PipelinedComparator pc= ...;
 pc.setOutputFilters(new URL[] { filter1, filter2 });
 
The filters are applied in array-order, with the first filter applied to the SAX events produced by the Comparator.

Parameters:
filters - the URL array to be set as the output filters for this PipelinedComparator
Throws:
IllegalArgumentException - if the URL array is null
FilterConfigurationException - if there is a problem instantiating or configuring an XSLT based filter

setOutputFilters

public void setOutputFilters(File[] filters)
                      throws FilterConfigurationException,
                             IllegalArgumentException
Allows SAX event filters to be specified in terms of File objects that reference XSL filters. Any File objects can be used at runtime. We would also recommend the use of Array initializers, for example:
 File filter1= new File("/path/to/filter/filter1.xsl");
 File filter2= new File("/path/to/filter/filter2.xsl");
 PipelinedComparator pc= ...;
 pc.setOutputFilters(new File[] { filter1, filter2 });
 
The filters are applied in array-order, with the first filter applied to the SAX events produced by the Comparator.

Parameters:
filters - the File array to be set as the output filters to this PipelinedComparator
Throws:
IllegalArgumentException - if the array is null
FilterConfigurationException - if there is a problem instantiating or configuring an XSLT based filter

compare

public void compare(Source s1,
                    Source s2,
                    Result r)
             throws PipelineProcessingException,
                    IdentityTransformerSetupException,
                    ComparatorInstantiationException,
                    ParserInstantiationException,
                    UnsupportedSourceException
Compares two Source inputs and writes the result to a Result.

Parameters:
s1 - the first Source to compare
s2 - the second Source to compare against the first
r - the Result object to which the resulting delta will be written
Throws:
PipelineProcessingException - if an unrecoverable error occurs during the course of the comparison.
ComparatorInstantiationException - if a Comparator cannot be instantiated or configured.
IdentityTransformerSetupException - if an XSLT identity transformer cannot be instantiated or configured.
ParserInstantiationException - if a parser cannot be instaniated
UnsupportedSourceException - if an input Source subclass is not supported
IllegalArgumentException - is thrown if any of the properties set using setOutputProperty(String, String) are not recognised. See Transformer.setOutputProperties(Properties) for more information.
See Also:
XMLComparator.compare(Source, Source, Result)

compare

public void compare(File f1,
                    File f2,
                    File result)
             throws PipelineProcessingException,
                    IdentityTransformerSetupException,
                    ComparatorInstantiationException,
                    ParserInstantiationException
Compares two File inputs and writes the result to a File.

Parameters:
f1 - the first File object to compare
f2 - the second File object to compare against the first
result - the File object in which to write the resulting difference
Throws:
PipelineProcessingException - if an unrecoverable error occurs during the course of the comparison.
ComparatorInstantiationException - if a Comparator cannot be instantiated or configured.
IdentityTransformerSetupException - if an XSLT identity transformer cannot be instantiated or configured.
ParserInstantiationException - if a parser cannot be instaniated
IllegalArgumentException - is thrown if any of the properties set using setOutputProperty(String, String) are not recognised. See Transformer.setOutputProperties(Properties) for more information.
See Also:
XMLComparator.compare(Source, Source, Result)

compare

public void compare(Reader r1,
                    Reader r2,
                    Writer result)
             throws PipelineProcessingException,
                    IdentityTransformerSetupException,
                    ComparatorInstantiationException,
                    ParserInstantiationException
Compares two Reader inputs and writes the result to a Writer.

Warning: Using this compare method with input data that refers to relative URIs is not recommended. We would recommend using compare(Source, Source, Result) and constructing StreamSources with a Reader and a systemId to ensure that relative URIs are referenced correctly.

Parameters:
r1 - the first Reader object to compare
r2 - the second Reader object to compare against the first
result - the Writer object to write the resulting difference to
Throws:
PipelineProcessingException - if an unrecoverable error occurs during the course of the comparison.
ComparatorInstantiationException - if a Comparator cannot be instantiated or configured.
IdentityTransformerSetupException - if an XSLT identity transformer cannot be instantiated or configured.
ParserInstantiationException - if a parser cannot be instaniated
IllegalArgumentException - is thrown if any of the properties set using setOutputProperty(String, String) are not recognised. See Transformer.setOutputProperties(Properties) for more information.
See Also:
XMLComparator.compare(Source, Source, Result), StreamSource

compare

public void compare(InputStream is1,
                    InputStream is2,
                    OutputStream result)
             throws PipelineProcessingException,
                    IdentityTransformerSetupException,
                    ComparatorInstantiationException,
                    ParserInstantiationException
Compares two InputStream inputs and writes the result to an OutputStream.

Warning: Using this compare method with input data that refers to relative URIs is not recommended. We would recommend using compare(Source, Source, Result) and constructing StreamSources with an InputStream and a systemId to ensure that relative URIs are referenced correctly.

Parameters:
is1 - the first InputStream to compare
is2 - the second InputStream to compare against the first
result - the OutputStream on which to write the resulting difference
Throws:
PipelineProcessingException - if an unrecoverable error occurs during the course of the comparison.
ComparatorInstantiationException - if a Comparator cannot be instantiated or configured.
IdentityTransformerSetupException - if an XSLT identity transformer cannot be instantiated or configured.
ParserInstantiationException - if a parser cannot be instaniated
IllegalArgumentException - is thrown if any of the properties set using setOutputProperty(String, String) are not recognised. See Transformer.setOutputProperties(Properties) for more information.
See Also:
XMLComparator.compare(Source, Source, Result), StreamSource

compare

public void compare(String s1,
                    String s2,
                    StringBuffer result)
             throws PipelineProcessingException,
                    IdentityTransformerSetupException,
                    ComparatorInstantiationException,
                    ParserInstantiationException
Compares two String inputs and writes the result to a StringBuffer.

Parameters:
s1 - the first String object to compare
s2 - the second String object to compare against the first
result - the StringBuffer in which to write the resulting difference
Throws:
PipelineProcessingException - if an unrecoverable error occurs during the course of the comparison.
ComparatorInstantiationException - if a Comparator cannot be instantiated or configured.
IdentityTransformerSetupException - if an XSLT identity transformer cannot be instantiated or configured.
ParserInstantiationException - if a parser cannot be instaniated
IllegalArgumentException - is thrown if any of the properties set using setOutputProperty(String, String) are not recognised. See Transformer.setOutputProperties(Properties) for more information.
See Also:
XMLComparator.compare(Source, Source, Result)

compare

public void compare(URL u1,
                    URL u2,
                    URL result)
             throws PipelineProcessingException,
                    IdentityTransformerSetupException,
                    ComparatorInstantiationException,
                    ParserInstantiationException
Compares two URL inputs and writes the result to a URL.

Parameters:
u1 - the first URL to compare
u2 - the second URL to compare against the first
result - the URL to write the resulting difference to
Throws:
PipelineProcessingException - if an unrecoverable error occurs during the course of the comparison.
ComparatorInstantiationException - if a Comparator cannot be instantiated or configured.
IdentityTransformerSetupException - if an XSLT identity transformer cannot be instantiated or configured.
ParserInstantiationException - if a parser cannot be instaniated
IllegalArgumentException - is thrown if any of the properties set using setOutputProperty(String, String) are not recognised. See Transformer.setOutputProperties(Properties) for more information.
See Also:
XMLComparator.compare(Source, Source, Result)

compare

public void compare(URL u1,
                    URL u2,
                    File result)
             throws PipelineProcessingException,
                    IdentityTransformerSetupException,
                    ComparatorInstantiationException,
                    ParserInstantiationException
Compares two URL inputs and writes the result to a File.

Parameters:
u1 - the first URL to compare
u2 - the second URL to compare against the first
result - the File in which to write the resulting difference
Throws:
PipelineProcessingException - if an unrecoverable error occurs during the course of the comparison.
ComparatorInstantiationException - if a Comparator cannot be instantiated or configured.
IdentityTransformerSetupException - if an XSLT identity transformer cannot be instantiated or configured.
ParserInstantiationException - if a parser cannot be instaniated
IllegalArgumentException - is thrown if any of the properties set using setOutputProperty(String, String) are not recognised. See Transformer.setOutputProperties(Properties) for more information.
See Also:
XMLComparator.compare(Source, Source, Result)

isEqual

public boolean isEqual(Source s1,
                       Source s2)
                throws PipelineProcessingException,
                       ComparatorInstantiationException,
                       ParserInstantiationException,
                       UnsupportedSourceException
Compares two Source inputs and returns whether they're equal.

Parameters:
s1 - the first Source to compare
s2 - the second Source to compare against the first
Returns:
whether the two input files are equal after they have been processed with the input filters
Throws:
PipelineProcessingException - if an unrecoverable error occurs during the course of the comparison.
ComparatorInstantiationException - if a Comparator cannot be instantiated or configured.
ParserInstantiationException - if a parser cannot be instaniated
UnsupportedSourceException - if an input Source subclass is not supported
Since:
5.0
See Also:
XMLComparator.isEqual(Source, Source)

isEqual

public boolean isEqual(File f1,
                       File f2)
                throws PipelineProcessingException,
                       ComparatorInstantiationException,
                       ParserInstantiationException
Compares two File inputs and returns whether they're equal.

Parameters:
f1 - the first File object to compare
f2 - the second File object to compare against the first
Returns:
whether the two input files are equal after they have been processed with the input filters
Throws:
PipelineProcessingException - if an unrecoverable error occurs during the course of the comparison.
ComparatorInstantiationException - if a Comparator cannot be instantiated or configured.
ParserInstantiationException - if a parser cannot be instaniated
Since:
5.0
See Also:
XMLComparator.isEqual(Source, Source)

isEqual

public boolean isEqual(Reader r1,
                       Reader r2)
                throws PipelineProcessingException,
                       ComparatorInstantiationException,
                       ParserInstantiationException
Compares two Reader inputs and returns whether they're equal.

Warning: Using this isEqual method with input data that refers to relative URIs is not recommended. We would recommend using isEqual(Source, Source) and constructing StreamSources with a Reader and a systemId to ensure that relative URIs are referenced correctly.

Parameters:
r1 - the first Reader object to compare
r2 - the second Reader object to compare against the first
Returns:
whether the two input files are equal after they have been processed with the input filters
Throws:
PipelineProcessingException - if an unrecoverable error occurs during the course of the comparison.
ComparatorInstantiationException - if a Comparator cannot be instantiated or configured.
ParserInstantiationException - if a parser cannot be instaniated
Since:
5.0
See Also:
XMLComparator.isEqual(Source, Source), StreamSource

isEqual

public boolean isEqual(InputStream is1,
                       InputStream is2)
                throws PipelineProcessingException,
                       ComparatorInstantiationException,
                       ParserInstantiationException
Compares two InputStream inputs and returns whether they're equal.

Warning: Using this compare method with input data that refers to relative URIs is not recommended. We would recommend using compare(Source, Source, Result) and constructing StreamSources with an InputStream and a systemId to ensure that relative URIs are referenced correctly.

Parameters:
is1 - the first InputStream to compare
is2 - the second InputStream to compare against the first
Returns:
whether the two input files are equal after they have been processed with the input filters
Throws:
PipelineProcessingException - if an unrecoverable error occurs during the course of the comparison.
ComparatorInstantiationException - if a Comparator cannot be instantiated or configured.
ParserInstantiationException - if a parser cannot be instaniated
Since:
5.0
See Also:
XMLComparator.isEqual(Source, Source), StreamSource

isEqual

public boolean isEqual(String s1,
                       String s2)
                throws PipelineProcessingException,
                       ComparatorInstantiationException,
                       ParserInstantiationException
Compares two String inputs and returns whether they're equal.

Parameters:
s1 - the first String object to compare
s2 - the second String object to compare against the first
Returns:
whether the two input files are equal after they have been processed with the input filters
Throws:
PipelineProcessingException - if an unrecoverable error occurs during the course of the comparison.
ComparatorInstantiationException - if a Comparator cannot be instantiated or configured.
ParserInstantiationException - if a parser cannot be instaniated
Since:
5.0
See Also:
XMLComparator.isEqual(Source, Source)

isEqual

public boolean isEqual(URL u1,
                       URL u2)
                throws PipelineProcessingException,
                       ComparatorInstantiationException,
                       ParserInstantiationException
Compares two URL inputs and returns whether they're equal.

Parameters:
u1 - the first URL to compare
u2 - the second URL to compare against the first
Returns:
whether the two input files are equal after they have been processed with the input filters
Throws:
PipelineProcessingException - if an unrecoverable error occurs during the course of the comparison.
ComparatorInstantiationException - if a Comparator cannot be instantiated or configured.
ParserInstantiationException - if a parser cannot be instaniated
Since:
5.0
See Also:
XMLComparator.isEqual(Source, Source)


Copyright 2001-2009 DeltaXML Ltd. All Rights Reserved.