Package org.infoset.xml

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


               } else if ("self".equals(rel)) {
                  toRemove.add(e);
               }
            } else if (e.getName().equals(UPDATED_NAME)) {
               modifiedDone = true;
               e.clear();
               e.addCharacters(toXSDDate(modified));
            } else if (e.getName().equals(ENTRY_NAME)) {
               toRemove.add(e);
            }
         }
View Full Code Here


      for (Child c : entry) {
         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();
View Full Code Here

                */
            } else if (e.getName().equals(UPDATED_NAME)) {
               modifiedDone = true;
            } else if (e.getName().equals(EDITED_NAME)) {
               editedDone = true;
               e.clear();
               e.setPrefix("app");
               e.addCharacters(toXSDDate(modified));
            } else if (e.getName().equals(AUTHOR_NAME)) {
               author = e;
            } else if (e.getName().equals(LINK_NAME)) {
View Full Code Here

            idE = doc.getDocumentElement().addElement(XML.ID_NAME);
         } else {
            idE = doc.getDocumentElement().addElement(0,XML.ID_NAME);
         }
      }
      idE.clear();
      idE.addCharacters(uri);
   }
  
   public String getTitle() {
      Element titleE = doc.getDocumentElement().getFirstElementNamed(XML.TITLE_NAME);
View Full Code Here

            titleE = doc.getDocumentElement().addElement(XML.TITLE_NAME);
         } 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);
View Full Code Here

            summaryE = doc.getDocumentElement().addElement(XML.SUMMARY_NAME);
         } 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

   {
      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

   {
      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

   {
      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();
View Full Code Here

      for (Child c : feed) {
         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();
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.