Class AbstractModule
- java.lang.Object
-
- gov.nist.secauto.metaschema.core.model.AbstractModule
-
- All Implemented Interfaces:
IModule
public abstract class AbstractModule extends Object implements IModule
Provides a common, abstract implementation of aIModule
.
-
-
Field Summary
-
Fields inherited from interface gov.nist.secauto.metaschema.core.model.IModule
METASCHEMA_XML_NS
-
-
Constructor Summary
Constructors Constructor Description AbstractModule(List<? extends IModule> importedModules)
Construct a new Metaschema module object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IAssemblyDefinition
getExportedAssemblyDefinitionByName(String name)
Retrieves the exported named assembly definition, if it exists.Collection<? extends IAssemblyDefinition>
getExportedAssemblyDefinitions()
Retrieve the top-level assembly definitions that are marked global in this Metaschema module or in any imported Metaschema module.IFieldDefinition
getExportedFieldDefinitionByName(String name)
Retrieves the exported named field definition, if it exists.Collection<? extends IFieldDefinition>
getExportedFieldDefinitions()
Retrieve the top-level field definitions that are marked global in this Metaschema module or in any imported Metaschema module.IFlagDefinition
getExportedFlagDefinitionByName(String name)
Retrieves the exported named flag definition, if it exists.Collection<? extends IFlagDefinition>
getExportedFlagDefinitions()
Retrieve the top-level flag definitions that are marked global in this Metaschema module or in any imported Metaschema modules.IModule
getImportedModuleByShortName(String name)
Retrieve the imported Metaschema module with the specified name, if it exists.List<? extends IModule>
getImportedModules()
Retrieves all Metaschema modules imported by this Metaschema module.protected void
initExports()
Processes the definitions exported by the Metaschema, saving a list of all exported by specific model types.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface gov.nist.secauto.metaschema.core.model.IModule
getAssemblyAndFieldDefinitions, getAssemblyDefinitionByName, getAssemblyDefinitions, getExportedRootAssemblyDefinitions, getFieldDefinitionByName, getFieldDefinitions, getFlagDefinitionByName, getFlagDefinitions, getJsonBaseUri, getLocation, getName, getQName, getRemarks, getRootAssemblyDefinitions, getScopedAssemblyDefinitionByName, getScopedFieldDefinitionByName, getScopedFlagDefinitionByName, getShortName, getVersion, getXmlNamespace
-
-
-
-
Constructor Detail
-
AbstractModule
public AbstractModule(@NonNull List<? extends IModule> importedModules)
Construct a new Metaschema module object.- Parameters:
importedModules
- the collection of Metaschema module objects this Metaschema module imports
-
-
Method Detail
-
getImportedModules
public List<? extends IModule> getImportedModules()
Description copied from interface:IModule
Retrieves all Metaschema modules imported by this Metaschema module.- Specified by:
getImportedModules
in interfaceIModule
- Returns:
- a list of imported Metaschema modules
-
getImportedModuleByShortName
public IModule getImportedModuleByShortName(String name)
Description copied from interface:IModule
Retrieve the imported Metaschema module with the specified name, if it exists.- Specified by:
getImportedModuleByShortName
in interfaceIModule
- Parameters:
name
- the short name of the Metschema module to retrieve- Returns:
- the imported Metaschema module or
null
if it doesn't exist
-
getExportedFlagDefinitions
public Collection<? extends IFlagDefinition> getExportedFlagDefinitions()
Description copied from interface:IModule
Retrieve the top-level flag definitions that are marked global in this Metaschema module or in any imported Metaschema modules. The resulting collection is built by adding global definitions from each imported Metaschema module in order of import, then adding global definitions from the current Metaschema module. Such a map is built in this way for each imported Metaschema module in the chain. Values for clashing keys will be replaced in this order, giving preference to the "closest" definition.- Specified by:
getExportedFlagDefinitions
in interfaceIModule
- Returns:
- the collection of exported flag definitions
-
getExportedFlagDefinitionByName
public IFlagDefinition getExportedFlagDefinitionByName(String name)
Description copied from interface:IModule
Retrieves the exported named flag definition, if it exists.For information about how flag definitions are exported see
IModule.getExportedFlagDefinitions()
.- Specified by:
getExportedFlagDefinitionByName
in interfaceIModule
- Parameters:
name
- the definition name- Returns:
- the flag definition, or
null
if it doesn't exist.
-
getExportedFieldDefinitions
public Collection<? extends IFieldDefinition> getExportedFieldDefinitions()
Description copied from interface:IModule
Retrieve the top-level field definitions that are marked global in this Metaschema module or in any imported Metaschema module. The resulting collection is built by adding global definitions from each imported Metaschema module in order of import, then adding global definitions from the current Metaschema module. Such a map is built in this way for each imported Metaschema module in the chain. Values for clashing keys will be replaced in this order, giving preference to the "closest" definition- Specified by:
getExportedFieldDefinitions
in interfaceIModule
- Returns:
- the collection of exported field definitions
-
getExportedFieldDefinitionByName
public IFieldDefinition getExportedFieldDefinitionByName(String name)
Description copied from interface:IModule
Retrieves the exported named field definition, if it exists.For information about how field definitions are exported see
IModule.getExportedFieldDefinitions()
.- Specified by:
getExportedFieldDefinitionByName
in interfaceIModule
- Parameters:
name
- the definition name- Returns:
- the field definition, or
null
if it doesn't exist.
-
getExportedAssemblyDefinitions
public Collection<? extends IAssemblyDefinition> getExportedAssemblyDefinitions()
Description copied from interface:IModule
Retrieve the top-level assembly definitions that are marked global in this Metaschema module or in any imported Metaschema module. The resulting collection is built by adding global definitions from each imported Metaschema module in order of import, then adding global definitions from the current Metaschema module. This collection is built in this way for each imported Metaschema module in the chain. Items with duplicate names will be replaced in this order, giving preference to the "closest" definition- Specified by:
getExportedAssemblyDefinitions
in interfaceIModule
- Returns:
- the collection of exported assembly definitions
-
getExportedAssemblyDefinitionByName
public IAssemblyDefinition getExportedAssemblyDefinitionByName(String name)
Description copied from interface:IModule
Retrieves the exported named assembly definition, if it exists.For information about how assembly definitions are exported see
IModule.getExportedFieldDefinitions()
.- Specified by:
getExportedAssemblyDefinitionByName
in interfaceIModule
- Parameters:
name
- the definition name- Returns:
- the assembly definition, or
null
if it doesn't exist.
-
initExports
protected void initExports()
Processes the definitions exported by the Metaschema, saving a list of all exported by specific model types.
-
-