Top Description Inners Fields Constructors Methods
com.sun.xml.xsom.util

public Class DomAnnotationParserFactory

extends Object
implements AnnotationParserFactory
Class Inheritance
All Implemented Interfaces
com.sun.xml.xsom.parser.AnnotationParserFactory
Imports
com.sun.xml.xsom.XSAnnotation, com.sun.xml.xsom.parser.AnnotationContext, .AnnotationParser, .AnnotationParserFactory, javax.xml.XMLConstants, org.w3c.dom.Document, .Element, .Node, org.xml.sax.ContentHandler, .EntityResolver, .ErrorHandler, javax.xml.transform.TransformerConfigurationException, javax.xml.transform.dom.DOMResult, javax.xml.transform.sax.SAXTransformerFactory, .TransformerHandler

AnnotationParserFactory that parses annotations into a W3C DOM.

If you use this parser factory, you'll get Element that represents <xs:annotation> from XSAnnotation#getAnnotation().

When multiple <xs:annotation>s are found for the given schema component, you'll see all <xs:appinfo>s and <xs:documentation>s combined under one <xs:annotation> element.

Author
Kohsuke Kawaguchi

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private static final ContextClassloaderLocal<SAXTransformerFactory>

Constructor Summary

AccessConstructor and Description
public
DomAnnotationParserFactory()

Default constructor.

Method Summary

Modifier and TypeMethod and Description
public AnnotationParser
public AnnotationParser
create(boolean disableSecureProcessing)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

stfback to summary
private static final ContextClassloaderLocal<SAXTransformerFactory> stf

Constructor Detail

DomAnnotationParserFactoryback to summary
public DomAnnotationParserFactory()

Default constructor.

Method Detail

createback to summary
public AnnotationParser create()

Implements com.sun.xml.xsom.parser.AnnotationParserFactory.create.

createback to summary
public AnnotationParser create(boolean disableSecureProcessing)
com.sun.xml.xsom.util back to summary

private Class DomAnnotationParserFactory.AnnotationParserImpl

extends AnnotationParser
Class Inheritance

Field Summary

Modifier and TypeField and Description
private DOMResult
private final TransformerHandler
transformer

Identity transformer used to parse SAX into DOM.

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv
AnnotationParserImpl(boolean disableSecureProcessing)

Method Summary

Modifier and TypeMethod and Description
public ContentHandler
getContentHandler(AnnotationContext context, String parentElementName, ErrorHandler errorHandler, EntityResolver entityResolver)

Implements abstract com.sun.xml.xsom.parser.AnnotationParser.getContentHandler.

Called every time a new <xs:annotation> element is found.

public Object
getResult(Object existing)

Implements abstract com.sun.xml.xsom.parser.AnnotationParser.getResult.

Once the SAX events are fed to the ContentHandler, this method will be called to retrieve the parsed result.

Field Detail

resultback to summary
private DOMResult result
transformerback to summary
private final TransformerHandler transformer

Identity transformer used to parse SAX into DOM.

Constructor Detail

AnnotationParserImplback to summary
pack-priv AnnotationParserImpl()
AnnotationParserImplback to summary
pack-priv AnnotationParserImpl(boolean disableSecureProcessing)

Method Detail

getContentHandlerback to summary
public ContentHandler getContentHandler(AnnotationContext context, String parentElementName, ErrorHandler errorHandler, EntityResolver entityResolver)

Implements abstract com.sun.xml.xsom.parser.AnnotationParser.getContentHandler.

Doc from com.sun.xml.xsom.parser.AnnotationParser.getContentHandler.

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.

getResultback to summary
public Object getResult(Object existing)

Implements abstract com.sun.xml.xsom.parser.AnnotationParser.getResult.

Doc from com.sun.xml.xsom.parser.AnnotationParser.getResult.

Once the SAX events are fed to the ContentHandler, this method will be called to retrieve the parsed result.