com.sun.org.apache.xml.internal.dtm.DTMDOMException Java Examples

The following examples show how to use com.sun.org.apache.xml.internal.dtm.DTMDOMException. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DTMNodeIterator.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/** @return the next node in the set and advance the position of the
 * iterator in the set.
 *
 * @throws DOMException - INVALID_STATE_ERR Raised if this method is
 * called after the detach method was invoked.
 *  */
public Node nextNode() throws DOMException
  {
    if(!valid)
      throw new DTMDOMException(DOMException.INVALID_STATE_ERR);

    int handle=dtm_iter.nextNode();
    if (handle==DTM.NULL)
      return null;
    return dtm_iter.getDTM(handle).getNode(handle);
  }
 
Example #2
Source File: DTMNodeIterator.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/** @return the next previous in the set and advance the position of the
 * iterator in the set.
 *
 * @throws DOMException - INVALID_STATE_ERR Raised if this method is
 * called after the detach method was invoked.
 *  */
public Node previousNode()
  {
    if(!valid)
      throw new DTMDOMException(DOMException.INVALID_STATE_ERR);

    int handle=dtm_iter.previousNode();
    if (handle==DTM.NULL)
      return null;
    return dtm_iter.getDTM(handle).getNode(handle);
  }
 
Example #3
Source File: DTMNodeIterator.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/** @return the next node in the set and advance the position of the
 * iterator in the set.
 *
 * @throws DOMException - INVALID_STATE_ERR Raised if this method is
 * called after the detach method was invoked.
 *  */
public Node nextNode() throws DOMException
  {
    if(!valid)
      throw new DTMDOMException(DOMException.INVALID_STATE_ERR);

    int handle=dtm_iter.nextNode();
    if (handle==DTM.NULL)
      return null;
    return dtm_iter.getDTM(handle).getNode(handle);
  }
 
Example #4
Source File: DTMNodeIterator.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/** @return the next previous in the set and advance the position of the
 * iterator in the set.
 *
 * @throws DOMException - INVALID_STATE_ERR Raised if this method is
 * called after the detach method was invoked.
 *  */
public Node previousNode()
  {
    if(!valid)
      throw new DTMDOMException(DOMException.INVALID_STATE_ERR);

    int handle=dtm_iter.previousNode();
    if (handle==DTM.NULL)
      return null;
    return dtm_iter.getDTM(handle).getNode(handle);
  }
 
Example #5
Source File: DTMNodeProxy.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/** This is a bit of a problem in DTM, since a DTM may be a Document
 * Fragment and hence not have a clear-cut Document Element. We can
 * make it work in the well-formed cases but would that be confusing for others?
 *
 *
 * @see org.w3c.dom.Document
 */
@Override
public final Element getDocumentElement()
{
              int dochandle=dtm.getDocument();
              int elementhandle=DTM.NULL;
              for(int kidhandle=dtm.getFirstChild(dochandle);
                              kidhandle!=DTM.NULL;
                              kidhandle=dtm.getNextSibling(kidhandle))
              {
                      switch(dtm.getNodeType(kidhandle))
                      {
                      case Node.ELEMENT_NODE:
                              if(elementhandle!=DTM.NULL)
                              {
                                      elementhandle=DTM.NULL; // More than one; ill-formed.
                                      kidhandle=dtm.getLastChild(dochandle); // End loop
                              }
                              else
                                      elementhandle=kidhandle;
                              break;

                      // These are harmless; document is still wellformed
                      case Node.COMMENT_NODE:
                      case Node.PROCESSING_INSTRUCTION_NODE:
                      case Node.DOCUMENT_TYPE_NODE:
                              break;

                      default:
                              elementhandle=DTM.NULL; // ill-formed
                              kidhandle=dtm.getLastChild(dochandle); // End loop
                              break;
                      }
              }
              if(elementhandle==DTM.NULL)
                      throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
              else
                      return (Element)(dtm.getNode(elementhandle));
}
 
Example #6
Source File: DTMNodeProxy.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/** This is a bit of a problem in DTM, since a DTM may be a Document
 * Fragment and hence not have a clear-cut Document Element. We can
 * make it work in the well-formed cases but would that be confusing for others?
 *
 *
 * @see org.w3c.dom.Document
 */
