Class SeedList
- java.lang.Object
-
- 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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
Auto generated by IntelliJ IDEA.java.lang.String
getComments()
Get the comments 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.void
setComments(java.lang.String s)
Set the comments for this list.java.lang.String
toString()
Returns a human-readable representation of the seeds.
-
-
-
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 seedlistseedsAsString
- 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 seedlistseeds
- 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.
-
getComments
public java.lang.String getComments()
Get the comments of this seedlist.- Specified by:
getComments
in interfaceNamed
- Returns:
- The comments.
-
setComments
public void setComments(java.lang.String s)
Set the comments for this list.- Parameters:
s
- User-entered free-form comments.
-
toString
public java.lang.String toString()
Returns a human-readable representation of the seeds.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A readable string
-
equals
public boolean equals(java.lang.Object o)
Auto generated by IntelliJ IDEA.- Overrides:
equals
in classjava.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 classjava.lang.Object
- Returns:
- hashcode
-
-