com.ibm.adt.topology.comparator
Interface TopologyComparator

All Known Implementing Classes:
TopologyComparatorImpl

public interface TopologyComparator


Method Summary
 void applyFilter(ComparatorFilter filter)
          Allows specification of filters to be applied to the compare() function.
 void clearResults()
          Clears the result set so that the comparator instance may be reused.
 java.util.Collection compare(TopologyObject o1, TopologyObject o2, boolean recurse)
          Compares the topology starting at the specified TopologyObject objects.
 AdditionalInfo getAdditionalInfo(java.lang.Object po)
          Gather additional information about a given PropertyObject so that it may be reflected in the comparator output.
 ComparatorFilter[] getFilters()
          Returns an array containing all of the currently applied filters.
 java.util.Collection getResults()
          Returns the result set of the previous compare opertain in the form of a collection of Object[2] arrays.
 java.io.OutputStream resultsToXml(org.w3c.dom.Element compareInputXml)
          Formats the result to an xml file in the form as defined by TopologyComparator.xsd.
 

Method Detail

compare

java.util.Collection compare(TopologyObject o1,
                             TopologyObject o2,
                             boolean recurse)
                             throws TopologyComparatorException,
                                    TopologyException
Compares the topology starting at the specified TopologyObject objects. TopologyObject must of the same type.

Parameters:
o1 - reference TopologyObject
o2 - delta TopologyObject
recurse - specifes whether to recurse the topology
Returns:
result set in the form of a collection of Object[2] objects
Throws:
TopologyComparatorException
TopologyException

getResults

java.util.Collection getResults()
Returns the result set of the previous compare opertain in the form of a collection of Object[2] arrays.

Returns:
the result set of the last compare

clearResults

void clearResults()
Clears the result set so that the comparator instance may be reused.


applyFilter

void applyFilter(ComparatorFilter filter)
Allows specification of filters to be applied to the compare() function.

Parameters:
filter -

resultsToXml

java.io.OutputStream resultsToXml(org.w3c.dom.Element compareInputXml)
                                  throws TopologyComparatorException
Formats the result to an xml file in the form as defined by TopologyComparator.xsd.

Parameters:
compareInputXml - if specified, the element is copied into the reulting output xml.
Returns:
an OutputStream with the resulting xml
Throws:
TopologyComparatorException

getFilters

ComparatorFilter[] getFilters()
Returns an array containing all of the currently applied filters.

Returns:
an array of ComparatorFilter objects

getAdditionalInfo

AdditionalInfo getAdditionalInfo(java.lang.Object po)
Gather additional information about a given PropertyObject so that it may be reflected in the comparator output. A TopologyProvider implementation may choose to override this method to provide customization of this output.

Parameters:
po - specifies the PropertyObject


© Copyright 2006 IBM Corp. 2006 All Rights Reserved