Package org.apache.xerces.xni.parser

Examples of org.apache.xerces.xni.parser.XMLEntityResolver


      }
      return null;
    }
    else if (name.equals(Constants.DOM_ENTITY_RESOLVER)) {
      try {              
                XMLEntityResolver entityResolver =
               (XMLEntityResolver) fConfiguration.getProperty(ENTITY_RESOLVER);
                if (entityResolver != null
                    && entityResolver instanceof DOMEntityResolverWrapper) {
                    return ((DOMEntityResolverWrapper) entityResolver).getEntityResolver();
                    }
View Full Code Here


      config.setFeature(Unmarshaller.DYNAMIC_VALIDATION, true);
   }

   public void setEntityResolver(final EntityResolver entityResolver) throws JBossXBException
   {
      config.setEntityResolver(new XMLEntityResolver()
      {
         private EntityResolver resolver;

         {
            this.resolver = entityResolver;
View Full Code Here

      config.setFeature(Unmarshaller.DYNAMIC_VALIDATION, true);
   }

   public void setEntityResolver(final EntityResolver entityResolver) throws JBossXBException
   {
      config.setEntityResolver(new XMLEntityResolver()
      {
         private EntityResolver resolver;

         {
            this.resolver = entityResolver;
View Full Code Here

    }
    else if (name.equalsIgnoreCase(Constants.DOM_ERROR_HANDLER)) {
            return fErrorHandlerWrapper.getErrorHandler();
    }
    else if (name.equalsIgnoreCase(Constants.DOM_RESOURCE_RESOLVER)) {
      XMLEntityResolver entityResolver = getEntityResolver();
      if (entityResolver != null && entityResolver instanceof DOMEntityResolverWrapper) {
        return ((DOMEntityResolverWrapper) entityResolver).getEntityResolver();
      }
      return null;
    }
View Full Code Here

            fErrorReporter = null;
        }

        // Get entity resolver.
        try {
            XMLEntityResolver value =
                (XMLEntityResolver)componentManager.getProperty(
                    ENTITY_RESOLVER);

            if (value != null) {
                fEntityResolver = value;
                if (fChildConfig != null) {
                    fChildConfig.setProperty(ENTITY_RESOLVER, value);
                }
            }
        }
        catch (XMLConfigurationException e) {
            fEntityResolver = null;
        }

        // Get security manager.
        try {
            SecurityManager value =
                (SecurityManager)componentManager.getProperty(
                    SECURITY_MANAGER);

            if (value != null) {
                fSecurityManager = value;
                if (fChildConfig != null) {
                    fChildConfig.setProperty(SECURITY_MANAGER, value);
                }
            }
        }
        catch (XMLConfigurationException e) {
            fSecurityManager = null;
        }
       
        // Get buffer size.
        try {
            Integer value =
                (Integer)componentManager.getProperty(
                    BUFFER_SIZE);

            if (value != null && value.intValue() > 0) {
                fBufferSize = value.intValue();
                if (fChildConfig != null) {
                    fChildConfig.setProperty(BUFFER_SIZE, value);
                }
            }
            else {
View Full Code Here

  // data per document?

        SymbolTable symbolTable = new ShadowedSymbolTable((SymbolTable)config.getProperty(DOMValidationConfiguration.SYMBOL_TABLE));
        fConfiguration =  new DOMValidationConfiguration(symbolTable);
       
        XMLEntityResolver entityResolver =  config.getEntityResolver();
        if (entityResolver != null) {
            fConfiguration.setEntityResolver(entityResolver);
        }
       
        XMLGrammarPool pool = (XMLGrammarPool)config.getProperty(DOMValidationConfiguration.GRAMMAR_POOL);
View Full Code Here

     */
    public EntityResolver getEntityResolver() {

        EntityResolver entityResolver = null;
        try {
            XMLEntityResolver xmlEntityResolver =
                (XMLEntityResolver)fConfiguration.getProperty(ENTITY_RESOLVER);
            if (xmlEntityResolver != null &&
                xmlEntityResolver instanceof EntityResolverWrapper) {
                entityResolver = ((EntityResolverWrapper)xmlEntityResolver).getEntityResolver();
            }
View Full Code Here

     */
    public EntityResolver getEntityResolver() {

        EntityResolver entityResolver = null;
        try {
            XMLEntityResolver xmlEntityResolver =
                (XMLEntityResolver)fConfiguration.getProperty(ENTITY_RESOLVER);
            if (xmlEntityResolver != null &&
                xmlEntityResolver instanceof EntityResolverWrapper) {
                entityResolver = ((EntityResolverWrapper)xmlEntityResolver).getEntityResolver();
            }
View Full Code Here

     * extract the info it needs.
     * Therefore, bucket must not be null!
     */
    SchemaGrammar parseXMLSchema(XMLInputSource is)
                throws IOException {
        XMLEntityResolver resolver = getEntityResolver();
        if(resolver != null) {
            fSchemaLoader.setEntityResolver(resolver);
        }
        if (fErrorReporter.getMessageFormatter(XSMessageFormatter.SCHEMA_DOMAIN) == null) {
            fErrorReporter.putMessageFormatter(XSMessageFormatter.SCHEMA_DOMAIN, new XSMessageFormatter());
View Full Code Here

    /* This method parses an external DTD entity.
     */
    DTDGrammar parseDTD(XMLInputSource is)
                throws IOException {
        XMLEntityResolver resolver = getEntityResolver();
        if(resolver != null) {
            fDTDLoader.setEntityResolver(resolver);
        }
        fDTDLoader.setProperty(ERROR_REPORTER, fErrorReporter);

View Full Code Here

TOP

Related Classes of org.apache.xerces.xni.parser.XMLEntityResolver

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.