Class MetapathFormatter

java.lang.Object
dev.metaschema.core.metapath.format.MetapathFormatter
All Implemented Interfaces:
IPathFormatter

public class MetapathFormatter extends Object implements IPathFormatter
An IPathFormatter that produces a Metapath expression for the path to a given INodeItem.
  • Constructor Details

    • MetapathFormatter

      public MetapathFormatter()
  • Method Details

    • formatMetaschema

      @NonNull public String formatMetaschema(IModuleNodeItem metaschema)
      Description copied from interface: IPathFormatter
      This visitor callback is used to format an individual metaschema path segment.
      Specified by:
      formatMetaschema in interface IPathFormatter
      Parameters:
      metaschema - the node to format
      Returns:
      the formatted text for the segment
    • formatDocument

      public String formatDocument(IDocumentNodeItem document)
      Description copied from interface: IPathFormatter
      This visitor callback is used to format an individual document path segment.
      Specified by:
      formatDocument in interface IPathFormatter
      Parameters:
      document - the node to format
      Returns:
      the formatted text for the segment
    • formatRootAssembly

      public String formatRootAssembly(IRootAssemblyNodeItem root)
      Description copied from interface: IPathFormatter
      This visitor callback is used to format a root assembly path segment.
      Specified by:
      formatRootAssembly in interface IPathFormatter
      Parameters:
      root - the node to format
      Returns:
      the formatted text for the segment
    • formatAssembly

      public String formatAssembly(IAssemblyNodeItem assembly)
      Description copied from interface: IPathFormatter
      This visitor callback is used to format an individual assembly path segment.
      Specified by:
      formatAssembly in interface IPathFormatter
      Parameters:
      assembly - the node to format
      Returns:
      the formatted text for the segment
    • formatAssembly

      public String formatAssembly(IAssemblyInstanceGroupedNodeItem assembly)
      Description copied from interface: IPathFormatter
      This visitor callback is used to format an individual grouped assembly path segment.
      Specified by:
      formatAssembly in interface IPathFormatter
      Parameters:
      assembly - the node to format
      Returns:
      the formatted text for the segment
    • formatField

      public String formatField(IFieldNodeItem field)
      Description copied from interface: IPathFormatter
      This visitor callback is used to format an individual field path segment.
      Specified by:
      formatField in interface IPathFormatter
      Parameters:
      field - the node to format
      Returns:
      the formatted text for the segment
    • formatFlag

      public String formatFlag(IFlagNodeItem flag)
      Description copied from interface: IPathFormatter
      This visitor callback is used to format an individual flag path segment.
      Specified by:
      formatFlag in interface IPathFormatter
      Parameters:
      flag - the node to format
      Returns:
      the formatted text for the segment