Class DomAnnotationParserFactory.AnnotationParserImpl

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private javax.xml.transform.dom.DOMResult result  
      private javax.xml.transform.sax.TransformerHandler transformer
      Identity transformer used to parse SAX into DOM.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.xml.sax.ContentHandler getContentHandler​(AnnotationContext context, java.lang.String parentElementName, org.xml.sax.ErrorHandler errorHandler, org.xml.sax.EntityResolver entityResolver)
      Called every time a new <xs:annotation> element is found.
      java.lang.Object getResult​(java.lang.Object existing)
      Once the SAX events are fed to the ContentHandler, this method will be called to retrieve the parsed result.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • transformer

        private final javax.xml.transform.sax.TransformerHandler transformer
        Identity transformer used to parse SAX into DOM.
      • result

        private javax.xml.transform.dom.DOMResult result
    • Constructor Detail

      • AnnotationParserImpl

        AnnotationParserImpl()
      • AnnotationParserImpl

        AnnotationParserImpl​(boolean disableSecureProcessing)
    • Method Detail

      • getContentHandler

        public org.xml.sax.ContentHandler getContentHandler​(AnnotationContext context,
                                                            java.lang.String parentElementName,
                                                            org.xml.sax.ErrorHandler errorHandler,
                                                            org.xml.sax.EntityResolver entityResolver)
        Description copied from class: AnnotationParser
        Called every time a new <xs:annotation> element is found. The sub-tree rooted at <xs:annotation> will be sent to this ContentHandler as if it is a whole document.
        Specified by:
        getContentHandler in class AnnotationParser
        Parameters:
        context - indicates the schema component that owns this annotation. Always non-null.
        parentElementName - local name of the element that contains <xs:annotation>. (e.g., "element", "attribute", ... )
        errorHandler - The error handler that the client application specifies. The returned content handler can send its errors to this object.
        entityResolver - The entity resolver that is currently in use. Again, The returned content handler can use this object if it needs to resolve entities.
      • getResult

        public java.lang.Object getResult​(java.lang.Object existing)
        Description copied from class: AnnotationParser
        Once the SAX events are fed to the ContentHandler, this method will be called to retrieve the parsed result.
        Specified by:
        getResult in class AnnotationParser
        Parameters:
        existing - An annotation object which was returned from another AnnotationParser before. Sometimes, one schema component can have multiple <:xs:annotation> elements and this parameter is used to merge all those annotations together. If there is no existing object, null will be passed.
        Returns:
        Any object, including null.