public class XMLFilterWriter extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
XMLFilterWriter.FilterWriter
Interface for an object which can write a FeatureFilter as XML.
|
Modifier and Type | Field and Description |
---|---|
static String |
XML_FILTER_NS |
Constructor and Description |
---|
XMLFilterWriter()
Construct a new
XMLFilterWriter which can serialize the buildin types of
FeatureFilter . |
Modifier and Type | Method and Description |
---|---|
void |
addXMLFilterWriter(Class clazz,
XMLFilterWriter.FilterWriter xfw)
Add a writer for the specified class of filters
|
void |
addXMLFilterWriter(FeatureFilter ff,
XMLFilterWriter.FilterWriter xfw)
Add a writer for a singleton filter.
|
boolean |
isStrict()
Determine if this writer is in strict mode.
|
void |
setIsStrict(boolean b)
Selects strict mode.
|
void |
writeFilter(FeatureFilter ff,
XMLWriter xw)
Write a FeatureFilter to the supplied XMLWriter
|
public static final String XML_FILTER_NS
public XMLFilterWriter()
XMLFilterWriter
which can serialize the buildin types of
FeatureFilter
.public void addXMLFilterWriter(Class clazz, XMLFilterWriter.FilterWriter xfw)
public void addXMLFilterWriter(FeatureFilter ff, XMLFilterWriter.FilterWriter xfw)
public boolean isStrict()
public void setIsStrict(boolean b)
IllegalArgumentException
if it encounters a type of FeatureFilter
it doesn't recognize. When not
in strict model, unrecognized filters are silently replaced by FeatureFilter.all
.
Default is false
.public void writeFilter(FeatureFilter ff, XMLWriter xw) throws IllegalArgumentException, IOException
IllegalArgumentException
- if the FeatureFilter is unrecognized, and the writer is
in strict mode.IOException
- if an error occurs while outputting XML.Copyright © 2020 BioJava. All rights reserved.