Class AliasInfo
- java.lang.Object
-
- dk.netarkivet.harvester.datamodel.AliasInfo
-
public class AliasInfo extends Object
Class encapsulating domain alias information. The information is used to prevent harvesting the domains which are aliases of other domains.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAliasOf()
String
getDomain()
Date
getExpirationDate()
The date when this alias will expire (or has expired).Date
getLastChange()
boolean
isExpired()
Is this alias expired? This method depends upon the Constant: dk.netarkivet.harvester.webinterface.Constants.ALIAS_TIMEOUT_IN_MILLISECONDS Note that this constant is now read from settings.String
toString()
-
-
-
Constructor Detail
-
AliasInfo
public AliasInfo(String domain, String aliasOf, Date lastChange) throws ArgumentNotValid
Constructor for the AliasInfo class.- Parameters:
domain
- a given domainaliasOf
- the given domain is an alias of this domainlastChange
- the alias was (re-)registered on this date.- Throws:
ArgumentNotValid
- in the following cases: 1. domain is null or empty 2. aliasOf is null or empty 3. lastChange is null 4. domain equals aliasOf
-
-
Method Detail
-
getAliasOf
public String getAliasOf()
- Returns:
- Returns the aliasOf.
-
getDomain
public String getDomain()
- Returns:
- Returns the domain.
-
getLastChange
public Date getLastChange()
- Returns:
- Returns the lastChange.
-
isExpired
public boolean isExpired()
Is this alias expired? This method depends upon the Constant: dk.netarkivet.harvester.webinterface.Constants.ALIAS_TIMEOUT_IN_MILLISECONDS Note that this constant is now read from settings.- Returns:
- true, if alias is expired
-
getExpirationDate
public Date getExpirationDate()
The date when this alias will expire (or has expired).- Returns:
- The expiration date for this alias. May be in the past or in the future.
-
toString
public String toString()
- Overrides:
toString
in classObject
- Returns:
- String representation of this AliasInfo object.
- See Also:
Object.toString()
-
-