Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
JDK 11 java.xml.jmod - XML Module
JDK 11 java.xml.jmod is the JMOD file for JDK 11 XML (eXtensible Markup Language) module.
JDK 11 XML module compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\java.xml.jmod.
JDK 11 XML module compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.
JDK 11 XML module source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\java.xml.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ com/sun/org/apache/xerces/internal/util/ParserConfigurationSettings.java
/*
* Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.sun.org.apache.xerces.internal.util;
import com.sun.org.apache.xerces.internal.impl.Constants;
import com.sun.org.apache.xerces.internal.xni.parser.XMLComponentManager;
import com.sun.org.apache.xerces.internal.xni.parser.XMLConfigurationException;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
/**
* This class implements the basic operations for managing parser
* configuration features and properties. This utility class can
* be used as a base class for parser configurations or separately
* to encapsulate a number of parser settings as a component
* manager.
* <p>
* This class can be constructed with a "parent" settings object
* (in the form of an <code>XMLComponentManager</code>) that allows
* parser configuration settings to be "chained" together.
*
* @author Andy Clark, IBM
*
*/
public class ParserConfigurationSettings
implements XMLComponentManager {
protected static final String PARSER_SETTINGS =
Constants.XERCES_FEATURE_PREFIX + Constants.PARSER_SETTINGS;
//
// Data
//
// data
/** Recognized properties. */
protected Set<String> fRecognizedProperties;
/** Properties. */
protected Map<String, Object> fProperties;
/** Recognized features. */
protected Set<String> fRecognizedFeatures;
/** Features. */
protected Map<String, Boolean> fFeatures;
/** Parent parser configuration settings. */
protected XMLComponentManager fParentSettings;
//
// Constructors
//
/** Default Constructor. */
public ParserConfigurationSettings() {
this(null);
} // <init>()
/**
* Constructs a parser configuration settings object with a
* parent settings object.
*/
public ParserConfigurationSettings(XMLComponentManager parent) {
// create storage for recognized features and properties
fRecognizedFeatures = new HashSet<>();
fRecognizedProperties = new HashSet<>();
// create table for features and properties
fFeatures = new HashMap<>();
fProperties = new HashMap<>();
// save parent
fParentSettings = parent;
} // <init>(XMLComponentManager)
//
// XMLParserConfiguration methods
//
/**
* Allows a parser to add parser specific features to be recognized
* and managed by the parser configuration.
*
* @param featureIds An array of the additional feature identifiers
* to be recognized.
*/
public void addRecognizedFeatures(String[] featureIds) {
// add recognized features
int featureIdsCount = featureIds != null ? featureIds.length : 0;
for (int i = 0; i < featureIdsCount; i++) {
String featureId = featureIds[i];
if (!fRecognizedFeatures.contains(featureId)) {
fRecognizedFeatures.add(featureId);
}
}
} // addRecognizedFeatures(String[])
/**
* Set the state of a feature.
*
* Set the state of any feature in a SAX2 parser. The parser
* might not recognize the feature, and if it does recognize
* it, it might not be able to fulfill the request.
*
* @param featureId The unique identifier (URI) of the feature.
* @param state The requested state of the feature (true or false).
*
* @exception com.sun.org.apache.xerces.internal.xni.parser.XMLConfigurationException If the
* requested feature is not known.
*/
public void setFeature(String featureId, boolean state)
throws XMLConfigurationException {
// check and store
FeatureState checkState = checkFeature(featureId);
if (checkState.isExceptional()) {
throw new XMLConfigurationException(checkState.status, featureId);
}
fFeatures.put(featureId, state);
} // setFeature(String,boolean)
/**
* Allows a parser to add parser specific properties to be recognized
* and managed by the parser configuration.
*
* @param propertyIds An array of the additional property identifiers
* to be recognized.
*/
public void addRecognizedProperties(String[] propertyIds) {
fRecognizedProperties.addAll(Arrays.asList(propertyIds));
} // addRecognizedProperties(String[])
/**
* setProperty
*
* @param propertyId
* @param value
* @exception com.sun.org.apache.xerces.internal.xni.parser.XMLConfigurationException If the
* requested feature is not known.
*/
public void setProperty(String propertyId, Object value)
throws XMLConfigurationException {
// check and store
PropertyState checkState = checkProperty(propertyId);
if (checkState.isExceptional()) {
throw new XMLConfigurationException(checkState.status, propertyId);
}
fProperties.put(propertyId, value);
} // setProperty(String,Object)
//
// XMLComponentManager methods
//
/**
* Returns the state of a feature.
*
* @param featureId The feature identifier.
* @return true if the feature is supported
*
* @throws XMLConfigurationException Thrown for configuration error.
* In general, components should
* only throw this exception if
* it is <strong>really</strong>
* a critical error.
*/
@Override
public final boolean getFeature(String featureId)
throws XMLConfigurationException {
FeatureState state = getFeatureState(featureId);
if (state.isExceptional()) {
throw new XMLConfigurationException(state.status, featureId);
}
return state.state;
} // getFeature(String):boolean
@Override
public final boolean getFeature(String featureId, boolean defaultValue) {
FeatureState state = getFeatureState(featureId);
if (state.isExceptional()) {
return defaultValue;
}
return state.state;
}
@Override
public FeatureState getFeatureState(String featureId) {
Boolean state = fFeatures.get(featureId);
if (state == null) {
FeatureState checkState = checkFeature(featureId);
if (checkState.isExceptional()) {
return checkState;
}
return FeatureState.is(false);
}
return FeatureState.is(state);
}
/**
* Returns the value of a property.
*
* @param propertyId The property identifier.
* @return the value of the property
*
* @throws XMLConfigurationException Thrown for configuration error.
* In general, components should
* only throw this exception if
* it is <strong>really</strong>
* a critical error.
*/
@Override
public final Object getProperty(String propertyId)
throws XMLConfigurationException {
PropertyState state = getPropertyState(propertyId);
if (state.isExceptional()) {
throw new XMLConfigurationException(state.status, propertyId);
}
return state.state;
} // getProperty(String):Object
@Override
public final Object getProperty(String propertyId, Object defaultValue) {
PropertyState state = getPropertyState(propertyId);
if (state.isExceptional()) {
return defaultValue;
}
return state.state;
}
@Override
public PropertyState getPropertyState(String propertyId) {
Object propertyValue = fProperties.get(propertyId);
if (propertyValue == null) {
PropertyState state = checkProperty(propertyId);
if (state.isExceptional()) {
return state;
}
}
return PropertyState.is(propertyValue);
}
//
// Protected methods
//
/**
* Check a feature. If feature is known and supported, this method simply
* returns. Otherwise, the appropriate exception is thrown.
*
* @param featureId The unique identifier (URI) of the feature.
*
* @exception com.sun.org.apache.xerces.internal.xni.parser.XMLConfigurationException If the
* requested feature is not known.
*/
protected FeatureState checkFeature(String featureId)
throws XMLConfigurationException {
// check feature
if (!fRecognizedFeatures.contains(featureId)) {
if (fParentSettings != null) {
return fParentSettings.getFeatureState(featureId);
}
else {
return FeatureState.NOT_RECOGNIZED;
}
}
// TODO: reasonable default?
return FeatureState.RECOGNIZED;
} // checkFeature(String)
/**
* Check a property. If the property is known and supported, this method
* simply returns. Otherwise, the appropriate exception is thrown.
*
* @param propertyId The unique identifier (URI) of the property
* being set.
* @return the PropertyState
* @exception com.sun.org.apache.xerces.internal.xni.parser.XMLConfigurationException If the
* requested feature is not known.
*/
protected PropertyState checkProperty(String propertyId)
throws XMLConfigurationException {
// check property
if (!fRecognizedProperties.contains(propertyId)) {
if (fParentSettings != null) {
PropertyState state = fParentSettings.getPropertyState(propertyId);
if (state.isExceptional()) {
return state;
}
}
else {
return PropertyState.NOT_RECOGNIZED;
}
}
return PropertyState.RECOGNIZED;
} // checkProperty(String)
} // class ParserConfigurationSettings
⏎ com/sun/org/apache/xerces/internal/util/ParserConfigurationSettings.java
Or download all of them as a single archive file:
File name: java.xml-11.0.1-src.zip File size: 4876106 bytes Release date: 2018-11-04 Download
⇒ JDK 11 java.xml.crypto.jmod - XML Crypto Module
2020-08-25, ≈691🔥, 0💬
Popular Posts:
How to show the XML parsing flow with sax\DocumentTracer.java provided in the Apache Xerces package?...
JDK 11 java.rmi.jmod is the JMOD file for JDK 11 RMI (Remote Method Invocation) module. JDK 11 RMI m...
ANTLR is a powerful parser generator for multiple programming languages including Java. ANTLR contai...
JDK 11 java.management.jmod is the JMOD file for JDK 11 Management module. JDK 11 Management module ...
What Is activation.jar? I heard it's related to JAF (JavaBeans Activation Framework) 1.0.2? The if y...