• Constructor Detail

      • RepositoryImpl

        public RepositoryImpl​(String name)

        Create a named repository.

        Parameters:
        name - the name of this repository
    • Method Detail

      • getChangeSupport

        protected ChangeSupport getChangeSupport​(ChangeType ct)

        Called to retrieve the ChangeSupport for this object.

        Your implementation of this method should have the following structure:

         ChangeSupport cs = super.getChangeSupport(ct);
        
         if(someForwarder == null && ct.isMatching(SomeInterface.SomeChangeType)) {
           someForwarder = new ChangeForwarder(...
        
           this.stateVariable.addChangeListener(someForwarder, VariableInterface.AChange);
         }
        
         return cs;
         
        It is usual for the forwarding listeners (someForwarder in this example) to be transient and lazily instantiated. Be sure to register & unregister the forwarder in the code that does the ChangeEvent handling in setter methods.

        Overrides:
        getChangeSupport in class AbstractChangeable
      • getName

        public String getName()

        The name of this repository.

        This will be the ${repository} component of any URIs of types defined here.

        Specified by:
        getName in interface FeatureTypes.Repository
        Returns:
        the name of the repository
      • createType

        public FeatureTypes.Type createType​(String name,
                                            FeatureFilter schema,
                                            Set parents)

        Create a new type in this repository.

        Parameters:
        name - the Type name
        schema - the FeatureFilter defining the type
        parents - the Set (possibly empty) of parent URIs