1 /*
2 * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
3 * @LastModified: Oct 2017
4 */
5 /*
6 * Licensed to the Apache Software Foundation (ASF) under one or more
7 * contributor license agreements. See the NOTICE file distributed with
8 * this work for additional information regarding copyright ownership.
9 * The ASF licenses this file to You under the Apache License, Version 2.0
10 * (the "License"); you may not use this file except in compliance with
11 * the License. You may obtain a copy of the License at
12 *
13 * http://www.apache.org/licenses/LICENSE-2.0
14 *
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
20 */
21
22 package com.sun.org.apache.xml.internal.dtm.ref;
23
24 import com.sun.org.apache.xml.internal.dtm.*;
25 import com.sun.org.apache.xml.internal.res.XMLErrorResources;
26 import com.sun.org.apache.xml.internal.res.XMLMessages;
27 import com.sun.org.apache.xml.internal.utils.BoolStack;
28 import com.sun.org.apache.xml.internal.utils.SuballocatedIntVector;
29 import com.sun.org.apache.xml.internal.utils.XMLString;
30 import com.sun.org.apache.xml.internal.utils.XMLStringFactory;
31 import java.io.*; // for dumpDTM
32 import java.util.Vector;
33 import javax.xml.transform.Source;
34
35 /**
36 * The <code>DTMDefaultBase</code> class serves as a helper base for DTMs.
37 * It sets up structures for navigation and type, while leaving data
38 * management and construction to the derived classes.
39 */
40 public abstract class DTMDefaultBase implements DTM
41 {
42 static final boolean JJK_DEBUG=false;
43
44 // This constant is likely to be removed in the future. Use the
45 // getDocument() method instead of ROOTNODE to get at the root
46 // node of a DTM.
47 /** The identity of the root node. */
48 public static final int ROOTNODE = 0;
49
50 /**
51 * The number of nodes, which is also used to determine the next
52 * node index.
53 */
54 protected int m_size = 0;
55
56 /** The expanded names, one array element for each node. */
57 protected SuballocatedIntVector m_exptype;
58
|
1 /*
2 * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
3 */
4 /*
5 * Licensed to the Apache Software Foundation (ASF) under one or more
6 * contributor license agreements. See the NOTICE file distributed with
7 * this work for additional information regarding copyright ownership.
8 * The ASF licenses this file to You under the Apache License, Version 2.0
9 * (the "License"); you may not use this file except in compliance with
10 * the License. You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 */
20
21 package com.sun.org.apache.xml.internal.dtm.ref;
22
23 import com.sun.org.apache.xml.internal.dtm.*;
24 import com.sun.org.apache.xml.internal.res.XMLErrorResources;
25 import com.sun.org.apache.xml.internal.res.XMLMessages;
26 import com.sun.org.apache.xml.internal.utils.BoolStack;
27 import com.sun.org.apache.xml.internal.utils.SuballocatedIntVector;
28 import com.sun.org.apache.xml.internal.utils.XMLString;
29 import com.sun.org.apache.xml.internal.utils.XMLStringFactory;
30 import java.io.*; // for dumpDTM
31 import java.util.Vector;
32 import javax.xml.transform.Source;
33
34 /**
35 * The <code>DTMDefaultBase</code> class serves as a helper base for DTMs.
36 * It sets up structures for navigation and type, while leaving data
37 * management and construction to the derived classes.
38 *
39 * @LastModified: Oct 2017
40 */
41 public abstract class DTMDefaultBase implements DTM
42 {
43 static final boolean JJK_DEBUG=false;
44
45 // This constant is likely to be removed in the future. Use the
46 // getDocument() method instead of ROOTNODE to get at the root
47 // node of a DTM.
48 /** The identity of the root node. */
49 public static final int ROOTNODE = 0;
50
51 /**
52 * The number of nodes, which is also used to determine the next
53 * node index.
54 */
55 protected int m_size = 0;
56
57 /** The expanded names, one array element for each node. */
58 protected SuballocatedIntVector m_exptype;
59
|