< prev index next >

src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/validation/ValidationManager.java

Print this page


   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.xerces.internal.impl.validation;
  23 
  24 import java.util.ArrayList;
  25 import java.util.List;
  26 
  27 /**
  28  * ValidationManager is a coordinator property for validators in the
  29  * pipeline. Each validator must know how to interact with
  30  * this property. Validators are not required to know what kind of
  31  * other validators present in the pipeline, but should understand
  32  * that there are others and that some coordination is required.
  33  *
  34  * @xerces.internal
  35  *
  36  * @author Elena Litani, IBM

  37  */
  38 public class ValidationManager {
  39 
  40     protected final List<ValidationState> fVSs = new ArrayList<>();
  41     protected boolean fGrammarFound = false;
  42 
  43     // used by the DTD validator to tell other components that it has a
  44     // cached DTD in hand so there's no reason to
  45     // scan external subset or entity decls.
  46     protected boolean fCachedDTD = false;
  47 
  48     /**
  49      * Each validator should call this method to add its ValidationState into
  50      * the validation manager.
  51      */
  52     public final void addValidationState(ValidationState vs) {
  53         fVSs.add(vs);
  54     }
  55 
  56     /**


   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.xerces.internal.impl.validation;
  22 
  23 import java.util.ArrayList;
  24 import java.util.List;
  25 
  26 /**
  27  * ValidationManager is a coordinator property for validators in the
  28  * pipeline. Each validator must know how to interact with
  29  * this property. Validators are not required to know what kind of
  30  * other validators present in the pipeline, but should understand
  31  * that there are others and that some coordination is required.
  32  *
  33  * @xerces.internal
  34  *
  35  * @author Elena Litani, IBM
  36  * @LastModified: Oct 2017
  37  */
  38 public class ValidationManager {
  39 
  40     protected final List<ValidationState> fVSs = new ArrayList<>();
  41     protected boolean fGrammarFound = false;
  42 
  43     // used by the DTD validator to tell other components that it has a
  44     // cached DTD in hand so there's no reason to
  45     // scan external subset or entity decls.
  46     protected boolean fCachedDTD = false;
  47 
  48     /**
  49      * Each validator should call this method to add its ValidationState into
  50      * the validation manager.
  51      */
  52     public final void addValidationState(ValidationState vs) {
  53         fVSs.add(vs);
  54     }
  55 
  56     /**


< prev index next >