当前位置: 首页>>代码示例>>Java>>正文


Java DTMException类代码示例

本文整理汇总了Java中com.sun.org.apache.xml.internal.dtm.DTMException的典型用法代码示例。如果您正苦于以下问题:Java DTMException类的具体用法?Java DTMException怎么用?Java DTMException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


DTMException类属于com.sun.org.apache.xml.internal.dtm包,在下文中一共展示了DTMException类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getXMLReader

import com.sun.org.apache.xml.internal.dtm.DTMException; //导入依赖的package包/类
/**
 * This method returns the SAX2 parser to use with the InputSource
 * obtained from this URI.
 * It may return null if any SAX2-conformant XML parser can be used,
 * or if getInputSource() will also return null. The parser must
 * be free for use (i.e., not currently in use for another parse().
 * After use of the parser is completed, the releaseXMLReader(XMLReader)
 * must be called.
 *
 * @param inputSource The value returned from the URIResolver.
 * @return  a SAX2 XMLReader to use to resolve the inputSource argument.
 *
 * @return non-null XMLReader reference ready to parse.
 */
synchronized public XMLReader getXMLReader(Source inputSource)
{

  try
  {
    XMLReader reader = (inputSource instanceof SAXSource)
                       ? ((SAXSource) inputSource).getXMLReader() : null;

    // If user did not supply a reader, ask for one from the reader manager
    if (null == reader) {
      if (m_readerManager == null) {
          m_readerManager = XMLReaderManager.getInstance(super.useServicesMechnism());
      }

      reader = m_readerManager.getXMLReader();
    }

    return reader;

  } catch (SAXException se) {
    throw new DTMException(se.getMessage(), se);
  }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:38,代码来源:DTMManagerDefault.java

示例2: createDocumentFragment

import com.sun.org.apache.xml.internal.dtm.DTMException; //导入依赖的package包/类
/**
 * Method createDocumentFragment
 *
 *
 * NEEDSDOC (createDocumentFragment) @return
 */
synchronized public DTM createDocumentFragment()
{

  try
  {
    DocumentBuilderFactory dbf = FactoryImpl.getDOMFactory(super.useServicesMechnism());
    dbf.setNamespaceAware(true);

    DocumentBuilder db = dbf.newDocumentBuilder();
    Document doc = db.newDocument();
    Node df = doc.createDocumentFragment();

    return getDTM(new DOMSource(df), true, null, false, false);
  }
  catch (Exception e)
  {
    throw new DTMException(e);
  }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:26,代码来源:DTMManagerDefault.java

示例3: cloneIterator

import com.sun.org.apache.xml.internal.dtm.DTMException; //导入依赖的package包/类
/**
 * Returns a deep copy of this iterator.   The cloned iterator is not reset.
 *
 * @return a deep copy of this iterator.
 */
public DTMAxisIterator cloneIterator()
{
  _isRestartable = false;

  try
  {
    final PrecedingIterator clone = (PrecedingIterator) super.clone();
    final int[] stackCopy = new int[_stack.length];
    System.arraycopy(_stack, 0, stackCopy, 0, _stack.length);

    clone._stack = stackCopy;

    // return clone.reset();
    return clone;
  }
  catch (CloneNotSupportedException e)
  {
    throw new DTMException(XMLMessages.createXMLMessage(XMLErrorResources.ER_ITERATOR_CLONE_NOT_SUPPORTED, null)); //"Iterator clone not supported.");
  }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:26,代码来源:SAX2DTM2.java

示例4: addDTM

import com.sun.org.apache.xml.internal.dtm.DTMException; //导入依赖的package包/类
/**
 * Add a DTM to the DTM table.
 *
 * @param dtm Should be a valid reference to a DTM.
 * @param id Integer DTM ID to be bound to this DTM.
 * @param offset Integer addressing offset. The internal DTM Node ID is
 * obtained by adding this offset to the node-number field of the
 * public DTM Handle. For the first DTM ID accessing each DTM, this is 0;
 * for overflow addressing it will be a multiple of 1<<IDENT_DTM_NODE_BITS.
 */
synchronized public void addDTM(DTM dtm, int id, int offset)
{
              if(id>=IDENT_MAX_DTMS)
              {
                      // TODO: %REVIEW% Not really the right error message.
          throw new DTMException(XMLMessages.createXMLMessage(XMLErrorResources.ER_NO_DTMIDS_AVAIL, null)); //"No more DTM IDs are available!");
              }

              // We used to just allocate the array size to IDENT_MAX_DTMS.
              // But we expect to increase that to 16 bits, and I'm not willing
              // to allocate that much space unless needed. We could use one of our
              // handy-dandy Fast*Vectors, but this will do for now.
              // %REVIEW%
              int oldlen=m_dtms.length;
              if(oldlen<=id)
              {
                      // Various growth strategies are possible. I think we don't want
                      // to over-allocate excessively, and I'm willing to reallocate
                      // more often to get that. See also Fast*Vector classes.
                      //
                      // %REVIEW% Should throw a more diagnostic error if we go over the max...
                      int newlen=Math.min((id+256),IDENT_MAX_DTMS);

                      DTM new_m_dtms[] = new DTM[newlen];
                      System.arraycopy(m_dtms,0,new_m_dtms,0,oldlen);
                      m_dtms=new_m_dtms;
                      int new_m_dtm_offsets[] = new int[newlen];
                      System.arraycopy(m_dtm_offsets,0,new_m_dtm_offsets,0,oldlen);
                      m_dtm_offsets=new_m_dtm_offsets;
              }

  m_dtms[id] = dtm;
              m_dtm_offsets[id]=offset;
  dtm.documentRegistration();
              // The DTM should have been told who its manager was when we created it.
              // Do we need to allow for adopting DTMs _not_ created by this manager?
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:48,代码来源:DTMManagerDefault.java

示例5: setNodeValue

import com.sun.org.apache.xml.internal.dtm.DTMException; //导入依赖的package包/类
public void setNodeValue(String value) {throw new DTMException(NOT_SUPPORTED_ERR);} 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:2,代码来源:DOM2DTMdefaultNamespaceDeclarationNode.java

示例6: setValue

import com.sun.org.apache.xml.internal.dtm.DTMException; //导入依赖的package包/类
public void setValue(String value) {throw new DTMException(NOT_SUPPORTED_ERR);} 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:2,代码来源:DOM2DTMdefaultNamespaceDeclarationNode.java

示例7: setPrefix

import com.sun.org.apache.xml.internal.dtm.DTMException; //导入依赖的package包/类
public void setPrefix(String value) {throw new DTMException(NOT_SUPPORTED_ERR);} 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:2,代码来源:DOM2DTMdefaultNamespaceDeclarationNode.java

示例8: insertBefore

import com.sun.org.apache.xml.internal.dtm.DTMException; //导入依赖的package包/类
public Node insertBefore(Node a, Node b) {throw new DTMException(NOT_SUPPORTED_ERR);} 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:2,代码来源:DOM2DTMdefaultNamespaceDeclarationNode.java

示例9: replaceChild

import com.sun.org.apache.xml.internal.dtm.DTMException; //导入依赖的package包/类
public Node replaceChild(Node a, Node b) {throw new DTMException(NOT_SUPPORTED_ERR);} 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:2,代码来源:DOM2DTMdefaultNamespaceDeclarationNode.java

示例10: appendChild

import com.sun.org.apache.xml.internal.dtm.DTMException; //导入依赖的package包/类
public Node appendChild(Node a) {throw new DTMException(NOT_SUPPORTED_ERR);} 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:2,代码来源:DOM2DTMdefaultNamespaceDeclarationNode.java

示例11: removeChild

import com.sun.org.apache.xml.internal.dtm.DTMException; //导入依赖的package包/类
public Node removeChild(Node a) {throw new DTMException(NOT_SUPPORTED_ERR);} 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:2,代码来源:DOM2DTMdefaultNamespaceDeclarationNode.java

示例12: cloneNode

import com.sun.org.apache.xml.internal.dtm.DTMException; //导入依赖的package包/类
public Node cloneNode(boolean deep) {throw new DTMException(NOT_SUPPORTED_ERR);} 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:2,代码来源:DOM2DTMdefaultNamespaceDeclarationNode.java


注:本文中的com.sun.org.apache.xml.internal.dtm.DTMException类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。