jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/CMNode.java
changeset 27111 7a491d709b83
parent 25868 686eef1e7a79
equal deleted inserted replaced
26996:a137992d750c 27111:7a491d709b83
     1 /*
     1 /*
     2  * reserved comment block
     2  * Copyright (c) 2006, 2009, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT REMOVE OR ALTER!
       
     4  */
     3  */
     5 /*
     4 /*
     6  * The Apache Software License, Version 1.1
     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
     7  *
    11  *
       
    12  *      http://www.apache.org/licenses/LICENSE-2.0
     8  *
    13  *
     9  * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    14  * Unless required by applicable law or agreed to in writing, software
    10  * reserved.
    15  * distributed under the License is distributed on an "AS IS" BASIS,
    11  *
    16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  * Redistribution and use in source and binary forms, with or without
    17  * See the License for the specific language governing permissions and
    13  * modification, are permitted provided that the following conditions
    18  * limitations under the License.
    14  * are met:
       
    15  *
       
    16  * 1. Redistributions of source code must retain the above copyright
       
    17  *    notice, this list of conditions and the following disclaimer.
       
    18  *
       
    19  * 2. Redistributions in binary form must reproduce the above copyright
       
    20  *    notice, this list of conditions and the following disclaimer in
       
    21  *    the documentation and/or other materials provided with the
       
    22  *    distribution.
       
    23  *
       
    24  * 3. The end-user documentation included with the redistribution,
       
    25  *    if any, must include the following acknowledgment:
       
    26  *       "This product includes software developed by the
       
    27  *        Apache Software Foundation (http://www.apache.org/)."
       
    28  *    Alternately, this acknowledgment may appear in the software itself,
       
    29  *    if and wherever such third-party acknowledgments normally appear.
       
    30  *
       
    31  * 4. The names "Xerces" and "Apache Software Foundation" must
       
    32  *    not be used to endorse or promote products derived from this
       
    33  *    software without prior written permission. For written
       
    34  *    permission, please contact apache@apache.org.
       
    35  *
       
    36  * 5. Products derived from this software may not be called "Apache",
       
    37  *    nor may "Apache" appear in their name, without prior written
       
    38  *    permission of the Apache Software Foundation.
       
    39  *
       
    40  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
       
    41  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
       
    42  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
       
    43  * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
       
    44  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
       
    45  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
       
    46  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
       
    47  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
       
    48  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
       
    49  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
       
    50  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
       
    51  * SUCH DAMAGE.
       
    52  * ====================================================================
       
    53  *
       
    54  * This software consists of voluntary contributions made by many
       
    55  * individuals on behalf of the Apache Software Foundation and was
       
    56  * originally based on software copyright (c) 1999, International
       
    57  * Business Machines, Inc., http://www.apache.org.  For more
       
    58  * information on the Apache Software Foundation, please see
       
    59  * <http://www.apache.org/>.
       
    60  */
    19  */
    61 
    20 
    62 package com.sun.org.apache.xerces.internal.impl.dtd.models;
    21 package com.sun.org.apache.xerces.internal.impl.dtd.models;
    63 
    22 
    64 /**
    23 /**
   123     public final void setMaxStates(int maxStates)
    82     public final void setMaxStates(int maxStates)
   124     {
    83     {
   125         fMaxStates = maxStates;
    84         fMaxStates = maxStates;
   126     }
    85     }
   127 
    86 
       
    87     public boolean isCompactedForUPA() {
       
    88         return fCompactedForUPA;
       
    89     }
       
    90 
       
    91     public void setIsCompactUPAModel(boolean value) {
       
    92         fCompactedForUPA = value;
       
    93     }
       
    94 
   128     /**
    95     /**
   129      * Allows the user to set arbitrary data on this content model
    96      * Allows the user to set arbitrary data on this content model
   130      * node. This is used by the a{n,m} optimization that runs
    97      * node. This is used by the a{n,m} optimization that runs
   131      * in constant space.
    98      * in constant space.
   132      */
    99      */
   179     //      has to be stored redundantly, but we need to fault in the
   146     //      has to be stored redundantly, but we need to fault in the
   180     //      state set members and they have to be sized to this size. We
   147     //      state set members and they have to be sized to this size. We
   181     //      init to to -1 so it will cause an error if its used without
   148     //      init to to -1 so it will cause an error if its used without
   182     //      being initialized.
   149     //      being initialized.
   183     // -------------------------------------------------------------------
   150     // -------------------------------------------------------------------
   184     private int         fType;
   151     private final int  fType;
   185     private CMStateSet  fFirstPos   = null;
   152     private CMStateSet fFirstPos   = null;
   186     private CMStateSet  fFollowPos  = null;
   153     private CMStateSet fFollowPos  = null;
   187     private CMStateSet  fLastPos    = null;
   154     private CMStateSet fLastPos    = null;
   188     private int         fMaxStates  = -1;
   155     private int        fMaxStates  = -1;
   189     private Object      fUserData   = null;
   156     private Object      fUserData   = null;
       
   157     /*
       
   158      * This boolean is true if the model represented by the CMNode does not represent
       
   159      * the true model from the schema, but has had its min/maxOccurs modified for a
       
   160      * more compact representation (for purposes of UPA).
       
   161      */
       
   162     private boolean fCompactedForUPA = false;
   190 };
   163 };