omml 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +22 -0
- data/.github/workflows/release.yml +23 -0
- data/.gitignore +1 -0
- data/.rubocop.yml +25 -0
- data/.rubocop_todo.yml +19 -0
- data/CLAUDE.md +64 -0
- data/Gemfile +11 -7
- data/README.adoc +222 -4
- data/Rakefile +3 -3
- data/bin/console +3 -3
- data/lib/omml/configuration/adapter.rb +22 -0
- data/lib/omml/configuration/context_registry.rb +131 -0
- data/lib/omml/configuration/model_registry.rb +60 -0
- data/lib/omml/configuration/type_resolver.rb +47 -0
- data/lib/omml/configuration.rb +25 -0
- data/lib/omml/errors/base_error.rb +8 -0
- data/lib/omml/errors/invalid_xml_error.rb +8 -0
- data/lib/omml/errors/missing_context_error.rb +23 -0
- data/lib/omml/errors/root_element_not_found_error.rb +11 -0
- data/lib/omml/errors/unsupported_root_element_error.rb +11 -0
- data/lib/omml/errors/xml_adapter_not_configured_error.rb +11 -0
- data/lib/omml/errors.rb +15 -0
- data/lib/omml/models/ct_acc.rb +23 -0
- data/lib/omml/models/ct_acc_pr.rb +23 -0
- data/lib/omml/models/ct_anchor.rb +60 -0
- data/lib/omml/models/ct_attr.rb +23 -0
- data/lib/omml/models/ct_bar.rb +23 -0
- data/lib/omml/models/ct_bar_pr.rb +23 -0
- data/lib/omml/models/ct_bookmark.rb +19 -0
- data/lib/omml/models/ct_bookmark_range.rb +21 -0
- data/lib/omml/models/ct_border.rb +35 -0
- data/lib/omml/models/ct_border_box.rb +24 -0
- data/lib/omml/models/ct_border_box_pr.rb +37 -0
- data/lib/omml/models/ct_box.rb +23 -0
- data/lib/omml/models/ct_box_pr.rb +31 -0
- data/lib/omml/models/ct_br.rb +21 -0
- data/lib/omml/models/ct_break_bin.rb +19 -0
- data/lib/omml/models/ct_break_bin_sub.rb +19 -0
- data/lib/omml/models/ct_calendar_type.rb +19 -0
- data/lib/omml/models/ct_char.rb +19 -0
- data/lib/omml/models/ct_color.rb +25 -0
- data/lib/omml/models/ct_control.rb +23 -0
- data/lib/omml/models/ct_ctrl_pr.rb +21 -0
- data/lib/omml/models/ct_custom_xml_pr.rb +23 -0
- data/lib/omml/models/ct_custom_xml_run.rb +27 -0
- data/lib/omml/models/ct_d.rb +23 -0
- data/lib/omml/models/ct_d_pr.rb +34 -0
- data/lib/omml/models/ct_data_binding.rb +23 -0
- data/lib/omml/models/ct_decimal_number.rb +19 -0
- data/lib/omml/models/ct_drawing.rb +23 -0
- data/lib/omml/models/ct_east_asian_layout.rb +27 -0
- data/lib/omml/models/ct_effect_extent.rb +25 -0
- data/lib/omml/models/ct_em.rb +19 -0
- data/lib/omml/models/ct_empty.rb +15 -0
- data/lib/omml/models/ct_eq_arr.rb +23 -0
- data/lib/omml/models/ct_eq_arr_pr.rb +31 -0
- data/lib/omml/models/ct_f.rb +25 -0
- data/lib/omml/models/ct_f_pr.rb +23 -0
- data/lib/omml/models/ct_f_type.rb +19 -0
- data/lib/omml/models/ct_ff_check_box.rb +29 -0
- data/lib/omml/models/ct_ff_data.rb +41 -0
- data/lib/omml/models/ct_ff_help_text.rb +21 -0
- data/lib/omml/models/ct_ff_name.rb +19 -0
- data/lib/omml/models/ct_ff_status_text.rb +21 -0
- data/lib/omml/models/ct_ff_text_input.rb +27 -0
- data/lib/omml/models/ct_ff_text_type.rb +19 -0
- data/lib/omml/models/ct_ffdd_list.rb +25 -0
- data/lib/omml/models/ct_fit_text.rb +21 -0
- data/lib/omml/models/ct_fld_char.rb +32 -0
- data/lib/omml/models/ct_fonts.rb +35 -0
- data/lib/omml/models/ct_ftn_edn_ref.rb +21 -0
- data/lib/omml/models/ct_func.rb +26 -0
- data/lib/omml/models/ct_func_pr.rb +21 -0
- data/lib/omml/models/ct_graphical_object.rb +21 -0
- data/lib/omml/models/ct_graphical_object_data.rb +19 -0
- data/lib/omml/models/ct_graphical_object_frame_locking.rb +33 -0
- data/lib/omml/models/ct_group_chr.rb +23 -0
- data/lib/omml/models/ct_group_chr_pr.rb +27 -0
- data/lib/omml/models/ct_highlight.rb +19 -0
- data/lib/omml/models/ct_hps_measure.rb +19 -0
- data/lib/omml/models/ct_hyperlink.rb +31 -0
- data/lib/omml/models/ct_inline.rb +38 -0
- data/lib/omml/models/ct_integer2.rb +19 -0
- data/lib/omml/models/ct_integer255.rb +19 -0
- data/lib/omml/models/ct_lang.rb +19 -0
- data/lib/omml/models/ct_language.rb +23 -0
- data/lib/omml/models/ct_lim_loc.rb +19 -0
- data/lib/omml/models/ct_lim_low.rb +26 -0
- data/lib/omml/models/ct_lim_low_pr.rb +21 -0
- data/lib/omml/models/ct_lim_upp.rb +25 -0
- data/lib/omml/models/ct_lim_upp_pr.rb +21 -0
- data/lib/omml/models/ct_lock.rb +19 -0
- data/lib/omml/models/ct_m.rb +23 -0
- data/lib/omml/models/ct_m_pr.rb +37 -0
- data/lib/omml/models/ct_macro_name.rb +19 -0
- data/lib/omml/models/ct_manual_break.rb +19 -0
- data/lib/omml/models/ct_markup.rb +19 -0
- data/lib/omml/models/ct_markup_range.rb +19 -0
- data/lib/omml/models/ct_math_pr.rb +53 -0
- data/lib/omml/models/ct_mc.rb +21 -0
- data/lib/omml/models/ct_mc_pr.rb +23 -0
- data/lib/omml/models/ct_mcs.rb +21 -0
- data/lib/omml/models/ct_move_bookmark.rb +21 -0
- data/lib/omml/models/ct_mr.rb +21 -0
- data/lib/omml/models/ct_nary.rb +27 -0
- data/lib/omml/models/ct_nary_pr.rb +31 -0
- data/lib/omml/models/ct_non_visual_drawing_props.rb +33 -0
- data/lib/omml/models/ct_non_visual_graphic_frame_properties.rb +24 -0
- data/lib/omml/models/ct_o_math.rb +22 -0
- data/lib/omml/models/ct_o_math_arg.rb +28 -0
- data/lib/omml/models/ct_o_math_arg_pr.rb +21 -0
- data/lib/omml/models/ct_o_math_jc.rb +19 -0
- data/lib/omml/models/ct_o_math_para.rb +26 -0
- data/lib/omml/models/ct_o_math_para_pr.rb +21 -0
- data/lib/omml/models/ct_object.rb +25 -0
- data/lib/omml/models/ct_office_art_extension.rb +19 -0
- data/lib/omml/models/ct_office_art_extension_list.rb +21 -0
- data/lib/omml/models/ct_on_off.rb +19 -0
- data/lib/omml/models/ct_p_tab.rb +23 -0
- data/lib/omml/models/ct_perm.rb +21 -0
- data/lib/omml/models/ct_perm_start.rb +25 -0
- data/lib/omml/models/ct_phant.rb +23 -0
- data/lib/omml/models/ct_phant_pr.rb +31 -0
- data/lib/omml/models/ct_picture.rb +23 -0
- data/lib/omml/models/ct_picture_base.rb +15 -0
- data/lib/omml/models/ct_placeholder.rb +21 -0
- data/lib/omml/models/ct_point2_d.rb +21 -0
- data/lib/omml/models/ct_pos_h.rb +27 -0
- data/lib/omml/models/ct_pos_v.rb +27 -0
- data/lib/omml/models/ct_positive_size2_d.rb +21 -0
- data/lib/omml/models/ct_proof_err.rb +19 -0
- data/lib/omml/models/ct_r.rb +27 -0
- data/lib/omml/models/ct_r_pr.rb +21 -0
- data/lib/omml/models/ct_r_pr_change.rb +21 -0
- data/lib/omml/models/ct_r_pr_original.rb +21 -0
- data/lib/omml/models/ct_rad.rb +25 -0
- data/lib/omml/models/ct_rad_pr.rb +23 -0
- data/lib/omml/models/ct_rel.rb +19 -0
- data/lib/omml/models/ct_rpr.rb +33 -0
- data/lib/omml/models/ct_ruby.rb +25 -0
- data/lib/omml/models/ct_ruby_align.rb +19 -0
- data/lib/omml/models/ct_ruby_content.rb +19 -0
- data/lib/omml/models/ct_ruby_pr.rb +31 -0
- data/lib/omml/models/ct_run_track_change.rb +23 -0
- data/lib/omml/models/ct_s_pre.rb +28 -0
- data/lib/omml/models/ct_s_pre_pr.rb +21 -0
- data/lib/omml/models/ct_s_sub.rb +25 -0
- data/lib/omml/models/ct_s_sub_pr.rb +21 -0
- data/lib/omml/models/ct_s_sub_sup.rb +28 -0
- data/lib/omml/models/ct_s_sub_sup_pr.rb +23 -0
- data/lib/omml/models/ct_s_sup.rb +25 -0
- data/lib/omml/models/ct_s_sup_pr.rb +21 -0
- data/lib/omml/models/ct_script.rb +19 -0
- data/lib/omml/models/ct_sdt_combo_box.rb +23 -0
- data/lib/omml/models/ct_sdt_content_run.rb +19 -0
- data/lib/omml/models/ct_sdt_date.rb +30 -0
- data/lib/omml/models/ct_sdt_date_mapping_type.rb +19 -0
- data/lib/omml/models/ct_sdt_doc_part.rb +25 -0
- data/lib/omml/models/ct_sdt_drop_down_list.rb +23 -0
- data/lib/omml/models/ct_sdt_end_pr.rb +21 -0
- data/lib/omml/models/ct_sdt_list_item.rb +21 -0
- data/lib/omml/models/ct_sdt_pr.rb +63 -0
- data/lib/omml/models/ct_sdt_run.rb +25 -0
- data/lib/omml/models/ct_sdt_text.rb +19 -0
- data/lib/omml/models/ct_shd.rb +35 -0
- data/lib/omml/models/ct_shp.rb +19 -0
- data/lib/omml/models/ct_signed_hps_measure.rb +19 -0
- data/lib/omml/models/ct_signed_twips_measure.rb +19 -0
- data/lib/omml/models/ct_simple_field.rb +29 -0
- data/lib/omml/models/ct_smart_tag_pr.rb +21 -0
- data/lib/omml/models/ct_smart_tag_run.rb +27 -0
- data/lib/omml/models/ct_spacing_rule.rb +19 -0
- data/lib/omml/models/ct_string.rb +19 -0
- data/lib/omml/models/ct_style.rb +19 -0
- data/lib/omml/models/ct_sym.rb +21 -0
- data/lib/omml/models/ct_text.rb +19 -0
- data/lib/omml/models/ct_text_effect.rb +19 -0
- data/lib/omml/models/ct_text_scale.rb +19 -0
- data/lib/omml/models/ct_top_bot.rb +19 -0
- data/lib/omml/models/ct_track_change.rb +21 -0
- data/lib/omml/models/ct_track_change_numbering.rb +19 -0
- data/lib/omml/models/ct_twips_measure.rb +19 -0
- data/lib/omml/models/ct_un_signed_integer.rb +19 -0
- data/lib/omml/models/ct_underline.rb +27 -0
- data/lib/omml/models/ct_vertical_align_run.rb +19 -0
- data/lib/omml/models/ct_wordprocessing_on_off.rb +19 -0
- data/lib/omml/models/ct_wrap_none.rb +15 -0
- data/lib/omml/models/ct_wrap_path.rb +25 -0
- data/lib/omml/models/ct_wrap_square.rb +31 -0
- data/lib/omml/models/ct_wrap_through.rb +27 -0
- data/lib/omml/models/ct_wrap_tight.rb +27 -0
- data/lib/omml/models/ct_wrap_top_bottom.rb +25 -0
- data/lib/omml/models/ct_x_align.rb +19 -0
- data/lib/omml/models/ct_y_align.rb +19 -0
- data/lib/omml/models/groups/eg_content_run_content.rb +26 -0
- data/lib/omml/models/groups/eg_math_content.rb +20 -0
- data/lib/omml/models/groups/eg_o_math_elements.rb +20 -0
- data/lib/omml/models/groups/eg_o_math_math_elements.rb +56 -0
- data/lib/omml/models/groups/eg_office_art_extension_list.rb +16 -0
- data/lib/omml/models/groups/eg_p_content.rb +24 -0
- data/lib/omml/models/groups/eg_r_pr.rb +17 -0
- data/lib/omml/models/groups/eg_r_pr_base.rb +93 -0
- data/lib/omml/models/groups/eg_r_pr_content.rb +19 -0
- data/lib/omml/models/groups/eg_r_pr_math.rb +23 -0
- data/lib/omml/models/groups/eg_range_markup_elements.rb +60 -0
- data/lib/omml/models/groups/eg_ruby_content.rb +20 -0
- data/lib/omml/models/groups/eg_run_inner_content.rb +83 -0
- data/lib/omml/models/groups/eg_run_level_elts.rb +34 -0
- data/lib/omml/models/groups/eg_script_style.rb +18 -0
- data/lib/omml/models/groups/eg_word_r_pr.rb +17 -0
- data/lib/omml/models/groups/eg_wrap_type.rb +27 -0
- data/lib/omml/models/groups.rb +19 -0
- data/lib/omml/models/o_math.rb +21 -0
- data/lib/omml/models/o_math_para.rb +25 -0
- data/lib/omml/models/simple_types/enum_string.rb +42 -0
- data/lib/omml/models/simple_types/hex_binary.rb +15 -0
- data/lib/omml/models/simple_types/st_adj_coordinate.rb +24 -0
- data/lib/omml/models/simple_types/st_align_h.rb +17 -0
- data/lib/omml/models/simple_types/st_align_v.rb +17 -0
- data/lib/omml/models/simple_types/st_border.rb +203 -0
- data/lib/omml/models/simple_types/st_br_clear.rb +16 -0
- data/lib/omml/models/simple_types/st_br_type.rb +15 -0
- data/lib/omml/models/simple_types/st_break_bin.rb +15 -0
- data/lib/omml/models/simple_types/st_break_bin_sub.rb +15 -0
- data/lib/omml/models/simple_types/st_calendar_type.rb +22 -0
- data/lib/omml/models/simple_types/st_combine_brackets.rb +17 -0
- data/lib/omml/models/simple_types/st_coordinate.rb +16 -0
- data/lib/omml/models/simple_types/st_displaced_by_custom_xml.rb +14 -0
- data/lib/omml/models/simple_types/st_ed_grp.rb +19 -0
- data/lib/omml/models/simple_types/st_em.rb +17 -0
- data/lib/omml/models/simple_types/st_f_type.rb +16 -0
- data/lib/omml/models/simple_types/st_ff_text_type.rb +18 -0
- data/lib/omml/models/simple_types/st_fld_char_type.rb +15 -0
- data/lib/omml/models/simple_types/st_geom_guide_name.rb +10 -0
- data/lib/omml/models/simple_types/st_hex_color.rb +24 -0
- data/lib/omml/models/simple_types/st_highlight_color.rb +29 -0
- data/lib/omml/models/simple_types/st_hint.rb +15 -0
- data/lib/omml/models/simple_types/st_info_text_type.rb +14 -0
- data/lib/omml/models/simple_types/st_integer2.rb +15 -0
- data/lib/omml/models/simple_types/st_integer255.rb +15 -0
- data/lib/omml/models/simple_types/st_jc.rb +16 -0
- data/lib/omml/models/simple_types/st_lang.rb +24 -0
- data/lib/omml/models/simple_types/st_lim_loc.rb +14 -0
- data/lib/omml/models/simple_types/st_lock.rb +16 -0
- data/lib/omml/models/simple_types/st_on_off.rb +18 -0
- data/lib/omml/models/simple_types/st_p_tab_alignment.rb +15 -0
- data/lib/omml/models/simple_types/st_p_tab_leader.rb +17 -0
- data/lib/omml/models/simple_types/st_p_tab_relative_to.rb +14 -0
- data/lib/omml/models/simple_types/st_positive_coordinate.rb +15 -0
- data/lib/omml/models/simple_types/st_proof_err.rb +16 -0
- data/lib/omml/models/simple_types/st_rel_from_h.rb +20 -0
- data/lib/omml/models/simple_types/st_rel_from_v.rb +20 -0
- data/lib/omml/models/simple_types/st_ruby_align.rb +18 -0
- data/lib/omml/models/simple_types/st_script.rb +18 -0
- data/lib/omml/models/simple_types/st_sdt_date_mapping_type.rb +15 -0
- data/lib/omml/models/simple_types/st_shd.rb +50 -0
- data/lib/omml/models/simple_types/st_shp.rb +14 -0
- data/lib/omml/models/simple_types/st_spacing_rule.rb +15 -0
- data/lib/omml/models/simple_types/st_style.rb +16 -0
- data/lib/omml/models/simple_types/st_text_effect.rb +19 -0
- data/lib/omml/models/simple_types/st_text_scale.rb +15 -0
- data/lib/omml/models/simple_types/st_theme.rb +20 -0
- data/lib/omml/models/simple_types/st_theme_color.rb +29 -0
- data/lib/omml/models/simple_types/st_top_bot.rb +14 -0
- data/lib/omml/models/simple_types/st_underline.rb +30 -0
- data/lib/omml/models/simple_types/st_vertical_align_run.rb +15 -0
- data/lib/omml/models/simple_types/st_wrap_text.rb +16 -0
- data/lib/omml/models/simple_types/st_x_align.rb +15 -0
- data/lib/omml/models/simple_types/st_y_align.rb +15 -0
- data/lib/omml/models/simple_types/token.rb +35 -0
- data/lib/omml/models/simple_types/unsigned_int.rb +15 -0
- data/lib/omml/models/simple_types/unsigned_long.rb +15 -0
- data/lib/omml/models/simple_types.rb +60 -0
- data/lib/omml/models.rb +183 -0
- data/lib/omml/namespace.rb +9 -0
- data/lib/omml/parser.rb +39 -0
- data/lib/omml/type_substitutions.rb +89 -0
- data/lib/omml/version.rb +2 -2
- data/lib/omml/wordprocessing_namespace.rb +9 -0
- data/lib/omml.rb +39 -3
- data/omml.gemspec +18 -14
- data/sig/omml.rbs +1 -1
- metadata +335 -6
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Omml
|
|
4
|
+
module Models
|
|
5
|
+
class EGRPrBase < Lutaml::Model::Serializable
|
|
6
|
+
attribute :r_style, :ct_string, collection: 0..1
|
|
7
|
+
attribute :r_fonts, :ct_fonts, collection: 0..1
|
|
8
|
+
attribute :b, :ct_wordprocessing_on_off, collection: 0..1
|
|
9
|
+
attribute :b_cs, :ct_wordprocessing_on_off, collection: 0..1
|
|
10
|
+
attribute :i, :ct_wordprocessing_on_off, collection: 0..1
|
|
11
|
+
attribute :i_cs, :ct_wordprocessing_on_off, collection: 0..1
|
|
12
|
+
attribute :caps, :ct_wordprocessing_on_off, collection: 0..1
|
|
13
|
+
attribute :small_caps, :ct_wordprocessing_on_off, collection: 0..1
|
|
14
|
+
attribute :strike, :ct_wordprocessing_on_off, collection: 0..1
|
|
15
|
+
attribute :dstrike, :ct_wordprocessing_on_off, collection: 0..1
|
|
16
|
+
attribute :outline, :ct_wordprocessing_on_off, collection: 0..1
|
|
17
|
+
attribute :shadow, :ct_wordprocessing_on_off, collection: 0..1
|
|
18
|
+
attribute :emboss, :ct_wordprocessing_on_off, collection: 0..1
|
|
19
|
+
attribute :imprint, :ct_wordprocessing_on_off, collection: 0..1
|
|
20
|
+
attribute :no_proof, :ct_wordprocessing_on_off, collection: 0..1
|
|
21
|
+
attribute :snap_to_grid, :ct_wordprocessing_on_off, collection: 0..1
|
|
22
|
+
attribute :vanish, :ct_wordprocessing_on_off, collection: 0..1
|
|
23
|
+
attribute :web_hidden, :ct_wordprocessing_on_off, collection: 0..1
|
|
24
|
+
attribute :color, :ct_color, collection: 0..1
|
|
25
|
+
attribute :spacing, :ct_signed_twips_measure, collection: 0..1
|
|
26
|
+
attribute :w, :ct_text_scale, collection: 0..1
|
|
27
|
+
attribute :kern, :ct_hps_measure, collection: 0..1
|
|
28
|
+
attribute :position, :ct_signed_hps_measure, collection: 0..1
|
|
29
|
+
attribute :sz, :ct_hps_measure, collection: 0..1
|
|
30
|
+
attribute :sz_cs, :ct_hps_measure, collection: 0..1
|
|
31
|
+
attribute :highlight, :ct_highlight, collection: 0..1
|
|
32
|
+
attribute :u, :ct_underline, collection: 0..1
|
|
33
|
+
attribute :effect, :ct_text_effect, collection: 0..1
|
|
34
|
+
attribute :bdr, :ct_border, collection: 0..1
|
|
35
|
+
attribute :shd, :ct_shd, collection: 0..1
|
|
36
|
+
attribute :fit_text, :ct_fit_text, collection: 0..1
|
|
37
|
+
attribute :vert_align, :ct_vertical_align_run, collection: 0..1
|
|
38
|
+
attribute :rtl, :ct_wordprocessing_on_off, collection: 0..1
|
|
39
|
+
attribute :cs, :ct_wordprocessing_on_off, collection: 0..1
|
|
40
|
+
attribute :em, :ct_em, collection: 0..1
|
|
41
|
+
attribute :lang, :ct_language, collection: 0..1
|
|
42
|
+
attribute :east_asian_layout, :ct_east_asian_layout, collection: 0..1
|
|
43
|
+
attribute :spec_vanish, :ct_wordprocessing_on_off, collection: 0..1
|
|
44
|
+
attribute :o_math, :ct_wordprocessing_on_off, collection: 0..1
|
|
45
|
+
|
|
46
|
+
xml do
|
|
47
|
+
type_name "EG_RPrBase"
|
|
48
|
+
namespace Omml::WordprocessingNamespace
|
|
49
|
+
map_element :rStyle, to: :r_style
|
|
50
|
+
map_element :rFonts, to: :r_fonts
|
|
51
|
+
map_element :b, to: :b, render_empty: true
|
|
52
|
+
map_element :bCs, to: :b_cs, render_empty: true
|
|
53
|
+
map_element :i, to: :i, render_empty: true
|
|
54
|
+
map_element :iCs, to: :i_cs, render_empty: true
|
|
55
|
+
map_element :caps, to: :caps, render_empty: true
|
|
56
|
+
map_element :smallCaps, to: :small_caps, render_empty: true
|
|
57
|
+
map_element :strike, to: :strike, render_empty: true
|
|
58
|
+
map_element :dstrike, to: :dstrike, render_empty: true
|
|
59
|
+
map_element :outline, to: :outline, render_empty: true
|
|
60
|
+
map_element :shadow, to: :shadow, render_empty: true
|
|
61
|
+
map_element :emboss, to: :emboss, render_empty: true
|
|
62
|
+
map_element :imprint, to: :imprint, render_empty: true
|
|
63
|
+
map_element :noProof, to: :no_proof, render_empty: true
|
|
64
|
+
map_element :snapToGrid, to: :snap_to_grid, render_empty: true
|
|
65
|
+
map_element :vanish, to: :vanish, render_empty: true
|
|
66
|
+
map_element :webHidden, to: :web_hidden, render_empty: true
|
|
67
|
+
map_element :color, to: :color
|
|
68
|
+
map_element :spacing, to: :spacing
|
|
69
|
+
map_element :w, to: :w
|
|
70
|
+
map_element :kern, to: :kern
|
|
71
|
+
map_element :position, to: :position
|
|
72
|
+
map_element :sz, to: :sz
|
|
73
|
+
map_element :szCs, to: :sz_cs
|
|
74
|
+
map_element :highlight, to: :highlight
|
|
75
|
+
map_element :u, to: :u
|
|
76
|
+
map_element :effect, to: :effect
|
|
77
|
+
map_element :bdr, to: :bdr
|
|
78
|
+
map_element :shd, to: :shd
|
|
79
|
+
map_element :fitText, to: :fit_text
|
|
80
|
+
map_element :vertAlign, to: :vert_align
|
|
81
|
+
map_element :rtl, to: :rtl, render_empty: true
|
|
82
|
+
map_element :cs, to: :cs, render_empty: true
|
|
83
|
+
map_element :em, to: :em
|
|
84
|
+
map_element :lang, to: :lang
|
|
85
|
+
map_element :eastAsianLayout, to: :east_asian_layout
|
|
86
|
+
map_element :specVanish, to: :spec_vanish, render_empty: true
|
|
87
|
+
map_element :oMath, to: :o_math, render_empty: true
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
Omml::Configuration.register_model(EGRPrBase)
|
|
92
|
+
end
|
|
93
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Omml
|
|
4
|
+
module Models
|
|
5
|
+
class EGRPrContent < Lutaml::Model::Serializable
|
|
6
|
+
import_model_attributes :eg_r_pr_base
|
|
7
|
+
attribute :r_pr_change, :ct_r_pr_change, collection: 0..1
|
|
8
|
+
|
|
9
|
+
xml do
|
|
10
|
+
type_name "EG_RPrContent"
|
|
11
|
+
namespace Omml::WordprocessingNamespace
|
|
12
|
+
import_model_mappings :eg_r_pr_base
|
|
13
|
+
map_element :rPrChange, to: :r_pr_change
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
Omml::Configuration.register_model(EGRPrContent)
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Omml
|
|
4
|
+
module Models
|
|
5
|
+
class EGRPrMath < Lutaml::Model::Serializable
|
|
6
|
+
choice(min: 1, max: 1) do
|
|
7
|
+
import_model_attributes :eg_r_pr
|
|
8
|
+
attribute :ins, :ct_r_pr_change
|
|
9
|
+
attribute :del, :ct_r_pr_change
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
xml do
|
|
13
|
+
type_name "EG_RPrMath"
|
|
14
|
+
namespace Omml::WordprocessingNamespace
|
|
15
|
+
import_model_mappings :eg_r_pr
|
|
16
|
+
map_element :ins, to: :ins, render_empty: true
|
|
17
|
+
map_element :del, to: :del, render_empty: true
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
Omml::Configuration.register_model(EGRPrMath)
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Omml
|
|
4
|
+
module Models
|
|
5
|
+
class EGRangeMarkupElements < Lutaml::Model::Serializable
|
|
6
|
+
choice(min: 1, max: 1) do
|
|
7
|
+
attribute :bookmark_start, :ct_bookmark
|
|
8
|
+
attribute :bookmark_end, :ct_markup_range
|
|
9
|
+
attribute :move_from_range_start, :ct_move_bookmark
|
|
10
|
+
attribute :move_from_range_end, :ct_markup_range
|
|
11
|
+
attribute :move_to_range_start, :ct_move_bookmark
|
|
12
|
+
attribute :move_to_range_end, :ct_markup_range
|
|
13
|
+
attribute :comment_range_start, :ct_markup_range
|
|
14
|
+
attribute :comment_range_end, :ct_markup_range
|
|
15
|
+
attribute :custom_xml_ins_range_start, :ct_track_change
|
|
16
|
+
attribute :custom_xml_ins_range_end, :ct_markup
|
|
17
|
+
attribute :custom_xml_del_range_start, :ct_track_change
|
|
18
|
+
attribute :custom_xml_del_range_end, :ct_markup
|
|
19
|
+
attribute :custom_xml_move_from_range_start, :ct_track_change
|
|
20
|
+
attribute :custom_xml_move_from_range_end, :ct_markup
|
|
21
|
+
attribute :custom_xml_move_to_range_start, :ct_track_change
|
|
22
|
+
attribute :custom_xml_move_to_range_end, :ct_markup
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
xml do
|
|
26
|
+
type_name "EG_RangeMarkupElements"
|
|
27
|
+
map_element :bookmarkStart, to: :bookmark_start, render_empty: true
|
|
28
|
+
map_element :bookmarkEnd, to: :bookmark_end, render_empty: true
|
|
29
|
+
map_element :moveFromRangeStart, to: :move_from_range_start,
|
|
30
|
+
render_empty: true
|
|
31
|
+
map_element :moveFromRangeEnd, to: :move_from_range_end,
|
|
32
|
+
render_empty: true
|
|
33
|
+
map_element :moveToRangeStart, to: :move_to_range_start,
|
|
34
|
+
render_empty: true
|
|
35
|
+
map_element :moveToRangeEnd, to: :move_to_range_end, render_empty: true
|
|
36
|
+
map_element :commentRangeStart, to: :comment_range_start,
|
|
37
|
+
render_empty: true
|
|
38
|
+
map_element :commentRangeEnd, to: :comment_range_end, render_empty: true
|
|
39
|
+
map_element :customXmlInsRangeStart, to: :custom_xml_ins_range_start,
|
|
40
|
+
render_empty: true
|
|
41
|
+
map_element :customXmlInsRangeEnd, to: :custom_xml_ins_range_end,
|
|
42
|
+
render_empty: true
|
|
43
|
+
map_element :customXmlDelRangeStart, to: :custom_xml_del_range_start,
|
|
44
|
+
render_empty: true
|
|
45
|
+
map_element :customXmlDelRangeEnd, to: :custom_xml_del_range_end,
|
|
46
|
+
render_empty: true
|
|
47
|
+
map_element :customXmlMoveFromRangeStart,
|
|
48
|
+
to: :custom_xml_move_from_range_start, render_empty: true
|
|
49
|
+
map_element :customXmlMoveFromRangeEnd,
|
|
50
|
+
to: :custom_xml_move_from_range_end, render_empty: true
|
|
51
|
+
map_element :customXmlMoveToRangeStart,
|
|
52
|
+
to: :custom_xml_move_to_range_start, render_empty: true
|
|
53
|
+
map_element :customXmlMoveToRangeEnd,
|
|
54
|
+
to: :custom_xml_move_to_range_end, render_empty: true
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
Omml::Configuration.register_model(EGRangeMarkupElements)
|
|
59
|
+
end
|
|
60
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Omml
|
|
4
|
+
module Models
|
|
5
|
+
class EGRubyContent < Lutaml::Model::Serializable
|
|
6
|
+
choice(min: 1, max: 1) do
|
|
7
|
+
attribute :r, :ct_r
|
|
8
|
+
import_model_attributes :eg_run_level_elts
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
xml do
|
|
12
|
+
type_name "EG_RubyContent"
|
|
13
|
+
map_element :r, to: :r, render_empty: true
|
|
14
|
+
import_model_mappings :eg_run_level_elts
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
Omml::Configuration.register_model(EGRubyContent)
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Omml
|
|
4
|
+
module Models
|
|
5
|
+
class EGRunInnerContent < Lutaml::Model::Serializable
|
|
6
|
+
choice(min: 1, max: 1) do
|
|
7
|
+
attribute :br, :string
|
|
8
|
+
attribute :t, :ct_text
|
|
9
|
+
attribute :del_text, :ct_text
|
|
10
|
+
attribute :instr_text, :ct_text
|
|
11
|
+
attribute :del_instr_text, :ct_text
|
|
12
|
+
attribute :no_break_hyphen, :ct_empty
|
|
13
|
+
attribute :soft_hyphen, :ct_empty, collection: 0..1
|
|
14
|
+
attribute :day_short, :ct_empty, collection: 0..1
|
|
15
|
+
attribute :month_short, :ct_empty, collection: 0..1
|
|
16
|
+
attribute :year_short, :ct_empty, collection: 0..1
|
|
17
|
+
attribute :day_long, :ct_empty, collection: 0..1
|
|
18
|
+
attribute :month_long, :ct_empty, collection: 0..1
|
|
19
|
+
attribute :year_long, :ct_empty, collection: 0..1
|
|
20
|
+
attribute :annotation_ref, :ct_empty, collection: 0..1
|
|
21
|
+
attribute :footnote_ref, :ct_empty, collection: 0..1
|
|
22
|
+
attribute :endnote_ref, :ct_empty, collection: 0..1
|
|
23
|
+
attribute :separator, :ct_empty, collection: 0..1
|
|
24
|
+
attribute :continuation_separator, :ct_empty, collection: 0..1
|
|
25
|
+
attribute :sym, :ct_sym, collection: 0..1
|
|
26
|
+
attribute :pg_num, :ct_empty, collection: 0..1
|
|
27
|
+
attribute :cr, :ct_empty, collection: 0..1
|
|
28
|
+
attribute :tab, :ct_empty, collection: 0..1
|
|
29
|
+
attribute :object, :ct_object
|
|
30
|
+
attribute :pict, :ct_picture
|
|
31
|
+
attribute :fld_char, :ct_fld_char
|
|
32
|
+
attribute :ruby, :ct_ruby
|
|
33
|
+
attribute :footnote_reference, :ct_ftn_edn_ref
|
|
34
|
+
attribute :endnote_reference, :ct_ftn_edn_ref
|
|
35
|
+
attribute :comment_reference, :ct_markup
|
|
36
|
+
attribute :drawing, :ct_drawing
|
|
37
|
+
attribute :ptab, :ct_p_tab, collection: 0..1
|
|
38
|
+
attribute :last_rendered_page_break, :ct_empty, collection: 0..1
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
xml do
|
|
42
|
+
type_name "EG_RunInnerContent"
|
|
43
|
+
map_element :br, to: :br, render_empty: true, namespace: nil
|
|
44
|
+
map_element :t, to: :t, render_empty: true
|
|
45
|
+
map_element :delText, to: :del_text, render_empty: true
|
|
46
|
+
map_element :instrText, to: :instr_text, render_empty: true
|
|
47
|
+
map_element :delInstrText, to: :del_instr_text, render_empty: true
|
|
48
|
+
map_element :noBreakHyphen, to: :no_break_hyphen, render_empty: true
|
|
49
|
+
map_element :softHyphen, to: :soft_hyphen
|
|
50
|
+
map_element :dayShort, to: :day_short
|
|
51
|
+
map_element :monthShort, to: :month_short
|
|
52
|
+
map_element :yearShort, to: :year_short
|
|
53
|
+
map_element :dayLong, to: :day_long
|
|
54
|
+
map_element :monthLong, to: :month_long
|
|
55
|
+
map_element :yearLong, to: :year_long
|
|
56
|
+
map_element :annotationRef, to: :annotation_ref
|
|
57
|
+
map_element :footnoteRef, to: :footnote_ref
|
|
58
|
+
map_element :endnoteRef, to: :endnote_ref
|
|
59
|
+
map_element :separator, to: :separator
|
|
60
|
+
map_element :continuationSeparator, to: :continuation_separator
|
|
61
|
+
map_element :sym, to: :sym
|
|
62
|
+
map_element :pgNum, to: :pg_num
|
|
63
|
+
map_element :cr, to: :cr
|
|
64
|
+
map_element :tab, to: :tab
|
|
65
|
+
map_element :object, to: :object, render_empty: true
|
|
66
|
+
map_element :pict, to: :pict, render_empty: true
|
|
67
|
+
map_element :fldChar, to: :fld_char, render_empty: true
|
|
68
|
+
map_element :ruby, to: :ruby, render_empty: true
|
|
69
|
+
map_element :footnoteReference, to: :footnote_reference,
|
|
70
|
+
render_empty: true
|
|
71
|
+
map_element :endnoteReference, to: :endnote_reference,
|
|
72
|
+
render_empty: true
|
|
73
|
+
map_element :commentReference, to: :comment_reference,
|
|
74
|
+
render_empty: true
|
|
75
|
+
map_element :drawing, to: :drawing, render_empty: true
|
|
76
|
+
map_element :ptab, to: :ptab
|
|
77
|
+
map_element :lastRenderedPageBreak, to: :last_rendered_page_break
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
Omml::Configuration.register_model(EGRunInnerContent)
|
|
82
|
+
end
|
|
83
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Omml
|
|
4
|
+
module Models
|
|
5
|
+
class EGRunLevelElts < Lutaml::Model::Serializable
|
|
6
|
+
choice(min: 1, max: 1) do
|
|
7
|
+
attribute :proof_err, :ct_proof_err, collection: 0..1
|
|
8
|
+
attribute :perm_start, :ct_perm_start, collection: 0..1
|
|
9
|
+
attribute :perm_end, :ct_perm, collection: 0..1
|
|
10
|
+
import_model_attributes :eg_range_markup_elements
|
|
11
|
+
attribute :ins, :ct_run_track_change, collection: 0..1
|
|
12
|
+
attribute :del, :ct_run_track_change, collection: 0..1
|
|
13
|
+
attribute :move_from, :ct_run_track_change
|
|
14
|
+
attribute :move_to, :ct_run_track_change
|
|
15
|
+
import_model_attributes :eg_math_content
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
xml do
|
|
19
|
+
type_name "EG_RunLevelElts"
|
|
20
|
+
map_element :proofErr, to: :proof_err
|
|
21
|
+
map_element :permStart, to: :perm_start
|
|
22
|
+
map_element :permEnd, to: :perm_end
|
|
23
|
+
import_model_mappings :eg_range_markup_elements
|
|
24
|
+
map_element :ins, to: :ins
|
|
25
|
+
map_element :del, to: :del
|
|
26
|
+
map_element :moveFrom, to: :move_from, render_empty: true
|
|
27
|
+
map_element :moveTo, to: :move_to, render_empty: true
|
|
28
|
+
import_model_mappings :eg_math_content
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
Omml::Configuration.register_model(EGRunLevelElts)
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Omml
|
|
4
|
+
module Models
|
|
5
|
+
class EGScriptStyle < Lutaml::Model::Serializable
|
|
6
|
+
attribute :scr, :ct_script, collection: 0..1
|
|
7
|
+
attribute :sty, :ct_style, collection: 0..1
|
|
8
|
+
|
|
9
|
+
xml do
|
|
10
|
+
type_name "EG_ScriptStyle"
|
|
11
|
+
map_element :scr, to: :scr
|
|
12
|
+
map_element :sty, to: :sty
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
Omml::Configuration.register_model(EGScriptStyle)
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Omml
|
|
4
|
+
module Models
|
|
5
|
+
class EGWordRPr < Lutaml::Model::Serializable
|
|
6
|
+
attribute :word_r_pr, :ct_r_pr, collection: 0..1
|
|
7
|
+
|
|
8
|
+
xml do
|
|
9
|
+
type_name "EG_WordRPr"
|
|
10
|
+
namespace Omml::WordprocessingNamespace
|
|
11
|
+
map_element :rPr, to: :word_r_pr
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
Omml::Configuration.register_model(EGWordRPr)
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Omml
|
|
4
|
+
module Models
|
|
5
|
+
class EGWrapType < Lutaml::Model::Serializable
|
|
6
|
+
choice(min: 1, max: 1) do
|
|
7
|
+
attribute :wrap_none, :ct_wrap_none, collection: 1..1
|
|
8
|
+
attribute :wrap_square, :ct_wrap_square, collection: 1..1
|
|
9
|
+
attribute :wrap_tight, :ct_wrap_tight, collection: 1..1
|
|
10
|
+
attribute :wrap_through, :ct_wrap_through, collection: 1..1
|
|
11
|
+
attribute :wrap_top_and_bottom, :ct_wrap_top_bottom, collection: 1..1
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
xml do
|
|
15
|
+
type_name "EG_WrapType"
|
|
16
|
+
map_element :wrapNone, to: :wrap_none, render_empty: true
|
|
17
|
+
map_element :wrapSquare, to: :wrap_square, render_empty: true
|
|
18
|
+
map_element :wrapTight, to: :wrap_tight, render_empty: true
|
|
19
|
+
map_element :wrapThrough, to: :wrap_through, render_empty: true
|
|
20
|
+
map_element :wrapTopAndBottom, to: :wrap_top_and_bottom,
|
|
21
|
+
render_empty: true
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
Omml::Configuration.register_model(EGWrapType)
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative "groups/eg_math_content"
|
|
4
|
+
require_relative "groups/eg_o_math_math_elements"
|
|
5
|
+
require_relative "groups/eg_office_art_extension_list"
|
|
6
|
+
require_relative "groups/eg_r_pr"
|
|
7
|
+
require_relative "groups/eg_r_pr_base"
|
|
8
|
+
require_relative "groups/eg_range_markup_elements"
|
|
9
|
+
require_relative "groups/eg_run_inner_content"
|
|
10
|
+
require_relative "groups/eg_script_style"
|
|
11
|
+
require_relative "groups/eg_word_r_pr"
|
|
12
|
+
require_relative "groups/eg_wrap_type"
|
|
13
|
+
require_relative "groups/eg_r_pr_content"
|
|
14
|
+
require_relative "groups/eg_r_pr_math"
|
|
15
|
+
require_relative "groups/eg_run_level_elts"
|
|
16
|
+
require_relative "groups/eg_content_run_content"
|
|
17
|
+
require_relative "groups/eg_o_math_elements"
|
|
18
|
+
require_relative "groups/eg_p_content"
|
|
19
|
+
require_relative "groups/eg_ruby_content"
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Omml
|
|
4
|
+
module Models
|
|
5
|
+
# Root element wrapper for the generated CTOMath content model.
|
|
6
|
+
class OMath < Lutaml::Model::Serializable
|
|
7
|
+
import_model_attributes :eg_o_math_elements
|
|
8
|
+
|
|
9
|
+
xml do
|
|
10
|
+
element "oMath"
|
|
11
|
+
namespace Omml::Namespace
|
|
12
|
+
ordered
|
|
13
|
+
sequence do
|
|
14
|
+
import_model_mappings :eg_o_math_elements
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
Omml::Configuration.register_model(OMath, id: :o_math)
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Omml
|
|
4
|
+
module Models
|
|
5
|
+
# Root element wrapper for the generated CTOMathPara content model.
|
|
6
|
+
class OMathPara < Lutaml::Model::Serializable
|
|
7
|
+
attribute :o_math_para_pr, :ct_o_math_para_pr, collection: 0..1
|
|
8
|
+
attribute :o_math, :ct_o_math, collection: 1..Float::INFINITY
|
|
9
|
+
attribute :r, :ct_r, collection: 0..Float::INFINITY
|
|
10
|
+
|
|
11
|
+
xml do
|
|
12
|
+
element "oMathPara"
|
|
13
|
+
namespace Omml::Namespace
|
|
14
|
+
ordered
|
|
15
|
+
sequence do
|
|
16
|
+
map_element :oMathParaPr, to: :o_math_para_pr
|
|
17
|
+
map_element :oMath, to: :o_math, render_empty: true
|
|
18
|
+
map_element :r, to: :r, render_empty: true
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
Omml::Configuration.register_model(OMathPara, id: :o_math_para)
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Omml
|
|
4
|
+
module Models
|
|
5
|
+
class EnumString < Lutaml::Model::Type::String
|
|
6
|
+
def self.cast(value, options = {})
|
|
7
|
+
return if value.nil?
|
|
8
|
+
|
|
9
|
+
values = defined_values
|
|
10
|
+
return super unless values
|
|
11
|
+
|
|
12
|
+
cast_options = options_with_values(options) do
|
|
13
|
+
values.map do |entry|
|
|
14
|
+
super(entry)
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
super(value, cast_options)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def self.defined_values
|
|
22
|
+
const_get(:VALUES, false) if const_defined?(:VALUES, false)
|
|
23
|
+
end
|
|
24
|
+
private_class_method :defined_values
|
|
25
|
+
|
|
26
|
+
def self.memoized_values
|
|
27
|
+
@memoized_values ||= yield
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def self.options_with_values(options, &block)
|
|
31
|
+
options.dup.tap do |cast_options|
|
|
32
|
+
cast_options[:values] ||= memoized_values(&block)
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
private_class_method :memoized_values
|
|
37
|
+
private_class_method :options_with_values
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
Omml::Configuration.register_model(EnumString)
|
|
41
|
+
end
|
|
42
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Omml
|
|
4
|
+
module Models
|
|
5
|
+
class HexBinary < Lutaml::Model::Type::String
|
|
6
|
+
def self.cast(value, options = {})
|
|
7
|
+
return if value.nil?
|
|
8
|
+
|
|
9
|
+
super(value, options.merge(pattern: /(?-mix:([0-9a-fA-F]{2})*)/))
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
Omml::Configuration.register_model(HexBinary)
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Omml
|
|
4
|
+
module Models
|
|
5
|
+
class STAdjCoordinate < Lutaml::Model::Type::Value
|
|
6
|
+
def self.cast(value, options = {})
|
|
7
|
+
return if value.nil?
|
|
8
|
+
|
|
9
|
+
cast_value(:st_coordinate, value, options) ||
|
|
10
|
+
cast_value(:st_geom_guide_name, value, options)
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def self.cast_value(type_name, value, options)
|
|
14
|
+
Lutaml::Model::GlobalContext
|
|
15
|
+
.resolve_type(type_name, @register)
|
|
16
|
+
.cast(value, options)
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
private_class_method :cast_value
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
Omml::Configuration.register_model(STAdjCoordinate)
|
|
23
|
+
end
|
|
24
|
+
end
|