Package org.eclipse.emf.cdo.common.model
Interface CDOPackageUnit
-
- All Superinterfaces:
CDOTimeProvider
,java.lang.Comparable<CDOPackageUnit>
- All Known Subinterfaces:
InternalCDOPackageUnit
public interface CDOPackageUnit extends java.lang.Comparable<CDOPackageUnit>, CDOTimeProvider
Represents a tree structure of nestedpackages
that are registered with apackage registry
and that can only be serialized as a whole.A package unit is the granule of committing or lazy loading packages. It contains some overall information like
type
,state
,commit time
and nestedpackage info
objects that describe all the nested packages.- Since:
- 2.0
- Author:
- Eike Stepper
- No Implement
- This interface is not intended to be implemented by clients.
- No Extend
- This interface is not intended to be extended by clients.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
CDOPackageUnit.State
Describes the possible states apackage unit
may be in during its lifecycle.static class
CDOPackageUnit.Type
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.eclipse.emf.ecore.EPackage[]
getEPackages(boolean loadOnDemand)
Returns allpackages
of the nested package tree structure described by this package unit in depth-first traversal order.java.lang.String
getID()
Returns the ID of this package unit.CDOPackageUnit.Type
getOriginalType()
Returns the type of this package unit as it was at the time it was originally committed by a client.CDOPackageInfo
getPackageInfo(java.lang.String packageURI)
Returns thepackage info
object that describes thepackage
with the given namespace URI, ornull
if this package unit does not contain a package with this URI.CDOPackageInfo[]
getPackageInfos()
Returns allpackage info
objects of the nested package tree structure described by this package unit in depth-first traversal order.CDOPackageRegistry
getPackageRegistry()
Returns the package registry this package unit is managed by.CDOPackageUnit.State
getState()
Returns the current state of this package unit.long
getTimeStamp()
Returns the time this package unit was originally committed.CDOPackageInfo
getTopLevelPackageInfo()
Returns thepackage info
object that describes the top levelpackage
of the nested package tree structure described by this package unit.CDOPackageUnit.Type
getType()
Returns the current type of this package unit.boolean
isResource()
Returnstrue
is this package unit describes the model Eresource ,false
otherwise.boolean
isSystem()
Returnstrue
is this package unit describes one of the models Ecore, Eresource or Etypes,false
otherwise.
-
-
-
Method Detail
-
getPackageRegistry
CDOPackageRegistry getPackageRegistry()
Returns the package registry this package unit is managed by.
-
getID
java.lang.String getID()
Returns the ID of this package unit.Same as
getTopLevelPackageInfo()
.CDOPackageInfo.getPackageURI()
.
-
getState
CDOPackageUnit.State getState()
Returns the current state of this package unit.
-
getType
CDOPackageUnit.Type getType()
Returns the current type of this package unit.
-
getOriginalType
CDOPackageUnit.Type getOriginalType()
Returns the type of this package unit as it was at the time it was originally committed by a client.
-
getTimeStamp
long getTimeStamp()
Returns the time this package unit was originally committed.- Specified by:
getTimeStamp
in interfaceCDOTimeProvider
-
getTopLevelPackageInfo
CDOPackageInfo getTopLevelPackageInfo()
Returns thepackage info
object that describes the top levelpackage
of the nested package tree structure described by this package unit.
-
getPackageInfo
CDOPackageInfo getPackageInfo(java.lang.String packageURI)
Returns thepackage info
object that describes thepackage
with the given namespace URI, ornull
if this package unit does not contain a package with this URI.
-
getPackageInfos
CDOPackageInfo[] getPackageInfos()
Returns allpackage info
objects of the nested package tree structure described by this package unit in depth-first traversal order.
-
getEPackages
org.eclipse.emf.ecore.EPackage[] getEPackages(boolean loadOnDemand)
Returns allpackages
of the nested package tree structure described by this package unit in depth-first traversal order.
-
isSystem
boolean isSystem()
Returnstrue
is this package unit describes one of the models Ecore, Eresource or Etypes,false
otherwise.Note that the models Ecore, Eresource and Etypes are expected to be present as generated
NATIVE
models in all deployments.
-
isResource
boolean isResource()
Returnstrue
is this package unit describes the model Eresource ,false
otherwise.Note that the model Eresource is expected to bepresent as generated
NATIVE
models in all deployments.- Since:
- 4.0
-
-