@Override
public final Element getDocumentElement()
{
              int dochandle=dtm.getDocument();
              int elementhandle=DTM.NULL;
              for(int kidhandle=dtm.getFirstChild(dochandle);
                              kidhandle!=DTM.NULL;
                              kidhandle=dtm.getNextSibling(kidhandle))
              {
                      switch(dtm.getNodeType(kidhandle))
                      {
                      case Node.ELEMENT_NODE:
                              if(elementhandle!=DTM.NULL)
                              {
                                      elementhandle=DTM.NULL; // More than one; ill-formed.
                                      kidhandle=dtm.getLastChild(dochandle); // End loop
                              }
                              else
                                      elementhandle=kidhandle;
                              break;

                      // These are harmless; document is still wellformed
                      case Node.COMMENT_NODE:
                      case Node.PROCESSING_INSTRUCTION_NODE:
                      case Node.DOCUMENT_TYPE_NODE:
                              break;

                      default:
                              elementhandle=DTM.NULL; // ill-formed
                              kidhandle=dtm.getLastChild(dochandle); // End loop
                              break;
                      }
              }
              if(elementhandle==DTM.NULL)
                      throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
              else
                      return (Element)(dtm.getNode(elementhandle));
}
 
Example #7
Source File: DTMNodeProxy.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
 *
 *
 * @see org.w3c.dom.Document
 */
@Override
public final DocumentFragment createDocumentFragment()
{
  throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
}
 
Example #8
Source File: DTMNodeProxy.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public Document createDocument(String namespaceURI,String qualfiedName,DocumentType doctype)
{
  // Could create a DTM... but why, when it'd have to be permanantly empty?
  throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
}
 
Example #9
Source File: DTMNodeProxy.java    From jdk1.8-source-analysis with Apache License 2.0 4 votes vote down vote up
/** @see org.w3c.dom.Element */
@Override
public final void normalize()
{
  throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
}
 
Example #10
Source File: DTMNodeProxy.java    From jdk1.8-source-analysis with Apache License 2.0 4 votes vote down vote up
/**
 *
 * @param value
 * @see org.w3c.dom.Attr
 */
@Override
public final void setValue(String value)
{
  throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
}
 
Example #11
Source File: DTMNodeProxy.java    From jdk1.8-source-analysis with Apache License 2.0 4 votes vote down vote up
@Override
public Document createDocument(String namespaceURI,String qualfiedName,DocumentType doctype)
{
  // Could create a DTM... but why, when it'd have to be permanantly empty?
  throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
}
 
Example #12
Source File: DTMNodeProxy.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
/** @see org.w3c.dom.Element */
@Override
public final void normalize()
{
  throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
}
 
Example #13
Source File: DTMNodeProxy.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
 *
 * @param value
 * @see org.w3c.dom.Attr
 */
@Override
public final void setValue(String value)
{
  throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
}
 
Example #14
Source File: DTMNodeProxy.java    From jdk1.8-source-analysis with Apache License 2.0 3 votes vote down vote up
/**
 *
 * @param namespaceURI
 * @param qualifiedName
 * @param value
 *
 * @throws DOMException
 * @see org.w3c.dom.Element
 */
@Override
public final void setAttributeNS(
                                 String namespaceURI, String qualifiedName, String value)
  throws DOMException
{
  throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
}
 
Example #15
Source File: DTMNodeProxy.java    From TencentKona-8 with GNU General Public License v2.0 3 votes vote down vote up
/**
 *
 * @param name
 * @param value
 *
 * @throws DOMException
 * @see org.w3c.dom.Element
 */
@Override
public final void setAttribute(String name, String value)
  throws DOMException
{
  throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
}
 
Example #16
Source File: DTMNodeProxy.java    From TencentKona-8 with GNU General Public License v2.0 3 votes vote down vote up
/**
 *
 * @param namespaceURI
 * @param qualifiedName
 * @param value
 *
 * @throws DOMException
 * @see org.w3c.dom.Element
 */
@Override
public final void setAttributeNS(
                                 String namespaceURI, String qualifiedName, String value)
  throws DOMException
{
  throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
}
 
Example #17
Source File: DTMNodeProxy.java    From jdk1.8-source-analysis with Apache License 2.0 3 votes vote down vote up
/**
 *
 * @param data
 *
 *
 *
 * @throws DOMException
 * @see org.w3c.dom.Document
 */
@Override
public final CDATASection createCDATASection(String data)
  throws DOMException
{
  throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
}
 
Example #18
Source File: DTMNodeProxy.java    From jdk1.8-source-analysis with Apache License 2.0 3 votes vote down vote up
/**
 *
 * @param newChild
 * @param refChild
 *
 *
 *
 * @throws DOMException
 * @see org.w3c.dom.Node -- DTMNodeProxy is read-only
 */
@Override
public final Node insertBefore(Node newChild, Node refChild)
  throws DOMException
{
  throw new DTMDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);
}
 
Example #19
Source File: DTMNodeProxy.java    From jdk1.8-source-analysis with Apache License 2.0 3 votes vote down vote up
/**
 *
 * @param name
 *
 *
 *
 * @throws DOMException
 * @see org.w3c.dom.Document
 */
