|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.biojava.bio.seq.io.filterxml.XMLAnnotationTypeWriter
public class XMLAnnotationTypeWriter
Main class for writing AnnotationTypes as XML. Knows about all the builtin classes of AnnotationType. It's possible to plug new ones in by calling one of the addXMLPropertyConstraintWriter methods.
Nested Class Summary | |
---|---|
static interface |
XMLAnnotationTypeWriter.XMLCollectionConstraintWriter
Writer for types of CollectionConstraint. |
static interface |
XMLAnnotationTypeWriter.XMLPropertyConstraintWriter
Writer for types of PropertyConstraint. |
Field Summary | |
---|---|
static java.lang.String |
XML_ANNOTATIONTYPE_NS
XML namespace string used to the AnnotationType representation |
Constructor Summary | |
---|---|
XMLAnnotationTypeWriter()
Construct a new AnnotationTypeWriter which knows about the builtin types of PropertyConstraint |
Method Summary | |
---|---|
void |
addXMLCollectionConstraintWriter(java.lang.Class clazz,
XMLAnnotationTypeWriter.XMLCollectionConstraintWriter xfw)
Register a writer for the specified class of collection constraint |
void |
addXMLCollectionConstraintWriter(CollectionConstraint pc,
XMLAnnotationTypeWriter.XMLCollectionConstraintWriter xfw)
Register a writer for a singleton property constraint. |
void |
addXMLPropertyConstraintWriter(java.lang.Class clazz,
XMLAnnotationTypeWriter.XMLPropertyConstraintWriter xfw)
Register a writer for the specified class of property constraint |
void |
addXMLPropertyConstraintWriter(PropertyConstraint pc,
XMLAnnotationTypeWriter.XMLPropertyConstraintWriter xfw)
Register a writer for a singleton property constraint. |
boolean |
isStrict()
Determine if this writer is in strict mode. |
void |
setIsStrict(boolean b)
Selects strict mode. |
void |
writeAnnotationType(AnnotationType at,
XMLWriter xw)
Write an AnnotationType to the specified XMLWriter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String XML_ANNOTATIONTYPE_NS
Constructor Detail |
---|
public XMLAnnotationTypeWriter()
Method Detail |
---|
public void addXMLPropertyConstraintWriter(java.lang.Class clazz, XMLAnnotationTypeWriter.XMLPropertyConstraintWriter xfw)
public void addXMLPropertyConstraintWriter(PropertyConstraint pc, XMLAnnotationTypeWriter.XMLPropertyConstraintWriter xfw)
public void addXMLCollectionConstraintWriter(java.lang.Class clazz, XMLAnnotationTypeWriter.XMLCollectionConstraintWriter xfw)
public void addXMLCollectionConstraintWriter(CollectionConstraint pc, XMLAnnotationTypeWriter.XMLCollectionConstraintWriter xfw)
public boolean isStrict()
public void setIsStrict(boolean b)
IllegalArgumentException
if it encounters a type of PropertyConstraint
it doesn't recognize. When not
in strict model, unrecognized constraints are silently replaced by PropertyConstraint.ANY
.
Default is false
.
public void writeAnnotationType(AnnotationType at, XMLWriter xw) throws java.lang.IllegalArgumentException, java.io.IOException
AnnotationType
to the specified XMLWriter.
java.lang.IllegalArgumentException
- if the AnnotationType contains unrecognized
constraints, and the writer is in strict mode.
java.io.IOException
- if an error occurs while outputting XML.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |