Package org.infoset.xml.util

Examples of org.infoset.xml.util.WriterItemDestination.send()


            try {
               Iterator<SyncProcess> procs = db.getSyncProcesses();
               Writer out = new OutputStreamWriter(os,"UTF-8");
               ItemDestination dest = new WriterItemDestination(out,"UTF-8");
               ItemConstructor constructor = InfosetFactory.getDefaultInfoset().createItemConstructor();
               dest.send(constructor.createDocument());
               dest.send(constructor.createElement(AdminXML.NM_SYNC_PROCESSES));
               while (procs.hasNext()) {
                  SyncProcess proc = procs.next();
                  proc.marshall();
                  DocumentSource.generate(proc.getElement(),false,dest);
View Full Code Here


               Iterator<SyncProcess> procs = db.getSyncProcesses();
               Writer out = new OutputStreamWriter(os,"UTF-8");
               ItemDestination dest = new WriterItemDestination(out,"UTF-8");
               ItemConstructor constructor = InfosetFactory.getDefaultInfoset().createItemConstructor();
               dest.send(constructor.createDocument());
               dest.send(constructor.createElement(AdminXML.NM_SYNC_PROCESSES));
               while (procs.hasNext()) {
                  SyncProcess proc = procs.next();
                  proc.marshall();
                  DocumentSource.generate(proc.getElement(),false,dest);
               }
View Full Code Here

               while (procs.hasNext()) {
                  SyncProcess proc = procs.next();
                  proc.marshall();
                  DocumentSource.generate(proc.getElement(),false,dest);
               }
               dest.send(constructor.createElementEnd(AdminXML.NM_SYNC_PROCESSES));
               dest.send(constructor.createDocumentEnd());
               out.flush();
               out.close();
            } catch (XMLException ex) {
               getContext().getLogger().log(Level.SEVERE,"Cannot get list of sync processes from DB: "+ex.getMessage(),ex);
View Full Code Here

                  SyncProcess proc = procs.next();
                  proc.marshall();
                  DocumentSource.generate(proc.getElement(),false,dest);
               }
               dest.send(constructor.createElementEnd(AdminXML.NM_SYNC_PROCESSES));
               dest.send(constructor.createDocumentEnd());
               out.flush();
               out.close();
            } catch (XMLException ex) {
               getContext().getLogger().log(Level.SEVERE,"Cannot get list of sync processes from DB: "+ex.getMessage(),ex);
               getResponse().setStatus(Status.SERVER_ERROR_INTERNAL,"Cannot get list of sync processes due to XML DB error.");
View Full Code Here

   {
      OutputStreamWriter w = new OutputStreamWriter(os,getCharacterSet().toString());
      try {
         WriterItemDestination dest = new WriterItemDestination(w,getCharacterSet().toString());
         ItemConstructor constructor = InfosetFactory.getDefaultInfoset().createItemConstructor();
         dest.send(constructor.createDocument());
         dest.send(constructor.createElement(root));
         while (iter.hasNext()) {
            DBObject obj = iter.next();
            if (obj instanceof XMLObject) {
               ((XMLObject)obj).generate(constructor,dest,contents);
View Full Code Here

      OutputStreamWriter w = new OutputStreamWriter(os,getCharacterSet().toString());
      try {
         WriterItemDestination dest = new WriterItemDestination(w,getCharacterSet().toString());
         ItemConstructor constructor = InfosetFactory.getDefaultInfoset().createItemConstructor();
         dest.send(constructor.createDocument());
         dest.send(constructor.createElement(root));
         while (iter.hasNext()) {
            DBObject obj = iter.next();
            if (obj instanceof XMLObject) {
               ((XMLObject)obj).generate(constructor,dest,contents);
            }
View Full Code Here

            DBObject obj = iter.next();
            if (obj instanceof XMLObject) {
               ((XMLObject)obj).generate(constructor,dest,contents);
            }
         }
         dest.send(constructor.createElementEnd(root));
         dest.send(constructor.createDocumentEnd());
      } catch (XMLException ex) {
         throw new IOException(ex.getMessage());
      }
      w.flush();
View Full Code Here

            if (obj instanceof XMLObject) {
               ((XMLObject)obj).generate(constructor,dest,contents);
            }
         }
         dest.send(constructor.createElementEnd(root));
         dest.send(constructor.createDocumentEnd());
      } catch (XMLException ex) {
         throw new IOException(ex.getMessage());
      }
      w.flush();
   }
View Full Code Here

            try {
               Iterator<RemoteApp> apps = db.getRemoteApps();
               Writer out = new OutputStreamWriter(os,"UTF-8");
               ItemDestination dest = new WriterItemDestination(out,"UTF-8");
               ItemConstructor constructor = InfosetFactory.getDefaultInfoset().createItemConstructor();
               dest.send(constructor.createDocument());
               dest.send(constructor.createElement(AdminXML.NM_APPS));
               while (apps.hasNext()) {
                  RemoteApp app = apps.next();
                  app.marshall();;
                  DocumentSource.generate(app.getElement(),false,dest);
View Full Code Here

               Iterator<RemoteApp> apps = db.getRemoteApps();
               Writer out = new OutputStreamWriter(os,"UTF-8");
               ItemDestination dest = new WriterItemDestination(out,"UTF-8");
               ItemConstructor constructor = InfosetFactory.getDefaultInfoset().createItemConstructor();
               dest.send(constructor.createDocument());
               dest.send(constructor.createElement(AdminXML.NM_APPS));
               while (apps.hasNext()) {
                  RemoteApp app = apps.next();
                  app.marshall();;
                  DocumentSource.generate(app.getElement(),false,dest);
               }
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.