Package gov.niem.tools.api.db.version
Class Version
java.lang.Object
gov.niem.tools.api.db.base.BaseEntity
gov.niem.tools.api.db.base.BaseStewardEntity
gov.niem.tools.api.db.base.BaseModelEntity
gov.niem.tools.api.db.version.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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Kinds of versions, such as major, minor, patch, core supplement, and domain update.static class
Version.VersionBuilder<C extends Version,
B extends Version.VersionBuilder<C, B>> Nested classes/interfaces inherited from class gov.niem.tools.api.db.base.BaseModelEntity
BaseModelEntity.BaseModelEntityBuilder<C extends BaseModelEntity,
B extends BaseModelEntity.BaseModelEntityBuilder<C, B>> Nested classes/interfaces inherited from class gov.niem.tools.api.db.base.BaseStewardEntity
BaseStewardEntity.BaseStewardEntityBuilder<C extends BaseStewardEntity,
B extends BaseStewardEntity.BaseStewardEntityBuilder<C, B>> Nested classes/interfaces inherited from class gov.niem.tools.api.db.base.BaseEntity
BaseEntity.BaseEntityBuilder<C extends BaseEntity,
B extends BaseEntity.BaseEntityBuilder<C, B>> -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionVersion()
Version
(Model model, @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 newVersion
instance.protected
Version
(Version.VersionBuilder<?, ?> b) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addToCmfModel
(org.mitre.niem.cmf.Model cmfModel) void
addToCmfModel
(org.mitre.niem.cmf.Model cmfModel, Boolean includeContent) Adds the namespaces, properties, and types in this model to the given CMF model.static Version.VersionBuilder
<?, ?> builder()
protected boolean
boolean
A kind of version, such as major or minor.A kind of NIEM entity, such as a Namespace or a Property.A list of one or more URIs that each represents an IEPD class to which the IEPD claims conformance.getDraft()
A draft of a version, such as "alpha1" or "rc2".A name of an entity or organization that uses this IEPD.A description of a transactional or design pattern used for this IEPD.A human-readable and url-friendly unique identifier for an entity.An identifier, unique within its immediate scope.A set of properties that serve as the root or starting point of message instances.getModel()
Gets the model to which the version belongs.A set of namespaces defined by a version of a model.getNext()
Corresponding entity from the next version of the model.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.getPrev()
Corresponding entity from the previous version of the model.A date the latest changes to an IEPD were published (i.e., CreationDate of previous version).getRoute()
An endpoint to get information about an entity.A description of the current state of this IEPD in development; may also project future plans for the IEPD.Gets the steward from the model that this version belongs to.getTitle()
A descriptive label or title used to identify an entity.getUri()
An URI identifier for a version of a model.@NonNull String
A number which identifies a version of a model, such as "5.2" or "1.0.1".int
hashCode()
boolean
True if this version of the model is considered the current version; false otherwise.boolean
True if a version has been published and the content is to be considered finalized; false otherwise.void
setCategory
(Version.Category category) A kind of version, such as major or minor.void
setConformanceTargets
(String conformanceTargets) A list of one or more URIs that each represents an IEPD class to which the IEPD claims conformance.void
setCurrent
(boolean isCurrent) True if this version of the model is considered the current version; false otherwise.void
A draft of a version, such as "alpha1" or "rc2".void
setExchangePartners
(String exchangePartners) A name of an entity or organization that uses this IEPD.void
setExchangePattern
(String exchangePattern) A description of a transactional or design pattern used for this IEPD.void
setMessageRoots
(Set<Property> messageRoots) A set of properties that serve as the root or starting point of message instances.void
void
setNamespaces
(Set<Namespace> namespaces) A set of namespaces defined by a version of a model.void
Corresponding entity mapped from the next version.void
setNiemVersion
(Version niemVersion) A NIEM version on which this version is based, or itself if this is a NIEM version.void
Corresponding entity mapped from the previous version.void
setPublished
(boolean isPublished) True if a version has been published and the content is to be considered finalized; false otherwise.void
setRevised
(String revised) A date the latest changes to an IEPD were published (i.e., CreationDate of previous version).void
A description of the current state of this IEPD in development; may also project future plans for the IEPD.void
An URI identifier for a version of a model.void
setVersionNumber
(@NonNull String versionNumber) A number which identifies a version of a model, such as "5.2" or "1.0.1".org.mitre.niem.cmf.Model
toCmf()
toString()
Gets key fields about a version.Methods inherited from class gov.niem.tools.api.db.base.BaseModelEntity
getModelKey, getModelSummary
Methods inherited from class gov.niem.tools.api.db.base.BaseStewardEntity
getStewardKey, getStewardSummary
Methods inherited from class gov.niem.tools.api.db.base.BaseEntity
getCreatedBy, getCreatedDate, getId, getLastModifiedBy, getLastModifiedDate, setCreatedBy, setCreatedDate, setId, setLastModifiedBy, setLastModifiedDate
-
Field Details
-
prev
Corresponding entity mapped from the previous version. -
next
Corresponding entity mapped from the next version.
-
-
Constructor Details
-
Version
-
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 newVersion
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
Corresponding entity from the previous version of the model. The Hibernate proxy (from lazy loading) is initialized. -
getNext
Corresponding entity from the next version of the model. The Hibernate proxy (from lazy loading) is initialized. -
getModel
Gets the model to which the version belongs. Makes sure a potential Hibernate proxy is initialized.- Specified by:
getModel
in 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: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 classBaseEntity
-
getRoute
Description copied from class:BaseEntity
An endpoint to get information about an entity.- Specified by:
getRoute
in classBaseEntity
-
getClassName
Description copied from class:BaseEntity
A kind of NIEM entity, such as a Namespace or a Property.- Overrides:
getClassName
in classBaseEntity
-
getFullIdentifier
Description copied from class:BaseEntity
A human-readable and url-friendly unique identifier for an entity.- Specified by:
getFullIdentifier
in classBaseEntity
-
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 classBaseEntity
-
getTitle
Description copied from class:BaseEntity
A descriptive label or title used to identify an entity.- Specified by:
getTitle
in classBaseEntity
-
getSteward
Gets the steward from the model that this version belongs to.- Overrides:
getSteward
in classBaseModelEntity
-
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 interfaceBaseCmfEntity<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 interfaceBaseCmfEntity<org.mitre.niem.cmf.Model>
-
builder
-
getVersionNumber
A number which identifies a version of a model, such as "5.2" or "1.0.1". -
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
An URI identifier for a version of a model. -
getConformanceTargets
A list of one or more URIs that each represents an IEPD class to which the IEPD claims conformance. -
getExchangePattern
A description of a transactional or design pattern used for this IEPD. -
getExchangePartners
A name of an entity or organization that uses this IEPD. -
getRevised
A date the latest changes to an IEPD were published (i.e., CreationDate of previous version). -
getStatus
A description of the current state of this IEPD in development; may also project future plans for the IEPD. -
getCategory
A kind of version, such as major or minor. -
getNamespaces
A set of namespaces defined by a version of a model. -
getMessageRoots
A set of properties that serve as the root or starting point of message instances. -
setModel
-
setVersionNumber
A number which identifies a version of a model, such as "5.2" or "1.0.1". -
setDraft
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
An URI identifier for a version of a model. -
setConformanceTargets
A list of one or more URIs that each represents an IEPD class to which the IEPD claims conformance. -
setExchangePattern
A description of a transactional or design pattern used for this IEPD. -
setExchangePartners
A name of an entity or organization that uses this IEPD. -
setRevised
A date the latest changes to an IEPD were published (i.e., CreationDate of previous version). -
setStatus
A description of the current state of this IEPD in development; may also project future plans for the IEPD. -
setCategory
A kind of version, such as major or minor. -
setNamespaces
A set of namespaces defined by a version of a model. -
setMessageRoots
A set of properties that serve as the root or starting point of message instances. -
setPrev
Corresponding entity mapped from the previous version. -
setNext
Corresponding entity mapped from the next version. -
setNiemVersion
A NIEM version on which this version is based, or itself if this is a NIEM version. -
toString
- Overrides:
toString
in classBaseModelEntity
-
equals
- Overrides:
equals
in classBaseModelEntity
-
canEqual
- Overrides:
canEqual
in classBaseModelEntity
-
hashCode
public int hashCode()- Overrides:
hashCode
in classBaseModelEntity
-