DLESE Tools
v1.6.0

org.dlese.dpc.schemedit.url
Class DupSimUrlChecker

java.lang.Object
  extended by org.dlese.dpc.schemedit.url.DupSimUrlChecker

public class DupSimUrlChecker
extends Object

Checks for duplicate and similar urls within a specific collection.

Author:
ostwald


Constructor Summary
DupSimUrlChecker(String referenceUrl, String collection, ServletContext servletContext)
          Constructor for the DupSimUrlChecker object, requiring ServletContext.
 
Method Summary
static String getDateString()
          Gets the dateString attribute of the DupSimUrlChecker class
 List getDups()
          Returns a list records in "collection" that contain either a PrimaryURL or MirrorURL that is a dupliate of the provided url.
 List getSims()
          Returns a list of DupSim instances that represent records in "collection" that contain either a PrimaryURL or MirrorURL similar to the provided url.
static List makeMirrorDupSims(ResultDocList results)
          Create a list of DupSim instances representing each of the MirrorUrls for each of the provided ResultDocs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DupSimUrlChecker

public DupSimUrlChecker(String referenceUrl,
                        String collection,
                        ServletContext servletContext)
                 throws Exception
Constructor for the DupSimUrlChecker object, requiring ServletContext.

Parameters:
servletContext -
referenceUrl - The url for which we look for duplicates and similar urls
collection - The collection we look in
Throws:
Exception - if required helper objects cannot be found in the servlet context initialized.
Method Detail

getDups

public List getDups()
Returns a list records in "collection" that contain either a PrimaryURL or MirrorURL that is a dupliate of the provided url.

Returns:
List of DupSim instances

getSims

public List getSims()
Returns a list of DupSim instances that represent records in "collection" that contain either a PrimaryURL or MirrorURL similar to the provided url.

Returns:
List of DupSim instances

makeMirrorDupSims

public static List makeMirrorDupSims(ResultDocList results)
Create a list of DupSim instances representing each of the MirrorUrls for each of the provided ResultDocs.

Parameters:
results - An array of ResultDocs from which to extract the MirrorUrl values
Returns:
A list of DupSims containing all the MirrorUrls found in results.

getDateString

public static String getDateString()
Gets the dateString attribute of the DupSimUrlChecker class

Returns:
The dateString value

DLESE Tools
v1.6.0