Interface ItemFileParser


@NonNullByDefault public interface ItemFileParser
ItemFileParser is the interface to implement by any file parser for Item object.
Author:
Laurent Garnier - Initial contribution
  • Method Details

    • getFileFormatParser

      String getFileFormatParser()
      Returns the format of the syntax.
      Returns:
      the syntax format
    • startParsingFileFormat

      @Nullable String startParsingFileFormat(String syntax, List<String> errors, List<String> warnings)
      Parse the provided syntax in file format without impacting the item and metadata registries.
      Parameters:
      syntax - the syntax in file format
      errors - the list to be used to fill the errors
      warnings - the list to be used to fill the warnings
      Returns:
      the model name used for parsing if the parsing succeeded without errors; null otherwise
    • getParsedItems

      Collection<Item> getParsedItems(String modelName)
      Get the Item objects found when parsing the file format.
      Parameters:
      modelName - the model name used for parsing
      Returns:
      the collection of items
    • getParsedMetadata

      Collection<Metadata> getParsedMetadata(String modelName)
      Get the Metadata objects found when parsing the file format.
      Parameters:
      modelName - the model name used for parsing
      Returns:
      the collection of metadata
    • getParsedStateFormatters

      Map<String,String> getParsedStateFormatters(String modelName)
      Get the state formatters found when parsing the file format.
      Parameters:
      modelName - the model name used for parsing
      Returns:
      the state formatters as a Map per item name
    • finishParsingFileFormat

      void finishParsingFileFormat(String modelName)
      Release the data from a previously started file format parsing.
      Parameters:
      modelName - the model name used for parsing