Package gov.niem.tools.api.db.facet
Class Facet
- All Implemented Interfaces:
BaseCmfEntity<org.mitre.niem.cmf.Facet>
,Serializable
@Entity
public class Facet
extends BaseNamespaceEntity<Facet>
implements BaseCmfEntity<org.mitre.niem.cmf.Facet>
A constraint on a datatype, such as an enumeration or a pattern.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Kinds of facet categories, such as enumeration, pattern, and length.static class
Nested classes/interfaces inherited from class gov.niem.tools.api.db.base.BaseNamespaceEntity
BaseNamespaceEntity.BaseNamespaceEntityBuilder<T extends BaseVersionEntity<T>,
C extends BaseNamespaceEntity<T>, B extends BaseNamespaceEntity.BaseNamespaceEntityBuilder<T, C, B>> Nested classes/interfaces inherited from class gov.niem.tools.api.db.base.BaseVersionEntity
BaseVersionEntity.BaseVersionEntityBuilder<T extends BaseVersionEntity<T>,
C extends BaseVersionEntity<T>, B extends BaseVersionEntity.BaseVersionEntityBuilder<T, 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 inherited from class gov.niem.tools.api.db.base.BaseVersionEntity
next, prev
-
Constructor Summary
ConstructorsConstructorDescriptionFacet()
Facet
(Type type, Facet.Category category, String value, String definition) Creates a new facet with the given fields on the given type.Facet
(Type type, String prefix, String qname, Long versionId, Facet.Category category, String value, String definition) Creates a newFacet
instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addToCmfModel
(org.mitre.niem.cmf.Model cmfModel) Adds this facet to the given CMF model.static Facet.FacetBuilder
builder()
protected boolean
boolean
A kind of facet, e.g., "enumeration"A kind of NIEM entity, such as a Namespace or a Property.getCmfFacetKind
(Facet.Category category) CMF Facet.facetKind values must be upper camel case.A human-readable and url-friendly unique identifier for an entity.An identifier, unique within its immediate scope.Gets the Namespace that contains the type of this facet.An immediate entity or scope to which this entity belongs.getQname()
getRoute()
An endpoint to get information about an entity.getTitle()
A descriptive label or title used to identify an entity.getType()
Gets the Type that contains this facet.getValue()
Gets the version database id.int
hashCode()
void
setCategory
(Facet.Category category) A kind of facet, e.g., "enumeration"void
setDefinition
(String definition) void
void
void
Type that contains the facet.void
void
setVersionId
(Long versionId) org.mitre.niem.cmf.Facet
toCmf()
Converts this facet to a CMF facet object.toString()
Methods inherited from class gov.niem.tools.api.db.base.BaseNamespaceEntity
getNamespaceId, getNamespaceSummary, getVersion
Methods inherited from class gov.niem.tools.api.db.base.BaseVersionEntity
getModel, getNext, getNiemVersion, getNiemVersionNumber, getOriginal, getPrev, getVersionNumber, getVersionSummary, isDeprecated, isOriginal, setDeprecated, setNext, setOriginal, setPrev
Methods inherited from class gov.niem.tools.api.db.base.BaseModelEntity
getModelKey, getModelSummary, getSteward
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
-
Constructor Details
-
Facet
Creates a new facet with the given fields on the given type. -
Facet
public Facet() -
Facet
public Facet(Type type, String prefix, String qname, Long versionId, Facet.Category category, String value, String definition) Creates a newFacet
instance.- Parameters:
type
- Type that contains the facet.prefix
-qname
-versionId
-category
- A kind of facet, e.g., "enumeration"value
-definition
-
-
-
Method Details
-
getNamespace
Gets the Namespace that contains the type of this facet.- Specified by:
getNamespace
in classBaseNamespaceEntity<Facet>
-
getType
Gets the Type that contains this facet. -
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
-
addToCmfModel
public void addToCmfModel(org.mitre.niem.cmf.Model cmfModel) throws org.mitre.niem.cmf.CMFException Adds this facet to the given CMF model.- Specified by:
addToCmfModel
in interfaceBaseCmfEntity<org.mitre.niem.cmf.Facet>
- Throws:
org.mitre.niem.cmf.CMFException
-
toCmf
public org.mitre.niem.cmf.Facet toCmf() throws org.mitre.niem.cmf.CMFExceptionConverts this facet to a CMF facet object.- Specified by:
toCmf
in interfaceBaseCmfEntity<org.mitre.niem.cmf.Facet>
- Throws:
org.mitre.niem.cmf.CMFException
-
getCmfFacetKind
CMF Facet.facetKind values must be upper camel case. -
builder
-
getPrefix
-
getQname
-
getVersionId
Description copied from class:BaseVersionEntity
Gets the version database id.- Overrides:
getVersionId
in classBaseVersionEntity<Facet>
-
getCategory
A kind of facet, e.g., "enumeration" -
getValue
-
getDefinition
-
setType
Type that contains the facet. -
setPrefix
-
setQname
-
setVersionId
-
setCategory
A kind of facet, e.g., "enumeration" -
setValue
-
setDefinition
-
toString
- Overrides:
toString
in classBaseNamespaceEntity<Facet>
-
equals
- Overrides:
equals
in classBaseNamespaceEntity<Facet>
-
canEqual
- Overrides:
canEqual
in classBaseNamespaceEntity<Facet>
-
hashCode
public int hashCode()- Overrides:
hashCode
in classBaseNamespaceEntity<Facet>
-