Interface IPathFormatter

  • All Known Implementing Classes:
    MetapathFormatter

    public interface IPathFormatter
    This interface provides an implementation contract for all path formatters. When format(IPathSegment) is called on a formatter implementation, the formatter will render the path segments based on the implemented path syntax. This allows a collection of path segments to be rendered in different forms by swapping out the formatter used. A path formatter is expected to be stateless and thus thread safe.
    • Method Detail

      • formatFlag

        @NonNull
        String formatFlag​(@NonNull
                          IFlagNodeItem flag)
        This visitor callback is used to format an individual flag path segment.
        Parameters:
        flag - the node to format
        Returns:
        the formatted text for the segment
      • formatField

        @NonNull
        String formatField​(@NonNull
                           IFieldNodeItem field)
        This visitor callback is used to format an individual field path segment.
        Parameters:
        field - the node to format
        Returns:
        the formatted text for the segment
      • formatAssembly

        @NonNull
        String formatAssembly​(@NonNull
                              IAssemblyNodeItem assembly)
        This visitor callback is used to format an individual assembly path segment.
        Parameters:
        assembly - the node to format
        Returns:
        the formatted text for the segment
      • formatRootAssembly

        @NonNull
        String formatRootAssembly​(@NonNull
                                  IRootAssemblyNodeItem root)
        This visitor callback is used to format a root assembly path segment.
        Parameters:
        root - the node to format
        Returns:
        the formatted text for the segment
      • formatDocument

        @NonNull
        String formatDocument​(@NonNull
                              IDocumentNodeItem document)
        This visitor callback is used to format an individual document path segment.
        Parameters:
        document - the node to format
        Returns:
        the formatted text for the segment
      • formatMetaschema

        @NonNull
        String formatMetaschema​(@NonNull
                                IModuleNodeItem metaschema)
        This visitor callback is used to format an individual metaschema path segment.
        Parameters:
        metaschema - the node to format
        Returns:
        the formatted text for the segment