uk.ac.ic.doc.automed.matching
Class SimilarSchemaElementPair

java.lang.Object
  extended by uk.ac.ic.doc.automed.matching.SchemaElementPair
      extended by uk.ac.ic.doc.automed.matching.SimilarSchemaElementPair
All Implemented Interfaces:
java.lang.Comparable

public class SimilarSchemaElementPair
extends SchemaElementPair
implements java.lang.Comparable

The class representing a pair of schema elements and its bidirectional similarity degrees. As in SchemaElementPair the index of the schema element matters.

See Also:
BidirectionalDegree

Constructor Summary
SimilarSchemaElementPair(SchemaElementPair pair, BidirectionalDegree degree)
          Constructs a SimilarSchemaElementPair object.
SimilarSchemaElementPair(SchemaElement first, SchemaElement second, BidirectionalDegree degree)
          Constructs a SimilarSchemaElementPair object.
 
Method Summary
 int compareTo(java.lang.Object o)
           
 BidirectionalDegree getDegree()
          Returns the bidirectional degree of this pair.
static java.util.Hashtable merge(java.util.Hashtable table1, java.util.Hashtable table2)
          Returns a Hashtable with the merged bidirectional degrees defined in the arguments.
 java.lang.String toString()
           
static void writeSimilarSchemaElementPairs(java.lang.String fileprefix, SimilarSchemaElementPair[] pairs)
           
 
Methods inherited from class uk.ac.ic.doc.automed.matching.SchemaElementPair
equals, getElement, getFirstElement, getSecondElement, hashCode, setFirstElement, setSecondElement
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimilarSchemaElementPair

public SimilarSchemaElementPair(SchemaElement first,
                                SchemaElement second,
                                BidirectionalDegree degree)
Constructs a SimilarSchemaElementPair object.

Parameters:
first - the first element of the pair
second - the second element of the pair
degree - the bidirectionan similarity degrees of the pair

SimilarSchemaElementPair

public SimilarSchemaElementPair(SchemaElementPair pair,
                                BidirectionalDegree degree)
Constructs a SimilarSchemaElementPair object.

Parameters:
pair - the schema element pair
degree - the bidirectionan similarity degrees of the pair
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class SchemaElementPair

getDegree

public BidirectionalDegree getDegree()
Returns the bidirectional degree of this pair.

Returns:
the bidirectional degree of this pair.

writeSimilarSchemaElementPairs

public static void writeSimilarSchemaElementPairs(java.lang.String fileprefix,
                                                  SimilarSchemaElementPair[] pairs)
                                           throws java.io.IOException
Throws:
java.io.IOException

merge

public static java.util.Hashtable merge(java.util.Hashtable table1,
                                        java.util.Hashtable table2)
Returns a Hashtable with the merged bidirectional degrees defined in the arguments. The input arguments and the returned value are hash tables which associate SchemaElementPair objects to SimilarSchemaElementPair objects. The merging process produces for each pair of schema elements that appear in the input hash tables the average bidirectional degrees.

Returns:
a Hashtable with the merged bidirectional degrees.

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable