Package org.apache.xerces.xni.grammars

Examples of org.apache.xerces.xni.grammars.XMLGrammarLoader


    // better make sure the loader exists and knows about this feature.
    // @param type type of grammar to look for the feature in.
    // @param featureId the feature string to query.
    // @return the value of the feature.
    public boolean getFeature(String type, String featureId) {
        XMLGrammarLoader gl = (XMLGrammarLoader)fLoaders.get(type);
        return gl.getFeature(featureId);
    } // getFeature (String, String):  boolean
View Full Code Here


    // by all loaders--the specific methods should be queried!</strong>
    // @param type type of grammar to look for the property in.
    // @param propertyId the property string to query.
    // @return the value of the property.
    public Object getProperty(String type, String propertyId) {
        XMLGrammarLoader gl = (XMLGrammarLoader)fLoaders.get(type);
        return gl.getProperty(propertyId);
    } // getProperty(String, String):  Object
View Full Code Here

      {
        String str = (String)KNOWN_LOADERS.get(paramString);
        try
        {
          ClassLoader localClassLoader = ObjectFactory.findClassLoader();
          XMLGrammarLoader localXMLGrammarLoader = (XMLGrammarLoader)ObjectFactory.newInstance(str, localClassLoader, true);
          this.fLoaders.put(paramString, localXMLGrammarLoader);
        }
        catch (Exception localException)
        {
          return false;
View Full Code Here

  public Grammar preparseGrammar(String paramString, XMLInputSource paramXMLInputSource)
    throws XNIException, IOException
  {
    if (this.fLoaders.containsKey(paramString))
    {
      XMLGrammarLoader localXMLGrammarLoader = (XMLGrammarLoader)this.fLoaders.get(paramString);
      localXMLGrammarLoader.setProperty("http://apache.org/xml/properties/internal/symbol-table", this.fSymbolTable);
      localXMLGrammarLoader.setProperty("http://apache.org/xml/properties/internal/entity-resolver", this.fEntityResolver);
      localXMLGrammarLoader.setProperty("http://apache.org/xml/properties/internal/error-reporter", this.fErrorReporter);
      if (this.fGrammarPool != null)
        try
        {
          localXMLGrammarLoader.setProperty("http://apache.org/xml/properties/internal/grammar-pool", this.fGrammarPool);
        }
        catch (Exception localException)
        {
        }
      return localXMLGrammarLoader.loadGrammar(paramXMLInputSource);
    }
    return null;
  }
View Full Code Here

  public void setFeature(String paramString, boolean paramBoolean)
  {
    Enumeration localEnumeration = this.fLoaders.elements();
    while (localEnumeration.hasMoreElements())
    {
      XMLGrammarLoader localXMLGrammarLoader = (XMLGrammarLoader)localEnumeration.nextElement();
      try
      {
        localXMLGrammarLoader.setFeature(paramString, paramBoolean);
      }
      catch (Exception localException)
      {
      }
    }
View Full Code Here

  public void setProperty(String paramString, Object paramObject)
  {
    Enumeration localEnumeration = this.fLoaders.elements();
    while (localEnumeration.hasMoreElements())
    {
      XMLGrammarLoader localXMLGrammarLoader = (XMLGrammarLoader)localEnumeration.nextElement();
      try
      {
        localXMLGrammarLoader.setProperty(paramString, paramObject);
      }
      catch (Exception localException)
      {
      }
    }
View Full Code Here

    }
  }

  public boolean getFeature(String paramString1, String paramString2)
  {
    XMLGrammarLoader localXMLGrammarLoader = (XMLGrammarLoader)this.fLoaders.get(paramString1);
    return localXMLGrammarLoader.getFeature(paramString2);
  }
View Full Code Here

    return localXMLGrammarLoader.getFeature(paramString2);
  }

  public Object getProperty(String paramString1, String paramString2)
  {
    XMLGrammarLoader localXMLGrammarLoader = (XMLGrammarLoader)this.fLoaders.get(paramString1);
    return localXMLGrammarLoader.getProperty(paramString2);
  }
View Full Code Here

TOP

Related Classes of org.apache.xerces.xni.grammars.XMLGrammarLoader

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.