org.ov4j.comp
Class URIComparisonResult

java.lang.Object
  extended by org.ov4j.comp.ComparisonResult<java.net.URI>
      extended by org.ov4j.comp.URIComparisonResult

public class URIComparisonResult
extends ComparisonResult<java.net.URI>

This class is used to compare URIs.

Author:
smolloy

Constructor Summary
URIComparisonResult()
           
 
Method Summary
 void compute()
          Perform metric computation.
 void fastCompute()
          Perform fast computation, only setting precision to 1.0 to indicate that both items are the same or to anything else otherwise.
static java.net.URI normalizeURI(java.net.URI uri)
          Normalize the URI so it can be sorted and compared.
 
Methods inherited from class org.ov4j.comp.ComparisonResult
findComparisonResultClass, getChanged, getFalseNegatives, getFalsePositives, getMatches, getOriginal, getPrecision, getRecall, numFalseNegatives, numFalsePositives, numMatches, setChanged, setFalseNegatives, setFalsePositives, setMatches, setOriginal, setPrecision, setRecall
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URIComparisonResult

public URIComparisonResult()
Method Detail

normalizeURI

public static java.net.URI normalizeURI(java.net.URI uri)
                                 throws java.net.UnknownHostException,
                                        java.net.URISyntaxException
Normalize the URI so it can be sorted and compared. This will try to add missing ports according to protocol and replace hostname with IP address.

Parameters:
uri - URI to normalize.
Returns:
Normalized URI.
Throws:
java.net.UnknownHostException
java.net.URISyntaxException

compute

public void compute()
Description copied from class: ComparisonResult
Perform metric computation.

Specified by:
compute in class ComparisonResult<java.net.URI>
See Also:
ComparisonResult.compute()

fastCompute

public void fastCompute()
Description copied from class: ComparisonResult
Perform fast computation, only setting precision to 1.0 to indicate that both items are the same or to anything else otherwise.

Specified by:
fastCompute in class ComparisonResult<java.net.URI>
See Also:
ComparisonResult.fastCompute()


Copyright © 2004-2007 Steve Molloy. All Rights Reserved.