org.biojava.bio.seq.io.filterxml
Class XMLAnnotationTypeHandler

java.lang.Object
  extended byorg.biojava.utils.stax.StAXContentHandlerBase
      extended byorg.biojava.bio.seq.io.filterxml.XMLAnnotationTypeHandler
All Implemented Interfaces:
StAXContentHandler

public class XMLAnnotationTypeHandler
extends StAXContentHandlerBase

StAX handler for parsing AnnotationTypes in FilterXML documents. Mainly used internally by XMLFilterHandler.

Since:
1.3
Author:
Thomas Down

Nested Class Summary
static interface XMLAnnotationTypeHandler.CollectionConstraintHandler
          Handler for an individual CollectionConstraint in an AnnotationType.
static interface XMLAnnotationTypeHandler.CollectionConstraintHandlerFactory
          Handler Factory for a CollectionConstraint in an AnnotationType.
static interface XMLAnnotationTypeHandler.PropertyConstraintHandler
          Handler for an individual PropertyConstraint in an AnnotationType.
static interface XMLAnnotationTypeHandler.PropertyConstraintHandlerFactory
          Handler Factory for a PropertyConstraint in an AnnotationType.
 
Constructor Summary
XMLAnnotationTypeHandler()
          Construct a new XMLAnnotationTypeHandler which can parse the builtin PropertyConstraints.
 
Method Summary
 void endElement(java.lang.String nsURI, java.lang.String localName, java.lang.String qName, StAXContentHandler delegate)
           
 AnnotationType getAnnotationType()
          Return the AnnotationType built by this handler
 void registerCollectionHandlerFactory(java.lang.String nsURI, java.lang.String localName, XMLAnnotationTypeHandler.CollectionConstraintHandlerFactory factory)
          Register a factory used to create handlers for the specified tag in an XML AnnotationType
 void registerPropertyHandlerFactory(java.lang.String nsURI, java.lang.String localName, XMLAnnotationTypeHandler.PropertyConstraintHandlerFactory factory)
          Register a factory used to create handlers for the specified tag in an XML AnnotationType
 void startElement(java.lang.String nsURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attrs, DelegationManager dm)
           
 
Methods inherited from class org.biojava.utils.stax.StAXContentHandlerBase
characters, endPrefixMapping, endTree, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startPrefixMapping, startTree
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLAnnotationTypeHandler

public XMLAnnotationTypeHandler()
Construct a new XMLAnnotationTypeHandler which can parse the builtin PropertyConstraints.

Method Detail

getAnnotationType

public AnnotationType getAnnotationType()
Return the AnnotationType built by this handler


registerPropertyHandlerFactory

public void registerPropertyHandlerFactory(java.lang.String nsURI,
                                           java.lang.String localName,
                                           XMLAnnotationTypeHandler.PropertyConstraintHandlerFactory factory)
Register a factory used to create handlers for the specified tag in an XML AnnotationType


registerCollectionHandlerFactory

public void registerCollectionHandlerFactory(java.lang.String nsURI,
                                             java.lang.String localName,
                                             XMLAnnotationTypeHandler.CollectionConstraintHandlerFactory factory)
Register a factory used to create handlers for the specified tag in an XML AnnotationType


startElement

public void startElement(java.lang.String nsURI,
                         java.lang.String localName,
                         java.lang.String qName,
                         org.xml.sax.Attributes attrs,
                         DelegationManager dm)
                  throws org.xml.sax.SAXException
Specified by:
startElement in interface StAXContentHandler
Overrides:
startElement in class StAXContentHandlerBase
Throws:
org.xml.sax.SAXException

endElement

public void endElement(java.lang.String nsURI,
                       java.lang.String localName,
                       java.lang.String qName,
                       StAXContentHandler delegate)
                throws org.xml.sax.SAXException
Specified by:
endElement in interface StAXContentHandler
Overrides:
endElement in class StAXContentHandlerBase
Throws:
org.xml.sax.SAXException