Package com.nomagic.uml2.ext.jmi.reflect
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<ElementRegistry,javax.jmi.reflect.RefObject,EventSupport>
,MapOwner
,AbstractRefBaseObject
,RepositoryProvider
,javax.jmi.reflect.RefBaseObject
,javax.jmi.reflect.RefPackage
public abstract class AbstractRepository extends AbstractRefPackage implements com.dassault_systemes.modeler.foundation.model.ModelElementRepository<ElementRegistry,javax.jmi.reflect.RefObject,EventSupport>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
AbstractRepository.Calculator
Calculator used in to calculate derived values.static class
AbstractRepository.Calculators
static interface
AbstractRepository.CandidatesForDisposeListener
Candidates for dispose listenerclass
AbstractRepository.MofRepository
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Collection
interfacePackagePrefixes
protected java.util.Map
interfacePackagePrefixToRefPackage
protected com.io_software.catools.tas.mof.TASMofRepository
mofRepository
-
Constructor Summary
Constructors Constructor Description AbstractRepository()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description AbstractRepository.Calculator
addCalculator(AbstractRepository.Calculators id, AbstractRepository.Calculator calculator)
void
addCandidateElementForDispose(com.dassault_systemes.modeler.foundation.model.ModelElement element)
void
addCandidateForDispose(javax.jmi.reflect.RefObject object)
void
addCandidatesForDisposeListener(AbstractRepository.CandidatesForDisposeListener listener)
Adds aAbstractRepository.CandidatesForDisposeListener
to get notifications aboutboolean
canSetID()
protected void
checkAlive()
protected void
classProxies()
void
clearCandidatesForDispose()
java.util.Map
createMap(MapOwner owner, java.lang.String mapName)
AbstractRepository.Calculator
getCalculator(AbstractRepository.Calculators calculatorName)
java.util.Set<javax.jmi.reflect.RefObject>
getCandidatesForDispose()
Counter
getCounter()
Standalone repositories (those, having no Project object) can have a separate counter assigned to them.javax.jmi.reflect.RefObject
getElementById(java.lang.String id)
ElementsFactory
getElementsFactory()
EventSupport
getEventSupport()
com.dassault_systemes.modeler.foundation.model.IDProxy
getIDProxy()
com.io_software.catools.tas.mof.TASRepository
getMetamodelProvider()
com.io_software.catools.tas.mof.TASMofRepository
getMofRepository()
int
getObjectsCount()
ElementRegistry
getProject()
AbstractRepository
getRepository()
Get repository.TransactionManager
getTransactionManager()
com.nomagic.uml2.impl.ValuesTable
getValuesTable()
long
getVersion()
Returns the repository version.void
invokeAfterTransaction(java.lang.Runnable r)
If at the current moment firing cached events, running runnable after these events are fired.boolean
isAlive()
boolean
isFullPreLoad()
boolean
isRawMode()
Deprecated.not usedvoid
kill()
Destroys repository.void
nextVersion()
Sets new repository version.javax.jmi.reflect.RefEnum
refGetEnum(java.lang.String enumName, java.lang.String args)
The refGetEnum operation returns the instance of an enumeration (i.e., an enumeration literal) whose value is described by the value of literalName .void
registerElement(javax.jmi.reflect.RefBaseObject object)
void
registerModelElement(com.dassault_systemes.modeler.foundation.model.ModelElement element)
void
removeCandidateElementForDispose(com.dassault_systemes.modeler.foundation.model.ModelElement element)
void
removeCandidateForDispose(javax.jmi.reflect.RefObject object)
void
removeCandidatesForDisposeListener(AbstractRepository.CandidatesForDisposeListener listener)
void
setCanSetID(boolean canSetID)
void
setCounter(Counter count)
Standalone repositories (those, having no Project object) can have a separate counter assigned to them.void
setElementsFactory(ElementsFactory elementsFactory)
protected void
setEventSupport(EventSupport eventSupport)
void
setIDProxy(com.dassault_systemes.modeler.foundation.model.IDProxy useEsiID)
void
setProject(ElementRegistry project)
void
setRawMode(boolean rawMode)
Deprecated.not usedboolean
unRegisterBaseElement(BaseElement element)
void
unRegisterElement(javax.jmi.reflect.RefBaseObject object)
void
unRegisterModelElement(com.dassault_systemes.modeler.foundation.model.ModelElement element)
-
Methods inherited from class com.nomagic.uml2.ext.jmi.reflect.AbstractRefPackage
addAssociation, addClass, addPackage, getMetaObjects, internalError, refAllAssociations, refAllClasses, refAllPackages, refAssociation, refAssociation, refClass, refClass, refCreateStruct, refCreateStruct, refDelete, refGetEnum, refPackage, refPackage, removeClass, removePackage
-
Methods inherited from class com.nomagic.uml2.ext.jmi.reflect.AbstractRefBaseObjectImpl
mapClear, mapPut, mapPutAll, mapRemove, mof_getRepository, refImmediatePackage, refMetaObject, refMofId, refOutermostPackage, refVerifyConstraints, setMofID, setOwner, setRefMetaObject, setRepository
-
-
-
-
Method Detail
-
isFullPreLoad
public boolean isFullPreLoad()
- Specified by:
isFullPreLoad
in interfacecom.dassault_systemes.modeler.foundation.model.ModelElementRepository<ElementRegistry,javax.jmi.reflect.RefObject,EventSupport>
-
getIDProxy
public com.dassault_systemes.modeler.foundation.model.IDProxy getIDProxy()
- Specified by:
getIDProxy
in interfacecom.dassault_systemes.modeler.foundation.model.ModelElementRepository<ElementRegistry,javax.jmi.reflect.RefObject,EventSupport>
-
setIDProxy
public void setIDProxy(com.dassault_systemes.modeler.foundation.model.IDProxy useEsiID)
- Specified by:
setIDProxy
in interfacecom.dassault_systemes.modeler.foundation.model.ModelElementRepository<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(java.lang.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 java.util.Map createMap(MapOwner owner, java.lang.String mapName)
-
getEventSupport
public EventSupport getEventSupport()
- Specified by:
getEventSupport
in interfacecom.dassault_systemes.modeler.foundation.model.ModelElementRepository<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 interfacecom.dassault_systemes.modeler.foundation.model.ModelElementRepository<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 interfacecom.dassault_systemes.modeler.foundation.model.ModelElementRepository<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:RepositoryProvider
Get repository.- Specified by:
getRepository
in interfaceAbstractRefBaseObject
- Specified by:
getRepository
in interfaceRepositoryProvider
- Overrides:
getRepository
in classcom.nomagic.uml2.ext.jmi.reflect.AbstractRefBaseObjectImpl
- Returns:
- repository.
-
getProject
public ElementRegistry getProject()
- Specified by:
getProject
in interfacecom.dassault_systemes.modeler.foundation.model.ModelElementRepository<ElementRegistry,javax.jmi.reflect.RefObject,EventSupport>
-
setProject
public void setProject(ElementRegistry project)
- Specified by:
setProject
in interfacecom.dassault_systemes.modeler.foundation.model.ModelElementRepository<ElementRegistry,javax.jmi.reflect.RefObject,EventSupport>
-
refGetEnum
@CheckForNull public javax.jmi.reflect.RefEnum refGetEnum(java.lang.String enumName, java.lang.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 interfacejavax.jmi.reflect.RefPackage
- Overrides:
refGetEnum
in classAbstractRefPackage
-
getMetamodelProvider
@CheckForNull public com.io_software.catools.tas.mof.TASRepository getMetamodelProvider()
-
getCounter
public Counter getCounter()
Standalone repositories (those, having no Project object) can have a separate counter assigned to them.
-
setCounter
public void setCounter(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(java.lang.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 interfacecom.dassault_systemes.modeler.foundation.model.ModelElementRepository<ElementRegistry,javax.jmi.reflect.RefObject,EventSupport>
-
removeCandidateElementForDispose
public void removeCandidateElementForDispose(com.dassault_systemes.modeler.foundation.model.ModelElement element)
- Specified by:
removeCandidateElementForDispose
in interfacecom.dassault_systemes.modeler.foundation.model.ModelElementRepository<ElementRegistry,javax.jmi.reflect.RefObject,EventSupport>
-
getCandidatesForDispose
public java.util.Set<javax.jmi.reflect.RefObject> getCandidatesForDispose()
-
clearCandidatesForDispose
public void clearCandidatesForDispose()
-
addCandidatesForDisposeListener
public void addCandidatesForDisposeListener(AbstractRepository.CandidatesForDisposeListener listener)
Adds aAbstractRepository.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
@CheckForNull public AbstractRepository.Calculator addCalculator(AbstractRepository.Calculators id, AbstractRepository.Calculator calculator)
- Parameters:
id
- calculator identifier.calculator
- value calculator.- Returns:
- calculator which was registered by same id.
-
-