本文整理汇总了Java中org.apache.commons.configuration.XMLConfiguration.setAttributeSplittingDisabled方法的典型用法代码示例。如果您正苦于以下问题:Java XMLConfiguration.setAttributeSplittingDisabled方法的具体用法?Java XMLConfiguration.setAttributeSplittingDisabled怎么用?Java XMLConfiguration.setAttributeSplittingDisabled使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.commons.configuration.XMLConfiguration
的用法示例。
在下文中一共展示了XMLConfiguration.setAttributeSplittingDisabled方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: loadDrivers
import org.apache.commons.configuration.XMLConfiguration; //导入方法依赖的package包/类
/**
* Loads the specified drivers resource as an XML stream and parses it to
* produce a ready-to-register driver provider.
*
* @param driversStream stream containing the drivers definitions
* @param resolver driver resolver
* @return driver provider
* @throws java.io.IOException if issues are encountered reading the stream
* or parsing the driver definitions within
*/
public DefaultDriverProvider loadDrivers(InputStream driversStream,
DriverResolver resolver) throws IOException {
try {
XMLConfiguration cfg = new XMLConfiguration();
cfg.setRootElementName(DRIVERS);
cfg.setAttributeSplittingDisabled(true);
cfg.load(driversStream);
return loadDrivers(cfg, resolver);
} catch (ConfigurationException e) {
throw new IOException("Unable to load drivers", e);
}
}
示例2: getApplicationDescription
import org.apache.commons.configuration.XMLConfiguration; //导入方法依赖的package包/类
/**
* Loads the application descriptor from the specified application archive
* stream and saves the stream in the appropriate application archive
* directory.
*
* @param appName application name
* @return application descriptor
* @throws org.onosproject.app.ApplicationException if unable to read application description
*/
public ApplicationDescription getApplicationDescription(String appName) {
try {
XMLConfiguration cfg = new XMLConfiguration();
cfg.setAttributeSplittingDisabled(true);
cfg.setDelimiterParsingDisabled(true);
cfg.load(appFile(appName, APP_XML));
return loadAppDescription(cfg);
} catch (Exception e) {
throw new ApplicationException("Unable to get app description", e);
}
}
示例3: parsePlainAppDescription
import org.apache.commons.configuration.XMLConfiguration; //导入方法依赖的package包/类
private ApplicationDescription parsePlainAppDescription(InputStream stream)
throws IOException {
XMLConfiguration cfg = new XMLConfiguration();
cfg.setAttributeSplittingDisabled(true);
cfg.setDelimiterParsingDisabled(true);
try {
cfg.load(stream);
return loadAppDescription(cfg);
} catch (ConfigurationException e) {
throw new IOException("Unable to parse " + APP_XML, e);
}
}
示例4: loadDrivers
import org.apache.commons.configuration.XMLConfiguration; //导入方法依赖的package包/类
/**
* Loads the specified drivers resource as an XML stream and parses it to
* produce a ready-to-register driver provider.
*
* @param driversStream stream containing the drivers definitions
* @return driver provider
* @throws java.io.IOException if issues are encountered reading the stream
* or parsing the driver definitions within
*/
public DefaultDriverProvider loadDrivers(InputStream driversStream) throws IOException {
try {
XMLConfiguration cfg = new XMLConfiguration();
cfg.setRootElementName(DRIVERS);
cfg.setAttributeSplittingDisabled(true);
cfg.load(driversStream);
return loadDrivers(cfg);
} catch (ConfigurationException e) {
throw new IOException("Unable to load drivers", e);
}
}
示例5: loadAppDescription
import org.apache.commons.configuration.XMLConfiguration; //导入方法依赖的package包/类
private ApplicationDescription loadAppDescription(XMLConfiguration cfg) {
cfg.setAttributeSplittingDisabled(true);
cfg.setDelimiterParsingDisabled(true);
String name = cfg.getString(NAME);
Version version = Version.version(cfg.getString(VERSION));
String desc = cfg.getString(DESCRIPTION);
String origin = cfg.getString(ORIGIN);
Set<Permission> perms = ImmutableSet.of();
String featRepo = cfg.getString(FEATURES_REPO);
URI featuresRepo = featRepo != null ? URI.create(featRepo) : null;
List<String> features = ImmutableList.copyOf(cfg.getStringArray(FEATURES));
return new DefaultApplicationDescription(name, version, desc, origin,
perms, featuresRepo, features);
}