Class SubstitutionGroupLeakPreventer

  • All Implemented Interfaces:

    public class SubstitutionGroupLeakPreventer
    extends Object
    implements 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.

    Justin Deoliveira, OpenGeo
    • Constructor Detail

      • SubstitutionGroupLeakPreventer

        public SubstitutionGroupLeakPreventer()
    • Method Detail

      • getTarget

        public Notifier getTarget()
        Specified by:
        getTarget in interface Adapter
      • setTarget

        public void setTarget​(Notifier newTarget)
        Specified by:
        setTarget in interface Adapter
      • isAdapterForType

        public boolean isAdapterForType​(Object type)
        Specified by:
        isAdapterForType in interface Adapter
      • notifyChanged

        public void notifyChanged​(Notification notification)
        Specified by:
        notifyChanged in interface Adapter