当前位置: 首页>>代码示例>>Java>>正文


Java XMLConfiguration.setAttributeSplittingDisabled方法代码示例

本文整理汇总了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);
    }
}
 
开发者ID:shlee89,项目名称:athena,代码行数:24,代码来源:XmlDriverLoader.java

示例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);
    }
}
 
开发者ID:shlee89,项目名称:athena,代码行数:21,代码来源:ApplicationArchive.java

示例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);
    }
}
 
开发者ID:shlee89,项目名称:athena,代码行数:13,代码来源:ApplicationArchive.java

示例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);
    }
}
 
开发者ID:ravikumaran2015,项目名称:ravikumaran201504,代码行数:22,代码来源:XmlDriverLoader.java

示例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);
}
 
开发者ID:ravikumaran2015,项目名称:ravikumaran201504,代码行数:16,代码来源:ApplicationArchive.java


注:本文中的org.apache.commons.configuration.XMLConfiguration.setAttributeSplittingDisabled方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。