@Override
public final EntityReference createEntityReference(String name)
  throws DOMException
{
  throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
}
 
Example #20
Source File: DTMNodeProxy.java    From jdk1.8-source-analysis with Apache License 2.0 3 votes vote down vote up
/**
 *
 * @param newChild
 * @param oldChild
 *
 *
 *
 * @throws DOMException
 * @see org.w3c.dom.Node -- DTMNodeProxy is read-only
 */
@Override
public final Node replaceChild(Node newChild, Node oldChild)
  throws DOMException
{
  throw new DTMDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);
}
 
Example #21
Source File: DTMNodeProxy.java    From TencentKona-8 with GNU General Public License v2.0 3 votes vote down vote up
/**
 *
 * @param namespaceURI
 * @param localName
 *
 * @throws DOMException
 * @see org.w3c.dom.Element
 */
@Override
public final void removeAttributeNS(String namespaceURI, String localName)
  throws DOMException
{
  throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
}
 
Example #22
Source File: DTMNodeProxy.java    From jdk1.8-source-analysis with Apache License 2.0 3 votes vote down vote up
/**
 *
 * @param offset
 * @param count
 * @param arg
 *
 * @throws DOMException
 * @see org.w3c.dom.CharacterData
 */
@Override
public final void replaceData(int offset, int count, String arg)
  throws DOMException
{
  throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
}
 
Example #23
Source File: DTMNodeProxy.java    From TencentKona-8 with GNU General Public License v2.0 3 votes vote down vote up
/**
 *
 * @param namespaceURI
 * @param qualifiedName
 *
 *
 *
 * @throws DOMException
 * @see org.w3c.dom.Document as of DOM Level 2
 */
@Override
public final Element createElementNS(
               String namespaceURI, String qualifiedName) throws DOMException
{
  throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
}
 
Example #24
Source File: DTMNodeProxy.java    From TencentKona-8 with GNU General Public License v2.0 3 votes vote down vote up
/**
 *
 * @param importedNode
 * @param deep
 *
 *
 *
 * @throws DOMException
 * @see org.w3c.dom.Document as of DOM Level 2 -- DTMNodeProxy is read-only
 */
@Override
public final Node importNode(Node importedNode, boolean deep)
  throws DOMException
{
  throw new DTMDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);
}
 
Example #25
Source File: DTMNodeProxy.java    From TencentKona-8 with GNU General Public License v2.0 3 votes vote down vote up
/**
 *
 * @param name
 *
 *
 *
 * @throws DOMException
 * @see org.w3c.dom.Document
 */
@Override
public final EntityReference createEntityReference(String name)
  throws DOMException
{
  throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
}
 
Example #26
Source File: DTMNodeProxy.java    From jdk1.8-source-analysis with Apache License 2.0 3 votes vote down vote up
/**
 *
 * @param name
 * @param value
 *
 * @throws DOMException
 * @see org.w3c.dom.Element
 */
@Override
public final void setAttribute(String name, String value)
  throws DOMException
{
  throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
}
 
Example #27
Source File: DTMNodeProxy.java    From jdk1.8-source-analysis with Apache License 2.0 3 votes vote down vote up
/**
 *
 * @param namespaceURI
 * @param localName
 *
 * @throws DOMException
 * @see org.w3c.dom.Element
 */
@Override
public final void removeAttributeNS(String namespaceURI, String localName)
  throws DOMException
{
  throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
}
 
Example #28
Source File: DTMNodeProxy.java    From TencentKona-8 with GNU General Public License v2.0 3 votes vote down vote up
/**
 *
 * @param data
 *
 *
 *
 * @throws DOMException
 * @see org.w3c.dom.Document
 */
@Override
public final CDATASection createCDATASection(String data)
  throws DOMException
{
  throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
}
 
Example #29
Source File: DTMNodeProxy.java    From TencentKona-8 with GNU General Public License v2.0 3 votes vote down vote up
/**
 *
 * @param newChild
 * @param oldChild
 *
 *
 *
 * @throws DOMException
 * @see org.w3c.dom.Node -- DTMNodeProxy is read-only
 */
@Override
public final Node replaceChild(Node newChild, Node oldChild)
  throws DOMException
{
  throw new DTMDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);
}
 
Example #30
Source File: DTMNodeProxy.java    From TencentKona-8 with GNU General Public License v2.0 3 votes vote down vote up
/**
 *
 * @param newChild
 * @param refChild
 *
 *
 *
 * @throws DOMException
 * @see org.w3c.dom.Node -- DTMNodeProxy is read-only
 */
@Override
public final Node insertBefore(Node newChild, Node refChild)
  throws DOMException
{
  throw new DTMDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);
}