Class Component<T extends BaseNamespaceEntity<T>>

Type Parameters:
T - - A subclass of Component, i.e., Property or Type.
All Implemented Interfaces:
Serializable, Comparable<Component<T>>
Direct Known Subclasses:
Property, Type

@MappedSuperclass @Indexed public abstract class Component<T extends BaseNamespaceEntity<T>> extends BaseNamespaceEntity<T> implements Comparable<Component<T>>
A parent class for Property and Type.
See Also:
  • Field Details

    • prefix

      protected String prefix
      A namespace prefix for the property or type.
    • qname

      public String qname
    • namespaceRank

      public int namespaceRank
      A ranking used to support sorting component namespaces by category, with Core and Core Supplements sorting first, followed by domains, etc.
    • name

      @FullTextField(name="name_tokens",analyzer="camel") @FullTextField(name="name_substring",analyzer="nGram") @KeywordField(name="name_sort", normalizer="case", sortable=YES, projectable=YES) protected String name
      A name of the property or type.
    • definition

      @FullTextField protected String definition
      A definition describing a property or type.
  • Constructor Details

    • Component

      public Component()
  • Method Details

    • getCategory

      protected abstract Object getCategory()
    • getNamespace

      public Namespace getNamespace()
      Namespace that defines this component.
      Specified by:
      getNamespace in class BaseNamespaceEntity<T extends BaseNamespaceEntity<T>>
    • getParentEntity

      public Namespace 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
    • 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
    • getTerms

      public String[] getTerms()
      A set of terms from the name of the property or type, broken apart by camel casing.
    • toSummary

      public Map<String,String> toSummary()
      Returns key fields about a component.
    • getPrefix

      public static String getPrefix(String qname)
      Return the first part (namespace prefix) of a qualified name string with a ":" delimiter. For example, return "nc" given "nc:PersonBirthDate".
    • getName

      public static String getName(String qname)
      Return the second part (namespace prefix) of a qualified name string with a ":" delimiter. For example, return "PersonBirthDate" given "nc:PersonBirthDate".
    • toCmf

      public org.mitre.niem.cmf.Component toCmf() throws org.mitre.niem.cmf.CMFException
      Throws:
      org.mitre.niem.cmf.CMFException
    • compareTo

      public int compareTo(Component<T> other)
      Custom sorting function for components. Returns components sorted by namespace rank, prefix, and name.
      Specified by:
      compareTo in interface Comparable<T extends BaseNamespaceEntity<T>>