Interface YamlModelRepository


@NonNullByDefault public interface YamlModelRepository
The YamlModelRepository defines methods to update elements in a YAML model.
Author:
Jan N. Klug - Initial contribution, Laurent Garnier - Added methods addElementsToBeGenerated, generateFileFormat, createIsolatedModel and removeIsolatedModel
  • Method Details

    • addElementToModel

      void addElementToModel(String modelName, YamlElement element)
    • removeElementFromModel

      void removeElementFromModel(String modelName, YamlElement element)
    • updateElementInModel

      void updateElementInModel(String modelName, YamlElement element)
    • addElementsToBeGenerated

      void addElementsToBeGenerated(String id, List<YamlElement> elements)
      Associate a list of elements to be generated to an identifier.
      Parameters:
      id - the identifier of the file format generation
      elements - the elements to be added
    • generateFileFormat

      void generateFileFormat(String id, OutputStream out)
      Generate the YAML file format for all elements that were associated to the provided identifier.
      Parameters:
      id - the identifier of the file format generation
      out - the output stream to write to
    • createIsolatedModel

      @Nullable String createIsolatedModel(InputStream inputStream, List<String> errors, List<String> warnings)
      Creates an isolated model in the repository An isolated model is a temporary model loaded without impacting any object registry.
      Parameters:
      inputStream - an input stream with the model's content
      errors - the list to be used to fill the errors
      warnings - the list to be used to fill the warnings
      Returns:
      the created model name if it was successfully processed, null otherwise
    • removeIsolatedModel

      void removeIsolatedModel(String modelName)
      Removes an isolated model from the repository
      Parameters:
      modelName - the name of the model to be removed