Interface INodeItemFactory

    • 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 provided definition.
        Parameters:
        definition - the root assembly definition to create the document item for.
        documentUri - the uniform resource identifier of the document
        value - 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 provided metaschema.
        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 new IFlagNodeItem, with no associated value, based on the provided flag definition.
        Parameters:
        definition - the flag definition
        parent - 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,
                                              @NonNull
                                              Object value)
        Create a new IFlagNodeItem based on the provided flag instance.
        Parameters:
        instance - the flag instance
        parent - the node item containing the flag
        value - the item's associated data
        Returns:
        the new flag node item
      • newFieldNodeItem

        @NonNull
        IFieldNodeItem newFieldNodeItem​(@NonNull
                                        IFieldDefinition definition,
                                        @NonNull
                                        IModuleNodeItem metaschema)
        Create a new IFieldNodeItem based on the provided definition, which is expected to be a global definition within the provided Metaschema.
        Parameters:
        definition - the global definition
        metaschema - the Metaschema containing the definition
        Returns:
        the new field node item
      • newFieldNodeItem

        @NonNull
        IFieldNodeItem newFieldNodeItem​(@NonNull
                                        IFieldInstance instance,
                                        @NonNull
                                        IAssemblyNodeItem parent)
        Create a new IFieldNodeItem 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 instance
        parent - 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 new IFieldNodeItem that is based on a Metaschema instance with associated data.
        Parameters:
        instance - the Metaschema field instance
        parent - the parent node item
        position - the data item's position in the sequence of data items for the instance
        value - the item's associated data
        Returns:
        the new field node item
      • newAssemblyNodeItem

        @NonNull
        IAssemblyNodeItem newAssemblyNodeItem​(@NonNull
                                              IAssemblyInstance instance,
                                              @NonNull
                                              IAssemblyNodeItem parent)
        Create a new IAssemblyNodeItem 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 instance
        parent - 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 new IAssemblyNodeItem that is based on a Metaschema instance with associated data.
        Parameters:
        instance - the Metaschema assembly instance
        parent - the parent node item
        position - the data item's position in the sequence of data items for the instance
        value - the data item's value
        Returns:
        the new assembly node item