Class AbstractNodeItemFactory
- java.lang.Object
-
- gov.nist.secauto.metaschema.core.metapath.item.node.AbstractNodeItemFactory
-
- All Implemented Interfaces:
INodeItemFactory
public abstract class AbstractNodeItemFactory extends Object implements INodeItemFactory
-
-
Constructor Summary
Constructors Constructor Description AbstractNodeItemFactory()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected Stream<INamedModelInstance>
getNamedModelInstances(IModelContainer container)
Get the descendant model instances of the providedcontainer
.IAssemblyNodeItem
newAssemblyNodeItem(IAssemblyDefinition definition, IModuleNodeItem module)
Create a newIAssemblyNodeItem
based on the provided definition, which is expected to be a global definition within the provided Metaschema.IAssemblyNodeItem
newAssemblyNodeItem(IAssemblyDefinition definition, URI baseUri)
Create a newIAssemblyNodeItem
that is detached from a Metaschema.IAssemblyNodeItem
newAssemblyNodeItem(IAssemblyDefinition definition, URI baseUri, Object value)
Create a newIAssemblyNodeItem
that is detached from a Metaschema, with associated data.IAssemblyNodeItem
newAssemblyNodeItem(IAssemblyInstance instance, IAssemblyNodeItem parent)
Create a newIAssemblyNodeItem
that is based on a Metaschema instance.IAssemblyNodeItem
newAssemblyNodeItem(IAssemblyInstance instance, IAssemblyNodeItem parent, int position, Object value)
Create a newIAssemblyNodeItem
that is based on a Metaschema instance with associated data.Supplier<gov.nist.secauto.metaschema.core.metapath.item.node.IFeatureModelContainerItem.ModelContainer>
newDataModelSupplier(IAssemblyNodeItem item)
Supplier<gov.nist.secauto.metaschema.core.metapath.item.node.IFeatureFlagContainerItem.FlagContainer>
newDataModelSupplier(IFieldNodeItem item)
Supplier<gov.nist.secauto.metaschema.core.metapath.item.node.IFeatureModelContainerItem.ModelContainer>
newDataModelSupplier(IRootAssemblyNodeItem item)
IDocumentNodeItem
newDocumentNodeItem(IAssemblyDefinition definition, URI documentUri, Object value)
Create a new document node item for the provideddefinition
.IFieldNodeItem
newFieldNodeItem(IFieldDefinition definition, IModuleNodeItem module)
Create a newIFieldNodeItem
based on the provided definition, which is expected to be a global definition within the provided Metaschema.IFieldNodeItem
newFieldNodeItem(IFieldDefinition definition, URI baseUri)
Create a newIFieldNodeItem
that is detached from a Metaschema.IFieldNodeItem
newFieldNodeItem(IFieldInstance instance, IAssemblyNodeItem parent)
Create a newIFieldNodeItem
that is based on a Metaschema instance.IFieldNodeItem
newFieldNodeItem(IFieldInstance instance, IAssemblyNodeItem parent, int position, Object value)
Create a newIFieldNodeItem
that is based on a Metaschema instance with associated data.Supplier<gov.nist.secauto.metaschema.core.metapath.item.node.IFeatureModelContainerItem.ModelContainer>
newMetaschemaModelSupplier(IAssemblyNodeItem item)
Supplier<gov.nist.secauto.metaschema.core.metapath.item.node.IFeatureFlagContainerItem.FlagContainer>
newMetaschemaModelSupplier(IFieldNodeItem item)
Supplier<gov.nist.secauto.metaschema.core.metapath.item.node.IFeatureModelContainerItem.ModelContainer>
newMetaschemaModelSupplier(IModuleNodeItem item)
protected IModelNodeItem<?,?>
newModelItem(INamedModelInstance instance, IAssemblyNodeItem parent)
protected IModelNodeItem<?,?>
newModelItem(INamedModelInstance instance, IAssemblyNodeItem parent, int position, Object value)
IModuleNodeItem
newModuleNodeItem(IModule module)
Create a new Metaschema node item for the providedmetaschema
.-
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.metapath.item.node.INodeItemFactory
newAssemblyNodeItem, newFlagNodeItem, newFlagNodeItem, newFlagNodeItem
-
-
-
-
Constructor Detail
-
AbstractNodeItemFactory
public AbstractNodeItemFactory()
-
-
Method Detail
-
newDocumentNodeItem
public IDocumentNodeItem newDocumentNodeItem(IAssemblyDefinition definition, URI documentUri, Object value)
Description copied from interface:INodeItemFactory
Create a new document node item for the provideddefinition
.- Specified by:
newDocumentNodeItem
in interfaceINodeItemFactory
- Parameters:
definition
- the root assembly definition to create the document item for.documentUri
- the uniform resource identifier of the documentvalue
- the root item's associated data- Returns:
- the new node item
-
newModuleNodeItem
public IModuleNodeItem newModuleNodeItem(IModule module)
Description copied from interface:INodeItemFactory
Create a new Metaschema node item for the providedmetaschema
.- Specified by:
newModuleNodeItem
in interfaceINodeItemFactory
- Parameters:
module
- the Metaschema to create the item for.- Returns:
- the new node item
-
newFieldNodeItem
public IFieldNodeItem newFieldNodeItem(IFieldDefinition definition, IModuleNodeItem module)
Description copied from interface:INodeItemFactory
Create a newIFieldNodeItem
based on the provided definition, which is expected to be a global definition within the provided Metaschema.- Specified by:
newFieldNodeItem
in interfaceINodeItemFactory
- Parameters:
definition
- the global definitionmodule
- the Metaschema containing the definition- Returns:
- the new field node item
-
newFieldNodeItem
public IFieldNodeItem newFieldNodeItem(IFieldDefinition definition, URI baseUri)
Description copied from interface:INodeItemFactory
Create a newIFieldNodeItem
that is detached from a Metaschema.- Specified by:
newFieldNodeItem
in interfaceINodeItemFactory
- Parameters:
definition
- the global definitionbaseUri
- the base URI to use for this node item when evaluating aMetapathExpression
- Returns:
- the new field node item
-
newFieldNodeItem
public IFieldNodeItem newFieldNodeItem(IFieldInstance instance, IAssemblyNodeItem parent)
Description copied from interface:INodeItemFactory
Create a newIFieldNodeItem
that is based on a Metaschema instance.A single instance of this item is expected to represent the possibility in a metaschema of a series of instance values.
- Specified by:
newFieldNodeItem
in interfaceINodeItemFactory
- Parameters:
instance
- the Metaschema field instanceparent
- the parent node item- Returns:
- the new field node item
-
newFieldNodeItem
public IFieldNodeItem newFieldNodeItem(IFieldInstance instance, IAssemblyNodeItem parent, int position, Object value)
Description copied from interface:INodeItemFactory
Create a newIFieldNodeItem
that is based on a Metaschema instance with associated data.- Specified by:
newFieldNodeItem
in interfaceINodeItemFactory
- Parameters:
instance
- the Metaschema field instanceparent
- the parent node itemposition
- the data item's position in the sequence of data items for the instancevalue
- the item's associated data- Returns:
- the new field node item
-
newAssemblyNodeItem
public IAssemblyNodeItem newAssemblyNodeItem(IAssemblyDefinition definition, IModuleNodeItem module)
Description copied from interface:INodeItemFactory
Create a newIAssemblyNodeItem
based on the provided definition, which is expected to be a global definition within the provided Metaschema.- Specified by:
newAssemblyNodeItem
in interfaceINodeItemFactory
- Parameters:
definition
- the global definitionmodule
- the Metaschema containing the definition- Returns:
- the new assembly node item
-
newAssemblyNodeItem
public IAssemblyNodeItem newAssemblyNodeItem(IAssemblyDefinition definition, URI baseUri)
Description copied from interface:INodeItemFactory
Create a newIAssemblyNodeItem
that is detached from a Metaschema.- Specified by:
newAssemblyNodeItem
in interfaceINodeItemFactory
- Parameters:
definition
- the global definitionbaseUri
- the base URI to use for this node item when evaluating aMetapathExpression
- Returns:
- the new assembly node item
-
newAssemblyNodeItem
public IAssemblyNodeItem newAssemblyNodeItem(IAssemblyDefinition definition, URI baseUri, Object value)
Description copied from interface:INodeItemFactory
Create a newIAssemblyNodeItem
that is detached from a Metaschema, with associated data.- Specified by:
newAssemblyNodeItem
in interfaceINodeItemFactory
- Parameters:
definition
- the global definitionbaseUri
- the base URI to use for this node item when evaluating aMetapathExpression
value
- the associated data- Returns:
- the new assembly node item
-
newAssemblyNodeItem
public IAssemblyNodeItem newAssemblyNodeItem(IAssemblyInstance instance, IAssemblyNodeItem parent)
Description copied from interface:INodeItemFactory
Create a newIAssemblyNodeItem
that is based on a Metaschema instance.A single instance of this item is expected to represent the possibility in a metaschema of a series of instance values.
- Specified by:
newAssemblyNodeItem
in interfaceINodeItemFactory
- Parameters:
instance
- the Metaschema assembly instanceparent
- the parent node item- Returns:
- the new assembly node item
-
newAssemblyNodeItem
public IAssemblyNodeItem newAssemblyNodeItem(IAssemblyInstance instance, IAssemblyNodeItem parent, int position, Object value)
Description copied from interface:INodeItemFactory
Create a newIAssemblyNodeItem
that is based on a Metaschema instance with associated data.- Specified by:
newAssemblyNodeItem
in interfaceINodeItemFactory
- Parameters:
instance
- the Metaschema assembly instanceparent
- the parent node itemposition
- the data item's position in the sequence of data items for the instancevalue
- the data item's value- Returns:
- the new assembly node item
-
newModelItem
@NonNull protected IModelNodeItem<?,?> newModelItem(@NonNull INamedModelInstance instance, @NonNull IAssemblyNodeItem parent, int position, @NonNull Object value)
Create a newIModelNodeItem
based on the providedinstance
that is a child of the providedparent
. This new item will have the providedvalue
.- Parameters:
instance
- the model instance to create the node forparent
- the item to use as the parent item for the created node itemposition
- the data item's position in the sequence of data items for the instancevalue
- the data item's value- Returns:
- the created node item
-
newModelItem
@NonNull protected IModelNodeItem<?,?> newModelItem(@NonNull INamedModelInstance instance, @NonNull IAssemblyNodeItem parent)
Create a newIModelNodeItem
based on the providedinstance
that is a child of the providedparent
. This new item will have no associated value.- Parameters:
instance
- the model instance to create the node forparent
- the item to use as the parent item for the created node item- Returns:
- the created node item
-
getNamedModelInstances
@NonNull protected Stream<INamedModelInstance> getNamedModelInstances(@NonNull IModelContainer container)
Get the descendant model instances of the providedcontainer
.- Parameters:
container
- the container to get descendant instances for- Returns:
- the stream of descendant instances
-
newDataModelSupplier
@NonNull public abstract Supplier<gov.nist.secauto.metaschema.core.metapath.item.node.IFeatureFlagContainerItem.FlagContainer> newDataModelSupplier(@NonNull IFieldNodeItem item)
-
newDataModelSupplier
@NonNull public abstract Supplier<gov.nist.secauto.metaschema.core.metapath.item.node.IFeatureModelContainerItem.ModelContainer> newDataModelSupplier(@NonNull IAssemblyNodeItem item)
-
newDataModelSupplier
@NonNull public abstract Supplier<gov.nist.secauto.metaschema.core.metapath.item.node.IFeatureModelContainerItem.ModelContainer> newDataModelSupplier(@NonNull IRootAssemblyNodeItem item)
-
newMetaschemaModelSupplier
@NonNull public abstract Supplier<gov.nist.secauto.metaschema.core.metapath.item.node.IFeatureFlagContainerItem.FlagContainer> newMetaschemaModelSupplier(@NonNull IFieldNodeItem item)
-
newMetaschemaModelSupplier
@NonNull public abstract Supplier<gov.nist.secauto.metaschema.core.metapath.item.node.IFeatureModelContainerItem.ModelContainer> newMetaschemaModelSupplier(@NonNull IAssemblyNodeItem item)
-
newMetaschemaModelSupplier
@NonNull public abstract Supplier<gov.nist.secauto.metaschema.core.metapath.item.node.IFeatureModelContainerItem.ModelContainer> newMetaschemaModelSupplier(@NonNull IModuleNodeItem item)
-
-