當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。