Java Doc for AbstractUnmarshallerImpl.java in  » 6.0-JDK-Modules » jaxb-api » javax » xml » bind » helpers » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » jaxb api » javax.xml.bind.helpers 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.xml.bind.helpers.AbstractUnmarshallerImpl

AbstractUnmarshallerImpl
abstract public class AbstractUnmarshallerImpl implements Unmarshaller(Code)
Partial default Unmarshaller implementation.

This class provides a partial default implementation for the javax.xml.bind.Unmarshaller interface.

A JAXB Provider has to implement five methods (getUnmarshallerHandler, unmarshal(Node), unmarshal(XMLReader,InputSource), unmarshal(XMLStreamReader), and unmarshal(XMLEventReader).
author:
  


    author:
      
  • Kohsuke Kawaguchi, Sun Microsystems, Inc.

  • author:
      

version:
   $Revision: 1.14 $ $Date: 2006/03/08 17:01:00 $
See Also:   javax.xml.bind.Unmarshaller
since:
   JAXB1.0


Field Summary
protected  booleanvalidating
    


Method Summary
protected  UnmarshalExceptioncreateUnmarshalException(SAXException e)
     Creates an UnmarshalException from a SAXException.
public  AgetAdapter(Class<A> type)
    
public  AttachmentUnmarshallergetAttachmentUnmarshaller()
    
public  ValidationEventHandlergetEventHandler()
     Return the current event handler or the default event handler if one hasn't been set.
public  ListenergetListener()
    
public  ObjectgetProperty(String name)
     Default implementation of the getProperty method always throws PropertyException since there are no required properties.
public  SchemagetSchema()
    
protected  XMLReadergetXMLReader()
     Obtains a configured XMLReader.
public  booleanisValidating()
     Indicates whether or not the Unmarshaller is configured to validate during unmarshal operations.

Note: I named this method isValidating() to stay in-line with JAXP, as opposed to naming it getValidating().

public  voidsetAdapter(XmlAdapter adapter)
    
public  voidsetAdapter(Class<A> type, A adapter)
    
public  voidsetAttachmentUnmarshaller(AttachmentUnmarshaller au)
    
public  voidsetEventHandler(ValidationEventHandler handler)
     Allow an application to register a validation event handler.

The validation event handler will be called by the JAXB Provider if any validation errors are encountered during calls to any of the unmarshal methods.

public  voidsetListener(Listener listener)
    
public  voidsetProperty(String name, Object value)
     Default implementation of the setProperty method always throws PropertyException since there are no required properties.
public  voidsetSchema(Schema schema)
    
public  voidsetValidating(boolean validating)
     Specifies whether or not the Unmarshaller should validate during unmarshal operations.
public  Objectunmarshal(Source source)
    
abstract protected  Objectunmarshal(XMLReader reader, InputSource source)
     Unmarshals an object by using the specified XMLReader and the InputSource.
final public  Objectunmarshal(InputSource source)
    
final public  Objectunmarshal(URL url)
    
final public  Objectunmarshal(File f)
    
final public  Objectunmarshal(java.io.InputStream is)
    
final public  Objectunmarshal(Reader reader)
    
public  Objectunmarshal(XMLEventReader reader)
    
public  Objectunmarshal(XMLStreamReader reader)
    
public  JAXBElement<T>unmarshal(Node node, Class<T> expectedType)
    
public  JAXBElement<T>unmarshal(Source source, Class<T> expectedType)
    
public  JAXBElement<T>unmarshal(XMLStreamReader reader, Class<T> expectedType)
    
public  JAXBElement<T>unmarshal(XMLEventReader reader, Class<T> expectedType)
    

Field Detail
validating
protected boolean validating(Code)
whether or not the unmarshaller will validate





Method Detail
createUnmarshalException
protected UnmarshalException createUnmarshalException(SAXException e)(Code)
Creates an UnmarshalException from a SAXException. This is an utility method provided for the derived classes.

When a provider-implemented ContentHandler wants to throw a JAXBException, it needs to wrap the exception by a SAXException. If the unmarshaller implementation blindly wrap SAXException by JAXBException, such an exception will be a JAXBException wrapped by a SAXException wrapped by another JAXBException. This is silly.

This method checks the nested exception of SAXException and reduce those excessive wrapping. the resulting UnmarshalException




getAdapter
public A getAdapter(Class<A> type)(Code)



getAttachmentUnmarshaller
public AttachmentUnmarshaller getAttachmentUnmarshaller()(Code)



getEventHandler
public ValidationEventHandler getEventHandler() throws JAXBException(Code)
Return the current event handler or the default event handler if one hasn't been set. the current ValidationEventHandler or the default event handlerif it hasn't been set
throws:
  JAXBException - if an error was encountered while getting thecurrent event handler



getListener
public Listener getListener()(Code)



getProperty
public Object getProperty(String name) throws PropertyException(Code)
Default implementation of the getProperty method always throws PropertyException since there are no required properties. If a provider needs to handle additional properties, it should override this method in a derived class.



getSchema
public Schema getSchema()(Code)



getXMLReader
protected XMLReader getXMLReader() throws JAXBException(Code)
Obtains a configured XMLReader. This method is used when the client-specified SAXSource object doesn't have XMLReader. Unmarshaller is not re-entrant, so we will only use one instance of XMLReader.



isValidating
public boolean isValidating() throws JAXBException(Code)
Indicates whether or not the Unmarshaller is configured to validate during unmarshal operations.

Note: I named this method isValidating() to stay in-line with JAXP, as opposed to naming it getValidating(). true if the Unmarshaller is configured to validate duringunmarshal operations, false otherwise
throws:
  JAXBException - if an error occurs while retrieving the validatingflag




setAdapter
public void setAdapter(XmlAdapter adapter)(Code)



setAdapter
public void setAdapter(Class<A> type, A adapter)(Code)



setAttachmentUnmarshaller
public void setAttachmentUnmarshaller(AttachmentUnmarshaller au)(Code)



setEventHandler
public void setEventHandler(ValidationEventHandler handler) throws JAXBException(Code)
Allow an application to register a validation event handler.

The validation event handler will be called by the JAXB Provider if any validation errors are encountered during calls to any of the unmarshal methods. If the client application does not register a validation event handler before invoking the unmarshal methods, then all validation events will be silently ignored and may result in unexpected behaviour.
Parameters:
  handler - the validation event handler
throws:
  JAXBException - if an error was encountered while setting theevent handler




setListener
public void setListener(Listener listener)(Code)



setProperty
public void setProperty(String name, Object value) throws PropertyException(Code)
Default implementation of the setProperty method always throws PropertyException since there are no required properties. If a provider needs to handle additional properties, it should override this method in a derived class.



setSchema
public void setSchema(Schema schema)(Code)



setValidating
public void setValidating(boolean validating) throws JAXBException(Code)
Specifies whether or not the Unmarshaller should validate during unmarshal operations. By default, the Unmarshaller does not validate.

This method may only be invoked before or after calling one of the unmarshal methods.
Parameters:
  validating - true if the Unmarshaller should validate duringunmarshal, false otherwise
throws:
  JAXBException - if an error occurred while enabling or disablingvalidation at unmarshal time




unmarshal
public Object unmarshal(Source source) throws JAXBException(Code)



unmarshal
abstract protected Object unmarshal(XMLReader reader, InputSource source) throws JAXBException(Code)
Unmarshals an object by using the specified XMLReader and the InputSource. The callee should call the setErrorHandler method of the XMLReader so that errors are passed to the client-specified ValidationEventHandler.



unmarshal
final public Object unmarshal(InputSource source) throws JAXBException(Code)



unmarshal
final public Object unmarshal(URL url) throws JAXBException(Code)



unmarshal
final public Object unmarshal(File f) throws JAXBException(Code)



unmarshal
final public Object unmarshal(java.io.InputStream is) throws JAXBException(Code)



unmarshal
final public Object unmarshal(Reader reader) throws JAXBException(Code)



unmarshal
public Object unmarshal(XMLEventReader reader) throws JAXBException(Code)



unmarshal
public Object unmarshal(XMLStreamReader reader) throws JAXBException(Code)



unmarshal
public JAXBElement<T> unmarshal(Node node, Class<T> expectedType) throws JAXBException(Code)



unmarshal
public JAXBElement<T> unmarshal(Source source, Class<T> expectedType) throws JAXBException(Code)



unmarshal
public JAXBElement<T> unmarshal(XMLStreamReader reader, Class<T> expectedType) throws JAXBException(Code)



unmarshal
public JAXBElement<T> unmarshal(XMLEventReader reader, Class<T> expectedType) throws JAXBException(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.