Package gov.niem.tools.api.db.version
Class Version
- All Implemented Interfaces:
BaseCmfEntity<org.mitre.niem.cmf.Model>,Serializable,Comparable<Version>
@Entity
public class Version
extends BaseVersionedEntity<Version>
implements BaseCmfEntity<org.mitre.niem.cmf.Model>, Comparable<Version>
A specific version or release of a model.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumKinds of versions, such as major, minor, patch, core supplement, and domain update. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringA description of the main content or changes in a version. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.mitre.niem.cmf.ModeladdToCmfModel(org.mitre.niem.cmf.Model cmfModel, boolean addDependencies, AddModelReason addModelReason, Test test) Add self to the given CMF model if not already there.intCustom sorting function for versions.A kind of NIEM entity, such as a Namespace or a Property.A human-readable and url-friendly unique identifier for an entity.An identifier, unique within its immediate scope.getModel()Gets the model to which the version belongs.Gets the reference model from the NIEM steward.Gets the NIEM version number compatible with this version of the model.An immediate entity or scope to which this entity belongs.getRoute()An endpoint to get information about an entity.Gets the steward from the model that this version belongs to.getTitle()A descriptive label or title used to identify an entity.org.mitre.niem.cmf.ModeltoCmf()Adds the namespaces, properties, and types in this model to the given CMF model.Gets key fields about a version.Methods inherited from class gov.niem.tools.api.db.base.BaseVersionedEntity
getNext, getPrevMethods inherited from class gov.niem.tools.api.db.base.BaseModelEntity
getModelKey, getModelSummaryMethods inherited from class gov.niem.tools.api.db.base.BaseStewardEntity
getStewardKey, getStewardSummary
-
Field Details
-
description
A description of the main content or changes in a version.
-
-
Constructor Details
-
Version
public Version()
-
-
Method Details
-
getModel
Gets the model to which the version belongs. Makes sure a potential Hibernate proxy is initialized.- Specified by:
getModelin classBaseModelEntity
-
getNiemVersion
Gets the reference model from the NIEM steward. Makes sure a potential Hibernate proxy is initialized. -
getNiemVersionNumber
Gets the NIEM version number compatible with this version of the model. -
getParentEntity
Description copied from class:BaseEntityAn immediate entity or scope to which this entity belongs. Examples include a steward (parent) for a model or a namespace (parent) for a property or type.- Specified by:
getParentEntityin classBaseEntity
-
getRoute
Description copied from class:BaseEntityAn endpoint to get information about an entity.- Specified by:
getRoutein classBaseEntity
-
getClassName
Description copied from class:BaseEntityA kind of NIEM entity, such as a Namespace or a Property.- Overrides:
getClassNamein classBaseEntity
-
getIdLabel
Description copied from class:BaseEntityA human-readable and url-friendly unique identifier for an entity.- Specified by:
getIdLabelin classBaseEntity
-
getIdLocalLabel
Description copied from class:BaseEntityAn identifier, unique within its immediate scope. Examples include a prefix (uniquely identifying a namespace) or a qualified name (uniquely identifying a property or a type) within a version of a model.- Specified by:
getIdLocalLabelin classBaseEntity
-
getTitle
Description copied from class:BaseEntityA descriptive label or title used to identify an entity.- Specified by:
getTitlein classBaseEntity
-
getSteward
Gets the steward from the model that this version belongs to.- Overrides:
getStewardin classBaseModelEntity
-
toSummary
Gets key fields about a version. -
addToCmfModel
public org.mitre.niem.cmf.Model addToCmfModel(org.mitre.niem.cmf.Model cmfModel, boolean addDependencies, AddModelReason addModelReason, Test test) throws org.mitre.niem.cmf.CMFException Description copied from interface:BaseCmfEntityAdd self to the given CMF model if not already there.- Specified by:
addToCmfModelin interfaceBaseCmfEntity<org.mitre.niem.cmf.Model>- Parameters:
cmfModel- The CMF model.addDependencies- True to also add dependencies if not already in the CMF model (namespace, type, group); false (default) to just add this property.addModelReason- Indicates the reason why a component is being added to the model, either directly due to a task like migration or transformation, or indirectly as a required dependency.test- If present, log info to given test object.- Throws:
org.mitre.niem.cmf.CMFException
-
toCmf
public org.mitre.niem.cmf.Model toCmf()Adds the namespaces, properties, and types in this model to the given CMF model.- Specified by:
toCmfin interfaceBaseCmfEntity<org.mitre.niem.cmf.Model>
-
compareTo
Custom sorting function for versions. Sort by version number.- Specified by:
compareToin interfaceComparable<Version>
-