示例#1
0
 @NotNull
 public static JoinImpl deserialize(final ProcessModelImpl ownerModel, @NotNull final XmlReader in)
     throws XmlException {
   return nl.adaptivity.xml.XmlUtil
       .<nl.adaptivity.process.processModel.engine.JoinImpl>deserializeHelper(
           new JoinImpl(ownerModel), in);
 }
 @NotNull
 public static DrawableEndNode deserialize(
     final DrawableProcessModel ownerModel, @NotNull final XmlReader in) throws XmlException {
   return nl.adaptivity.xml.XmlUtil
       .<nl.adaptivity.process.diagram.DrawableEndNode>deserializeHelper(
           new DrawableEndNode(ownerModel), in);
 }
 public void marshalResult(final HttpServletResponse pResponse)
     throws TransformerException, IOException, XmlException {
   if (mResult instanceof XmlSerializable) {
     // By default don't use JAXB
     setContentType(pResponse, "text/xml");
     OutputStreamWriter writer =
         new OutputStreamWriter(pResponse.getOutputStream(), pResponse.getCharacterEncoding());
     XmlUtil.serialize((XmlSerializable) mResult, writer);
     writer.close();
     return;
   }
   final XmlRootElement xmlRootElement =
       mResult == null ? null : mResult.getClass().getAnnotation(XmlRootElement.class);
   if (xmlRootElement != null) {
     try {
       final JAXBContext jaxbContext = JAXBContext.newInstance(getReturnType());
       final JAXBSource jaxbSource = new JAXBSource(jaxbContext, mResult);
       setContentType(pResponse, "text/xml");
       Sources.writeToStream(jaxbSource, pResponse.getOutputStream());
     } catch (final JAXBException e) {
       throw new MessagingException(e);
     }
   } else {
     serializeValue(pResponse, this.mResult);
   }
 }