Class Subproperty

All Implemented Interfaces:
BaseCmfEntity<org.mitre.niem.cmf.PropertyAssociation>, Serializable, Comparable<Subproperty>

@Entity public class Subproperty extends BaseNamespaceEntity<Subproperty> implements BaseCmfEntity<org.mitre.niem.cmf.PropertyAssociation>, Comparable<Subproperty>
A subproperty is a property that is contained by a type, along with cardinality constraints. Also called a child property association.
See Also:
  • Field Details

    • typeQname

      public String typeQname
    • propertyQname

      public String propertyQname
  • Method Details

    • getType

      public Type getType()
      Gets the type of this subproperty. Makes sure a potential Hibernate proxy is initialized.
    • getProperty

      public Property getProperty()
      Gets the property of this subproperty. Makes sure a potential Hibernate proxy is initialized.
    • getNamespace

      public Namespace getNamespace()
      Gets the namespace where this subproperty is defined (the type namespace).
      Specified by:
      getNamespace in class BaseNamespaceEntity<Subproperty>
    • getTypeQname

      public String getTypeQname()
      Gets the qualified name of this subproperty's type.
    • getTypePrefix

      public String getTypePrefix()
      Gets the namespace prefix of this subproperty's type.
    • getPropertyQname

      public String getPropertyQname()
      Gets the qualified name of this subproperty's property.
    • getPropertyPrefix

      public String getPropertyPrefix()
      Gets the namespace prefix of this subproperty's property.
    • getTypeSummary

      public Map<String,String> getTypeSummary()
      Gets summary fields about this subproperty's type.
    • getPropertySummary

      public Map<String,String> getPropertySummary()
    • getParentEntity

      public Type 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
    • addToCmfModel

      public org.mitre.niem.cmf.PropertyAssociation 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.PropertyAssociation>
      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
    • addToCmfModelAsAugmentationRecord

      public org.mitre.niem.cmf.AugmentRecord addToCmfModelAsAugmentationRecord(org.mitre.niem.cmf.Model cmfModel, Type augmentedType) throws org.mitre.niem.cmf.CMFException
      Add subproperty to the CMF model as an augmentation record.
      Parameters:
      augmentedType - The original type being augmented.
      Throws:
      org.mitre.niem.cmf.CMFException
    • toCmf

      public org.mitre.niem.cmf.PropertyAssociation toCmf() throws org.mitre.niem.cmf.CMFException
      Specified by:
      toCmf in interface BaseCmfEntity<org.mitre.niem.cmf.PropertyAssociation>
      Throws:
      org.mitre.niem.cmf.CMFException
    • compareTo

      public int compareTo(Subproperty other)
      Custom sort function for subproperties, sorting by type qname, then sequence.
      Specified by:
      compareTo in interface Comparable<Subproperty>