< prev index next >

src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/KeyIndex.java

Print this page


   1 /*
   2  * Copyright (c) 2007, 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  * $Id: KeyIndex.java,v 1.6 2006/06/19 19:49:02 spericas Exp $
  23  */


  25 package com.sun.org.apache.xalan.internal.xsltc.dom;
  26 
  27 import com.sun.org.apache.xalan.internal.xsltc.DOM;
  28 import com.sun.org.apache.xalan.internal.xsltc.DOMEnhancedForDTM;
  29 import com.sun.org.apache.xalan.internal.xsltc.runtime.BasisLibrary;
  30 import com.sun.org.apache.xalan.internal.xsltc.util.IntegerArray;
  31 import com.sun.org.apache.xml.internal.dtm.Axis;
  32 import com.sun.org.apache.xml.internal.dtm.DTM;
  33 import com.sun.org.apache.xml.internal.dtm.DTMAxisIterator;
  34 import com.sun.org.apache.xml.internal.dtm.ref.DTMAxisIteratorBase;
  35 import java.util.HashMap;
  36 import java.util.Map;
  37 import java.util.StringTokenizer;
  38 
  39 /**
  40  * Stores mappings of key values or IDs to DTM nodes.
  41  * <em>Use of an instance of this class as a {@link DTMAxisIterator} is
  42  * <b>deprecated.</b></em>
  43  * @author Morten Jorgensen
  44  * @author Santiago Pericas-Geertsen

  45  */
  46 public class KeyIndex extends DTMAxisIteratorBase {
  47 
  48     /**
  49      * A mapping between values and nodesets for the current document.  Used
  50      * only while building keys.
  51      */
  52     private Map<String, IntegerArray> _index;
  53 
  54     /**
  55      * The document node currently being processed.  Used only while building
  56      * keys.
  57      */
  58     private int _currentDocumentNode = DTM.NULL;
  59 
  60     /**
  61      * A mapping from a document node to the mapping between values and nodesets
  62      */
  63     private Map<Integer, Map<String, IntegerArray>> _rootToIndexMap = new HashMap<>();
  64 


   1 /*
   2  * Copyright (c) 2007, 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  * $Id: KeyIndex.java,v 1.6 2006/06/19 19:49:02 spericas Exp $
  22  */


  24 package com.sun.org.apache.xalan.internal.xsltc.dom;
  25 
  26 import com.sun.org.apache.xalan.internal.xsltc.DOM;
  27 import com.sun.org.apache.xalan.internal.xsltc.DOMEnhancedForDTM;
  28 import com.sun.org.apache.xalan.internal.xsltc.runtime.BasisLibrary;
  29 import com.sun.org.apache.xalan.internal.xsltc.util.IntegerArray;
  30 import com.sun.org.apache.xml.internal.dtm.Axis;
  31 import com.sun.org.apache.xml.internal.dtm.DTM;
  32 import com.sun.org.apache.xml.internal.dtm.DTMAxisIterator;
  33 import com.sun.org.apache.xml.internal.dtm.ref.DTMAxisIteratorBase;
  34 import java.util.HashMap;
  35 import java.util.Map;
  36 import java.util.StringTokenizer;
  37 
  38 /**
  39  * Stores mappings of key values or IDs to DTM nodes.
  40  * <em>Use of an instance of this class as a {@link DTMAxisIterator} is
  41  * <b>deprecated.</b></em>
  42  * @author Morten Jorgensen
  43  * @author Santiago Pericas-Geertsen
  44  * @LastModified: Oct 2017
  45  */
  46 public class KeyIndex extends DTMAxisIteratorBase {
  47 
  48     /**
  49      * A mapping between values and nodesets for the current document.  Used
  50      * only while building keys.
  51      */
  52     private Map<String, IntegerArray> _index;
  53 
  54     /**
  55      * The document node currently being processed.  Used only while building
  56      * keys.
  57      */
  58     private int _currentDocumentNode = DTM.NULL;
  59 
  60     /**
  61      * A mapping from a document node to the mapping between values and nodesets
  62      */
  63     private Map<Integer, Map<String, IntegerArray>> _rootToIndexMap = new HashMap<>();
  64 


< prev index next >