|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.iges.grads.server.MetadataFilter
A filter for whether metadata extracted from a dataset should be sent to the client. The filter tests pairs of the form (variable-name, attribute-name), with one of three possible results: the attribute should be included in the client metadata, removed from the client metadata, or neither, if the filter does not match.
| Field Summary | |
protected java.lang.String |
attName
|
protected java.lang.String |
attPrefix
|
protected java.lang.String |
attSuffix
|
static java.util.List |
COARDS_FILTERS
Filters to remove all COARDS metadata. |
protected boolean |
globalOnly
|
protected boolean |
sendIfMatch
|
protected java.lang.String |
varName
|
protected java.lang.String |
varPrefix
|
protected java.lang.String |
varSuffix
|
| Constructor Summary | |
MetadataFilter(java.lang.String varPrefix,
java.lang.String varSuffix,
java.lang.String varName,
boolean globalOnly,
java.lang.String attPrefix,
java.lang.String attSuffix,
java.lang.String attName,
boolean sendIfMatch)
Creates a filter. |
|
| Method Summary | |
static boolean |
attributePassesFilters(MetadataAttribute attribute,
java.util.List filters,
boolean defaultVal)
If any of the filters in the given list recommends removing the attribute, returns false. |
boolean |
equals(java.lang.Object obj)
|
protected boolean |
match(MetadataAttribute attribute)
Returns true if the variable name and attribute name match the prefixes, suffixes, and names given. |
boolean |
shouldInclude(MetadataAttribute attribute)
|
boolean |
shouldRemove(MetadataAttribute attribute)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected java.lang.String varPrefix
protected java.lang.String varSuffix
protected java.lang.String varName
protected boolean globalOnly
protected java.lang.String attPrefix
protected java.lang.String attSuffix
protected java.lang.String attName
protected boolean sendIfMatch
public static java.util.List COARDS_FILTERS
| Constructor Detail |
public MetadataFilter(java.lang.String varPrefix,
java.lang.String varSuffix,
java.lang.String varName,
boolean globalOnly,
java.lang.String attPrefix,
java.lang.String attSuffix,
java.lang.String attName,
boolean sendIfMatch)
throws AnagramException
varPrefix - The filter will match only when the variable
name starts with the string specified. The value of "" always
matches.varSuffix - The filter will match only when the variable
name ends with the string specified. The value of "" always
matches.varName - The filter will match only when the variable
name is exactly equal to the string specified. The value of ""
always matches.sendIfMatch - If true, the filter "includes" pairs that
match. If false, it "removes" pairs that match.| Method Detail |
public boolean shouldRemove(MetadataAttribute attribute)
public boolean shouldInclude(MetadataAttribute attribute)
protected boolean match(MetadataAttribute attribute)
public static boolean attributePassesFilters(MetadataAttribute attribute,
java.util.List filters,
boolean defaultVal)
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||