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.

Delegates to Lutaml::Xmi::Parsers::Xml for actual parsing.

Instance Attribute Summary

Attributes inherited from BaseParser

#configuration, #last_duration, #options

Instance Method Summary collapse

Methods inherited from BaseParser

#can_parse?, #errors, #execute_parse, #has_errors?, #has_warnings?, #initialize, #parse, #record_parse_stats, #reset_statistics, #statistics, #warnings

Constructor Details

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

Instance Method Details

#content_patternsObject



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

def content_patterns
  [/xmi:version/]
end

#format_nameString

Get parser format name

Returns:

  • (String)

    Human-readable format name



17
18
19
# File 'lib/lutaml/model_transformations/parsers/xmi_parser.rb', line 17

def format_name
  "XML Metadata Interchange (XMI)"
end

#priorityObject



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

def priority
  80
end

#supported_extensionsArray<String>

Get list of supported file extensions

Returns:

  • (Array<String>)

    List of extensions



24
25
26
# File 'lib/lutaml/model_transformations/parsers/xmi_parser.rb', line 24

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