Class: Lutaml::ModelTransformations::Parsers::XmiParser

Inherits:
BaseParser
  • Object
show all
Defined in:
lib/lutaml/model_transformations/parsers/xmi_parser.rb

Overview

XMI Parser implements the BaseParser interface for XML Metadata Interchange files.

This parser wraps the existing Lutaml::Parser functionality and adapts it to the new unified transformation architecture. It follows the Adapter pattern to integrate legacy XMI parsing with the new system.

Instance Attribute Summary

Attributes inherited from BaseParser

#configuration, #options

Instance Method Summary collapse

Methods inherited from BaseParser

#can_parse?, #errors, #has_errors?, #has_warnings?, #initialize, #parse, #statistics, #warnings

Constructor Details

This class inherits a constructor from Lutaml::ModelTransformations::Parsers::BaseParser

Instance Method Details

#content_patternsObject



32
33
34
# File 'lib/lutaml/model_transformations/parsers/xmi_parser.rb', line 32

def content_patterns
  [/xmi:version/]
end

#format_nameString

Get parser format name

Returns:

  • (String)

    Human-readable format name



21
22
23
# File 'lib/lutaml/model_transformations/parsers/xmi_parser.rb', line 21

def format_name
  "XML Metadata Interchange (XMI)"
end

#priorityObject



36
37
38
# File 'lib/lutaml/model_transformations/parsers/xmi_parser.rb', line 36

def priority
  80
end

#supported_extensionsArray<String>

Get list of supported file extensions

Returns:

  • (Array<String>)

    List of extensions



28
29
30
# File 'lib/lutaml/model_transformations/parsers/xmi_parser.rb', line 28

def supported_extensions
  [".xmi", ".xml"]
end