dk.netarkivet.harvester.datamodel
Class SeedList

java.lang.Object
  extended by dk.netarkivet.harvester.datamodel.SeedList
All Implemented Interfaces:
Named, java.io.Serializable

public class SeedList
extends java.lang.Object
implements java.io.Serializable, Named

Representation of the list of harvesting seeds. Basically just a list of URL's

See Also:
Serialized Form

Constructor Summary
SeedList(java.lang.String name, java.util.List<java.lang.String> seeds)
          Create new seedlist.
SeedList(java.lang.String name, java.lang.String seedsAsString)
          Create new seedlist.
 
Method Summary
 boolean equals(java.lang.Object o)
          Auto generated by IntelliJ IDEA.
 java.lang.String getComments()
          Get the comments of this seedlist.
(package private)  long getID()
          Get the ID of this seedlist.
 java.lang.String getName()
          Get the name of this seedlist.
 java.util.List<java.lang.String> getSeeds()
          Gets all seeds in a list.
 java.lang.String getSeedsAsString()
          Gets the seeds.
 int hashCode()
          Auto generated by IntelliJ IDEA.
(package private)  boolean hasID()
          Check if this seedlist has an ID set yet (doesn't happen until the DBDAO persists it).
 void setComments(java.lang.String s)
          Set the comments for this list.
(package private)  void setID(long id)
          Set the ID of this seedlist.
 java.lang.String toString()
          Returns a human-readable representation of the seeds.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SeedList

public SeedList(java.lang.String name,
                java.lang.String seedsAsString)
Create new seedlist. Helper constructor that takes the seeds as a newline separated string.

Parameters:
name - the name of the new seedlist
seedsAsString - the seeds
Throws:
ArgumentNotValid - if name is null or empty or seeds are null. Empty seeds are allowed.

SeedList

public SeedList(java.lang.String name,
                java.util.List<java.lang.String> seeds)
Create new seedlist.

Parameters:
name - the name of the new seedlist
seeds - the seeds
Throws:
ArgumentNotValid - if the arguments are null or empty strings
Method Detail

getSeeds

public java.util.List<java.lang.String> getSeeds()
Gets all seeds in a list.

Returns:
The seeds

getSeedsAsString

public java.lang.String getSeedsAsString()
Gets the seeds. Seeds are separated by newline,

Returns:
the seedlist as a String

getName

public java.lang.String getName()
Get the name of this seedlist.

Specified by:
getName in interface Named
Returns:
The name.

getComments

public java.lang.String getComments()
Get the comments of this seedlist.

Specified by:
getComments in interface Named
Returns:
The comments.

setComments

public void setComments(java.lang.String s)
Set the comments for this list.

Parameters:
s - User-entered free-form comments.

getID

long getID()
Get the ID of this seedlist. Only for use by DBDAO

Returns:
the ID of this seedlist

setID

void setID(long id)
Set the ID of this seedlist. Only for use by DBDAO

Parameters:
id - the new ID of this seedlist

hasID

boolean hasID()
Check if this seedlist has an ID set yet (doesn't happen until the DBDAO persists it).

Returns:
true if this seedlist has an ID set

toString

public java.lang.String toString()
Returns a human-readable representation of the seeds.

Overrides:
toString in class java.lang.Object
Returns:
A readable string

equals

public boolean equals(java.lang.Object o)
Auto generated by IntelliJ IDEA.

Overrides:
equals in class java.lang.Object
Parameters:
o - The object to compare with
Returns:
Whether they are equal

hashCode

public int hashCode()
Auto generated by IntelliJ IDEA.

Overrides:
hashCode in class java.lang.Object
Returns:
hashcode