Demos and Usage of javax.xml.bind.JAXBElement.getValue()


   1: 
   2: import javax.xml.bind.JAXBElement;
   3: import javax.xml.bind.JAXBException;
   4:         ...
   5:   {
   6:     JAXBElement element = (JAXBElement) obj;
   7: 
   8:         ...
   9:     return element.getValue();
  10:   }

View Full Code Here
   1: import javax.xml.bind.JAXBContext;
   2: import javax.xml.bind.JAXBElement;
   3: import javax.xml.bind.JAXBException;
   4:         ...
   5:         
   6:         JAXBElement rootElement = (JAXBElement)
   7:                                               u.unmarshal(fc.getSelectedFile());
   8:         ...
   9:         ConfigurationType configType = (ConfigurationType) 
  10:                                               rootElement.getValue();
  11:         

View Full Code Here
   1: import javax.xml.bind.JAXBContext;
   2: import javax.xml.bind.JAXBElement;
   3: import javax.xml.bind.JAXBException;
   4:         ...
   5:             Unmarshaller u = jc.createUnmarshaller();
   6:             JAXBElement orderElement =
   7:         ...
   8:                 (JAXBElement)u.unmarshal(new
   9:                                     FileInputStream("cd-UBL-1.0/xml/office/"
  10:         ...
  11: 
  12:         OrderType order = (OrderType)orderElement.getValue(); 

View Full Code Here
   1: import javax.xml.bind.JAXBException;
   2: import javax.xml.bind.JAXBElement;
   3: import javax.xml.parsers.DocumentBuilder;
   4:         ...
   5:         PurchaseOrder po = null;
   6:         if (jaxbObject instanceof JAXBElement) {
   7:         ...
   8:             JAXBElement jaxbElement = (JAXBElement) jaxbObject;
   9:         ...
  10:             if(jaxbElement.getValue() instanceof PurchaseOrder){

View Full Code Here
   1: 
   2: import javax.xml.bind.JAXBElement;
   3: import javax.xml.bind.annotation.adapters.XmlAdapter;
   4:         ...
   5: 
   6:     public static final Accessor<JAXBElement,Object> JAXB_ELEMENT_VALUE = new Accessor<JAXBElement,Object>(Object.class) {
   7:         public Object get(JAXBElement jaxbElement) {
   8:         ...
   9:             return jaxbElement.getValue();
  10:         }

View Full Code Here
   1:       for(Map.Entry<String,?> e : properties.entrySet())
   2:         setProperty(e.getKey(), e.getValue());
   3:     }
   4:         ...
   5:   {
   6:     if (obj instanceof JAXBElement) {
   7:         ...
   8:       JAXBElement element = (JAXBElement) obj;
   9: 
  10:         ...
  11:       obj = element.getValue();

View Full Code Here