1 /*
2 * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
3 * @LastModified: Nov 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.xpath.internal.axes;
23
29 import com.sun.org.apache.xml.internal.utils.PrefixResolver;
30 import com.sun.org.apache.xpath.internal.ExpressionOwner;
31 import com.sun.org.apache.xpath.internal.XPathContext;
32 import com.sun.org.apache.xpath.internal.XPathVisitor;
33 import com.sun.org.apache.xpath.internal.compiler.Compiler;
34 import com.sun.org.apache.xpath.internal.objects.XNodeSet;
35 import com.sun.org.apache.xpath.internal.objects.XObject;
36 import com.sun.org.apache.xpath.internal.res.XPATHErrorResources;
37
38 /**
39 * This class extends NodeSetDTM, which implements NodeIterator,
40 * and fetches nodes one at a time in document order based on a XPath
41 * <a href="http://www.w3.org/TR/xpath#NT-LocationPath>LocationPath</a>.
42 *
43 * <p>If setShouldCacheNodes(true) is called,
44 * as each node is iterated via nextNode(), the node is also stored
45 * in the NodeVector, so that previousNode() can easily be done, except in
46 * the case where the LocPathIterator is "owned" by a UnionPathIterator,
47 * in which case the UnionPathIterator will cache the nodes.</p>
48 * @xsl.usage advanced
49 */
50 public abstract class LocPathIterator extends PredicatedNodeTest
51 implements Cloneable, DTMIterator, java.io.Serializable, PathComponent
52 {
53 static final long serialVersionUID = -4602476357268405754L;
54
55 /**
56 * Create a LocPathIterator object.
57 *
58 */
59 protected LocPathIterator()
60 {
61 }
62
63
64 /**
65 * Create a LocPathIterator object.
66 *
67 * @param nscontext The namespace context for this iterator,
68 * should be OK if null.
|
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.xpath.internal.axes;
22
28 import com.sun.org.apache.xml.internal.utils.PrefixResolver;
29 import com.sun.org.apache.xpath.internal.ExpressionOwner;
30 import com.sun.org.apache.xpath.internal.XPathContext;
31 import com.sun.org.apache.xpath.internal.XPathVisitor;
32 import com.sun.org.apache.xpath.internal.compiler.Compiler;
33 import com.sun.org.apache.xpath.internal.objects.XNodeSet;
34 import com.sun.org.apache.xpath.internal.objects.XObject;
35 import com.sun.org.apache.xpath.internal.res.XPATHErrorResources;
36
37 /**
38 * This class extends NodeSetDTM, which implements NodeIterator,
39 * and fetches nodes one at a time in document order based on a XPath
40 * <a href="http://www.w3.org/TR/xpath#NT-LocationPath>LocationPath</a>.
41 *
42 * <p>If setShouldCacheNodes(true) is called,
43 * as each node is iterated via nextNode(), the node is also stored
44 * in the NodeVector, so that previousNode() can easily be done, except in
45 * the case where the LocPathIterator is "owned" by a UnionPathIterator,
46 * in which case the UnionPathIterator will cache the nodes.</p>
47 * @xsl.usage advanced
48 * @LastModified: Nov 2017
49 */
50 public abstract class LocPathIterator extends PredicatedNodeTest
51 implements Cloneable, DTMIterator, java.io.Serializable, PathComponent
52 {
53 static final long serialVersionUID = -4602476357268405754L;
54
55 /**
56 * Create a LocPathIterator object.
57 *
58 */
59 protected LocPathIterator()
60 {
61 }
62
63
64 /**
65 * Create a LocPathIterator object.
66 *
67 * @param nscontext The namespace context for this iterator,
68 * should be OK if null.
|