< prev index next >

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

Print this page


   1 /*
   2  * reserved comment block
   3  * DO NOT REMOVE OR ALTER!
   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.xalan.internal.xsltc.dom;
  23 


  32 import com.sun.org.apache.xml.internal.utils.StringComparable;
  33 import com.sun.org.apache.xalan.internal.utils.ObjectFactory;
  34 import com.sun.org.apache.xalan.internal.utils.SecuritySupport;
  35 
  36 /**
  37  * Base class for sort records containing application specific sort keys
  38  */
  39 public abstract class NodeSortRecord {
  40     public static final int COMPARE_STRING     = 0;
  41     public static final int COMPARE_NUMERIC    = 1;
  42 
  43     public static final int COMPARE_ASCENDING  = 0;
  44     public static final int COMPARE_DESCENDING = 1;
  45 
  46     /**
  47      * A reference to a collator. May be updated by subclass if the stylesheet
  48      * specifies a different language (will be updated iff _locale is updated).
  49      * @deprecated This field continues to exist for binary compatibility.
  50      *             New code should not refer to it.
  51      */

  52     private static final Collator DEFAULT_COLLATOR = Collator.getInstance();
  53 
  54     /**
  55      * A reference to the first Collator
  56      * @deprecated This field continues to exist for binary compatibility.
  57      *             New code should not refer to it.
  58      */

  59     protected Collator _collator = DEFAULT_COLLATOR;
  60     protected Collator[] _collators;
  61 
  62     /**
  63      * A locale field that might be set by an instance of a subclass.
  64      * @deprecated This field continues to exist for binary compatibility.
  65      *             New code should not refer to it.
  66      */

  67     protected Locale _locale;
  68 
  69     protected CollatorFactory _collatorFactory;
  70 
  71     protected SortSettings _settings;
  72 
  73     private DOM    _dom = null;
  74     private int    _node;           // The position in the current iterator
  75     private int    _last = 0;       // Number of nodes in the current iterator
  76     private int    _scanned = 0;    // Number of key levels extracted from DOM
  77 
  78     private Object[] _values; // Contains Comparable  objects
  79 
  80     /**
  81      * This constructor is run by a call to ClassLoader in the
  82      * makeNodeSortRecord method in the NodeSortRecordFactory class. Since we
  83      * cannot pass any parameters to the constructor in that case we just set
  84      * the default values here and wait for new values through initialize().
  85      */
  86     public NodeSortRecord(int node) {


   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.xalan.internal.xsltc.dom;
  22 


  31 import com.sun.org.apache.xml.internal.utils.StringComparable;
  32 import com.sun.org.apache.xalan.internal.utils.ObjectFactory;
  33 import com.sun.org.apache.xalan.internal.utils.SecuritySupport;
  34 
  35 /**
  36  * Base class for sort records containing application specific sort keys
  37  */
  38 public abstract class NodeSortRecord {
  39     public static final int COMPARE_STRING     = 0;
  40     public static final int COMPARE_NUMERIC    = 1;
  41 
  42     public static final int COMPARE_ASCENDING  = 0;
  43     public static final int COMPARE_DESCENDING = 1;
  44 
  45     /**
  46      * A reference to a collator. May be updated by subclass if the stylesheet
  47      * specifies a different language (will be updated iff _locale is updated).
  48      * @deprecated This field continues to exist for binary compatibility.
  49      *             New code should not refer to it.
  50      */
  51     @Deprecated
  52     private static final Collator DEFAULT_COLLATOR = Collator.getInstance();
  53 
  54     /**
  55      * A reference to the first Collator
  56      * @deprecated This field continues to exist for binary compatibility.
  57      *             New code should not refer to it.
  58      */
  59     @Deprecated
  60     protected Collator _collator = DEFAULT_COLLATOR;
  61     protected Collator[] _collators;
  62 
  63     /**
  64      * A locale field that might be set by an instance of a subclass.
  65      * @deprecated This field continues to exist for binary compatibility.
  66      *             New code should not refer to it.
  67      */
  68     @Deprecated
  69     protected Locale _locale;
  70 
  71     protected CollatorFactory _collatorFactory;
  72 
  73     protected SortSettings _settings;
  74 
  75     private DOM    _dom = null;
  76     private int    _node;           // The position in the current iterator
  77     private int    _last = 0;       // Number of nodes in the current iterator
  78     private int    _scanned = 0;    // Number of key levels extracted from DOM
  79 
  80     private Object[] _values; // Contains Comparable  objects
  81 
  82     /**
  83      * This constructor is run by a call to ClassLoader in the
  84      * makeNodeSortRecord method in the NodeSortRecordFactory class. Since we
  85      * cannot pass any parameters to the constructor in that case we just set
  86      * the default values here and wait for new values through initialize().
  87      */
  88     public NodeSortRecord(int node) {


< prev index next >