Interface ItemParser

All Superinterfaces:
ObjectParser<Item>

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

    • startParsingFormat

      @Nullable String startParsingFormat(String syntax, List<String> errors, List<String> warnings)
      Parse the provided syntax string without impacting the item and metadata registries.
      Specified by:
      startParsingFormat in interface ObjectParser<Item>
      Parameters:
      syntax - the syntax in format.
      errors - the List to use to report errors.
      warnings - the List to be used to report warnings.
      Returns:
      The model name used for parsing if the parsing succeeded without errors; null otherwise.
    • getParsedObjects

      Collection<Item> getParsedObjects(String modelName)
      Get the Item objects found when parsing the format.
      Specified by:
      getParsedObjects in interface ObjectParser<Item>
      Parameters:
      modelName - the model name used when parsing.
      Returns:
      The Collection of Items.
    • getParsedMetadata

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

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