Package org.infoset.xml

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


      if (xmlBase!=null) {
         service.setBaseURI(URI.create(xmlBase));
         service.setAttributeValue(Attribute.XML_BASE, xmlBase);
      }
      dest.send(service);
      dest.send(constructor.createElement(XML.WORKSPACE));
      dest.send(constructor.createElement(AtomResource.TITLE_NAME));
      dest.send(constructor.createCharacters("Feeds"));
      dest.send(constructor.createElementEnd(AtomResource.TITLE_NAME));
      while (feeds.hasNext()) {
         Feed feed = feeds.next();
View Full Code Here


         service.setBaseURI(URI.create(xmlBase));
         service.setAttributeValue(Attribute.XML_BASE, xmlBase);
      }
      dest.send(service);
      dest.send(constructor.createElement(XML.WORKSPACE));
      dest.send(constructor.createElement(AtomResource.TITLE_NAME));
      dest.send(constructor.createCharacters("Feeds"));
      dest.send(constructor.createElementEnd(AtomResource.TITLE_NAME));
      while (feeds.hasNext()) {
         Feed feed = feeds.next();
         String href = locator.makeHref(feed);
View Full Code Here

      dest.send(constructor.createElementEnd(AtomResource.TITLE_NAME));
      while (feeds.hasNext()) {
         Feed feed = feeds.next();
         String href = locator.makeHref(feed);
         String title = storage.getFeedTitle(feed.getPath(),feed.getUUID());
         Element collection = constructor.createElement(XML.COLLECTION);
         collection.setAttributeValue("href",basePath+href);
         dest.send(collection);
         dest.send(constructor.createElement(AtomResource.TITLE_NAME));
         if (title!=null) {
            dest.send(constructor.createCharacters(title));
View Full Code Here

         String href = locator.makeHref(feed);
         String title = storage.getFeedTitle(feed.getPath(),feed.getUUID());
         Element collection = constructor.createElement(XML.COLLECTION);
         collection.setAttributeValue("href",basePath+href);
         dest.send(collection);
         dest.send(constructor.createElement(AtomResource.TITLE_NAME));
         if (title!=null) {
            dest.send(constructor.createCharacters(title));
         }
         dest.send(constructor.createElementEnd(AtomResource.TITLE_NAME));
         dest.send(constructor.createElement(XML.ACCEPT));
View Full Code Here

         dest.send(constructor.createElement(AtomResource.TITLE_NAME));
         if (title!=null) {
            dest.send(constructor.createCharacters(title));
         }
         dest.send(constructor.createElementEnd(AtomResource.TITLE_NAME));
         dest.send(constructor.createElement(XML.ACCEPT));
         dest.send(constructor.createCharacters("application/atom+xml;type=entry"));
         dest.send(constructor.createElementEnd(XML.ACCEPT));
         dest.send(constructor.createElement(XML.ACCEPT));
         dest.send(constructor.createCharacters("*/*"));
         dest.send(constructor.createElementEnd(XML.ACCEPT));
View Full Code Here

         }
         dest.send(constructor.createElementEnd(AtomResource.TITLE_NAME));
         dest.send(constructor.createElement(XML.ACCEPT));
         dest.send(constructor.createCharacters("application/atom+xml;type=entry"));
         dest.send(constructor.createElementEnd(XML.ACCEPT));
         dest.send(constructor.createElement(XML.ACCEPT));
         dest.send(constructor.createCharacters("*/*"));
         dest.send(constructor.createElementEnd(XML.ACCEPT));
         dest.send(constructor.createElementEnd(XML.COLLECTION));
      }
      dest.send(constructor.createElementEnd(XML.WORKSPACE));
View Full Code Here

      throws XMLException
   {
      //getContext().getLogger().info("Generating feed for term "+term);
      ItemConstructor constructor = InfosetFactory.getDefaultInfoset().createItemConstructor();
      dest.send(constructor.createDocument());
      dest.send(constructor.createElement(AtomResource.FEED_NAME));
      dest.send(constructor.createCharacters("\n"));
      link(constructor,dest,"self",getRequest().getResourceRef().toString());
      if (prevRef!=null) {
         link(constructor,dest,"previous",prevRef);
      }
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.