Examples of addCharacters()


Examples of org.infoset.xml.Element.addCharacters()

         } else {
            titleE = doc.getDocumentElement().addElement(0,XML.TITLE_NAME);
         }
      }
      titleE.clear();
      titleE.addCharacters(text);
   }
  
   public String getSummary() {
      Element summaryE = doc.getDocumentElement().getFirstElementNamed(XML.SUMMARY_NAME);
      return summaryE==null ? null : summaryE.getText();
View Full Code Here

Examples of org.infoset.xml.Element.addCharacters()

         } else {
            summaryE = doc.getDocumentElement().addElement(0,XML.SUMMARY_NAME);
         }
      }
      summaryE.clear();
      summaryE.addCharacters(text);
   }

   public Map<URI,Term> getTerms() {
      return terms==null ? null : Collections.unmodifiableMap(terms);
   }
View Full Code Here

Examples of org.infoset.xml.Element.addCharacters()

      Element dateE = doc.getDocumentElement().getFirstElementNamed(XML.UPDATED_NAME);
      if (dateE==null) {
         dateE = doc.getDocumentElement().addElement(XML.UPDATED_NAME);
      }
      dateE.clear();
      dateE.addCharacters(toXSDDate(date));
   }
  
   public Date getPublished()
      throws ParseException
   {
View Full Code Here

Examples of org.infoset.xml.Element.addCharacters()

      Element dateE = doc.getDocumentElement().getFirstElementNamed(XML.PUBLISHED_NAME);
      if (dateE==null) {
         dateE = doc.getDocumentElement().addElement(XML.PUBLISHED_NAME);
      }
      dateE.clear();
      dateE.addCharacters(toXSDDate(date));
   }
  
   public Date getEdited()
      throws ParseException
   {
View Full Code Here

Examples of org.infoset.xml.Element.addCharacters()

      Element dateE = doc.getDocumentElement().getFirstElementNamed(XML.EDITED_NAME);
      if (dateE==null) {
         dateE = doc.getDocumentElement().addElement(XML.EDITED_NAME);
      }
      dateE.clear();
      dateE.addCharacters(toXSDDate(date));
   }
  
   public void update() {
      Element entryE = doc.getDocumentElement();
      Iterator<Element> categories = entryE.getElementsByName(XML.CATEGORY_NAME);
View Full Code Here

Examples of org.infoset.xml.Element.addCharacters()

               Element categoryE = idPos<0 ? entryE.addElement(XML.CATEGORY_NAME) : entryE.addElement(idPos,XML.CATEGORY_NAME);
               if (scheme!=null) {
                  categoryE.setAttributeValue("scheme",scheme);
               }
               categoryE.setAttributeValue("term",name);
               categoryE.addCharacters(value);
            }
         } else {
            Element categoryE = idPos<0 ? entryE.addElement(XML.CATEGORY_NAME) : entryE.addElement(idPos,XML.CATEGORY_NAME);
            if (scheme!=null) {
               categoryE.setAttributeValue("scheme",scheme);
View Full Code Here

Examples of org.infoset.xml.Element.addCharacters()

      top.addElement(ID_NAME).addCharacters("urn:uuid:"+id.toString());
      String dateString = toXSDDate(created);
      top.addElement(PUBLISHED_NAME).addCharacters(dateString);
      top.addElement(UPDATED_NAME).addCharacters(dateString);
      Element edited = top.addElement(EDITED_NAME);
      edited.addCharacters(dateString);
      edited.setPrefix("app");
      Element link = top.addElement(LINK_NAME);
      link.setAttributeValue("rel","edit");
      link.setAttributeValue("href","./_/"+id);
      if (authorName!=null) {
View Full Code Here

Examples of org.infoset.xml.Element.addCharacters()

         if (c instanceof Element) {
            Element e = (Element)c;
            if (e.getName().equals(ID_NAME)) {
               idDone = true;
               e.clear();
               e.addCharacters("urn:uuid:"+id.toString());
               /*
            } else if (e.getName().equals(PUBLISHED_NAME) && created!=null) {
               createdDone = true;
               e.clear();
               e.addCharacters(toXSDDate(created));
View Full Code Here

Examples of org.infoset.xml.Element.addCharacters()

      throws IOException,XMLException
   {
      File dbConf = new File(dir,"db.conf");
      Document doc = InfosetFactory.getDefaultInfoset().createItemConstructor().createDocument();
      Element top = doc.createDocumentElement(AdminXML.NM_DATABASES);
      top.addCharacters("\n");
      for (DB db : dbList.values()) {
         Element database = top.addElement(AdminXML.NM_DATABASE);
         File compDir = new File(dir,db.getName());
         if (compDir.getCanonicalPath().equals(db.getDatabaseDir().getCanonicalPath())) {
            db.getDatabaseDir();
View Full Code Here

Examples of org.infoset.xml.Element.addCharacters()

        
         // change the entry's edited element
         Element edited = doc.getDocumentElement().getFirstElementNamed(AtomResource.EDITED_NAME);
         if (edited!=null) {
            edited.clear();
            edited.addCharacters(toXSDDate(date));
         }
        
         // store the change.
         status = storage.storeEntry(feed.getPath(),feed.getUUID(),entry.getUUID(),doc);
         if (status.isSuccess()) {
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.