Examples of clearContent()


Examples of org.dom4j.Element.clearContent()

    if (elem == null) {
      // missing, we add it
      elem = xmlDoc.getRootElement().addElement(
          new QName(KEYWORD_TITLE, namespaceDC));
    } else {
      elem.clearContent();// clear the old value
    }
    elem.addText(propsPart.getTitleProperty().getValue());
  }

  private void addVersion() {
View Full Code Here

Examples of org.dom4j.Element.clearContent()

    if (elem == null) {
      // missing, we add it
      elem = xmlDoc.getRootElement().addElement(
          new QName(KEYWORD_VERSION, namespaceCoreProperties));
    } else {
      elem.clearContent();// clear the old value
    }
    elem.addText(propsPart.getVersionProperty().getValue());
  }
}
View Full Code Here

Examples of org.dom4j.Element.clearContent()

     * @param rules List of {@link LuceneIndexItemRule} objects to be saved
     */
    public static void saveRules(Element lucene, List rules) {       
        Element itemrules = lucene.element("itemrules");
        //remove old rules
        itemrules.clearContent();
        Iterator itemrulesIt = rules.iterator();
        while (itemrulesIt.hasNext()) {
            LuceneIndexItemRule rule = (LuceneIndexItemRule) itemrulesIt.next();
            Element itemrule = itemrules.addElement("itemrule");
            itemrule.addAttribute("indextype", rule.getIndexType());
View Full Code Here

Examples of org.dom4j.Element.clearContent()

     * @param restrictions The restrictions to write. List of {@link IPv4Restriction} objects.
     */
    public static void saveRestrictions(Element clientRestrictions, List restrictions) {
        Element restrictionsElement = clientRestrictions.element("restrictions");
        //remove old rules
        restrictionsElement.clearContent();
        Iterator restrictionsIt = restrictions.iterator();
        while (restrictionsIt.hasNext()) {
            IPv4Restriction restriction = (IPv4Restriction) restrictionsIt.next();
            restriction.addToElement(restrictionsElement);
        }       
View Full Code Here

Examples of org.dom4j.Element.clearContent()

     * @param rules List of {@link LuceneIndexFileRule} objects to be saved
     */
    public static void saveRules(Element lucene, List rules) {
        Element filerules = WGUtils.getOrCreateElement(lucene, "filerules");
        //remove old rules
        filerules.clearContent();
        Iterator itemrulesIt = rules.iterator();
        while (itemrulesIt.hasNext()) {
            LuceneIndexFileRule rule = (LuceneIndexFileRule) itemrulesIt.next();
            Element ruleElement = filerules.addElement("filerule");
            ruleElement.addAttribute("filesizelimit", new Integer(rule.getFileSizeLimit()).toString());           
View Full Code Here

Examples of org.dom4j.Element.clearContent()

            login.addAttribute("username", username);
        }
        login.addAttribute("encoding", "base64");

        Element titleNode = contentDbElement.element("title");
        titleNode.clearContent();
        if (title.equals(DUMMY_CONTENTDB_TITLE) || title.trim().equals("")) {
            titleNode.addCDATA("");
        }
        else {
            titleNode.addCDATA(title);
View Full Code Here

Examples of org.dom4j.Element.clearContent()

    }
   
    public void clearLastUpdated(String dbKey) {
        Element dbElement = fetchDBElement(dbKey);
        Element lastUpdateElement = dbElement.element("lastupdate");
        lastUpdateElement.clearContent();
        try {
            writeConfigDoc();
        } catch (IOException e) {
            _core.getLog().error("Cannot clear lastUpdate for db '" + dbKey + "' in indexConfigFile '" + _configFile.getPath() + "'." , e);
        }       
View Full Code Here

Examples of org.dom4j.Element.clearContent()

    Element element = (Element) document.selectSingleNode( xPath );
    if ( element == null ) {
      element = DocumentHelper.makeElement( document, xPath );
    }
    if ( useCData ) {
      element.clearContent();
      element.addCDATA( value );
    } else {
      element.setText( value );
    }
  }
View Full Code Here

Examples of org.dom4j.Element.clearContent()

    Element element = (Element) document.selectSingleNode( xPath );
    if ( element == null ) {
      element = DocumentHelper.makeElement( document, xPath );
    }
    if ( useCData ) {
      element.clearContent();
      element.addCDATA( value );
    } else {
      element.setText( value );
    }
  }
View Full Code Here

Examples of org.dom4j.Element.clearContent()

    Element element = (Element) document.selectSingleNode( xPath );
    if ( element == null ) {
      element = DocumentHelper.makeElement( document, xPath );
    }
    if ( useCData ) {
      element.clearContent();
      element.addCDATA( value );
    } else {
      element.setText( value );
    }
  }
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.