Interface INodeItemFactory
-
- All Known Implementing Classes:
AbstractNodeItemFactory
public interface INodeItemFactory
This factory interface is used to createINodeItem
objects of various types.A singleton instance of this factory can be acquired using the
instance()
method.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static INodeItemFactory
instance()
Get the singleton instance of the default node factory.default IAssemblyNodeItem
newAssemblyNodeItem(IAssemblyDefinition definition)
Create a newIAssemblyNodeItem
that is detached from a Metaschema.IAssemblyNodeItem
newAssemblyNodeItem(IAssemblyDefinition definition, IModuleNodeItem metaschema)
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.IDocumentNodeItem
newDocumentNodeItem(IAssemblyDefinition definition, URI documentUri, Object value)
Create a new document node item for the provideddefinition
.IFieldNodeItem
newFieldNodeItem(IFieldDefinition definition, IModuleNodeItem metaschema)
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.default IFlagNodeItem
newFlagNodeItem(IFlagDefinition definition, IModuleNodeItem parent)
Create a newIFlagNodeItem
, with no associated value, based on the provided flag definition.default IFlagNodeItem
newFlagNodeItem(IFlagInstance instance, IModelNodeItem<?,?> parent)
Create a newIFlagNodeItem
based on the provided flag instance.default IFlagNodeItem
newFlagNodeItem(IFlagInstance instance, IModelNodeItem<?,?> parent, Object value)
Create a newIFlagNodeItem
based on the provided flag instance.IModuleNodeItem
newModuleNodeItem(IModule module)
Create a new Metaschema node item for the providedmetaschema
.
-
-
-
Method Detail
-
instance
@NonNull static INodeItemFactory instance()
Get the singleton instance of the default node factory.- Returns:
- the node factory instance
-
newDocumentNodeItem
@NonNull IDocumentNodeItem newDocumentNodeItem(@NonNull IAssemblyDefinition definition, @NonNull URI documentUri, @NonNull Object value)
Create a new document node item for the provideddefinition
.- 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
@NonNull IModuleNodeItem newModuleNodeItem(@NonNull IModule module)
Create a new Metaschema node item for the providedmetaschema
.- Parameters:
module
- the Metaschema to create the item for.- Returns:
- the new node item
-
newFlagNodeItem
@NonNull default IFlagNodeItem newFlagNodeItem(@NonNull IFlagDefinition definition, @NonNull IModuleNodeItem parent)
Create a newIFlagNodeItem
, with no associated value, based on the provided flag definition.- Parameters:
definition
- the flag definitionparent
- the item for the Metaschema containing the definition- Returns:
- the new flag node item
-
newFlagNodeItem
@NonNull default IFlagNodeItem newFlagNodeItem(@NonNull IFlagInstance instance, @NonNull IModelNodeItem<?,?> parent)
Create a newIFlagNodeItem
based on the provided flag instance.- Parameters:
instance
- the flag instanceparent
- the node item containing the flag- Returns:
- the new flag node item
-
newFlagNodeItem
@NonNull default IFlagNodeItem newFlagNodeItem(@NonNull IFlagInstance instance, @NonNull IModelNodeItem<?,?> parent, @NonNull Object value)
Create a newIFlagNodeItem
based on the provided flag instance.- Parameters:
instance
- the flag instanceparent
- the node item containing the flagvalue
- the item's associated data- Returns:
- the new flag node item
-
newFieldNodeItem
@NonNull IFieldNodeItem newFieldNodeItem(@NonNull IFieldDefinition definition, @NonNull IModuleNodeItem metaschema)
Create a newIFieldNodeItem
based on the provided definition, which is expected to be a global definition within the provided Metaschema.- Parameters:
definition
- the global definitionmetaschema
- the Metaschema containing the definition- Returns:
- the new field node item
-
newFieldNodeItem
@NonNull IFieldNodeItem newFieldNodeItem(@NonNull IFieldDefinition definition, @Nullable URI baseUri)
Create a newIFieldNodeItem
that is detached from a Metaschema.- Parameters:
definition
- the global definitionbaseUri
- the base URI to use for this node item when evaluating aMetapathExpression
- Returns:
- the new field node item
-
newFieldNodeItem
@NonNull IFieldNodeItem newFieldNodeItem(@NonNull IFieldInstance instance, @NonNull IAssemblyNodeItem parent)
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.
- Parameters:
instance
- the Metaschema field instanceparent
- the parent node item- Returns:
- the new field node item
-
newFieldNodeItem
@NonNull IFieldNodeItem newFieldNodeItem(@NonNull IFieldInstance instance, @NonNull IAssemblyNodeItem parent, int position, @NonNull Object value)
Create a newIFieldNodeItem
that is based on a Metaschema instance with associated data.- 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
@NonNull default IAssemblyNodeItem newAssemblyNodeItem(@NonNull IAssemblyDefinition definition)
Create a newIAssemblyNodeItem
that is detached from a Metaschema.- Parameters:
definition
- the global definition- Returns:
- the new assembly node item
-
newAssemblyNodeItem
@NonNull IAssemblyNodeItem newAssemblyNodeItem(@NonNull IAssemblyDefinition definition, @NonNull IModuleNodeItem metaschema)
Create a newIAssemblyNodeItem
based on the provided definition, which is expected to be a global definition within the provided Metaschema.- Parameters:
definition
- the global definitionmetaschema
- the Metaschema containing the definition- Returns:
- the new assembly node item
-
newAssemblyNodeItem
@NonNull IAssemblyNodeItem newAssemblyNodeItem(@NonNull IAssemblyDefinition definition, @Nullable URI baseUri)
Create a newIAssemblyNodeItem
that is detached from a Metaschema.- Parameters:
definition
- the global definitionbaseUri
- the base URI to use for this node item when evaluating aMetapathExpression
- Returns:
- the new assembly node item
-
newAssemblyNodeItem
@NonNull IAssemblyNodeItem newAssemblyNodeItem(@NonNull IAssemblyDefinition definition, @Nullable URI baseUri, @NonNull Object value)
Create a newIAssemblyNodeItem
that is detached from a Metaschema, with associated data.- 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
@NonNull IAssemblyNodeItem newAssemblyNodeItem(@NonNull IAssemblyInstance instance, @NonNull IAssemblyNodeItem parent)
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.
- Parameters:
instance
- the Metaschema assembly instanceparent
- the parent node item- Returns:
- the new assembly node item
-
newAssemblyNodeItem
@NonNull IAssemblyNodeItem newAssemblyNodeItem(@NonNull IAssemblyInstance instance, @NonNull IAssemblyNodeItem parent, int position, @NonNull Object value)
Create a newIAssemblyNodeItem
that is based on a Metaschema instance with associated data.- 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
-
-