|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.netarkivet.harvester.datamodel.GlobalCrawlerTrapList
public class GlobalCrawlerTrapList
Class representing one or more global crawler traps, modelled as a list of regular expressions.
Constructor Summary | |
---|---|
|
GlobalCrawlerTrapList(java.io.InputStream is,
java.lang.String name,
java.lang.String description,
boolean isActive)
Construct a new GlobalCrawlerTrapList from an input stream consisting of newline-separated regular expressions. |
protected |
GlobalCrawlerTrapList(int id,
java.util.List<java.lang.String> traps,
java.lang.String name,
java.lang.String description,
boolean isActive)
Protected constructor used by the DAO to create instances of this class. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object o)
|
java.lang.String |
getDescription()
Get the description of this list. |
int |
getId()
Get the id of this list. |
java.lang.String |
getName()
Get the name of the list. |
java.util.Set<java.lang.String> |
getTraps()
Get the trap expressions for this list. |
int |
hashCode()
|
boolean |
isActive()
Retruns true if this list is active. |
void |
setActive(boolean active)
Set the activity state of the list. |
void |
setDescription(java.lang.String description)
Set the description of this list. |
protected void |
setId(int id)
Set the id of this list. |
void |
setName(java.lang.String name)
Set the name of the list. |
void |
setTraps(java.util.Set<java.lang.String> traps)
Set the trap expressions for this list. |
void |
setTrapsFromInputStream(java.io.InputStream is)
A utility method to read the list of traps from an InputStream, line-by-line. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected GlobalCrawlerTrapList(int id, java.util.List<java.lang.String> traps, java.lang.String name, java.lang.String description, boolean isActive) throws ArgumentNotValid
id
- the id of this list.name
- a name by which this list is known.traps
- the set of trap expressions.description
- A textual description of this list (may be null).isActive
- flag indicating whether this list is isActive.
ArgumentNotValid
- if the name is empty or null.public GlobalCrawlerTrapList(java.io.InputStream is, java.lang.String name, java.lang.String description, boolean isActive) throws IOFailure, ArgumentNotValid
is
- an input stream from which the list of trap expressions
can be read.name
- a name by which this list is known.description
- A textual description of this list.isActive
- flag indicating whether this list is isActive.
IOFailure
- if the input stream cannot be found or read.
ArgumentNotValid
- if the input stream is null or the name is
null or empty.Method Detail |
---|
public java.lang.String getName()
public void setName(java.lang.String name)
name
- the name.public void setTrapsFromInputStream(java.io.InputStream is)
is
- The input stream from which to read.
IOFailure
- if the input stream cannot be read.
ArgumentNotValid
- if the input stream is nullpublic int getId()
protected void setId(int id)
id
- the id.public java.util.Set<java.lang.String> getTraps()
public void setTraps(java.util.Set<java.lang.String> traps)
traps
- the trap expressions.public java.lang.String getDescription()
public void setDescription(java.lang.String description)
description
- the description.public boolean isActive()
public void setActive(boolean active)
active
- the activity state.public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |