jaxp/src/com/sun/org/apache/xalan/internal/xsltc/DOM.java
author joehw
Tue, 17 Apr 2012 11:17:59 -0700
changeset 12458 d601e4bba306
parent 12457 c348e06f0e82
permissions -rw-r--r--
7160380: Sync JDK8 with JAXP 1.4.5 Summary: bring JDK8 up to date to what we have in 7u4 Reviewed-by: lancea, mullan
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6
7f561c08de6b Initial load
duke
parents:
diff changeset
     1
/*
7f561c08de6b Initial load
duke
parents:
diff changeset
     2
 * reserved comment block
7f561c08de6b Initial load
duke
parents:
diff changeset
     3
 * DO NOT REMOVE OR ALTER!
7f561c08de6b Initial load
duke
parents:
diff changeset
     4
 */
7f561c08de6b Initial load
duke
parents:
diff changeset
     5
/*
7f561c08de6b Initial load
duke
parents:
diff changeset
     6
 * Copyright 2001-2004 The Apache Software Foundation.
7f561c08de6b Initial load
duke
parents:
diff changeset
     7
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
     8
 * Licensed under the Apache License, Version 2.0 (the "License");
7f561c08de6b Initial load
duke
parents:
diff changeset
     9
 * you may not use this file except in compliance with the License.
7f561c08de6b Initial load
duke
parents:
diff changeset
    10
 * You may obtain a copy of the License at
7f561c08de6b Initial load
duke
parents:
diff changeset
    11
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    12
 *     http://www.apache.org/licenses/LICENSE-2.0
7f561c08de6b Initial load
duke
parents:
diff changeset
    13
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    14
 * Unless required by applicable law or agreed to in writing, software
7f561c08de6b Initial load
duke
parents:
diff changeset
    15
 * distributed under the License is distributed on an "AS IS" BASIS,
7f561c08de6b Initial load
duke
parents:
diff changeset
    16
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7f561c08de6b Initial load
duke
parents:
diff changeset
    17
 * See the License for the specific language governing permissions and
7f561c08de6b Initial load
duke
parents:
diff changeset
    18
 * limitations under the License.
7f561c08de6b Initial load
duke
parents:
diff changeset
    19
 */
7f561c08de6b Initial load
duke
parents:
diff changeset
    20
/*
7f561c08de6b Initial load
duke
parents:
diff changeset
    21
 * $Id: DOM.java,v 1.2.4.1 2005/08/31 10:18:49 pvedula Exp $
7f561c08de6b Initial load
duke
parents:
diff changeset
    22
 */
7f561c08de6b Initial load
duke
parents:
diff changeset
    23
7f561c08de6b Initial load
duke
parents:
diff changeset
    24
package com.sun.org.apache.xalan.internal.xsltc;
7f561c08de6b Initial load
duke
parents:
diff changeset
    25
7f561c08de6b Initial load
duke
parents:
diff changeset
    26
import com.sun.org.apache.xalan.internal.xsltc.runtime.Hashtable;
7f561c08de6b Initial load
duke
parents:
diff changeset
    27
import com.sun.org.apache.xml.internal.dtm.DTMAxisIterator;
7f561c08de6b Initial load
duke
parents:
diff changeset
    28
7f561c08de6b Initial load
duke
parents:
diff changeset
    29
import org.w3c.dom.Node;
7f561c08de6b Initial load
duke
parents:
diff changeset
    30
import org.w3c.dom.NodeList;
7f561c08de6b Initial load
duke
parents:
diff changeset
    31
7f561c08de6b Initial load
duke
parents:
diff changeset
    32
import com.sun.org.apache.xml.internal.serializer.SerializationHandler;
7f561c08de6b Initial load
duke
parents:
diff changeset
    33
7f561c08de6b Initial load
duke
parents:
diff changeset
    34
/**
7f561c08de6b Initial load
duke
parents:
diff changeset
    35
 * @author Jacek Ambroziak
7f561c08de6b Initial load
duke
parents:
diff changeset
    36
 * @author Santiago Pericas-Geertsen
7f561c08de6b Initial load
duke
parents:
diff changeset
    37
 */
7f561c08de6b Initial load
duke
parents:
diff changeset
    38
public interface DOM {
7f561c08de6b Initial load
duke
parents:
diff changeset
    39
    public final static int  FIRST_TYPE             = 0;
7f561c08de6b Initial load
duke
parents:
diff changeset
    40
7f561c08de6b Initial load
duke
parents:
diff changeset
    41
    public final static int  NO_TYPE                = -1;
7f561c08de6b Initial load
duke
parents:
diff changeset
    42
7f561c08de6b Initial load
duke
parents:
diff changeset
    43
    // 0 is reserved for NodeIterator.END
7f561c08de6b Initial load
duke
parents:
diff changeset
    44
    public final static int NULL     = 0;
7f561c08de6b Initial load
duke
parents:
diff changeset
    45
7f561c08de6b Initial load
duke
parents:
diff changeset
    46
    // used by some node iterators to know which node to return
7f561c08de6b Initial load
duke
parents:
diff changeset
    47
    public final static int RETURN_CURRENT = 0;
7f561c08de6b Initial load
duke
parents:
diff changeset
    48
    public final static int RETURN_PARENT  = 1;
7f561c08de6b Initial load
duke
parents:
diff changeset
    49
7f561c08de6b Initial load
duke
parents:
diff changeset
    50
    // Constants used by getResultTreeFrag to indicate the types of the RTFs.
7f561c08de6b Initial load
duke
parents:
diff changeset
    51
    public final static int SIMPLE_RTF   = 0;
7f561c08de6b Initial load
duke
parents:
diff changeset
    52
    public final static int ADAPTIVE_RTF = 1;
7f561c08de6b Initial load
duke
parents:
diff changeset
    53
    public final static int TREE_RTF     = 2;
7f561c08de6b Initial load
duke
parents:
diff changeset
    54
7f561c08de6b Initial load
duke
parents:
diff changeset
    55
    /** returns singleton iterator containg the document root */
7f561c08de6b Initial load
duke
parents:
diff changeset
    56
    public DTMAxisIterator getIterator();
7f561c08de6b Initial load
duke
parents:
diff changeset
    57
    public String getStringValue();
7f561c08de6b Initial load
duke
parents:
diff changeset
    58
7f561c08de6b Initial load
duke
parents:
diff changeset
    59
    public DTMAxisIterator getChildren(final int node);
7f561c08de6b Initial load
duke
parents:
diff changeset
    60
    public DTMAxisIterator getTypedChildren(final int type);
7f561c08de6b Initial load
duke
parents:
diff changeset
    61
    public DTMAxisIterator getAxisIterator(final int axis);
7f561c08de6b Initial load
duke
parents:
diff changeset
    62
    public DTMAxisIterator getTypedAxisIterator(final int axis, final int type);
7f561c08de6b Initial load
duke
parents:
diff changeset
    63
    public DTMAxisIterator getNthDescendant(int node, int n, boolean includeself);
7f561c08de6b Initial load
duke
parents:
diff changeset
    64
    public DTMAxisIterator getNamespaceAxisIterator(final int axis, final int ns);
7f561c08de6b Initial load
duke
parents:
diff changeset
    65
    public DTMAxisIterator getNodeValueIterator(DTMAxisIterator iter, int returnType,
7f561c08de6b Initial load
duke
parents:
diff changeset
    66
                                             String value, boolean op);
7f561c08de6b Initial load
duke
parents:
diff changeset
    67
    public DTMAxisIterator orderNodes(DTMAxisIterator source, int node);
7f561c08de6b Initial load
duke
parents:
diff changeset
    68
    public String getNodeName(final int node);
7f561c08de6b Initial load
duke
parents:
diff changeset
    69
    public String getNodeNameX(final int node);
7f561c08de6b Initial load
duke
parents:
diff changeset
    70
    public String getNamespaceName(final int node);
7f561c08de6b Initial load
duke
parents:
diff changeset
    71
    public int getExpandedTypeID(final int node);
7f561c08de6b Initial load
duke
parents:
diff changeset
    72
    public int getNamespaceType(final int node);
7f561c08de6b Initial load
duke
parents:
diff changeset
    73
    public int getParent(final int node);
7f561c08de6b Initial load
duke
parents:
diff changeset
    74
    public int getAttributeNode(final int gType, final int element);
7f561c08de6b Initial load
duke
parents:
diff changeset
    75
    public String getStringValueX(final int node);
7f561c08de6b Initial load
duke
parents:
diff changeset
    76
    public void copy(final int node, SerializationHandler handler)
7f561c08de6b Initial load
duke
parents:
diff changeset
    77
        throws TransletException;
7f561c08de6b Initial load
duke
parents:
diff changeset
    78
    public void copy(DTMAxisIterator nodes, SerializationHandler handler)
7f561c08de6b Initial load
duke
parents:
diff changeset
    79
        throws TransletException;
7f561c08de6b Initial load
duke
parents:
diff changeset
    80
    public String shallowCopy(final int node, SerializationHandler handler)
7f561c08de6b Initial load
duke
parents:
diff changeset
    81
        throws TransletException;
7f561c08de6b Initial load
duke
parents:
diff changeset
    82
    public boolean lessThan(final int node1, final int node2);
7f561c08de6b Initial load
duke
parents:
diff changeset
    83
    public void characters(final int textNode, SerializationHandler handler)
7f561c08de6b Initial load
duke
parents:
diff changeset
    84
        throws TransletException;
7f561c08de6b Initial load
duke
parents:
diff changeset
    85
    public Node makeNode(int index);
7f561c08de6b Initial load
duke
parents:
diff changeset
    86
    public Node makeNode(DTMAxisIterator iter);
7f561c08de6b Initial load
duke
parents:
diff changeset
    87
    public NodeList makeNodeList(int index);
7f561c08de6b Initial load
duke
parents:
diff changeset
    88
    public NodeList makeNodeList(DTMAxisIterator iter);
7f561c08de6b Initial load
duke
parents:
diff changeset
    89
    public String getLanguage(int node);
7f561c08de6b Initial load
duke
parents:
diff changeset
    90
    public int getSize();
7f561c08de6b Initial load
duke
parents:
diff changeset
    91
    public String getDocumentURI(int node);
7f561c08de6b Initial load
duke
parents:
diff changeset
    92
    public void setFilter(StripFilter filter);
7f561c08de6b Initial load
duke
parents:
diff changeset
    93
    public void setupMapping(String[] names, String[] urisArray, int[] typesArray, String[] namespaces);
7f561c08de6b Initial load
duke
parents:
diff changeset
    94
    public boolean isElement(final int node);
7f561c08de6b Initial load
duke
parents:
diff changeset
    95
    public boolean isAttribute(final int node);
7f561c08de6b Initial load
duke
parents:
diff changeset
    96
    public String lookupNamespace(int node, String prefix)
7f561c08de6b Initial load
duke
parents:
diff changeset
    97
        throws TransletException;
7f561c08de6b Initial load
duke
parents:
diff changeset
    98
    public int getNodeIdent(final int nodehandle);
7f561c08de6b Initial load
duke
parents:
diff changeset
    99
    public int getNodeHandle(final int nodeId);
7f561c08de6b Initial load
duke
parents:
diff changeset
   100
    public DOM getResultTreeFrag(int initialSize, int rtfType);
7f561c08de6b Initial load
duke
parents:
diff changeset
   101
    public DOM getResultTreeFrag(int initialSize, int rtfType, boolean addToDTMManager);
7f561c08de6b Initial load
duke
parents:
diff changeset
   102
    public SerializationHandler getOutputDomBuilder();
7f561c08de6b Initial load
duke
parents:
diff changeset
   103
    public int getNSType(int node);
7f561c08de6b Initial load
duke
parents:
diff changeset
   104
    public int getDocument();
7f561c08de6b Initial load
duke
parents:
diff changeset
   105
    public String getUnparsedEntityURI(String name);
7f561c08de6b Initial load
duke
parents:
diff changeset
   106
    public Hashtable getElementsWithIDs();
7f561c08de6b Initial load
duke
parents:
diff changeset
   107
}