Examples of Catalog


Examples of org.apache.xml.resolver.Catalog

   *
   * 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());
    }

View Full Code Here

Examples of org.apache.xml.resolver.Catalog

    }

    ResolvingParser.validating = validating;
    ResolvingParser.namespaceAware = nsAware;
    ResolvingParser reader = new ResolvingParser();
    Catalog catalog = reader.getCatalog();

    for (int count = 0; count < catalogFiles.size(); count++) {
      String file = (String) catalogFiles.elementAt(count);
      catalog.parseCatalog(file);
    }

    XParseError xpe = new XParseError(showErrors, showWarnings);
    xpe.setMaxMessages(maxErrs);
    reader.setErrorHandler(xpe);
View Full Code Here

Examples of org.apache.xml.resolver.Catalog

      reader.setFeature("http://xml.org/sax/features/validation", validating);
    } catch (SAXException e) {
      // nop;
    }

    Catalog catalog = reader.getCatalog();

    for (int count = 0; count < catalogFiles.size(); count++) {
      String file = (String) catalogFiles.elementAt(count);
      catalog.parseCatalog(file);
    }

    XParseError xpe = new XParseError(showErrors, showWarnings);
    xpe.setMaxMessages(maxErrs);
    reader.setErrorHandler(xpe);
View Full Code Here

Examples of org.apache.xml.resolver.Catalog

  }
      }
    }

    CatalogResolver catalogResolver = new CatalogResolver();
    Catalog resolver = catalogResolver.getCatalog();

    for (int count = 0; count < catalogFiles.size(); count++) {
      String file = (String) catalogFiles.elementAt(count);
      resolver.parseCatalog(file);
    }
    String result = null;

    if (resType == Catalog.DOCTYPE) {
      System.out.println("Resolve DOCTYPE (name, publicid, systemid):");
      if (name != null) { System.out.println("       name: " + name); }
      if (publicId != null) { System.out.println("  public id: " + publicId); }
      if (systemId != null) { System.out.println("  system id: " + systemId); }
      if (uri != null) { System.out.println("        uri: " + uri); }
      result = resolver.resolveDoctype(name, publicId, systemId);
    } else if (resType == Catalog.DOCUMENT) {
      System.out.println("Resolve DOCUMENT ():");
      result = resolver.resolveDocument();
    } else if (resType == Catalog.ENTITY) {
      System.out.println("Resolve ENTITY (name, publicid, systemid):");
      if (name != null) { System.out.println("       name: " + name); }
      if (publicId != null) { System.out.println("  public id: " + publicId); }
      if (systemId != null) { System.out.println("  system id: " + systemId); }
      result = resolver.resolveEntity(name, publicId, systemId);
    } else if (resType == Catalog.NOTATION) {
      System.out.println("Resolve NOTATION (name, publicid, systemid):");
      if (name != null) { System.out.println("       name: " + name); }
      if (publicId != null) { System.out.println("  public id: " + publicId); }
      if (systemId != null) { System.out.println("  system id: " + systemId); }
      result = resolver.resolveNotation(name, publicId, systemId);
    } else if (resType == Catalog.PUBLIC) {
      System.out.println("Resolve PUBLIC (publicid, systemid):");
      if (publicId != null) { System.out.println("  public id: " + publicId); }
      if (systemId != null) { System.out.println("  system id: " + systemId); }
      result = resolver.resolvePublic(publicId, systemId);
    } else if (resType == Catalog.SYSTEM) {
      System.out.println("Resolve SYSTEM (systemid):");
      if (systemId != null) { System.out.println("  system id: " + systemId); }
      result = resolver.resolveSystem(systemId);
    } else if (resType == Catalog.URI) {
      System.out.println("Resolve URI (uri):");
      if (uri != null) { System.out.println("        uri: " + uri); }
      result = resolver.resolveURI(uri);
    } else {
      System.out.println("resType is wrong!? This can't happen!");
      usage();
    }
View Full Code Here

