⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bigxmlkeydom.java

📁 java开源的企业总线.xmlBlaster
💻 JAVA
字号:
/*------------------------------------------------------------------------------Name:      BigXmlKeyDOM.javaProject:   xmlBlaster.orgCopyright: xmlBlaster.org, see xmlBlaster-LICENSE fileComment:   Building a huge DOM tree for all known MsgUnit xmlKey------------------------------------------------------------------------------*/package org.xmlBlaster.engine;import java.util.logging.Logger;import java.util.logging.Level;import org.xmlBlaster.engine.xml2java.XmlKeyDom;import org.xmlBlaster.util.def.Constants;import org.xmlBlaster.util.XmlNotPortable;import org.xmlBlaster.util.XmlBlasterException;import org.xmlBlaster.authentication.Authenticate;import java.util.StringTokenizer;/** * Building a huge DOM tree for all known MsgUnit.xmlKeys. * <p /> * This huge DOM tree contains all meta data about the known messages.<br /> * Since the message content is a BLOB, messages may only be queried through<br /> * this DOM tree using XPath. * <p /> * Full text search scanning the content BLOB may be available through MIME based plugins. * @author xmlBlaster@marcelruff.info */public class BigXmlKeyDOM extends XmlKeyDom{   private static Logger log = Logger.getLogger(BigXmlKeyDOM.class.getName());   /**    * A singleton for each xmlBlaster server.    */   BigXmlKeyDOM(RequestBroker requestBroker, Authenticate authenticate) throws XmlBlasterException   {      super(requestBroker);   }   /**    * Removing a node from the xmlBlaster xmlKey tree    * @param The node removed    */   public org.w3c.dom.Node removeKeyNode(org.w3c.dom.Node node)   {      return xmlKeyDoc.getDocumentElement().removeChild(node);   }   /**    * Invoked on message erase() invocation.    */   public void messageErase(TopicHandler topicHandler) throws XmlBlasterException   {      if (log.isLoggable(Level.FINE)) log.fine("Erase event occured ...");      if (!topicHandler.isUnconfigured()) {         /*org.w3c.dom.Node node =*/removeKeyNode(topicHandler.getRootNode());      }   }   /**    * Dump state of this object into XML.    * <br>    * @return XML state of BigXmlKeyDOM    */   public final String toXml() throws XmlBlasterException {      return toXml((String)null);   }   /**    * Dump state of this object into XML.    * <br>    * @param extraOffset indenting of tags    * @return XML state of BigXmlKeyDOM    */   public final String toXml(String extraOffset) throws XmlBlasterException {      StringBuffer sb = new StringBuffer();      if (extraOffset == null) extraOffset = "";      String offset = Constants.OFFSET + extraOffset;      sb.append(offset).append("<BigXmlKeyDOM>");      try {         java.io.ByteArrayOutputStream out = XmlNotPortable.write(xmlKeyDoc);         StringTokenizer st = new StringTokenizer(out.toString(), "\n");         while (st.hasMoreTokens()) {            sb.append(offset).append(Constants.INDENT).append(st.nextToken());         }      } catch (Exception e) { }      sb.append(offset).append("</BigXmlKeyDOM>\n");      return sb.toString();   }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -