Examples of unmarshalElement()


Examples of org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement()

         {
            PortletBuilder builder = new PortletBuilder();
            ctx.parsePastStartTag(m_uri, "preferences");
            while (ctx.isAt(m_uri, "preference"))
            {
               Preference value = (Preference)ctx.unmarshalElement();
               builder.add(value.getName(), value.getValues(), value.isReadOnly());
            }
            ctx.parsePastEndTag(m_uri, "preferences");
            state = new TransientApplicationState(contentId, builder.build());
         }
View Full Code Here

Examples of org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement()

      //
      Properties properties = null;
      if (ctx.isAt(m_uri, "properties"))
      {
         properties = (Properties)ctx.unmarshalElement();
      }

      //
      ctx.parsePastEndTag(m_uri, m_name);
View Full Code Here

Examples of org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement()

      //
      IBindingFactory bfact = BindingDirectory.getFactory(type);
      UnmarshallingContext uctx = (UnmarshallingContext)bfact.createUnmarshallingContext();
      uctx.setDocument(baos, null, "UTF-8", false);
      T obj = type.cast(uctx.unmarshalElement());

      // Find out version
      XMLInputFactory factory = XMLInputFactory.newInstance();
      baos.reset();
      XMLStreamReader reader = factory.createXMLStreamReader(baos);
View Full Code Here

Examples of org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement()

      String out = IOUtil.getStreamContentAsString(confManager_.getInputStream(path));
      ByteArrayInputStream is = new ByteArrayInputStream(out.getBytes("UTF-8"));
      IBindingFactory bfact = BindingDirectory.getFactory(Container.class);
      UnmarshallingContext uctx = (UnmarshallingContext)bfact.createUnmarshallingContext();
      uctx.setDocument(is, null, "UTF-8", false);
      Container container = (Container)uctx.unmarshalElement();
      generateStorageName(container);
      return container;
   }

   public void save() throws Exception
View Full Code Here

Examples of org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement()

                    return JibxSimpleTypes.toObject(text, stype);
                } else {
                    throw new RuntimeException("Missing required element [" + ctype + "]");
                }
            } else {
                return ctx.unmarshalElement(part.getTypeClass());  
            }
        } catch (JiBXException e) {
            throw new RuntimeException(e);
        }
    }
View Full Code Here

Examples of org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement()

    }

    public Object read(QName elementQName, XMLStreamReader input, Class<?> type) {
        try {
            UnmarshallingContext ctx = getUnmarshallingContext(input, type);
            return ctx.unmarshalElement(type);
        } catch (JiBXException e) {
            throw new RuntimeException(e);
        }
    }
View Full Code Here

Examples of org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement()

  protected Object unmarshalXmlStreamReader(XMLStreamReader streamReader) {
    try {
      UnmarshallingContext unmarshallingContext = (UnmarshallingContext) createUnmarshallingContext();
      IXMLReader xmlReader = new StAXReaderWrapper(streamReader, null, true);
      unmarshallingContext.setDocument(xmlReader);
      return unmarshallingContext.unmarshalElement();
    }
    catch (JiBXException ex) {
      throw convertJibxException(ex, false);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.