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


Java Catalog类代码示例

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


Catalog类属于com.sun.org.apache.xml.internal.resolver包,在下文中一共展示了Catalog类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: getCatalog

import com.sun.org.apache.xml.internal.resolver.Catalog; //导入依赖的package包/类
/**
 * Get a catalog instance.
 *
 * If this manager uses static catalogs, the same static catalog will
 * always be returned. Otherwise a new catalog will be returned.
 */
public Catalog getCatalog() {
  Catalog catalog = staticCatalog;

  if (useStaticCatalog == null) {
    useStaticCatalog = new Boolean(getUseStaticCatalog());
  }

  if (catalog == null || !useStaticCatalog.booleanValue()) {
    catalog = getPrivateCatalog();
    if (useStaticCatalog.booleanValue()) {
      staticCatalog = catalog;
    }
  }

  return catalog;
}
 
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:23,代码来源:CatalogManager.java

示例4: 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

示例5: workaroundCatalogResolver

import com.sun.org.apache.xml.internal.resolver.Catalog; //导入依赖的package包/类
/**
 *  Default CatalogResolver implementation is broken as it depends on CatalogManager.getCatalog() which will always create a new one when
 *  useStaticCatalog is false.
 *  This returns a CatalogResolver that uses the catalog passed as parameter.
 * @param catalog
 * @return  CatalogResolver
 */
private static CatalogResolver workaroundCatalogResolver(final Catalog catalog) {
    // set up a manager
    CatalogManager manager = new CatalogManager() {
        @Override
        public Catalog getCatalog() {
            return catalog;
        }
    };
    manager.setIgnoreMissingProperties(true);
    // Using static catalog may  result in to sharing of the catalog by multiple apps running in a container
    manager.setUseStaticCatalog(false);

    return new CatalogResolver(manager);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:22,代码来源:XmlUtil.java

示例6: attachReaderToCatalog

import com.sun.org.apache.xml.internal.resolver.Catalog; //导入依赖的package包/类
/**
 * Attaches the reader to the catalog.
 */
private void attachReaderToCatalog (Catalog catalog) {

    SAXParserFactory spf = new SAXParserFactoryImpl();
    spf.setNamespaceAware(true);
    spf.setValidating(false);

    SAXCatalogReader saxReader = new SAXCatalogReader(spf);
    saxReader.setCatalogParser(OASISXMLCatalogReader.namespaceName, "catalog",
        "com.sun.org.apache.xml.internal.resolver.readers.OASISXMLCatalogReader");
    catalog.addReader("application/xml", saxReader);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:15,代码来源:XMLCatalogResolver.java

示例7: setCatalog

import com.sun.org.apache.xml.internal.resolver.Catalog; //导入依赖的package包/类
/** Set the Catalog for which parsing is being performed. */
public void setCatalog(Catalog catalog);
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:3,代码来源:SAXCatalogParser.java

示例8: setCatalog

import com.sun.org.apache.xml.internal.resolver.Catalog; //导入依赖的package包/类
/** Set the current catalog. */
public void setCatalog (Catalog catalog) {
  this.catalog = catalog;
  debug = catalog.getCatalogManager().debug;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:6,代码来源:OASISXMLCatalogReader.java

示例9: getCatalog

import com.sun.org.apache.xml.internal.resolver.Catalog; //导入依赖的package包/类
/** Get the current catalog. */
public Catalog getCatalog () {
  return catalog;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:5,代码来源:OASISXMLCatalogReader.java

示例10: setCatalog

import com.sun.org.apache.xml.internal.resolver.Catalog; //导入依赖的package包/类
/** Set the current catalog. */
public void setCatalog (Catalog catalog) {
  this.catalog = catalog;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:5,代码来源:XCatalogReader.java

示例11: getCatalog

import com.sun.org.apache.xml.internal.resolver.Catalog; //导入依赖的package包/类
/**
 * Provide accessto the underlying Catalog.
 */
public Catalog getCatalog() {
  return catalogResolver.getCatalog();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:7,代码来源:ResolvingXMLFilter.java

示例12: getCatalog

import com.sun.org.apache.xml.internal.resolver.Catalog; //导入依赖的package包/类
/** Return the underlying catalog */
public Catalog getCatalog() {
  return catalog;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:5,代码来源:CatalogResolver.java

示例13: getCatalog

import com.sun.org.apache.xml.internal.resolver.Catalog; //导入依赖的package包/类
/** Return the Catalog being used. */
public Catalog getCatalog() {
  return catalogResolver.getCatalog();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:5,代码来源:ResolvingParser.java


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