1 16 19 package org.apache.xml.dtm; 20 21 import javax.xml.transform.SourceLocator ; 22 23 import org.apache.xml.utils.XMLString; 24 25 76 public interface DTM 77 { 78 79 82 public static final int NULL = -1; 83 84 90 93 public static final short ROOT_NODE = 0; 94 95 98 public static final short ELEMENT_NODE = 1; 99 100 103 public static final short ATTRIBUTE_NODE = 2; 104 105 108 public static final short TEXT_NODE = 3; 109 110 113 public static final short CDATA_SECTION_NODE = 4; 114 115 118 public static final short ENTITY_REFERENCE_NODE = 5; 119 120 123 public static final short ENTITY_NODE = 6; 124 125 128 public static final short PROCESSING_INSTRUCTION_NODE = 7; 129 130 133 public static final short COMMENT_NODE = 8; 134 135 138 public static final short DOCUMENT_NODE = 9; 139 140 143 public static final short DOCUMENT_TYPE_NODE = 10; 144 145 148 public static final short DOCUMENT_FRAGMENT_NODE = 11; 149 150 153 public static final short NOTATION_NODE = 12; 154 155 159 public static final short NAMESPACE_NODE = 13; 160 161 164 public static final short NTYPES = 14; 165 166 170 178 public void setFeature(String featureId, boolean state); 179 180 186 public void setProperty(String property, Object value); 187 188 190 198 public DTMAxisTraverser getAxisTraverser(final int axis); 199 200 210 public DTMAxisIterator getAxisIterator(final int axis); 211 212 221 public DTMAxisIterator getTypedAxisIterator(final int axis, final int type); 222 223 235 public boolean hasChildNodes(int nodeHandle); 236 237 244 public int getFirstChild(int nodeHandle); 245 246 253 public int getLastChild(int nodeHandle); 254 255 270 public int getAttributeNode(int elementHandle, String namespaceURI, 271 String name); 272 273 279 public int getFirstAttribute(int nodeHandle); 280 281 293 public int getFirstNamespaceNode(int nodeHandle, boolean inScope); 294 295 301 public int getNextSibling(int nodeHandle); 302 303 312 public int getPreviousSibling(int nodeHandle); 313 314 323 public int getNextAttribute(int nodeHandle); 324 325 337 public int getNextNamespaceNode(int baseHandle, int namespaceHandle, 338 boolean inScope); 339 340 347 public int getParent(int nodeHandle); 348 349 361 public int getDocument(); 362 363 372 public int getOwnerDocument(int nodeHandle); 373 374 383 public int getDocumentRoot(int nodeHandle); 384 385 394 public XMLString getStringValue(int nodeHandle); 395 396 408 public int getStringValueChunkCount(int nodeHandle); 409 410 424 public char[] getStringValueChunk(int nodeHandle, int chunkIndex, 425 int[] startAndLen); 426 427 434 public int getExpandedTypeID(int nodeHandle); 435 436 450 public int getExpandedTypeID(String namespace, String localName, int type); 451 452 458 public String getLocalNameFromExpandedNameID(int ExpandedNameID); 459 460 467 public String getNamespaceFromExpandedNameID(int ExpandedNameID); 468 469 477 public String getNodeName(int nodeHandle); 478 479 487 public String getNodeNameX(int nodeHandle); 488 489 497 public String getLocalName(int nodeHandle); 498 499 513 public String getPrefix(int nodeHandle); 514 515 525 public String getNamespaceURI(int nodeHandle); 526 527 535 public String getNodeValue(int nodeHandle); 536 537 545 public short getNodeType(int nodeHandle); 546 547 555 public short getLevel(int nodeHandle); 556 557 559 570 public boolean isSupported(String feature, String version); 571 572 579 public String getDocumentBaseURI(); 580 581 586 public void setDocumentBaseURI(String baseURI); 587 588 595 public String getDocumentSystemIdentifier(int nodeHandle); 596 597 604 public String getDocumentEncoding(int nodeHandle); 605 606 616 public String getDocumentStandalone(int nodeHandle); 617 618 630 public String getDocumentVersion(int documentHandle); 631 632 642 public boolean getDocumentAllDeclarationsProcessed(); 643 644 652 public String getDocumentTypeDeclarationSystemIdentifier(); 653 654 664 public String getDocumentTypeDeclarationPublicIdentifier(); 665 666 683 public int getElementById(String elementId); 684 685 719 public String getUnparsedEntityURI(String name); 720 721 723 729 public boolean supportsPreStripping(); 730 731 751 public boolean isNodeAfter(int firstNodeHandle, int secondNodeHandle); 752 753 780 public boolean isCharacterElementContentWhitespace(int nodeHandle); 781 782 797 public boolean isDocumentAllDeclarationsProcessed(int documentHandle); 798 799 811 public boolean isAttributeSpecified(int attributeHandle); 812 813 815 832 public void dispatchCharactersEvents( 833 int nodeHandle, org.xml.sax.ContentHandler ch, boolean normalize) 834 throws org.xml.sax.SAXException ; 835 836 845 public void dispatchToEvents(int nodeHandle, org.xml.sax.ContentHandler ch) 846 throws org.xml.sax.SAXException ; 847 848 855 public org.w3c.dom.Node getNode(int nodeHandle); 856 857 860 866 public boolean needsTwoThreads(); 867 868 874 879 public org.xml.sax.ContentHandler getContentHandler(); 880 881 888 public org.xml.sax.ext.LexicalHandler getLexicalHandler(); 889 890 895 public org.xml.sax.EntityResolver getEntityResolver(); 896 897 902 public org.xml.sax.DTDHandler getDTDHandler(); 903 904 909 public org.xml.sax.ErrorHandler getErrorHandler(); 910 911 916 public org.xml.sax.ext.DeclHandler getDeclHandler(); 917 918 936 public void appendChild(int newChild, boolean clone, boolean cloneDepth); 937 938 944 public void appendTextChild(String str); 945 946 953 public SourceLocator getSourceLocatorFor(int node); 954 955 961 public void documentRegistration(); 962 963 969 970 public void documentRelease(); 971 972 979 public void migrateTo(DTMManager manager); 980 } 981 | Popular Tags |