src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/BasicParserConfiguration.java

Print this page


   1 /*
   2  * reserved comment block
   3  * DO NOT REMOVE OR ALTER!
   4  */
   5 /*
   6  * Copyright 2001-2004 The Apache Software Foundation.
   7  *
   8  * Licensed under the Apache License, Version 2.0 (the "License");
   9  * you may not use this file except in compliance with the License.
  10  * 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.parsers;
  22 
  23 import java.io.IOException;
  24 import java.util.ArrayList;
  25 import java.util.HashMap;
  26 import java.util.Locale;
  27 
  28 import com.sun.org.apache.xerces.internal.impl.Constants;
  29 import com.sun.org.apache.xerces.internal.util.FeatureState;
  30 import com.sun.org.apache.xerces.internal.util.ParserConfigurationSettings;


 564         throws XMLConfigurationException {
 565 
 566         //
 567         // Xerces Features
 568         //
 569         if (featureId.startsWith(Constants.XERCES_FEATURE_PREFIX)) {
 570             final int suffixLength = featureId.length() - Constants.XERCES_FEATURE_PREFIX.length();
 571 
 572             //
 573             // special performance feature: no one by component manager is allowed to set it
 574             //
 575             if (suffixLength == Constants.PARSER_SETTINGS.length() &&
 576                 featureId.endsWith(Constants.PARSER_SETTINGS)) {
 577                 return FeatureState.NOT_SUPPORTED;
 578             }
 579         }
 580 
 581         return super.checkFeature(featureId);
 582      } // checkFeature(String)
 583 








 584 








 585 } // class BasicParserConfiguration
   1 /*
   2  * Copyright (c) 2015, 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.parsers;
  22 
  23 import java.io.IOException;
  24 import java.util.ArrayList;
  25 import java.util.HashMap;
  26 import java.util.Locale;
  27 
  28 import com.sun.org.apache.xerces.internal.impl.Constants;
  29 import com.sun.org.apache.xerces.internal.util.FeatureState;
  30 import com.sun.org.apache.xerces.internal.util.ParserConfigurationSettings;


 564         throws XMLConfigurationException {
 565 
 566         //
 567         // Xerces Features
 568         //
 569         if (featureId.startsWith(Constants.XERCES_FEATURE_PREFIX)) {
 570             final int suffixLength = featureId.length() - Constants.XERCES_FEATURE_PREFIX.length();
 571 
 572             //
 573             // special performance feature: no one by component manager is allowed to set it
 574             //
 575             if (suffixLength == Constants.PARSER_SETTINGS.length() &&
 576                 featureId.endsWith(Constants.PARSER_SETTINGS)) {
 577                 return FeatureState.NOT_SUPPORTED;
 578             }
 579         }
 580 
 581         return super.checkFeature(featureId);
 582      } // checkFeature(String)
 583 
 584     /**
 585      * Stops the parsing process.
 586      */
 587     @Override
 588     public boolean stop() {
 589         //no-op. this feature is implemented in the specific SAX parser.
 590         return false;
 591     }
 592 
 593     /**
 594      * Resumes parsing after it was stopped by calling the stop method.
 595      */
 596     @Override
 597     public boolean resume() {
 598         //no-op. this feature is implemented in the specific SAX parser.
 599         return false;
 600     }
 601 } // class BasicParserConfiguration