Class Namespace
- All Implemented Interfaces:
BaseCmfEntity<org.mitre.niem.cmf.Namespace>,Serializable,Comparable<Namespace>
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumKinds of namespaces, such as core, domain, code, adapter, and extension.static enumKinds of schema generation options, representing schemas that have to be built, schemas that are to be included as static files, and schemas that do not have to be included at all (e.g., the schema for XML Schema).static enumKinds of NDR targets, such as REF and EXT. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.mitre.niem.cmf.NamespaceaddToCmfModel(org.mitre.niem.cmf.Model cmfModel, boolean addDependencies, AddModelReason addModelReason, Test test) Adds this namespace to the given CMF model if it does not already exist.categoryFromCmf(int kind) Converts CMF namespace categories to API namespace categories.intcategoryToCmfInt(Namespace.Category category) Converts API namespace categories to CMF namespace kinds (int).categoryToCmfString(Namespace.Category category) Converts API namespace categories to CMF namespace kinds (string).intCustom sorting function for namespaces.A kind of NIEM entity, such as a Namespace or a Property.Returns the name of the conformance target.A human-readable and url-friendly unique identifier for an entity.An identifier, unique within its immediate scope.Gets the conformance target URI based on the target and NIEM version number of this namespace.Gets the NDR version for this namespace, based on the version of NIEM that is compatible with this namespace.Returns the first digit of the NIEM version compatible with this namespace.An immediate entity or scope to which this entity belongs.intgetRank()A ranking used to support sorting namespaces by category, with Core and Core Supplements sorting first, followed by domains, etc.getRoute()An endpoint to get information about an entity.getTitle()A descriptive label or title used to identify an entity.Gets the version to which this namespace belongs.booleanTrue if the namespace has a NDR conformance target and is meant to be conforming; false if the namespace is a utility, external, or is otherwise not meant to be conforming.org.mitre.niem.cmf.NamespacetoCmf()Converts this namespace to a CMF namespace object.Gets key fields about a namespace.Methods inherited from class gov.niem.tools.api.db.base.BaseVersionEntity
getCurrent, getModel, getNiemVersion, getNiemVersionNumber, getOriginal, getVersionId, getVersionNumber, getVersionSummary, isCurrent, isOriginalMethods inherited from class gov.niem.tools.api.db.base.BaseVersionedEntity
getNext, getPrevMethods inherited from class gov.niem.tools.api.db.base.BaseModelEntity
getModelKey, getModelSummary, getStewardMethods inherited from class gov.niem.tools.api.db.base.BaseStewardEntity
getStewardKey, getStewardSummary
-
Constructor Details
-
Namespace
public Namespace()
-
-
Method Details
-
getRank
@IndexingDependency(derivedFrom=@ObjectPath(@PropertyValue(propertyName="category"))) @GenericField(sortable=YES) public int getRank()A ranking used to support sorting namespaces by category, with Core and Core Supplements sorting first, followed by domains, etc. -
getVersion
Gets the version to which this namespace belongs.- Specified by:
getVersionin classBaseVersionEntity<Namespace>
-
hasTarget
public boolean hasTarget()True if the namespace has a NDR conformance target and is meant to be conforming; false if the namespace is a utility, external, or is otherwise not meant to be conforming. -
getParentEntity
Description copied from class:BaseEntityAn 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:
getParentEntityin classBaseEntity
-
getRoute
Description copied from class:BaseEntityAn endpoint to get information about an entity.- Specified by:
getRoutein classBaseEntity
-
getClassName
Description copied from class:BaseEntityA kind of NIEM entity, such as a Namespace or a Property.- Overrides:
getClassNamein classBaseEntity
-
getIdLabel
Description copied from class:BaseEntityA human-readable and url-friendly unique identifier for an entity.- Specified by:
getIdLabelin classBaseEntity
-
getIdLocalLabel
Description copied from class:BaseEntityAn 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:
getIdLocalLabelin classBaseEntity
-
getTitle
Description copied from class:BaseEntityA descriptive label or title used to identify an entity.- Specified by:
getTitlein classBaseEntity
-
getConformanceTargetName
Returns the name of the conformance target. For example, for a REF target, returns "Reference". -
getNiemVersionMajorDigit
Returns the first digit of the NIEM version compatible with this namespace. -
getNdrVersion
Gets the NDR version for this namespace, based on the version of NIEM that is compatible with this namespace. -
getNdrConformanceTarget
Gets the conformance target URI based on the target and NIEM version number of this namespace. -
toSummary
Gets key fields about a namespace. -
addToCmfModel
public org.mitre.niem.cmf.Namespace addToCmfModel(org.mitre.niem.cmf.Model cmfModel, boolean addDependencies, AddModelReason addModelReason, Test test) throws org.mitre.niem.cmf.CMFException, EntityNotUniqueException Adds this namespace to the given CMF model if it does not already exist.- Specified by:
addToCmfModelin interfaceBaseCmfEntity<org.mitre.niem.cmf.Namespace>- Parameters:
cmfModel- The CMF model.addDependencies- True to also add namespace dependencies (local terminology); false to just add this namespace.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.CMFExceptionEntityNotUniqueException
-
toCmf
public org.mitre.niem.cmf.Namespace toCmf() throws org.mitre.niem.cmf.CMFExceptionConverts this namespace to a CMF namespace object.- Specified by:
toCmfin interfaceBaseCmfEntity<org.mitre.niem.cmf.Namespace>- Throws:
org.mitre.niem.cmf.CMFException
-
categoryFromCmf
Converts CMF namespace categories to API namespace categories. -
categoryToCmfInt
Converts API namespace categories to CMF namespace kinds (int).From CMF: cmf/NamespaceKind.java NSK_EXTENSION = 0; has conformance assertion, not in NIEM model NSK_DOMAIN = 1; domain schema NSK_CORE = 2; niem core schema NSK_OTHERNIEM = 3; other niem model; starts with release or publication prefix NSK_APPINFO = 4; appinfo NSK_CLSA = 5; code lists schema appinfo NSK_CLI = 6; code lists instance NSK_NIEM_XS = 7; proxy NSK_STRUCTURES = 8; structures NSK_XSD = 9; namespace for XSD NSK_XML = 10; namespace for xml: attributes NSK_EXTERNAL = 11; was imported with appinfo:externalImportIndicator NSK_NOTNIEM = 12; none of the above; no conformance assertion or external appinfo NSK_UNKNOWN = 13; can't figure it out; probably an error NSK_NUMKINDS = 14; this many kinds of namespaces
-
categoryToCmfString
Converts API namespace categories to CMF namespace kinds (string). -
compareTo
Custom sorting function for namespaces. Sorts by namespace rank, then prefix.- Specified by:
compareToin interfaceComparable<Namespace>
-