Top Inners Fields Constructors Methods
org.hibernate.boot.cfgxml.internal

public Class JaxbCfgProcessor

extends Object
Class Inheritance
Imports
org.hibernate.HibernateException, org.hibernate.boot.jaxb.Origin, org.hibernate.boot.jaxb.cfg.spi.JaxbCfgHibernateConfiguration, org.hibernate.boot.jaxb.internal.stax.LocalXmlResourceResolver, org.hibernate.boot.registry.classloading.spi.ClassLoaderService, org.hibernate.internal.util.StringHelper, org.hibernate.internal.util.config.ConfigurationException, org.hibernate.internal.util.xml.XsdException, org.jboss.logging.Logger, org.xml.sax.SAXException, javax.xml.XMLConstants, jakarta.xml.bind.JAXBContext, .JAXBException, .Unmarshaller, .ValidationEvent, .ValidationEventHandler, .ValidationEventLocator, javax.xml.namespace.QName, javax.xml.stream.XMLEventFactory, .XMLEventReader, .XMLInputFactory, .XMLStreamException, javax.xml.stream.events.Namespace, .StartElement, .XMLEvent, javax.xml.stream.util.EventReaderDelegate, javax.xml.transform.stream.StreamSource, javax.xml.validation.Schema, .SchemaFactory, java.io.IOException, .InputStream, java.net.URL, java.util.ArrayList, .Iterator, .List

Author
Steve Ebersole

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
public static class

Field Summary

Modifier and TypeField and Description
private final ClassLoaderService
public static final String
private static final Logger
private Schema
private XMLInputFactory
private final LocalXmlResourceResolver

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private XMLInputFactory
private boolean
isNamespaced(StartElement startElement)

private Schema
private Schema
resolveLocalSchema(String schemaName, String schemaLanguage)

private Schema
private XMLInputFactory
public JaxbCfgHibernateConfiguration
unmarshal(InputStream stream, Origin origin)

private JaxbCfgHibernateConfiguration
unmarshal(XMLEventReader staxEventReader, final Origin origin)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

classLoaderServiceback to summary
private final ClassLoaderService classLoaderService
HIBERNATE_CONFIGURATION_URIback to summary
public static final String HIBERNATE_CONFIGURATION_URI
logback to summary
private static final Logger log
schemaback to summary
private Schema schema
staxFactoryback to summary
private XMLInputFactory staxFactory
xmlResourceResolverback to summary
private final LocalXmlResourceResolver xmlResourceResolver

Constructor Detail

JaxbCfgProcessorback to summary
public JaxbCfgProcessor(ClassLoaderService classLoaderService)

Method Detail

buildStaxFactoryback to summary
private XMLInputFactory buildStaxFactory()
isNamespacedback to summary
private boolean isNamespaced(StartElement startElement)
resolveLocalSchemaback to summary
private Schema resolveLocalSchema(String schemaName)
resolveLocalSchemaback to summary
private Schema resolveLocalSchema(String schemaName, String schemaLanguage)
schemaback to summary
private Schema schema()
staxFactoryback to summary
private XMLInputFactory staxFactory()
unmarshalback to summary
public JaxbCfgHibernateConfiguration unmarshal(InputStream stream, Origin origin)
unmarshalback to summary
private JaxbCfgHibernateConfiguration unmarshal(XMLEventReader staxEventReader, final Origin origin)
org.hibernate.boot.cfgxml.internal back to summary

pack-priv Class JaxbCfgProcessor.ContextProvidingValidationEventHandler

extends Object
implements ValidationEventHandler
Class Inheritance
  • java.lang.Object
  • org.hibernate.boot.cfgxml.internal.JaxbCfgProcessor.ContextProvidingValidationEventHandler
All Implemented Interfaces
jakarta.xml.bind.ValidationEventHandler

Field Summary

Modifier and TypeField and Description
private int
private int
private String

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public int
public int
public String
public boolean
handleEvent(ValidationEvent
the encapsulated validation event information. It is a provider error if this parameter is null.
validationEvent
)

