public class MessageContentFilter extends Filter implements java.lang.Cloneable
RESULT_NEUTRAL, RESULT_PASS, RESULT_REJECT, RESULT_WEAK_PASS, RESULT_WEAK_REJECT| Constructor and Description |
|---|
MessageContentFilter()
Create a Filter that will select based on particular types of information in packets.
|
| Modifier and Type | Method and Description |
|---|---|
int |
acceptAX25Frame(AX25Frame frame)
Indicate whether the specified message should be displayed or used
to determine if a station should be displayed (if recursively called from
acceptStation()).
|
int |
acceptMessage(AX25Message msg)
Indicate whether the specified message should be displayed or used
to determine if a station should be displayed (if recursively called from
acceptStation()).
|
int |
acceptStation(StationState ss)
Indicate whether the specified station should be displayed.
|
void |
addFilterChangeListener(FilterChangeListener l)
Register a listener for changes of this Filter.
|
boolean |
canRejectSome()
Specifies that this filter may reject some stations, messages, and/or frames.
|
java.lang.Object |
clone()
Creates and returns a copy of this object.
|
java.util.Iterator<java.lang.Enum> |
enumIterator()
Get an Iterator through all the WeatherEnum and DataExtensionEnum values supported by this filter.
|
java.lang.String |
getCommentText()
Get the text fragment used for comment text matching.
|
java.lang.String |
getDigipeater()
Get the digipeater callsign-SSID used for digipeater matching.
|
java.lang.String |
getFilterHelpTagName()
Report a tag name used to look up JavaHelp for a filter editor.
|
java.lang.String |
getFilterTypeTagName()
Report a tag name used to look up the labelling for an editor panel
for this editor instance in a ResourceBundle of translated names.
|
java.lang.String |
getFilterUIName()
Get the class name of a dynamically loadable class for the the GUI for this
filter.
|
float |
getLatAmbiguity()
Report the current position latitude ambiguity threshold being used for ambiguity testing.
|
boolean |
isAmbiguityLtLimit()
Report whether the filter is looking for position more precise or less precise than the threshold.
|
boolean |
isEnabled()
Report whether the entire MessageContentFilter is enabled to check for specific message contents.
|
boolean |
isEnabled(java.lang.Enum e)
Report whether filtering is enabled for messages containing the specified message token as
identified by a WeatherEnum or DataExtensionEnum.
|
boolean |
isNotMatch()
Report whether this filter will pass only packets matching the enabled filter elements, or those
not matching any of the enabled filter elements.
|
void |
removeFilterChangeListener(FilterChangeListener l)
Deregisters a listener.
|
void |
setAmbiguityLtLimit(boolean ambiguityLtLimit)
Specify whether the filter is looking for position more precise or less precise than the threshold.
|
void |
setCommentText(java.lang.String commentText)
Set the text fragment to use for free-text comment matching.
|
void |
setDigipeater(java.lang.String digipeater)
Set the digipeater callsign-SSID used for digipeater matching.
|
void |
setEnabled(boolean enabled)
Specify whether the entire MessageContentFilter is enabled to check for specific message contents.
|
void |
setEnabled(java.lang.Enum e,
boolean enabled)
Specify whether filtering is enabled for messages containing the specified message token as
identified by a WeatherEnum or DataExtensionEnum.
|
void |
setLatAmbiguity(float fLatAmbiguity)
Specify the current position latitude ambiguity threshold being used for ambiguity testing.
|
void |
setNotMatch(boolean notMatch)
Specify whether this filter will pass only packets matching the enabled filter elements, or those
not matching any of the enabled filter elements.
|
void |
setToPassall()
Reset the filter to a configuration that would pass the maximum
amount of messages, packets, and stations.
|
java.lang.String |
toString()
Returns a string representation of the object.
|
public MessageContentFilter()
public int acceptAX25Frame(AX25Frame frame)
acceptAX25Frame in class Filterframe - the timestamped AX25 frame record to analyzepublic java.lang.String getFilterTypeTagName()
getFilterTypeTagName in class Filterpublic java.lang.String getFilterHelpTagName()
getFilterHelpTagName in class Filterpublic java.lang.String getFilterUIName()
getFilterUIName in class Filterpublic int acceptStation(StationState ss)
acceptStation in class Filterss - StationState record to analyzepublic int acceptMessage(AX25Message msg)
acceptMessage in class Filtermsg - the APRS Message record to analyzepublic void addFilterChangeListener(FilterChangeListener l)
addFilterChangeListener in class Filterl - FilterChangeListener to registerpublic void removeFilterChangeListener(FilterChangeListener l)
removeFilterChangeListener in class Filterl - FilterChangeListener to deregisterpublic void setToPassall()
setToPassall in class Filterpublic boolean canRejectSome()
canRejectSome in class FiltersetToPassall()public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class Filterjava.lang.CloneNotSupportedException - if the object's class does not
support the Cloneable interface. Subclasses
that override the clone method can also
throw this exception to indicate that an instance cannot
be cloned.Cloneablepublic java.lang.String getCommentText()
public void setCommentText(java.lang.String commentText)
commentText - String of text fragment to search for in free-text commentspublic java.lang.String getDigipeater()
public void setDigipeater(java.lang.String digipeater)
digipeater - matching callsign Stringpublic boolean isEnabled(java.lang.Enum e)
throws java.lang.IllegalArgumentException
e - WeatherEnum or DataExtensionEnum to report onjava.lang.IllegalArgumentException - if not a supported Enum instancepublic void setEnabled(java.lang.Enum e,
boolean enabled)
e - WeatherEnum or DataExtensionEnum to report onenabled - boolean true if filter will test for and match only on messages containing the specified message parameterjava.lang.IllegalArgumentException - if not a supported Enum instancepublic boolean isEnabled()
public void setEnabled(boolean enabled)
enabled - boolean true if filter is enabledpublic boolean isNotMatch()
public void setNotMatch(boolean notMatch)
notMatch - boolean true if only non-matches will be passed, false if only complete matches will be passedpublic java.util.Iterator<java.lang.Enum> enumIterator()
public float getLatAmbiguity()
public void setLatAmbiguity(float fLatAmbiguity)
throws java.lang.IllegalArgumentException
fLatAmbiguity - position ambiguity threshold in fractional degreesjava.lang.IllegalArgumentException - if invalid (negative) ambiguity levelpublic boolean isAmbiguityLtLimit()
public void setAmbiguityLtLimit(boolean ambiguityLtLimit)
ambiguityLtLimit - boolean true if filter matches more precise positionspublic java.lang.String toString()
toString in class java.lang.Object