DLESE Tools
v1.6.0

org.dlese.dpc.suggest.resource.urlcheck
Class UrlValidator

java.lang.Object
  extended by org.dlese.dpc.suggest.resource.urlcheck.UrlValidator

public class UrlValidator
extends Object

Uses the Search Web Service (DDSWS v1.0) to search a repository (or a collection within a repository) for ADN records having duplicate and/or similar urls in it's primary or mirrorUrl fields.

The primary method is validate, which takes a referenceUrl, and returns a ValidatorResults instance that stores information about records that contain duplicate and similar urls in the PrimaryURL and MirrorUrl fields.

Version:
$Id: UrlValidator.java,v 1.3 2009/03/20 23:34:00 jweather Exp $
Author:
ostwald

$Id $


Constructor Summary
UrlValidator(SearchServiceClient searchServiceClient, String referenceCollection)
          Constructor for the UrlValidator object
UrlValidator(String searchServiceBaseUrl, String referenceCollection)
          Constructor for the UrlValidator object
 
Method Summary
 String getReferenceCollection()
          Gets the referenceCollection attribute of the UrlValidator object
static void main(String[] args)
          The main program for the UrlValidator class
static void setDebug(boolean bool)
          Sets the debug attribute of the UrlValidator class
 ValidatorResults validate(String referenceUrl)
          Return a ValidatorResults instance containing the results of a query to find duplicate and similiar urls in the primaryUrl and mirrorUrl fields of repository records.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UrlValidator

public UrlValidator(String searchServiceBaseUrl,
                    String referenceCollection)
Constructor for the UrlValidator object

Parameters:
searchServiceBaseUrl - base url of the Search Service used to validate a url
referenceCollection - NOT YET DOCUMENTED

UrlValidator

public UrlValidator(SearchServiceClient searchServiceClient,
                    String referenceCollection)
Constructor for the UrlValidator object

Parameters:
searchServiceClient - base url of the Search Service used to validate a url
referenceCollection - NOT YET DOCUMENTED
Method Detail

getReferenceCollection

public String getReferenceCollection()
Gets the referenceCollection attribute of the UrlValidator object

Returns:
The referenceCollection value

validate

public ValidatorResults validate(String referenceUrl)
Return a ValidatorResults instance containing the results of a query to find duplicate and similiar urls in the primaryUrl and mirrorUrl fields of repository records.

Parameters:
referenceUrl - The url to be validated
Returns:
Description of the Return Value

main

public static void main(String[] args)
                 throws Exception
The main program for the UrlValidator class

Parameters:
args - The command line arguments
Throws:
Exception - Description of the Exception

setDebug

public static void setDebug(boolean bool)
Sets the debug attribute of the UrlValidator class

Parameters:
bool - The new debug value

DLESE Tools
v1.6.0