Implements jakarta.xml.bind.ValidationEventHandler.handleEvent.

Receive notification of a validation warning or error.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

columnNumberback to summary
private int columnNumber
lineNumberback to summary
private int lineNumber
messageback to summary
private String message

Constructor Detail

ContextProvidingValidationEventHandlerback to summary
pack-priv ContextProvidingValidationEventHandler()

Method Detail

getColumnNumberback to summary
public int getColumnNumber()
getLineNumberback to summary
public int getLineNumber()
getMessageback to summary
public String getMessage()
handleEventback to summary
public boolean handleEvent(ValidationEvent validationEvent)

Implements jakarta.xml.bind.ValidationEventHandler.handleEvent.

Doc from jakarta.xml.bind.ValidationEventHandler.handleEvent.

Receive notification of a validation warning or error. The ValidationEvent will have a ValidationEventLocator embedded in it that indicates where the error or warning occurred.

If an unchecked runtime exception is thrown from this method, the Jakarta XML Binding provider will treat it as if the method returned false and interrupt the current unmarshal, validate, or marshal operation.

Parameters
validationEvent:ValidationEvent

the encapsulated validation event information. It is a provider error if this parameter is null.

Returns:boolean

true if the Jakarta XML Binding Provider should attempt to continue the current unmarshal, validate, or marshal operation after handling this warning/error, false if the provider should terminate the current operation with the appropriate UnmarshalException, ValidationException, or MarshalException.

Annotations
@Override
org.hibernate.boot.cfgxml.internal back to summary

public Class JaxbCfgProcessor.NamespaceAddingEventReader

extends EventReaderDelegate
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final String
private final XMLEventFactory

Constructor Summary

AccessConstructor and Description
public
public
NamespaceAddingEventReader(XMLEventReader reader, XMLEventFactory xmlEventFactory, String namespaceUri)

Method Summary

Modifier and TypeMethod and Description
public XMLEvent
public XMLEvent
peek()

Overrides javax.xml.stream.util.EventReaderDelegate.peek.

Implements javax.xml.stream.XMLEventReader.peek.

Check the next XMLEvent without reading it from the stream.
private StartElement
Inherited from javax.xml.stream.util.EventReaderDelegate:
closegetElementTextgetParentgetPropertyhasNextnextnextTagremovesetParent

Field Detail

namespaceUriback to summary
private final String namespaceUri
xmlEventFactoryback to summary
private final XMLEventFactory xmlEventFactory

Constructor Detail

NamespaceAddingEventReaderback to summary
public NamespaceAddingEventReader(XMLEventReader reader, String namespaceUri)
NamespaceAddingEventReaderback to summary
public NamespaceAddingEventReader(XMLEventReader reader, XMLEventFactory xmlEventFactory, String namespaceUri)

Method Detail

nextEventback to summary
public XMLEvent nextEvent() throws XMLStreamException

Overrides javax.xml.stream.util.EventReaderDelegate.nextEvent.

Implements javax.xml.stream.XMLEventReader.nextEvent.

Doc from javax.xml.stream.XMLEventReader.nextEvent.

Gets the next XMLEvent. The initial event is StartDocument.

Returns:XMLEvent

the next XMLEvent

Annotations
@Override
Exceptions
XMLStreamException:
if there is an error with the underlying XML.
peekback to summary
public XMLEvent peek() throws XMLStreamException

Overrides javax.xml.stream.util.EventReaderDelegate.peek.

Implements javax.xml.stream.XMLEventReader.peek.

Doc from javax.xml.stream.XMLEventReader.peek.

Check the next XMLEvent without reading it from the stream. Returns null if the stream is at EOF or has no more XMLEvents. A call to peek() will be equal to the next return of next().

Returns:XMLEvent

the next XMLEvent

Annotations
@Override
Exceptions
XMLStreamException:
if an error occurs
withNamespaceback to summary
private StartElement withNamespace(StartElement startElement)