Class AbstractRepository

java.lang.Object
com.nomagic.uml2.ext.jmi.reflect.AbstractRefBaseObjectImpl
com.nomagic.uml2.ext.jmi.reflect.AbstractRefPackage
com.nomagic.uml2.ext.jmi.reflect.AbstractRepository
All Implemented Interfaces:
com.dassault_systemes.modeler.foundation.model.ModelElementRepository<com.nomagic.uml2.ext.jmi.reflect.ElementRegistry,javax.jmi.reflect.RefObject,EventSupport>, com.nomagic.uml2.ext.jmi.MapOwner, AbstractRefBaseObject, com.nomagic.uml2.ext.jmi.reflect.RepositoryProvider, javax.jmi.reflect.RefBaseObject, javax.jmi.reflect.RefPackage

public abstract class AbstractRepository extends AbstractRefPackage implements com.dassault_systemes.modeler.foundation.model.ModelElementRepository<com.nomagic.uml2.ext.jmi.reflect.ElementRegistry,javax.jmi.reflect.RefObject,EventSupport>
  • Field Details

    • interfacePackagePrefixToRefPackage

      protected Map interfacePackagePrefixToRefPackage
    • interfacePackagePrefixes

      protected Collection interfacePackagePrefixes
    • mofRepository

      protected com.io_software.catools.tas.mof.TASMofRepository mofRepository
  • Constructor Details

    • AbstractRepository

      public AbstractRepository()
  • Method Details

    • isFullPreLoad

      public boolean isFullPreLoad()
      Specified by:
      isFullPreLoad in interface com.dassault_systemes.modeler.foundation.model.ModelElementRepository<com.nomagic.uml2.ext.jmi.reflect.ElementRegistry,javax.jmi.reflect.RefObject,EventSupport>
    • getIDProxy

      public com.dassault_systemes.modeler.foundation.model.IDProxy getIDProxy()
      Specified by:
      getIDProxy in interface com.dassault_systemes.modeler.foundation.model.ModelElementRepository<com.nomagic.uml2.ext.jmi.reflect.ElementRegistry,javax.jmi.reflect.RefObject,EventSupport>
    • setIDProxy

      public void setIDProxy(com.dassault_systemes.modeler.foundation.model.IDProxy useEsiID)
      Specified by:
      setIDProxy in interface com.dassault_systemes.modeler.foundation.model.ModelElementRepository<com.nomagic.uml2.ext.jmi.reflect.ElementRegistry,javax.jmi.reflect.RefObject,EventSupport>
    • getVersion

      public long getVersion()
      Returns the repository version. It is a number that will be increased after any repository change.
      Returns:
      repository version.
    • nextVersion

      public void nextVersion()
      Sets new repository version.
    • setEventSupport

      protected void setEventSupport(EventSupport eventSupport)
    • getElementsFactory

      public ElementsFactory getElementsFactory()
    • setElementsFactory

      public void setElementsFactory(ElementsFactory elementsFactory)
    • getElementById

      @CheckForNull public javax.jmi.reflect.RefObject getElementById(String id)
      Returns:
      element registered with such id.
    • checkAlive

      protected void checkAlive()
    • isAlive

      public boolean isAlive()
      Returns:
      true if repository is not killed.
    • kill

      public void kill()
      Destroys repository.
    • classProxies

      protected void classProxies()
    • getMofRepository

      public com.io_software.catools.tas.mof.TASMofRepository getMofRepository()
    • createMap

      public Map createMap(com.nomagic.uml2.ext.jmi.MapOwner owner, String mapName)
    • getEventSupport

      public EventSupport getEventSupport()
      Specified by:
      getEventSupport in interface com.dassault_systemes.modeler.foundation.model.ModelElementRepository<com.nomagic.uml2.ext.jmi.reflect.ElementRegistry,javax.jmi.reflect.RefObject,EventSupport>
      Returns:
      Event support for this repository
    • registerModelElement

      public void registerModelElement(com.dassault_systemes.modeler.foundation.model.ModelElement element)
      Specified by:
      registerModelElement in interface com.dassault_systemes.modeler.foundation.model.ModelElementRepository<com.nomagic.uml2.ext.jmi.reflect.ElementRegistry,javax.jmi.reflect.RefObject,EventSupport>
    • registerElement

      public void registerElement(javax.jmi.reflect.RefBaseObject object)
    • getObjectsCount

      public int getObjectsCount()
    • unRegisterModelElement

      public void unRegisterModelElement(com.dassault_systemes.modeler.foundation.model.ModelElement element)
      Specified by:
      unRegisterModelElement in interface com.dassault_systemes.modeler.foundation.model.ModelElementRepository<com.nomagic.uml2.ext.jmi.reflect.ElementRegistry,javax.jmi.reflect.RefObject,EventSupport>
    • unRegisterElement

      public void unRegisterElement(javax.jmi.reflect.RefBaseObject object)
    • unRegisterBaseElement

      public boolean unRegisterBaseElement(BaseElement element)
    • getRepository

      public AbstractRepository getRepository()
      Description copied from interface: com.nomagic.uml2.ext.jmi.reflect.RepositoryProvider
      Get repository.
      Specified by:
      getRepository in interface AbstractRefBaseObject
      Specified by:
      getRepository in interface com.nomagic.uml2.ext.jmi.reflect.RepositoryProvider
      Overrides:
      getRepository in class com.nomagic.uml2.ext.jmi.reflect.AbstractRefBaseObjectImpl
      Returns:
      repository.
    • getProject

      public com.nomagic.uml2.ext.jmi.reflect.ElementRegistry getProject()
      Specified by:
      getProject in interface com.dassault_systemes.modeler.foundation.model.ModelElementRepository<com.nomagic.uml2.ext.jmi.reflect.ElementRegistry,javax.jmi.reflect.RefObject,EventSupport>
    • setProject

      public void setProject(com.nomagic.uml2.ext.jmi.reflect.ElementRegistry project)
      Specified by:
      setProject in interface com.dassault_systemes.modeler.foundation.model.ModelElementRepository<com.nomagic.uml2.ext.jmi.reflect.ElementRegistry,javax.jmi.reflect.RefObject,EventSupport>
    • refGetEnum

      @CheckForNull public javax.jmi.reflect.RefEnum refGetEnum(String enumName, String args)
      Description copied from class: AbstractRefPackage
      The refGetEnum operation returns the instance of an enumeration (i.e., an enumeration literal) whose value is described by the value of literalName . Note that the type of enumeration is defined by the meta object that owns the metaLiteral object. InvalidCallException is raised if the enumType parameter does not designate a valid enumeration. InvalidNameException is raised when the enumName does not denote a valid enum name. This refGetEnum returns the enumeration object representing the enumeration literal. specific analog: none. return type: RefEnum parameters: RefObject enumType (or String enumName ) String literalName exceptions: JmiException (TypeMismatchException, InvalidCallException, InvalidNameException, java.lang.NullPointerException)
      Specified by:
      refGetEnum in interface javax.jmi.reflect.RefPackage
      Overrides:
      refGetEnum in class AbstractRefPackage
    • getMetamodelProvider

      @CheckForNull public com.io_software.catools.tas.mof.TASRepository getMetamodelProvider()
    • getCounter

      public com.nomagic.util.Counter getCounter()
      Standalone repositories (those, having no Project object) can have a separate counter assigned to them.
    • setCounter

      public void setCounter(com.nomagic.util.Counter count)
      Standalone repositories (those, having no Project object) can have a separate counter assigned to them.
    • canSetID

      public boolean canSetID()
    • setCanSetID

      public void setCanSetID(boolean canSetID)
      Parameters:
      canSetID - The canSetID to set.
    • getValuesTable

      public com.nomagic.uml2.impl.ValuesTable getValuesTable()
    • invokeAfterTransaction

      public void invokeAfterTransaction(Runnable r)
      If at the current moment firing cached events, running runnable after these events are fired. Running now in other case.
      Parameters:
      r - Runnable to run.
    • isRawMode

      @Deprecated public boolean isRawMode()
      Deprecated.
      not used
    • setRawMode

      @Deprecated public void setRawMode(boolean rawMode)
      Deprecated.
      not used
    • getTransactionManager

      public TransactionManager getTransactionManager()
    • addCandidateForDispose

      public void addCandidateForDispose(javax.jmi.reflect.RefObject object)
    • removeCandidateForDispose

      public void removeCandidateForDispose(javax.jmi.reflect.RefObject object)
    • addCandidateElementForDispose

      public void addCandidateElementForDispose(com.dassault_systemes.modeler.foundation.model.ModelElement element)
      Specified by:
      addCandidateElementForDispose in interface com.dassault_systemes.modeler.foundation.model.ModelElementRepository<com.nomagic.uml2.ext.jmi.reflect.ElementRegistry,javax.jmi.reflect.RefObject,EventSupport>
    • removeCandidateElementForDispose

      public void removeCandidateElementForDispose(com.dassault_systemes.modeler.foundation.model.ModelElement element)
      Specified by:
      removeCandidateElementForDispose in interface com.dassault_systemes.modeler.foundation.model.ModelElementRepository<com.nomagic.uml2.ext.jmi.reflect.ElementRegistry,javax.jmi.reflect.RefObject,EventSupport>
    • getCandidatesForDispose

      public Set<javax.jmi.reflect.RefObject> getCandidatesForDispose()
    • clearCandidatesForDispose

      public void clearCandidatesForDispose()
    • addCandidatesForDisposeListener

      public void addCandidatesForDisposeListener(AbstractRepository.CandidatesForDisposeListener listener)
      Adds a AbstractRepository.CandidatesForDisposeListener to get notifications about
      Parameters:
      listener - the listener
    • removeCandidatesForDisposeListener

      public void removeCandidatesForDisposeListener(AbstractRepository.CandidatesForDisposeListener listener)
    • getCalculator

      public AbstractRepository.Calculator getCalculator(AbstractRepository.Calculators calculatorName)
    • addCalculator

      Parameters:
      id - calculator identifier.
      calculator - value calculator.
      Returns:
      calculator which was registered by same id.