Ignore:
Timestamp:
09/06/10 11:40:42 (21 months ago)
Author:
jharrop
Message:

Avoid things of the form:

extends JaxbXmlPart?<JAXBElement<xyz>>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/docx4j/src/main/java/org/docx4j/openpackaging/parts/WordprocessingML/GlossaryDocumentPart.java

    r887 r1203  
    5959        } 
    6060                 
    61     /** 
    62      * Unmarshal XML data from the specified InputStream and return the  
    63      * resulting content tree.  Validation event location information may 
    64      * be incomplete when using this form of the unmarshal API. 
    65      * 
    66      * <p> 
    67      * Implements <a href="#unmarshalGlobal">Unmarshal Global Root Element</a>. 
    68      *  
    69      * @param is the InputStream to unmarshal XML data from 
    70      * @return the newly created root object of the java content tree  
    71      * 
    72      * @throws JAXBException  
    73      *     If any unexpected errors occur while unmarshalling 
    74      */ 
    75         @Override 
    76     public GlossaryDocument unmarshal( java.io.InputStream is ) throws JAXBException { 
    77          
    78                 try { 
    79                                      
    80                         Unmarshaller u = jc.createUnmarshaller(); 
    81  
    82                         //u.setSchema(org.docx4j.jaxb.WmlSchema.schema);                         
    83                         u.setEventHandler(new org.docx4j.jaxb.JaxbValidationEventHandler()); 
    84                          
    85 //                      JAXBElement<?> root = (JAXBElement<?>)u.unmarshal( is );                         
    86 //                      jaxbElement = (org.docx4j.wml.Document)root.getValue(); 
    87                          
    88                         jaxbElement =  (GlossaryDocument) u.unmarshal( is ); 
    89                         return jaxbElement; 
    90                          
    91                         //System.out.println("\n\n" + this.getClass().getName() + " unmarshalled \n\n" );                                                                        
    92  
    93                 } catch (Exception e ) { 
    94                         e.printStackTrace(); 
    95                         return null; 
    96                 } 
    97          
    98          
    99     } 
    10061         
    10162} 
Note: See TracChangeset for help on using the changeset viewer.