< prev index next >

src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLNamespaceBinder.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.xerces.internal.impl;
  23 


 199      *                      SAXNotSupportedException.
 200      */
 201     public void reset(XMLComponentManager componentManager)
 202         throws XNIException {
 203 
 204         // features
 205         fNamespaces = componentManager.getFeature(NAMESPACES, true);
 206 
 207         // Xerces properties
 208         fSymbolTable = (SymbolTable)componentManager.getProperty(SYMBOL_TABLE);
 209         fErrorReporter = (XMLErrorReporter)componentManager.getProperty(ERROR_REPORTER);
 210 
 211     } // reset(XMLComponentManager)
 212 
 213     /**
 214      * Returns a list of feature identifiers that are recognized by
 215      * this component. This method may return null if no features
 216      * are recognized by this component.
 217      */
 218     public String[] getRecognizedFeatures() {
 219         return (String[])(RECOGNIZED_FEATURES.clone());
 220     } // getRecognizedFeatures():String[]
 221 
 222     /**
 223      * Sets the state of a feature. This method is called by the component
 224      * manager any time after reset when a feature changes state.
 225      * <p>
 226      * <strong>Note:</strong> Components should silently ignore features
 227      * that do not affect the operation of the component.
 228      *
 229      * @param featureId The feature identifier.
 230      * @param state     The state of the feature.
 231      *
 232      * @throws SAXNotRecognizedException The component should not throw
 233      *                                   this exception.
 234      * @throws SAXNotSupportedException The component should not throw
 235      *                                  this exception.
 236      */
 237     public void setFeature(String featureId, boolean state)
 238         throws XMLConfigurationException {
 239     } // setFeature(String,boolean)
 240 
 241     /**
 242      * Returns a list of property identifiers that are recognized by
 243      * this component. This method may return null if no properties
 244      * are recognized by this component.
 245      */
 246     public String[] getRecognizedProperties() {
 247         return (String[])(RECOGNIZED_PROPERTIES.clone());
 248     } // getRecognizedProperties():String[]
 249 
 250     /**
 251      * Sets the value of a property during parsing.
 252      *
 253      * @param propertyId
 254      * @param value
 255      */
 256     public void setProperty(String propertyId, Object value)
 257         throws XMLConfigurationException {
 258 
 259         // Xerces properties
 260         if (propertyId.startsWith(Constants.XERCES_PROPERTY_PREFIX)) {
 261                 final int suffixLength = propertyId.length() - Constants.XERCES_PROPERTY_PREFIX.length();
 262 
 263             if (suffixLength == Constants.SYMBOL_TABLE_PROPERTY.length() &&
 264                 propertyId.endsWith(Constants.SYMBOL_TABLE_PROPERTY)) {
 265                 fSymbolTable = (SymbolTable)value;
 266             }
 267             else if (suffixLength == Constants.ERROR_REPORTER_PROPERTY.length() &&


   1 /*
   2  * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
   3  * @LastModified: Nov 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;
  23 


 199      *                      SAXNotSupportedException.
 200      */
 201     public void reset(XMLComponentManager componentManager)
 202         throws XNIException {
 203 
 204         // features
 205         fNamespaces = componentManager.getFeature(NAMESPACES, true);
 206 
 207         // Xerces properties
 208         fSymbolTable = (SymbolTable)componentManager.getProperty(SYMBOL_TABLE);
 209         fErrorReporter = (XMLErrorReporter)componentManager.getProperty(ERROR_REPORTER);
 210 
 211     } // reset(XMLComponentManager)
 212 
 213     /**
 214      * Returns a list of feature identifiers that are recognized by
 215      * this component. This method may return null if no features
 216      * are recognized by this component.
 217      */
 218     public String[] getRecognizedFeatures() {
 219         return RECOGNIZED_FEATURES.clone();
 220     } // getRecognizedFeatures():String[]
 221 
 222     /**
 223      * Sets the state of a feature. This method is called by the component
 224      * manager any time after reset when a feature changes state.
 225      * <p>
 226      * <strong>Note:</strong> Components should silently ignore features
 227      * that do not affect the operation of the component.
 228      *
 229      * @param featureId The feature identifier.
 230      * @param state     The state of the feature.
 231      *
 232      * @throws SAXNotRecognizedException The component should not throw
 233      *                                   this exception.
 234      * @throws SAXNotSupportedException The component should not throw
 235      *                                  this exception.
 236      */
 237     public void setFeature(String featureId, boolean state)
 238         throws XMLConfigurationException {
 239     } // setFeature(String,boolean)
 240 
 241     /**
 242      * Returns a list of property identifiers that are recognized by
 243      * this component. This method may return null if no properties
 244      * are recognized by this component.
 245      */
 246     public String[] getRecognizedProperties() {
 247         return RECOGNIZED_PROPERTIES.clone();
 248     } // getRecognizedProperties():String[]
 249 
 250     /**
 251      * Sets the value of a property during parsing.
 252      *
 253      * @param propertyId
 254      * @param value
 255      */
 256     public void setProperty(String propertyId, Object value)
 257         throws XMLConfigurationException {
 258 
 259         // Xerces properties
 260         if (propertyId.startsWith(Constants.XERCES_PROPERTY_PREFIX)) {
 261                 final int suffixLength = propertyId.length() - Constants.XERCES_PROPERTY_PREFIX.length();
 262 
 263             if (suffixLength == Constants.SYMBOL_TABLE_PROPERTY.length() &&
 264                 propertyId.endsWith(Constants.SYMBOL_TABLE_PROPERTY)) {
 265                 fSymbolTable = (SymbolTable)value;
 266             }
 267             else if (suffixLength == Constants.ERROR_REPORTER_PROPERTY.length() &&


< prev index next >