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:
  • Field Details

    • description

      protected String description
      A description of the main content or changes in a version.
  • Constructor Details

    • Version

      public Version()
  • Method Details

    • getModel

      public Model getModel()
      Gets the model to which the version belongs. Makes sure a potential Hibernate proxy is initialized.
      Specified by:
      getModel in class BaseModelEntity
    • getNiemVersion

      public Version getNiemVersion()
      Gets the reference model from the NIEM steward. Makes sure a potential Hibernate proxy is initialized.
    • getNiemVersionNumber

      public String getNiemVersionNumber()
      Gets the NIEM version number compatible with this version of the model.
    • getParentEntity

      public Model getParentEntity()
      Description copied from class: BaseEntity
      An 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:
      getParentEntity in class BaseEntity
    • getRoute

      public String getRoute()
      Description copied from class: BaseEntity
      An endpoint to get information about an entity.
      Specified by:
      getRoute in class BaseEntity
    • getClassName

      public String getClassName()
      Description copied from class: BaseEntity
      A kind of NIEM entity, such as a Namespace or a Property.
      Overrides:
      getClassName in class BaseEntity
    • getIdLabel

      public String getIdLabel()
      Description copied from class: BaseEntity
      A human-readable and url-friendly unique identifier for an entity.
      Specified by:
      getIdLabel in class BaseEntity
    • getIdLocalLabel

      public String getIdLocalLabel()
      Description copied from class: BaseEntity
      An 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:
      getIdLocalLabel in class BaseEntity
    • getTitle

      public String getTitle()
      Description copied from class: BaseEntity
      A descriptive label or title used to identify an entity.
      Specified by:
      getTitle in class BaseEntity
    • getSteward

      public Steward getSteward()
      Gets the steward from the model that this version belongs to.
      Overrides:
      getSteward in class BaseModelEntity
    • toSummary

      public Map<String,String> 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: BaseCmfEntity
      Add self to the given CMF model if not already there.
      Specified by:
      addToCmfModel in interface BaseCmfEntity<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:
      toCmf in interface BaseCmfEntity<org.mitre.niem.cmf.Model>
    • compareTo

      public int compareTo(Version other)
      Custom sorting function for versions. Sort by version number.
      Specified by:
      compareTo in interface Comparable<Version>