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 ofnamespace declaration listeners
of all namespaces declared in the parsed resource (xsi:schemalocation), then a list ofproxy 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 boolean
containmentOnly
Only set containment reference values, ignore the rest.
-
Constructor Summary
Constructors Constructor Description NotifyingParserPool(boolean containmentOnly)
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods 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
-
-
-
-
Method Detail
-
getDefaultHandler
public XMLDefaultHandler getDefaultHandler(XMLResource resource, XMLLoad xmlLoad, XMLHelper helper, Map<?,?> options)
- Specified by:
getDefaultHandler
in interfaceXMLParserPool
- Overrides:
getDefaultHandler
in classXMLParserPoolImpl
-
createDefaultHandler
protected XMLDefaultHandler createDefaultHandler(XMLResource resource, XMLLoad xmlLoad, XMLHelper helper, Map<?,?> options)
Create the default (unwrapped) XMLDefaultHandler. This is merely a call tosuper
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.
-
-