Package org.biojava.bio.seq.io.filterxml
Class XMLFilterWriter
java.lang.Object
org.biojava.bio.seq.io.filterxml.XMLFilterWriter
Write FeatureFilters in XML format.
- Since:
- 1.3
- Author:
- Thomas Down
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
Interface for an object which can write a FeatureFilter as XML. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstruct a newXMLFilterWriter
which can serialize the buildin types ofFeatureFilter
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addXMLFilterWriter
(Class clazz, XMLFilterWriter.FilterWriter xfw) Add a writer for the specified class of filtersvoid
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
-
Field Details
-
XML_FILTER_NS
- See Also:
-
-
Constructor Details
-
XMLFilterWriter
public XMLFilterWriter()Construct a newXMLFilterWriter
which can serialize the buildin types ofFeatureFilter
.
-
-
Method Details
-
addXMLFilterWriter
Add a writer for the specified class of filters -
addXMLFilterWriter
Add a writer for a singleton filter. -
isStrict
Determine if this writer is in strict mode. -
setIsStrict
Selects strict mode. In strict mode, the writer will throw anIllegalArgumentException
if it encounters a type ofFeatureFilter
it doesn't recognize. When not in strict model, unrecognized filters are silently replaced byFeatureFilter.all
. Default isfalse
. -
writeFilter
public void writeFilter(FeatureFilter ff, XMLWriter xw) throws IllegalArgumentException, IOException Write a FeatureFilter to the supplied XMLWriter- Throws:
IllegalArgumentException
- if the FeatureFilter is unrecognized, and the writer is in strict mode.IOException
- if an error occurs while outputting XML.
-