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


Java Catalog.parseCatalog方法代码示例

本文整理汇总了Java中com.sun.org.apache.xml.internal.resolver.Catalog.parseCatalog方法的典型用法代码示例。如果您正苦于以下问题:Java Catalog.parseCatalog方法的具体用法?Java Catalog.parseCatalog怎么用?Java Catalog.parseCatalog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.sun.org.apache.xml.internal.resolver.Catalog的用法示例。


在下文中一共展示了Catalog.parseCatalog方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createEntityResolver

import com.sun.org.apache.xml.internal.resolver.Catalog; //导入方法依赖的package包/类
public static EntityResolver createEntityResolver(@Nullable URL catalogUrl) {
    // set up a manager
    CatalogManager manager = new CatalogManager();
    manager.setIgnoreMissingProperties(true);
    // Using static catalog may  result in to sharing of the catalog by multiple apps running in a container
    manager.setUseStaticCatalog(false);
    Catalog catalog = manager.getCatalog();
    try {
        if (catalogUrl != null) {
            catalog.parseCatalog(catalogUrl);
        }
    } catch (IOException e) {
        throw new ServerRtException("server.rt.err",e);
    }
    return workaroundCatalogResolver(catalog);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:17,代码来源:XmlUtil.java

示例2: parseCatalogs

import com.sun.org.apache.xml.internal.resolver.Catalog; //导入方法依赖的package包/类
/**
 * Instruct the <code>Catalog</code> to parse each of the
 * catalogs in the list. Only the first catalog will actually be
 * parsed immediately. The others will be queued and read if
 * they are needed later.
 */
private void parseCatalogs () throws IOException {
    if (fCatalogsList != null) {
        fCatalog = new Catalog(fResolverCatalogManager);
        attachReaderToCatalog(fCatalog);
        for (int i = 0; i < fCatalogsList.length; ++i) {
            String catalog = fCatalogsList[i];
            if (catalog != null && catalog.length() > 0) {
                fCatalog.parseCatalog(catalog);
            }
        }
    }
    else {
        fCatalog = null;
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:22,代码来源:XMLCatalogResolver.java

示例3: createDefaultCatalogResolver

import com.sun.org.apache.xml.internal.resolver.Catalog; //导入方法依赖的package包/类
/**
 * Gets a default EntityResolver for catalog at META-INF/jaxws-catalog.xml
 */
public static EntityResolver createDefaultCatalogResolver() {

    // set up a manager
    CatalogManager manager = new CatalogManager();
    manager.setIgnoreMissingProperties(true);
    // Using static catalog may  result in to sharing of the catalog by multiple apps running in a container
    manager.setUseStaticCatalog(false);
    // parse the catalog
    ClassLoader cl = Thread.currentThread().getContextClassLoader();
    Enumeration<URL> catalogEnum;
    Catalog catalog = manager.getCatalog();
    try {
        if (cl == null) {
            catalogEnum = ClassLoader.getSystemResources("META-INF/jax-ws-catalog.xml");
        } else {
            catalogEnum = cl.getResources("META-INF/jax-ws-catalog.xml");
        }

        while(catalogEnum.hasMoreElements()) {
            URL url = catalogEnum.nextElement();
            catalog.parseCatalog(url);
        }
    } catch (IOException e) {
        throw new WebServiceException(e);
    }

    return workaroundCatalogResolver(catalog);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:32,代码来源:XmlUtil.java


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