org.archive.crawler.settings.refinements
Class PortnumberCriteria

java.lang.Object
  extended by org.archive.crawler.settings.refinements.PortnumberCriteria
All Implemented Interfaces:
Criteria

public class PortnumberCriteria
extends java.lang.Object
implements Criteria

A refinement criterion that checks if a URI matches a specific port number.

If the port number is not known it will try to use the default port number for the URI's scheme.

Author:
John Erik Halse

Constructor Summary
PortnumberCriteria()
          Create a new instance of PortnumberCriteria.
PortnumberCriteria(java.lang.String portNumber)
          Create a new instance of PortnumberCriteria.
 
Method Summary
 java.lang.String getDescription()
          Returns a description of the Criteria's current settings.
 java.lang.String getName()
          Returns the name of the Criteria type.
 java.lang.String getPortNumber()
          Get the port number that is to be checked against a URI.
 boolean isWithinRefinementBounds(UURI uri)
          Check if a uri is within the bounds of this criteria.
 void setPortNumber(java.lang.String portNumber)
          Set the port number that is to be checked against a URI.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PortnumberCriteria

public PortnumberCriteria()
Create a new instance of PortnumberCriteria.


PortnumberCriteria

public PortnumberCriteria(java.lang.String portNumber)
Create a new instance of PortnumberCriteria.

Parameters:
portNumber - the port number for this criteria.
Method Detail

isWithinRefinementBounds

public boolean isWithinRefinementBounds(UURI uri)
Description copied from interface: Criteria
Check if a uri is within the bounds of this criteria.

Specified by:
isWithinRefinementBounds in interface Criteria
Parameters:
uri - the UURI to check.
Returns:
true if the curi is within the bounds.

getPortNumber

public java.lang.String getPortNumber()
Get the port number that is to be checked against a URI.

Returns:
Returns the portNumber.

setPortNumber

public void setPortNumber(java.lang.String portNumber)
Set the port number that is to be checked against a URI.

Parameters:
portNumber - The portNumber to set.

getName

public java.lang.String getName()
Description copied from interface: Criteria
Returns the name of the Criteria type.

Specified by:
getName in interface Criteria
Returns:
the name of the Criteria type

getDescription

public java.lang.String getDescription()
Description copied from interface: Criteria
Returns a description of the Criteria's current settings.

Specified by:
getDescription in interface Criteria
Returns:
a description of the Criteria's current settings.


Copyright © 2003-2011 Internet Archive. All Rights Reserved.