opendap.crawler
Class URLGroup

java.lang.Object
  extended by opendap.crawler.URLGroup
All Implemented Interfaces:
java.io.Serializable

public class URLGroup
extends java.lang.Object
implements java.io.Serializable

A URLGroup is a set of URLs each with the same number of components where each corresponding component of all the URLs either matches literally or is a member of an equivalence class. Since the number of components match, we can keep track of the variable in values for those components that fall into an equivalence class. Once all the URLs have been processed, the histograms built for for those equivalence classes can be used to alter the grouping.

Author:
jimg
See Also:
Serialized Form

Nested Class Summary
 class URLGroup.Equivalences
          An Enumeration of the equivalence classes that help define this group.
 class URLGroup.URLs
           
 
Constructor Summary
URLGroup(ParsedURL url, URLProcessedComponents pc)
          Build a new URLGroup and initialize it with a single URL.
 
Method Summary
 void add(ParsedURL url)
           
 URLProcessedComponents getClassifications()
           
 Equivalence getDateEquivalence()
          Search for the Equivalence that has the largest number of DatePart instances and return it.
 URLGroup.Equivalences getEquivalences()
          Use this to access the Equivalences that help define this group.
 int getNumberOfUrls()
          How many URLs are in this group?
 URLGroup.URLs getURLs()
          Get an instance of the Iteration over the URLs in this group.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

URLGroup

public URLGroup(ParsedURL url,
                URLProcessedComponents pc)
Build a new URLGroup and initialize it with a single URL.

Parameters:
url - The parsed URL
pc - Classifications for the parsed components
Throws:
java.lang.Exception
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getURLs

public URLGroup.URLs getURLs()
Get an instance of the Iteration over the URLs in this group.

Returns:
URLs: An iterator over the URLs in the group.

getNumberOfUrls

public int getNumberOfUrls()
How many URLs are in this group?

Returns:
The number of URL in the group.

getEquivalences

public URLGroup.Equivalences getEquivalences()
Use this to access the Equivalences that help define this group.

Returns:

add

public void add(ParsedURL url)

getDateEquivalence

public Equivalence getDateEquivalence()
Search for the Equivalence that has the largest number of DatePart instances and return it. This can be used to provide an ordering for the URLs in the URLGroup.

Returns:
An Equivalence for the component with the most date information. Return null if no Equivalence has date information.

getClassifications

public URLProcessedComponents getClassifications()