Class Version

All Implemented Interfaces:
BaseCmfEntity<org.mitre.niem.cmf.Model>, Serializable

@Entity public class Version extends BaseModelEntity implements BaseCmfEntity<org.mitre.niem.cmf.Model>
A specific version or release of a model.
See Also:
  • Field Details

    • prev

      public Version prev
      Corresponding entity mapped from the previous version.
    • next

      public Version next
      Corresponding entity mapped from the next version.
  • Constructor Details

    • Version

      protected Version(Version.VersionBuilder<?,?> b)
    • Version

      public Version()
    • Version

      public Version(Model model, @NonNull @NonNull String versionNumber, String draft, boolean isPublished, boolean isCurrent, String uri, String conformanceTargets, String exchangePattern, String exchangePartners, String revised, String status, Version.Category category, Set<Namespace> namespaces, Set<Property> messageRoots, Version prev, Version next, Version niemVersion)
      Creates a new Version instance.
      Parameters:
      model -
      versionNumber - A number which identifies a version of a model, such as "5.2" or "1.0.1".
      draft - A draft of a version, such as "alpha1" or "rc2".
      isPublished - True if a version has been published and the content is to be considered finalized; false otherwise.
      isCurrent - True if this version of the model is considered the current version; false otherwise.
      uri - An URI identifier for a version of a model.
      conformanceTargets - A list of one or more URIs that each represents an IEPD class to which the IEPD claims conformance.
      exchangePattern - A description of a transactional or design pattern used for this IEPD.
      exchangePartners - A name of an entity or organization that uses this IEPD.
      revised - A date the latest changes to an IEPD were published (i.e., CreationDate of previous version).
      status - A description of the current state of this IEPD in development; may also project future plans for the IEPD.
      category - A kind of version, such as major or minor.
      namespaces - A set of namespaces defined by a version of a model.
      messageRoots - A set of properties that serve as the root or starting point of message instances.
      prev - Corresponding entity mapped from the previous version.
      next - Corresponding entity mapped from the next version.
      niemVersion - A NIEM version on which this version is based, or itself if this is a NIEM version.
  • Method Details

    • getPrev

      public Version getPrev()
      Corresponding entity from the previous version of the model. The Hibernate proxy (from lazy loading) is initialized.
    • getNext

      public Version getNext()
      Corresponding entity from the next version of the model. The Hibernate proxy (from lazy loading) is initialized.
    • 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
    • getFullIdentifier

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

      public String getLocalIdentifier()
      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:
      getLocalIdentifier 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 void addToCmfModel(org.mitre.niem.cmf.Model cmfModel) throws org.mitre.niem.cmf.CMFException
      Specified by:
      addToCmfModel in interface BaseCmfEntity<org.mitre.niem.cmf.Model>
      Throws:
      org.mitre.niem.cmf.CMFException
    • addToCmfModel

      public void addToCmfModel(org.mitre.niem.cmf.Model cmfModel, Boolean includeContent) throws org.mitre.niem.cmf.CMFException
      Adds the namespaces, properties, and types in this model to the given CMF model.
      Throws:
      org.mitre.niem.cmf.CMFException
    • toCmf

      public org.mitre.niem.cmf.Model toCmf()
      Specified by:
      toCmf in interface BaseCmfEntity<org.mitre.niem.cmf.Model>
    • builder

      public static Version.VersionBuilder<?,?> builder()
    • getVersionNumber

      @NonNull public @NonNull String getVersionNumber()
      A number which identifies a version of a model, such as "5.2" or "1.0.1".
    • getDraft

      public String getDraft()
      A draft of a version, such as "alpha1" or "rc2".
    • isPublished

      public boolean isPublished()
      True if a version has been published and the content is to be considered finalized; false otherwise.
    • isCurrent

      public boolean isCurrent()
      True if this version of the model is considered the current version; false otherwise.
    • getUri

      public String getUri()
      An URI identifier for a version of a model.
    • getConformanceTargets

      public String getConformanceTargets()
      A list of one or more URIs that each represents an IEPD class to which the IEPD claims conformance.
    • getExchangePattern

      public String getExchangePattern()
      A description of a transactional or design pattern used for this IEPD.
    • getExchangePartners

      public String getExchangePartners()
      A name of an entity or organization that uses this IEPD.
    • getRevised

      public String getRevised()
      A date the latest changes to an IEPD were published (i.e., CreationDate of previous version).
    • getStatus

      public String getStatus()
      A description of the current state of this IEPD in development; may also project future plans for the IEPD.
    • getCategory

      public Version.Category getCategory()
      A kind of version, such as major or minor.
    • getNamespaces

      public Set<Namespace> getNamespaces()
      A set of namespaces defined by a version of a model.
    • getMessageRoots

      public Set<Property> getMessageRoots()
      A set of properties that serve as the root or starting point of message instances.
    • setModel

      public void setModel(Model model)
    • setVersionNumber

      public void setVersionNumber(@NonNull @NonNull String versionNumber)
      A number which identifies a version of a model, such as "5.2" or "1.0.1".
    • setDraft

      public void setDraft(String draft)
      A draft of a version, such as "alpha1" or "rc2".
    • setPublished

      public void setPublished(boolean isPublished)
      True if a version has been published and the content is to be considered finalized; false otherwise.
    • setCurrent

      public void setCurrent(boolean isCurrent)
      True if this version of the model is considered the current version; false otherwise.
    • setUri

      public void setUri(String uri)
      An URI identifier for a version of a model.
    • setConformanceTargets

      public void setConformanceTargets(String conformanceTargets)
      A list of one or more URIs that each represents an IEPD class to which the IEPD claims conformance.
    • setExchangePattern

      public void setExchangePattern(String exchangePattern)
      A description of a transactional or design pattern used for this IEPD.
    • setExchangePartners

      public void setExchangePartners(String exchangePartners)
      A name of an entity or organization that uses this IEPD.
    • setRevised

      public void setRevised(String revised)
      A date the latest changes to an IEPD were published (i.e., CreationDate of previous version).
    • setStatus

      public void setStatus(String status)
      A description of the current state of this IEPD in development; may also project future plans for the IEPD.
    • setCategory

      public void setCategory(Version.Category category)
      A kind of version, such as major or minor.
    • setNamespaces

      public void setNamespaces(Set<Namespace> namespaces)
      A set of namespaces defined by a version of a model.
    • setMessageRoots

      public void setMessageRoots(Set<Property> messageRoots)
      A set of properties that serve as the root or starting point of message instances.
    • setPrev

      public void setPrev(Version prev)
      Corresponding entity mapped from the previous version.
    • setNext

      public void setNext(Version next)
      Corresponding entity mapped from the next version.
    • setNiemVersion

      public void setNiemVersion(Version niemVersion)
      A NIEM version on which this version is based, or itself if this is a NIEM version.
    • toString

      public String toString()
      Overrides:
      toString in class BaseModelEntity
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class BaseModelEntity
    • canEqual

      protected boolean canEqual(Object other)
      Overrides:
      canEqual in class BaseModelEntity
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class BaseModelEntity