public class GlobalCrawlerTrapList extends Object
Modifier | Constructor and Description |
---|---|
|
GlobalCrawlerTrapList(InputStream is,
String name,
String description,
boolean isActive)
Construct a new GlobalCrawlerTrapList from an input stream consisting of newline-separated regular expressions.
|
protected |
GlobalCrawlerTrapList(int id,
List<String> traps,
String name,
String description,
boolean isActive)
Protected constructor used by the DAO to create instances of this class.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
String |
getDescription()
Get the description of this list.
|
int |
getId()
Get the id of this list.
|
String |
getName()
Get the name of the list.
|
Set<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(String description)
Set the description of this list.
|
protected void |
setId(int id)
Set the id of this list.
|
void |
setName(String name)
Set the name of the list.
|
void |
setTraps(Set<String> traps)
Set the trap expressions for this list.
|
void |
setTrapsFromInputStream(InputStream is)
A utility method to read the list of traps from an InputStream, line-by-line.
|
protected GlobalCrawlerTrapList(int id, List<String> traps, String name, 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(InputStream is, String name, 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.public void setTrapsFromInputStream(InputStream is) throws ArgumentNotValid
is
- The input stream from which to read.IOFailure
- if the input stream cannot be read.ArgumentNotValid
- if the input stream is null or if any of the specified traps are not valid regular
expressions.public int getId()
protected void setId(int id)
id
- the id.public Set<String> getTraps()
public void setTraps(Set<String> traps)
traps
- the trap expressions.public String getDescription()
public void setDescription(String description)
description
- the description.public boolean isActive()
public void setActive(boolean active)
active
- the activity state.Copyright © 2005–2015 The Royal Danish Library, the Danish State and University Library, the National Library of France and the Austrian National Library.. All rights reserved.