org.geotools.gml2
Class SubstitutionGroupLeakPreventer

java.lang.Object
  extended by org.geotools.gml2.SubstitutionGroupLeakPreventer
All Implemented Interfaces:
org.eclipse.emf.common.notify.Adapter

public class SubstitutionGroupLeakPreventer
extends java.lang.Object
implements org.eclipse.emf.common.notify.Adapter

Adapter for preventing memory leaks created by substitution group affiliations.

When an application schema contains an element in the gml:_Feature substitution group a link from gml:_Feature back to the app schema element is created. Since the gml schema (and thus the gml:_Feature) element is a singleton this creates a memory leak. This adapter watches the XSDElementDeclaration.getSubstitutionGroup() of the gml:_Feature element and prevents it from growing in size by making it a unique list of XSDElementDeclaration based on qualified name.

Author:
Justin Deoliveira, OpenGeo

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.emf.common.notify.Adapter
org.eclipse.emf.common.notify.Adapter.Internal
 
Constructor Summary
SubstitutionGroupLeakPreventer()
           
 
Method Summary
 org.eclipse.emf.common.notify.Notifier getTarget()
           
 boolean isAdapterForType(java.lang.Object type)
           
 void notifyChanged(org.eclipse.emf.common.notify.Notification notification)
           
 void setTarget(org.eclipse.emf.common.notify.Notifier newTarget)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubstitutionGroupLeakPreventer

public SubstitutionGroupLeakPreventer()
Method Detail

getTarget

public org.eclipse.emf.common.notify.Notifier getTarget()
Specified by:
getTarget in interface org.eclipse.emf.common.notify.Adapter

setTarget

public void setTarget(org.eclipse.emf.common.notify.Notifier newTarget)
Specified by:
setTarget in interface org.eclipse.emf.common.notify.Adapter

isAdapterForType

public boolean isAdapterForType(java.lang.Object type)
Specified by:
isAdapterForType in interface org.eclipse.emf.common.notify.Adapter

notifyChanged

public void notifyChanged(org.eclipse.emf.common.notify.Notification notification)
Specified by:
notifyChanged in interface org.eclipse.emf.common.notify.Adapter


Copyright © 1996-2010 Geotools. All Rights Reserved.