Module org.eclipse.persistence.core
Class XMLReader
java.lang.Object
org.eclipse.persistence.internal.oxm.record.XMLReader
- All Implemented Interfaces:
XMLReader
- Direct Known Subclasses:
XMLReaderAdapter
INTERNAL:
Purpose:Provide a wrapper for an org.xml.sax.XMLReader instance and define some extra event methods that can be used by TopLink during the unmarshal process. These events are no ops in this class, but may be overridden in subclasses.
Responsibilities
- Wrap an instance of org.xml.sax.XMLReader and provide all the required API
- Provide empty implementations of some callback methods that can be overridden in subclasses
- Since:
- release specific (what release of product did this appear in)
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
Validate the SAX events reported to the ContentHandler. -
Field Summary
Modifier and TypeFieldDescriptionprotected Locator
static final String
static final String
protected XMLReader.ValidatingContentHandler
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionconvertValueBasedOnSchemaType
(Field xmlField, Object value, ConversionManager conversionManager, AbstractUnmarshalRecord record) INTERNAL:getCurrentObject
(CoreAbstractSession session, Mapping selfRecordMapping) boolean
getFeature
(String name) INTERNAL: return the Locator object associated with this readerINTERNAL:char
INTERNAL: The character used to separate the prefix and uri portions when namespaces are presentgetProperty
(String name) getValue
(CharSequence characters, Class<?> dataType) This call back mechanism provides an opportunity for the XMLReader to provide an alternate conversion.boolean
boolean
INTERNAL: Determine if namespaces will be considered during marshal/unmarshal operations.boolean
isNullRecord
(AbstractNullPolicy nullPolicy, Attributes atts, UnmarshalRecord record) boolean
isNullRepresentedByXsiNil
(AbstractNullPolicy nullPolicy) void
newObjectEvent
(Object object, Object parent, Mapping selfRecordMapping) void
void
parse
(InputSource input) void
setContentHandler
(ContentHandler handler) void
setDTDHandler
(DTDHandler handler) void
setEntityResolver
(EntityResolver resolver) void
setErrorHandler
(ErrorHandler handler) void
setFeature
(String name, boolean value) void
setLexicalHandler
(LexicalHandler lexicalHandler) void
setLocator
(Locator newLocator) INTERNAL: set the Locator object to associate with this readervoid
setNamespaceAware
(boolean namespaceAware) If set to true, the reader will be aware of namespaces during marshal/unmarsal operations.void
setNamespaceSeparator
(char namespaceSeparator) Sets namespace separator.void
setProperty
(String name, Object value) void
setValidatorHandler
(ValidatorHandler validatorHandler)
-
Field Details
-
NAMESPACE_PREFIXES_FEATURE
- See Also:
-
REPORT_IGNORED_ELEMENT_CONTENT_WHITESPACE_FEATURE
- See Also:
-
validatingContentHandler
-
locator
-
-
Constructor Details
-
XMLReader
-
XMLReader
public XMLReader()
-
-
Method Details
-
getLocator
INTERNAL: return the Locator object associated with this reader- Since:
- 2.4
-
setLocator
INTERNAL: set the Locator object to associate with this reader- Since:
- 2.4
-
getContentHandler
- Specified by:
getContentHandler
in interfaceXMLReader
-
setContentHandler
- Specified by:
setContentHandler
in interfaceXMLReader
-
isNamespaceAware
public boolean isNamespaceAware()INTERNAL: Determine if namespaces will be considered during marshal/unmarshal operations.- Since:
- 2.4
-
setNamespaceAware
public void setNamespaceAware(boolean namespaceAware) If set to true, the reader will be aware of namespaces during marshal/unmarsal operations.- Parameters:
namespaceAware
- if reader should be namespace aware- Since:
- 2.6.0
-
getNamespaceSeparator
public char getNamespaceSeparator()INTERNAL: The character used to separate the prefix and uri portions when namespaces are present- Since:
- 2.4
-
setNamespaceSeparator
public void setNamespaceSeparator(char namespaceSeparator) Sets namespace separator.- Parameters:
namespaceSeparator
- namespace separator- Since:
- 2.6.0
-
getMediaType
INTERNAL:- Returns:
- The MediaType associated with this reader
-
convertValueBasedOnSchemaType
public Object convertValueBasedOnSchemaType(Field xmlField, Object value, ConversionManager conversionManager, AbstractUnmarshalRecord record) INTERNAL:- Since:
- 2.4
-
getDTDHandler
- Specified by:
getDTDHandler
in interfaceXMLReader
-
setDTDHandler
- Specified by:
setDTDHandler
in interfaceXMLReader
-
setEntityResolver
- Specified by:
setEntityResolver
in interfaceXMLReader
-
getEntityResolver
- Specified by:
getEntityResolver
in interfaceXMLReader
-
getErrorHandler
- Specified by:
getErrorHandler
in interfaceXMLReader
-
setErrorHandler
- Specified by:
setErrorHandler
in interfaceXMLReader
-
getLexicalHandler
-
setLexicalHandler
-
getFeature
- Specified by:
getFeature
in interfaceXMLReader
- Throws:
SAXNotRecognizedException
SAXNotSupportedException
-
setFeature
public void setFeature(String name, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException - Specified by:
setFeature
in interfaceXMLReader
- Throws:
SAXNotRecognizedException
SAXNotSupportedException
-
getProperty
- Specified by:
getProperty
in interfaceXMLReader
- Throws:
SAXNotRecognizedException
SAXNotSupportedException
-
setProperty
public void setProperty(String name, Object value) throws SAXNotRecognizedException, SAXNotSupportedException - Specified by:
setProperty
in interfaceXMLReader
- Throws:
SAXNotRecognizedException
SAXNotSupportedException
-
parse
- Specified by:
parse
in interfaceXMLReader
- Throws:
IOException
SAXException
-
parse
- Specified by:
parse
in interfaceXMLReader
- Throws:
IOException
SAXException
-
setValidatorHandler
-
getValidatorHandler
-
newObjectEvent
-
getCurrentObject
-
getValue
This call back mechanism provides an opportunity for the XMLReader to provide an alternate conversion. This optimization is currently only leveraged for properties annotated with @XmlInlineBinaryData.- Parameters:
characters
- The characters to be converted.dataType
- The type to be converted to.- Returns:
- The converted value
-
isNullRepresentedByXsiNil
-
isNullRecord
-
isInCollection
public boolean isInCollection()
-