Class: Ea::Transformations::Parsers::XmiParser

Inherits:
BaseParser
  • Object
show all
Defined in:
lib/ea/transformations/parsers/xmi_parser.rb

Overview

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

Delegates to Ea::Xmi::Parser for actual parsing.

Instance Attribute Summary

Attributes inherited from BaseParser

#configuration, #last_duration, #options

Instance Method Summary collapse

Methods inherited from BaseParser

#add_error, #add_info, #add_warning, #assign_if_supported, #can_parse?, #clear_errors_and_warnings, #errors, #execute_parse, #format_file_size, #format_statistics, #has_errors?, #has_warnings?, #initialize, #parse, #record_parse_stats, #reset_statistics, #should_fail_fast?, #should_log_errors?, #should_validate_input?, #should_validate_output?, #statistics, #validate_file!, #validate_output!, #warnings

Constructor Details

This class inherits a constructor from Ea::Transformations::Parsers::BaseParser

Instance Method Details

#content_patternsObject



26
27
28
# File 'lib/ea/transformations/parsers/xmi_parser.rb', line 26

def content_patterns
  [/xmi:version/]
end

#format_nameString

Get parser format name

Returns:

  • (String)

    Human-readable format name



15
16
17
# File 'lib/ea/transformations/parsers/xmi_parser.rb', line 15

def format_name
  "XML Metadata Interchange (XMI)"
end

#priorityObject



30
31
32
# File 'lib/ea/transformations/parsers/xmi_parser.rb', line 30

def priority
  80
end

#supported_extensionsArray<String>

Get list of supported file extensions

Returns:

  • (Array<String>)

    List of extensions



22
23
24
# File 'lib/ea/transformations/parsers/xmi_parser.rb', line 22

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