Package org.xml.sax

Examples of org.xml.sax.EntityResolver


   */
  public EntityResolver createResolver(InputStream in) throws IOException {
    // cache data for efficient future reuse, avoiding repeated I/O on reuse,
    // in particular network I/O if this is a networked stream.
    final byte[] data = FileUtil.toByteArray(in);
    return new EntityResolver() {
      public InputSource resolveEntity(String publicId, String systemId) {
        return new InputSource(new ByteArrayInputStream(data));
      }
    };
  }
View Full Code Here


     */
    public static EntityResolver getInstance(PluginManager pluginManager, String handlerName)
    throws SecurityException, IllegalArgumentException, ClassNotFoundException, NoSuchMethodException,
        InstantiationException, IllegalAccessException, InvocationTargetException
    {
        EntityResolver resolver = (EntityResolver) resolvers.get(handlerName);
        if (resolver == null)
        {
            resolver = (EntityResolver) pluginManager.createExecutableExtension("org.jpox.metadata_handler", "name",
                handlerName, "entity-resolver", null, null);
            resolvers.put(handlerName, resolver);
View Full Code Here

                parser = factory.newSAXParser();
            }

            // Generate the default handler to process the metadata
            DefaultHandler handler = null;
            EntityResolver entityResolver = null;
            try
            {
                entityResolver = EntityResolverFactory.getInstance(mgr.getNucleusContext().getPluginManager(),
                    handlerName);
                if (entityResolver != null)
View Full Code Here

      String outputType = null;
      String media = null;
      Vector params = new Vector();
      boolean quietConflictWarnings = false;
      URIResolver uriResolver = null;
      EntityResolver entityResolver = null;
      ContentHandler contentHandler = null;
      int recursionLimit=-1;

      for (int i = 0; i < argv.length; i++)
      {
View Full Code Here

            e.printStackTrace();
         }

         // expand it before passing it to the parser
         InputSource source = null;
         EntityResolver currentER = parser.getEntityResolver();
         if (currentER != null) {
            source = currentER.resolveEntity("", loc);
         }
         if (source == null) {
            loc = fEntityHandler.expandSystemId(loc);
            source = new InputSource(loc);
         }
View Full Code Here

               return source;
            }
         }

         // first try to resolve using user's entity resolver
         EntityResolver resolver = fEntityHandler.getEntityResolver();
         if (resolver != null) {
            InputSource source = resolver.resolveEntity(publicId, systemId);
            if (source != null) {
               return source;
            }
         }
View Full Code Here

      String outputType = null;
      String media = null;
      Vector params = new Vector();
      boolean quietConflictWarnings = false;
      URIResolver uriResolver = null;
      EntityResolver entityResolver = null;
      ContentHandler contentHandler = null;
      int recursionLimit=-1;

      for (int i = 0; i < argv.length; i++)
      {
View Full Code Here

    algorithmConfig.getXMLConfiguration().setDelimiterParsingDisabled(true);
   
    if(schemaValidation){
      final InputStream resource = Resource.getAsInputStream("algorithm_schema.xsd");
      if(resource != null) {
        EntityResolver resolver = new EntityResolver() {

          @Override
          public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {
            {
              InputSource is = new InputSource(resource);
View Full Code Here

    final URIResolver uriResolver = createStyleSheetResolver(catalogResolver);

    // configure a resolver for xml entities
    final InjectingEntityResolver injectingResolver = createEntityResolver(catalogResolver);

    EntityResolver resolver = catalogResolver;
    if (injectingResolver != null) {
      resolver = injectingResolver;
    }

    // configure the builder for XSL Transforms
View Full Code Here


            DocumentBuilderFactory dbfactory = DocumentBuilderFactory.newInstance();
            dbfactory.setValidating(false);
            DocumentBuilder builder = dbfactory.newDocumentBuilder();
            builder.setEntityResolver(new EntityResolver() {
                @Override
                public InputSource resolveEntity(String publicId, String systemId)
                        throws SAXException, IOException {
                    return new InputSource(new StringReader(""));
                }
View Full Code Here

TOP

Related Classes of org.xml.sax.EntityResolver

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.