Package org.apache.xml.resolver

Examples of org.apache.xml.resolver.CatalogManager


  }
  
  //--------------------------------------------------------------------------

  private void setUpXmlResolver() {
    CatalogManager catMan = new CatalogManager();
    catMan.setAllowOasisXMLCatalogPI(false);
    catMan.setCatalogClassName("org.apache.xml.resolver.Catalog");
    String catFiles = System.getProperty(Constants.XML_CATALOG_FILES);
    if (catFiles == null) catFiles="";
        if(Log.isDebugEnabled(Log.JEEVES)) Log.debug(Log.JEEVES,"Using oasis catalog files "+catFiles);

        setBlankXSLFile(System.getProperty(Constants.XML_CATALOG_BLANKXSLFILE));
       
    catMan.setCatalogFiles(catFiles);
    catMan.setIgnoreMissingProperties(true);
    catMan.setPreferPublic(true);
    catMan.setRelativeCatalogs(false);
    catMan.setUseStaticCatalog(false);
    String catVerbosity = System.getProperty(Constants.XML_CATALOG_VERBOSITY);
    if (catVerbosity == null) catVerbosity = "1";
    int iCatVerb = 1;
    try {
      iCatVerb = Integer.parseInt(catVerbosity);
    } catch (NumberFormatException nfe) {
      Log.error(Log.JEEVES, "Failed to parse "+ Constants.XML_CATALOG_VERBOSITY+" "+catVerbosity);
      nfe.printStackTrace();
    }
        if(Log.isDebugEnabled(Log.JEEVES)) Log.debug(Log.JEEVES,"Using catalog resolver verbosity "+iCatVerb);
    catMan.setVerbosity(iCatVerb);

    catResolver = new CatalogResolver(catMan);

    @SuppressWarnings("unchecked")
        Vector<String> catalogs = catResolver.getCatalog().getCatalogManager().getCatalogFiles();
View Full Code Here


     * the behaviour of this catalog resolver.
     */
    private void init (String [] catalogs, boolean preferPublic) {
        fCatalogsList = (catalogs != null) ? (String[]) catalogs.clone() : null;
        fPreferPublic = preferPublic;
        fResolverCatalogManager = new CatalogManager();
        fResolverCatalogManager.setAllowOasisXMLCatalogPI(false);
        fResolverCatalogManager.setCatalogClassName("org.apache.xml.resolver.Catalog");
        fResolverCatalogManager.setCatalogFiles("");
        fResolverCatalogManager.setIgnoreMissingProperties(true);
        fResolverCatalogManager.setPreferPublic(fPreferPublic);
View Full Code Here

                configs.add(new File(configName));
            }
        }
        EntityResolver entityResolver = null;
        if (catalogLocation != null) {
            CatalogManager catalogManager = CatalogManager.getStaticManager();
            catalogManager.setCatalogFiles(catalogLocation);
            entityResolver = new PassThroughResolver(new CatalogResolver());
        }
        List classPathList = new ArrayList();
        if (classpath != null) {
            for (StringTokenizer st = new StringTokenizer(classpath, ","); st.hasMoreTokens();) {
View Full Code Here

        }
        return null;
    }
    private static EntityResolver getResolver() {
        try {
            CatalogManager catalogManager = new CatalogManager();
            if (DEBUG_LEVEL != null) {
                catalogManager.debug.setDebug(Integer.parseInt(DEBUG_LEVEL));
            }
            catalogManager.setUseStaticCatalog(false);
            catalogManager.setIgnoreMissingProperties(true);
            CatalogResolver catalogResolver = new CatalogResolver(catalogManager) {
                public String getResolvedEntity(String publicId, String systemId) {
                    String s = super.getResolvedEntity(publicId, systemId);
                    if (s != null && s.startsWith("classpath:")) {
                        try {
View Full Code Here

  }

  protected void setUp() throws Exception {
    super.setUp();

    CatalogManager manager = new CatalogManager();

    // Just do this to make sure that the debug level gets set.
    // I could set the value explicitly, but I know that the
    // ant build file is going to set the system property, so just
    // make sure that that gets used.
    int verbosity = manager.getVerbosity();

    catalog = new Catalog(manager);
    catalog.setupReaders();
    catalog.loadSystemCatalogs();
  }
View Full Code Here

     * the behaviour of this catalog resolver.
     */
    private void init (String [] catalogs, boolean preferPublic) {
        fCatalogsList = (catalogs != null) ? (String[]) catalogs.clone() : null;
        fPreferPublic = preferPublic;
        fResolverCatalogManager = new CatalogManager();
        fResolverCatalogManager.setAllowOasisXMLCatalogPI(false);
        fResolverCatalogManager.setCatalogClassName("org.apache.xml.resolver.Catalog");
        fResolverCatalogManager.setCatalogFiles("");
        fResolverCatalogManager.setIgnoreMissingProperties(true);
        fResolverCatalogManager.setPreferPublic(fPreferPublic);
View Full Code Here

     * the behaviour of this catalog resolver.
     */
    private void init (String [] catalogs, boolean preferPublic) {
        fCatalogsList = (catalogs != null) ? (String[]) catalogs.clone() : null;
        fPreferPublic = preferPublic;
        fResolverCatalogManager = new CatalogManager();
        fResolverCatalogManager.setAllowOasisXMLCatalogPI(false);
        fResolverCatalogManager.setCatalogClassName("org.apache.xml.resolver.Catalog");
        fResolverCatalogManager.setCatalogFiles("");
        fResolverCatalogManager.setIgnoreMissingProperties(true);
        fResolverCatalogManager.setPreferPublic(fPreferPublic);
View Full Code Here

    private Catalog resolver;
    private Set<URL> loadedCatalogs = Collections.synchronizedSet(new HashSet<URL>());
    private Bus bus;

    public OASISCatalogManager() {
        CatalogManager catalogManager = new CatalogManager();
        catalogManager.setUseStaticCatalog(false);
        catalogManager.setIgnoreMissingProperties(true);
        CatalogResolver catalogResolver = new CatalogResolver(catalogManager);
        if (DEBUG_LEVEL != null) {
            catalogManager.debug.setDebug(Integer.parseInt(DEBUG_LEVEL));           
        }
        this.resolver = catalogResolver.getCatalog();
View Full Code Here

        }
        return null;
    }
    private static EntityResolver getResolver() {
        try {
            CatalogManager catalogManager = new CatalogManager();
            if (DEBUG_LEVEL != null) {
                catalogManager.debug.setDebug(Integer.parseInt(DEBUG_LEVEL));
            }
            catalogManager.setUseStaticCatalog(false);
            catalogManager.setIgnoreMissingProperties(true);
            CatalogResolver catalogResolver = new CatalogResolver(catalogManager) {
                public String getResolvedEntity(String publicId, String systemId) {
                    String s = super.getResolvedEntity(publicId, systemId);
                    if (s != null && s.startsWith("classpath:")) {
                        try {
View Full Code Here

     * the behaviour of this catalog resolver.
     */
    private void init (String [] catalogs, boolean preferPublic) {
        fCatalogsList = (catalogs != null) ? (String[]) catalogs.clone() : null;
        fPreferPublic = preferPublic;
        fResolverCatalogManager = new CatalogManager();
        fResolverCatalogManager.setAllowOasisXMLCatalogPI(false);
        fResolverCatalogManager.setCatalogClassName("org.apache.xml.resolver.Catalog");
        fResolverCatalogManager.setCatalogFiles("");
        fResolverCatalogManager.setIgnoreMissingProperties(true);
        fResolverCatalogManager.setPreferPublic(fPreferPublic);
View Full Code Here

TOP

Related Classes of org.apache.xml.resolver.CatalogManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.