Package org.infoset.xml

Examples of org.infoset.xml.ItemConstructor.createElement()


   {
      String baseURIValue = baseURI.toString();
      URI baseDir = URI.create(baseURIValue.substring(0,baseURIValue.lastIndexOf('/')+1));
      ItemConstructor constructor = InfosetFactory.getDefaultInfoset().createItemConstructor();
      dest.send(constructor.createDocument(baseURI));
      dest.send(constructor.createElement(SERVER));
      dest.send(constructor.createCharacters("\n"));
     
      Element keystoreE = constructor.createElement(KEYSTORE);
      keystoreE.setAttributeValue("href",baseDir.relativize(keyStorePath.toURI()).toString());
      keystoreE.setAttributeValue("password",keyStorePassword);
View Full Code Here


      ItemConstructor constructor = InfosetFactory.getDefaultInfoset().createItemConstructor();
      dest.send(constructor.createDocument(baseURI));
      dest.send(constructor.createElement(SERVER));
      dest.send(constructor.createCharacters("\n"));
     
      Element keystoreE = constructor.createElement(KEYSTORE);
      keystoreE.setAttributeValue("href",baseDir.relativize(keyStorePath.toURI()).toString());
      keystoreE.setAttributeValue("password",keyStorePassword);
      if (!keyStorePassword.equals(keyPassword)) {
         keystoreE.setAttributeValue("key-password",keyPassword);
      }
View Full Code Here

      dest.send(constructor.createElementEnd(KEYSTORE));
      dest.send(constructor.createCharacters("\n"));
     
      for (Interface iface : interfaces) {

         Element ifaceE = constructor.createElement(INTERFACE);
         ifaceE.setAttributeValue("address",iface.getAddress());
         ifaceE.setAttributeValue("port",Integer.toString(iface.getPort()));
         ifaceE.setAttributeValue("secure",iface.isSecure() ? "true" : "false");
         dest.send(ifaceE);
View Full Code Here

         ifaceE.setAttributeValue("secure",iface.isSecure() ? "true" : "false");
         dest.send(ifaceE);

         for (Host host : iface.getHosts().values()) {

            Element hostE = constructor.createElement(HOST);
            hostE.setAttributeValue("name",host.getName());
            dest.send(hostE);
            dest.send(constructor.createElementEnd(HOST));
            dest.send(constructor.createCharacters("\n"));
         }
View Full Code Here

      throws XMLException
   {
      XMLRepresentationParser xmlParser = new XMLRepresentationParser();
      ItemConstructor constructor = InfosetFactory.getDefaultInfoset().createItemConstructor();
      dest.send(constructor.createDocument());
      dest.send(constructor.createElement(AtomResource.FEED_NAME));
      link(constructor,dest,"self",metaRef.toString());
      link(constructor,dest,"related",feedRef.toString());
      try {
         org.atomojo.app.client.Feed feedRep = new org.atomojo.app.client.Feed(xmlParser.load(storage.getFeedHead(feed.getPath(), feed.getUUID())));
         text(constructor,dest,AtomResource.TITLE_NAME,feedRep.getTitle());
View Full Code Here

            }
         } while (parent!=null);
         Collections.reverse(ancestors);
         for (Feed ancestor : ancestors) {
            org.atomojo.app.client.Feed feedRep = new org.atomojo.app.client.Feed(xmlParser.load(storage.getFeedHead(ancestor.getPath(), ancestor.getUUID())));
            dest.send(constructor.createElement(AtomResource.ENTRY_NAME));
            text(constructor,dest,AtomResource.ID_NAME,ancestor.getUUID().toString());
            text(constructor,dest,AtomResource.PUBLISHED_NAME,AtomResource.toXSDDate(ancestor.getCreated()));
            text(constructor,dest,AtomResource.UPDATED_NAME,AtomResource.toXSDDate(ancestor.getEdited()));
            text(constructor,dest,AtomResource.TITLE_NAME,feedRep.getTitle());
            String summary = feedRep.getSummary();
View Full Code Here

            Feed child = children.next();
            if (child.getTerm(hidden)!=null) {
               continue;
            }
            org.atomojo.app.client.Feed feedRep = new org.atomojo.app.client.Feed(xmlParser.load(storage.getFeedHead(child.getPath(), child.getUUID())));
            dest.send(constructor.createElement(AtomResource.ENTRY_NAME));
            text(constructor,dest,AtomResource.ID_NAME,child.getUUID().toString());
            text(constructor,dest,AtomResource.PUBLISHED_NAME,AtomResource.toXSDDate(child.getCreated()));
            text(constructor,dest,AtomResource.UPDATED_NAME,AtomResource.toXSDDate(child.getEdited()));
            text(constructor,dest,AtomResource.TITLE_NAME,feedRep.getTitle());
            String summary = feedRep.getSummary();
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

      AuthCredentials cred = new AuthCredentials(getRequest().getChallengeResponse());
      final Iterator<User> users = auth.getUsers(cred);

      ItemConstructor constructor = InfosetFactory.getDefaultInfoset().createItemConstructor();
      dest.send(constructor.createDocument());
      dest.send(constructor.createElement(NM_USERS));
      dest.send(constructor.createCharacters("\n"));
      while (users.hasNext()) {
         User user = users.next();
         UserResource.toXML(user,new RemoveDocumentFilter(dest));
         dest.send(constructor.createCharacters("\n"));
View Full Code Here

   private void generate(ItemDestination dest)
      throws XMLException
   {
      ItemConstructor constructor = InfosetFactory.getDefaultInfoset().createItemConstructor();
      dest.send(constructor.createDocument());
      dest.send(constructor.createElement(AdminXML.NM_USERS));
      dest.send(constructor.createCharacters("\n"));
      for (String group : groups.values()) {
         Element groupE = constructor.createElement(AdminXML.NM_GROUP);
         groupE.setAttributeValue("name",group);
         dest.send(groupE);
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.