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 listenersof all namespaces declared in the parsed resource (xsi:schemalocation), then a list ofproxy creation listenersof each and every proxy it sees while loading an XML file as an EMF model.
-
-
Field Summary
Fields Modifier and Type Field Description protected booleancontainmentOnlyOnly 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 voidaddNamespaceDeclarationListener(INamespaceDeclarationListener listener)Add a namespace declaration listener to this parser pool's list.voidaddProxyListener(IProxyCreationListener listener)Add a proxy creation listener to this parser pool's list.protected XMLDefaultHandlercreateDefaultHandler(XMLResource resource, XMLLoad xmlLoad, XMLHelper helper, Map<?,?> options)Create the default (unwrapped) XMLDefaultHandler.XMLDefaultHandlergetDefaultHandler(XMLResource resource, XMLLoad xmlLoad, XMLHelper helper, Map<?,?> options)voidremoveNamespaceDeclarationListener(INamespaceDeclarationListener listener)Remove a namespace declaration listener from this parser pool's list.voidremoveProxyListener(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:
getDefaultHandlerin interfaceXMLParserPool- Overrides:
getDefaultHandlerin classXMLParserPoolImpl
-
createDefaultHandler
protected XMLDefaultHandler createDefaultHandler(XMLResource resource, XMLLoad xmlLoad, XMLHelper helper, Map<?,?> options)
Create the default (unwrapped) XMLDefaultHandler. This is merely a call tosuperbut 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.
-
-