Package org.eclipse.emf.compare.ide.internal.utils

# Class NotifyingParserPool

java.lang.Object
org.eclipse.emf.ecore.xmi.impl.XMLParserPoolImpl
org.eclipse.emf.compare.ide.internal.utils.NotifyingParserPool

All Implemented Interfaces:
  `XMLParserPool`

Direct Known Subclasses:
  `NoNotificationParserPool`

public class NotifyingParserPool extends XMLParserPoolImpl
This implementation of an XML parser pool will notify a list of `namespace declaration listeners` of all namespaces declared in the parsed resource (xsi:schemalocation), then a list of `proxy creation listeners` of each and every proxy it sees while loading an XML file as an EMF model.

## Field Summary

Fields
Modifier and Type
Field
Description
`protected final boolean`
`containmentOnly`
Only set containment reference values, ignore the rest.

## Constructor Summary

Constructors
Constructor
Description
`NotifyingParserPool(boolean containmentOnly)`
Default constructor.

## Method Summary

Modifier and Type
Method
Description
`void`
`addNamespaceDeclarationListener(INamespaceDeclarationListener listener)`
Add a namespace declaration listener to this parser pool's list.
`void`
`addProxyListener(IProxyCreationListener listener)`
Add a proxy creation listener to this parser pool's list.
`protected XMLDefaultHandler`
`createDefaultHandler(XMLResource resource, XMLLoad xmlLoad, XMLHelper helper, Map<?,?> options)`
Create the default (unwrapped) XMLDefaultHandler.
`XMLDefaultHandler`
`getDefaultHandler(XMLResource resource, XMLLoad xmlLoad, XMLHelper helper, Map<?,?> options)`
`void`
`removeNamespaceDeclarationListener(INamespaceDeclarationListener listener)`
Remove a namespace declaration listener from this parser pool's list.
`void`
`removeProxyListener(IProxyCreationListener listener)`
Remove a proxy creation listener from this parser pool's list.

### Methods inherited from class org.eclipse.emf.ecore.xmi.impl.XMLParserPoolImpl

`get, makeParser, release, releaseDefaultHandler`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### containmentOnly

protected final boolean containmentOnly
Only set containment reference values, ignore the rest.

## Constructor Details

### NotifyingParserPool

public NotifyingParserPool(boolean containmentOnly)
Default constructor.

Parameters:
  `containmentOnly` - only set containment reference values. The model will be mostly empty except for its containment tree.

## Method Details

### getDefaultHandler

public XMLDefaultHandler getDefaultHandler(XMLResource resource, XMLLoad xmlLoad, XMLHelper helper, Map<?,?> options)

Specified by:
  `getDefaultHandler` in interface `XMLParserPool`
Overrides:
  `getDefaultHandler` in class `XMLParserPoolImpl`

### createDefaultHandler

protected XMLDefaultHandler createDefaultHandler(XMLResource resource, XMLLoad xmlLoad, XMLHelper helper, Map<?,?> options)
Create the default (unwrapped) XMLDefaultHandler. This is merely a call to `super` but can be sub-classed.

Parameters:
  `resource` - The resource to load.
  `xmlLoad` - The XML load to pass on tho the handler.
  `helper` - The XML helper to pass on tho the handler.
  `options` - The load options for this resource.
Returns:
  The created XMLDefaultHandler.
See Also:
  - `getDefaultHandler(XMLResource, XMLLoad, XMLHelper, Map)`

### addProxyListener

public void addProxyListener(IProxyCreationListener listener)
Add a proxy creation listener to this parser pool's list.

Parameters:
  `listener` - The listener to add to this pool's list.

### removeProxyListener

public void removeProxyListener(IProxyCreationListener listener)
Remove a proxy creation listener from this parser pool's list.

Parameters:
  `listener` - The listener to remove from this pool's list.

### addNamespaceDeclarationListener

public void addNamespaceDeclarationListener(INamespaceDeclarationListener listener)
Add a namespace declaration listener to this parser pool's list.

Parameters:
  `listener` - The listener to add to this pool's list.

### removeNamespaceDeclarationListener

public void removeNamespaceDeclarationListener(INamespaceDeclarationListener listener)
Remove a namespace declaration listener from this parser pool's list.

Parameters:
  `listener` - The listener to remove from this pool's list.