Class UrlValidator

java.lang.Object
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 Details

    • 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 Details

    • 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