Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## BEA WebLogic Server 9.0 API Reference

## weblogic.apache.xerces.util
Class XMLGrammarPoolImpl

    java.lang.Object
      weblogic.apache.xerces.util.XMLGrammarPoolImpl

All Implemented Interfaces:
  XMLGrammarPool

Direct Known Subclasses:
  CachingParserPool.ShadowedGrammarPool

Deprecated. please use JDK supplied XML parsers and transformers

public class XMLGrammarPoolImpl
extends Object
implements XMLGrammarPool

Stores grammars in a pool associated to a specific key. This grammar pool implementation stores two types of grammars: those keyed by the root element name, and those keyed by the grammar's target namespace. This is the default implementation of the GrammarPool interface. As we move forward, this will become more function-rich and robust.

Nested Class Summary
`protected static class` | `XMLGrammarPoolImpl.Entry` Deprecated. This class is a grammar pool entry.

Field Summary
`protected XMLGrammarPoolImpl.Entry[]` | `fGrammars` Deprecated. Grammars.
`protected boolean` | `fPoolIsLocked` Deprecated.
`protected static int` | `TABLE_SIZE` Deprecated. Default size.

Constructor Summary
`XMLGrammarPoolImpl()` Deprecated. Constructs a grammar pool with a default number of buckets.
`XMLGrammarPoolImpl(int initialCapacity)` Deprecated. Constructs a grammar pool with a specified number of buckets.

Method Summary
`void` | `cacheGrammars(String grammarType, Grammar[] grammars)` Deprecated.
`void` | `clear()` Deprecated.
`boolean` | `containsGrammar(XMLGrammarDescription desc)` Deprecated. Returns true if the grammar pool contains a grammar associated to the specified grammar description.
`boolean` | `equals(XMLGrammarDescription desc1, XMLGrammarDescription desc2)` Deprecated. This method checks whether two grammars are the same.
`Grammar` | `getGrammar(XMLGrammarDescription desc)` Deprecated. Returns the grammar associated to the specified grammar description.
`int` | `hashCode(XMLGrammarDescription desc)` Deprecated. Returns the hash code value for the given grammar description.
`void` | `lockPool()` Deprecated.
`void` | `putGrammar(Grammar grammar)` Deprecated. Puts the specified grammar into the grammar pool and associates it to its root element name or its target namespace.
`Grammar` | `removeGrammar(XMLGrammarDescription desc)` Deprecated. Removes the grammar associated to the specified grammar description from the grammar pool and returns the removed grammar.
`Grammar` | `retrieveGrammar(XMLGrammarDescription desc)` Deprecated.
`Grammar[]` | `retrieveInitialGrammarSet(String grammarType)` Deprecated.
`void` | `unlockPool()` Deprecated.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### fGrammars

    protected XMLGrammarPoolImpl.Entry[] fGrammars

  Deprecated.
  Grammars.

### fPoolIsLocked

    protected boolean fPoolIsLocked

  Deprecated.

### TABLE_SIZE

    protected static final int TABLE_SIZE

  Deprecated.
  Default size.

  See Also:
    Constant Field Values

Constructor Detail

### XMLGrammarPoolImpl

    public XMLGrammarPoolImpl()

  Deprecated.
  Constructs a grammar pool with a default number of buckets.

### XMLGrammarPoolImpl

    public XMLGrammarPoolImpl(int initialCapacity)

  Deprecated.
  Constructs a grammar pool with a specified number of buckets.

Method Detail

### cacheGrammars

    public void cacheGrammars(String grammarType,
                              Grammar[] grammars)

  Deprecated.
  Specified by:
    `cacheGrammars` in interface `XMLGrammarPool`

### clear

    public void clear()

  Deprecated.
  Specified by:
    `clear` in interface `XMLGrammarPool`

### containsGrammar

    public boolean containsGrammar(XMLGrammarDescription desc)

  Deprecated.
  Returns true if the grammar pool contains a grammar associated to the specified grammar description. Currently, the root element name is used as the key for DTD grammars and the target namespace is used as the key for Schema grammars.

  Parameters:
    `desc` - The Grammar Description.

### equals

    public boolean equals(XMLGrammarDescription desc1,
                          XMLGrammarDescription desc2)

  Deprecated.
  This method checks whether two grammars are the same. Currently, we compare the root element names for DTD grammars and the target namespaces for Schema grammars. The application can override this behaviour and add its own logic.

  Returns:
    True if the grammars are equal, otherwise false

### getGrammar

    public Grammar getGrammar(XMLGrammarDescription desc)

  Deprecated.
  Returns the grammar associated to the specified grammar description. Currently, the root element name is used as the key for DTD grammars and the target namespace is used as the key for Schema grammars.

  Parameters:
    `desc` - The Grammar Description.

### hashCode

    public int hashCode(XMLGrammarDescription desc)

  Deprecated.
  Returns the hash code value for the given grammar description.

  Parameters:
    `desc` - The grammar description
  Returns:
    The hash code value

### lockPool

    public void lockPool()

  Deprecated.
  Specified by:
    `lockPool` in interface `XMLGrammarPool`

### putGrammar

    public void putGrammar(Grammar grammar)

  Deprecated.
  Puts the specified grammar into the grammar pool and associates it to its root element name or its target namespace.

  Parameters:
    `grammar` - The Grammar.

### removeGrammar

    public Grammar removeGrammar(XMLGrammarDescription desc)

  Deprecated.
  Removes the grammar associated to the specified grammar description from the grammar pool and returns the removed grammar. Currently, the root element name is used as the key for DTD grammars and the target namespace is used as the key for Schema grammars.

  Parameters:
    `desc` - The Grammar Description.
  Returns:
    The removed grammar.

### retrieveGrammar

    public Grammar retrieveGrammar(XMLGrammarDescription desc)

  Deprecated.
  Specified by:
    `retrieveGrammar` in interface `XMLGrammarPool`

### retrieveInitialGrammarSet

    public Grammar[] retrieveInitialGrammarSet(String grammarType)

  Deprecated.
  Specified by:
    `retrieveInitialGrammarSet` in interface `XMLGrammarPool`

### unlockPool

    public void unlockPool()

  Deprecated.
  Specified by:
    `unlockPool` in interface `XMLGrammarPool`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://e-docs.bea.com/wls/docs90 Copyright 2005 BEA Systems Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD