Interface INamedModelElement
-
- All Superinterfaces:
IModelElement
- All Known Subinterfaces:
IAssembly
,IAssemblyDefinition
,IAssemblyInstance
,IDefinition
,IFeatureFlagContainer<F>
,IFeatureInlinedDefinition<INSTANCE>
,IField
,IFieldDefinition
,IFieldInstance
,IFlag
,IFlagContainer
,IFlagDefinition
,IFlagInstance
,INamedInstance
,INamedModelInstance
,IValuedDefinition
- All Known Implementing Classes:
AbstractAssemblyInstance
,AbstractFieldInstance
,AbstractFlagInstance
public interface INamedModelElement extends IModelElement
A marker interface for Metaschema constructs that can be members of a Metaschema definition's model that are named.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description MarkupLine
getDescription()
Get the text that describes the basic use of the element.default MarkupLine
getEffectiveDescription()
Get the text that describes the basic use of the element, which allows an instance to override a definition's description.default String
getEffectiveFormalName()
The resolved formal display name, which allows an instance to override a definition's name.default String
getEffectiveName()
Get the name to use based on the provided names.String
getFormalName()
The formal display name.default String
getJsonName()
Get the name used for the associated property in JSON/YAML.String
getName()
Retrieve the name of the model element.Map<QName,Set<String>>
getProperties()
Get the mapping of property name to values for the model element.default Set<String>
getPropertyValues(QName qname)
Get the values associated with a given property.String
getUseName()
Retrieve the name to use for the model element, instead of the name.default boolean
hasProperty(QName qname)
Determine if a property is defined.default boolean
hasPropertyValue(QName qname, String value)
Determine if a given property, with a givenqname
, has the identifiedvalue
.-
Methods inherited from interface gov.nist.secauto.metaschema.core.model.IModelElement
getContainingModule, getModelType, getRemarks, toCoordinates
-
-
-
-
Method Detail
-
getFormalName
@Nullable String getFormalName()
The formal display name.- Returns:
- the formal name or
null
if not defined
-
getEffectiveFormalName
@Nullable default String getEffectiveFormalName()
The resolved formal display name, which allows an instance to override a definition's name.- Returns:
- the formal name or
null
if not defined
-
getDescription
@Nullable MarkupLine getDescription()
Get the text that describes the basic use of the element.- Returns:
- a line of markup text or
null
if not defined
-
getEffectiveDescription
@Nullable default MarkupLine getEffectiveDescription()
Get the text that describes the basic use of the element, which allows an instance to override a definition's description.- Returns:
- a line of markup text or
null
if not defined
-
getProperties
@NonNull Map<QName,Set<String>> getProperties()
Get the mapping of property name to values for the model element.- Returns:
- the mapping
-
hasProperty
default boolean hasProperty(@NonNull QName qname)
Determine if a property is defined.- Parameters:
qname
- the qualified name of the property- Returns:
true
if the property is defined orfalse
otherwise
-
getPropertyValues
@NonNull default Set<String> getPropertyValues(@NonNull QName qname)
Get the values associated with a given property.- Parameters:
qname
- the qualified name of the property- Returns:
- the values or an empty set
-
hasPropertyValue
default boolean hasPropertyValue(@NonNull QName qname, @NonNull String value)
Determine if a given property, with a givenqname
, has the identifiedvalue
.- Parameters:
qname
- the qualified name of the propertyvalue
- the expected property value- Returns:
true
if the property value is defined orfalse
otherwise
-
getJsonName
@NonNull default String getJsonName()
Get the name used for the associated property in JSON/YAML.- Returns:
- the JSON property name
-
getEffectiveName
@NonNull default String getEffectiveName()
Get the name to use based on the provided names. This method will return the use name provided bygetUseName()
if the call is notnull
, and fall back to the name provided bygetName()
otherwise. This is the model name to use for the for an instance where the instance is referenced.- Returns:
- the use name if available, or the name if not
- See Also:
getUseName()
,getName()
-
getUseName
@Nullable String getUseName()
Retrieve the name to use for the model element, instead of the name.- Returns:
- the use name or
null
if no use name is defined
-
-