Top Fields Constructors Methods
org.hibernate.boot.jaxb.internal

public abstract Class AbstractBinder

extends Object
implements Binder
Class Inheritance
All Implemented Interfaces
org.hibernate.boot.jaxb.spi.Binder
Known Direct Subclasses
org.hibernate.boot.jaxb.internal.MappingBinder
Imports
java.io.InputStream, javax.xml.bind.JAXBContext, .JAXBException, .Unmarshaller, javax.xml.stream.XMLEventReader, .XMLInputFactory, .XMLStreamException, javax.xml.stream.events.StartElement, .XMLEvent, javax.xml.transform.Source, javax.xml.validation.Schema, org.hibernate.boot.MappingException, org.hibernate.boot.jaxb.Origin, org.hibernate.boot.jaxb.internal.stax.BufferedXMLEventReader, .LocalXmlResourceResolver, org.hibernate.boot.jaxb.spi.Binder, .Binding, org.hibernate.boot.registry.classloading.spi.ClassLoaderService, org.hibernate.internal.util.StringHelper, org.jboss.logging.Logger

Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private static final Logger
private XMLInputFactory
private final boolean
private final LocalXmlResourceResolver

Constructor Summary

AccessConstructor and Description
protected
AbstractBinder(ClassLoaderService classLoaderService)

protected
AbstractBinder(ClassLoaderService classLoaderService, boolean validateXml)

Method Summary

Modifier and TypeMethod and Description
public Binding<T>
bind(InputStream
The InputStream containing XML
stream
,
Origin
The descriptor of the stream origin
origin
)

Implements org.hibernate.boot.jaxb.spi.Binder.bind.

Bind from an InputStream
public Binding<T>
bind(Source
The XML source.
source
,
Origin
The descriptor of the source origin
origin
)

Implements org.hibernate.boot.jaxb.spi.Binder.bind.

Bind from an XML source.
private XMLInputFactory
protected XMLEventReader
protected XMLEventReader
createReader(Source source, Origin origin)

private Binding<T>
doBind(XMLEventReader eventReader, Origin origin)

protected abstract Binding<T>
doBind(XMLEventReader staxEventReader, StartElement rootElementStartEvent, Origin origin)

protected static boolean
hasNamespace(StartElement startElement)

public boolean
protected <T> T
jaxb(XMLEventReader reader, Schema xsd, JAXBContext jaxbContext, Origin origin)

protected StartElement
private XMLInputFactory
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

logback to summary
private static final Logger log
staxFactoryback to summary
private XMLInputFactory staxFactory
validateXmlback to summary
private final boolean validateXml
xmlResourceResolverback to summary
private final LocalXmlResourceResolver xmlResourceResolver

Constructor Detail

AbstractBinderback to summary
protected AbstractBinder(ClassLoaderService classLoaderService)
AbstractBinderback to summary
protected AbstractBinder(ClassLoaderService classLoaderService, boolean validateXml)

Method Detail

bindback to summary
public Binding<T> bind(InputStream stream, Origin origin)

Implements org.hibernate.boot.jaxb.spi.Binder.bind.

Doc from org.hibernate.boot.jaxb.spi.Binder.bind.

Bind from an InputStream

Parameters
stream:InputStream

The InputStream containing XML

origin:Origin

The descriptor of the stream origin

Returns:Binding<T>

The bound JAXB model

Annotations
@Override
bindback to summary
public Binding<T> bind(Source source, Origin origin)

Implements org.hibernate.boot.jaxb.spi.Binder.bind.

Doc from org.hibernate.boot.jaxb.spi.Binder.bind.

Bind from an XML source.

Parameters
source:Source

The XML source.

origin:Origin

The descriptor of the source origin

Returns:Binding<T>

The bound JAXB model

Annotations
@Override
buildStaxFactoryback to summary
private XMLInputFactory buildStaxFactory()
Annotations
@SuppressWarnings:UnnecessaryLocalVariable
createReaderback to summary
protected XMLEventReader createReader(InputStream stream, Origin origin)
createReaderback to summary
protected XMLEventReader createReader(Source source, Origin origin)
doBindback to summary
private Binding<T> doBind(XMLEventReader eventReader, Origin origin)
doBindback to summary
protected abstract Binding<T> doBind(XMLEventReader staxEventReader, StartElement rootElementStartEvent, Origin origin)
hasNamespaceback to summary
protected static boolean hasNamespace(StartElement startElement)
isValidationEnabledback to summary
public boolean isValidationEnabled()
jaxbback to summary
protected <T> T jaxb(XMLEventReader reader, Schema xsd, JAXBContext jaxbContext, Origin origin)
Annotations
@SuppressWarnings:unchecked
seekRootElementStartEventback to summary
protected StartElement seekRootElementStartEvent(XMLEventReader staxEventReader, Origin origin)
staxFactoryback to summary
private XMLInputFactory staxFactory()