Package org.dlese.dpc.schemedit.url
Class DupSimUrlChecker
java.lang.Object
org.dlese.dpc.schemedit.url.DupSimUrlChecker
Checks for duplicate and similar urls within a specific collection.
- Author:
- ostwald
-
Constructor Summary
ConstructorsConstructorDescriptionDupSimUrlChecker(String referenceUrl, String collection, ServletContext servletContext) Constructor for the DupSimUrlChecker object, requiring ServletContext. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringGets the dateString attribute of the DupSimUrlChecker classgetDups()Returns a list records in "collection" that contain either a PrimaryURL or MirrorURL that is a dupliate of the provided url.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 ListmakeMirrorDupSims(ResultDocList results) Create a list of DupSim instances representing each of the MirrorUrls for each of the provided ResultDocs.
-
Constructor Details
-
DupSimUrlChecker
public DupSimUrlChecker(String referenceUrl, String collection, ServletContext servletContext) throws Exception Constructor for the DupSimUrlChecker object, requiring ServletContext.- Parameters:
referenceUrl- The url for which we look for duplicates and similar urlscollection- The collection we look inservletContext-- Throws:
Exception- if required helper objects cannot be found in the servlet context initialized.
-
-
Method Details
-
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
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
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
Gets the dateString attribute of the DupSimUrlChecker class- Returns:
- The dateString value
-