Examples of org.apache.xml.resolver.Catalog

    if (privateCatalog || catalog == null) {
      try {
  String catalogClassName = CatalogManager.catalogClassName();
  if (catalogClassName == null) {
    catalog = new Catalog();
  } else {
    try {
      catalog = (Catalog) Class.forName(catalogClassName).newInstance();
    } catch (ClassNotFoundException cnfe) {
      Debug.message(1,"Catalog class named '"
        + catalogClassName
        + "' could not be found. Using default.");
      catalog = new Catalog();
    } catch (ClassCastException cnfe) {
      Debug.message(1,"Class named '"
        + catalogClassName
        + "' is not a Catalog. Using default.");
      catalog = new Catalog();
    }
  }

  catalog.setupReaders();
View Full Code Here

Examples of org.apache.xml.resolver.Catalog

                    return;
                }
            }
        }

        Catalog catalog = loadCatalog();

        WSDLLocator wsdlLocator = null;
        if (isURL(this.wsdlURI.toString())) {
            wsdlLocator = new CatalogWSDLLocator(this.wsdlURI.toString(), catalog);
        } else {
View Full Code Here

Examples of org.apache.xml.resolver.Catalog

        CatalogManager catalogManager = new CatalogManager();
        catalogManager.setUseStaticCatalog(false);
        catalogManager.setIgnoreMissingProperties(true);
        CatalogResolver catalogResolver = new CatalogResolver(catalogManager);
        Catalog catalog = catalogResolver.getCatalog();

        if (catalogURI != null) {
            LOG.debug("Found OASIS catalog {} ", catalogURI);
            try {
                catalog.parseCatalog(catalogURI);
            } catch (Exception e) {
                LOG.warn("Failed to read OASIS catalog", e);
            }
        }
View Full Code Here

Examples of org.apache.xml.resolver.Catalog

      reader.setFeature("http://xml.org/sax/features/validation", validating);
    } catch (SAXException e) {
      // nop;
    }

    Catalog catalog = reader.getCatalog();

    System.out.println("Parsing with " + catalog);

    for (int count = 0; count < catalogFiles.size(); count++) {
      String file = (String) catalogFiles.elementAt(count);
      catalog.parseCatalog(file);
    }

    XParseError xpe = new XParseError(showErrors, showWarnings);
    xpe.setMaxMessages(maxErrs);
    reader.setErrorHandler(xpe);
View Full Code Here

Examples of org.apache.xml.resolver.Catalog

    // 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

Examples of org.apache.xml.resolver.Catalog

  }
      }
    }

    CatalogResolver catalogResolver = new CatalogResolver();
    Catalog resolver = catalogResolver.getCatalog();

    for (int count = 0; count < catalogFiles.size(); count++) {
      String file = (String) catalogFiles.elementAt(count);
      resolver.parseCatalog(file);
    }
    String result = null;

    if (resType == Catalog.DOCTYPE) {
      System.out.println("Resolve DOCTYPE (name, publicid, systemid):");
      if (name != null) { System.out.println("       name: " + name); }
      if (publicId != null) { System.out.println("  public id: " + publicId); }
      if (systemId != null) { System.out.println("  system id: " + systemId); }
      if (uri != null) { System.out.println("        uri: " + uri); }
      result = resolver.resolveDoctype(name, publicId, systemId);
    } else if (resType == Catalog.DOCUMENT) {
      System.out.println("Resolve DOCUMENT ():");
      result = resolver.resolveDocument();
    } else if (resType == Catalog.ENTITY) {
      System.out.println("Resolve ENTITY (name, publicid, systemid):");
      if (name != null) { System.out.println("       name: " + name); }
      if (publicId != null) { System.out.println("  public id: " + publicId); }
      if (systemId != null) { System.out.println("  system id: " + systemId); }
      result = resolver.resolveEntity(name, publicId, systemId);
    } else if (resType == Catalog.NOTATION) {
      System.out.println("Resolve NOTATION (name, publicid, systemid):");
      if (name != null) { System.out.println("       name: " + name); }
      if (publicId != null) { System.out.println("  public id: " + publicId); }
      if (systemId != null) { System.out.println("  system id: " + systemId); }
      result = resolver.resolveNotation(name, publicId, systemId);
    } else if (resType == Catalog.PUBLIC) {
      System.out.println("Resolve PUBLIC (publicid, systemid):");
      if (publicId != null) { System.out.println("  public id: " + publicId); }
      if (systemId != null) { System.out.println("  system id: " + systemId); }
      result = resolver.resolvePublic(publicId, systemId);
    } else if (resType == Catalog.SYSTEM) {
      System.out.println("Resolve SYSTEM (systemid):");
      if (systemId != null) { System.out.println("  system id: " + systemId); }
      result = resolver.resolveSystem(systemId);
    } else if (resType == Catalog.URI) {
      System.out.println("Resolve URI (uri):");
      if (uri != null) { System.out.println("        uri: " + uri); }
      result = resolver.resolveURI(uri);
    } else {
      System.out.println("resType is wrong!? This can't happen!");
      usage();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.