diff --git a/lib/xmi/root13.rb b/lib/xmi/root13.rb index 409643d..d60a48b 100644 --- a/lib/xmi/root13.rb +++ b/lib/xmi/root13.rb @@ -3,7 +3,6 @@ require "shale" module Xmi - # OMG 1.3 class EaXmiHeaderDocumentation < Shale::Mapper attribute :exporter, Shale::Type::String diff --git a/lib/xmi/uml13.rb b/lib/xmi/uml13.rb index 4d98874..2f4c393 100644 --- a/lib/xmi/uml13.rb +++ b/lib/xmi/uml13.rb @@ -1,3 +1,10 @@ +# frozen_string_literal: true + +module Xmi + module Uml13 + end +end + require_relative "uml13/abstraction" require_relative "uml13/action" require_relative "uml13/action_sequence" diff --git a/lib/xmi/uml13/abstraction.rb b/lib/xmi/uml13/abstraction.rb index 25b56d0..35300b3 100644 --- a/lib/xmi/uml13/abstraction.rb +++ b/lib/xmi/uml13/abstraction.rb @@ -1,153 +1,159 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'associationassociation_end' -require_relative 'associationconnection' -require_relative 'associationlink' -require_relative 'generalizable_elementgeneralization' -require_relative 'generalizable_elementis_abstract' -require_relative 'generalizable_elementis_leaf' -require_relative 'generalizable_elementis_root' -require_relative 'generalizable_elementspecialization' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'namespaceowned_element' -require_relative 'xm_iextension' +require "shale" -class Abstraction < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :is_root, Shale::Type::String - attribute :is_leaf, Shale::Type::String - attribute :is_abstract, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :generalization, Shale::Type::Value - attribute :specialization, Shale::Type::Value - attribute :link, Shale::Type::Value - attribute :association_end, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :generalizable_element_is_root, GeneralizableElementisRoot, collection: true - attribute :generalizable_element_is_leaf, GeneralizableElementisLeaf, collection: true - attribute :generalizable_element_is_abstract, GeneralizableElementisAbstract, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :generalizable_element_generalization, GeneralizableElementgeneralization, collection: true - attribute :generalizable_element_specialization, GeneralizableElementspecialization, collection: true - attribute :association_link, Associationlink, collection: true - attribute :association_association_end, AssociationassociationEnd, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :namespace_owned_element, NamespaceownedElement, collection: true - attribute :association_connection, Associationconnection, collection: true +require_relative "associationassociation_end" +require_relative "associationconnection" +require_relative "associationlink" +require_relative "generalizable_elementgeneralization" +require_relative "generalizable_elementis_abstract" +require_relative "generalizable_elementis_leaf" +require_relative "generalizable_elementis_root" +require_relative "generalizable_elementspecialization" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "namespaceowned_element" +require_relative "xm_iextension" - xml do - root 'Abstraction' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Abstraction < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :is_root, Shale::Type::String + attribute :is_leaf, Shale::Type::String + attribute :is_abstract, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :generalization, Shale::Type::Value + attribute :specialization, Shale::Type::Value + attribute :link, Shale::Type::Value + attribute :association_end, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :generalizable_element_is_root, GeneralizableElementisRoot, collection: true + attribute :generalizable_element_is_leaf, GeneralizableElementisLeaf, collection: true + attribute :generalizable_element_is_abstract, GeneralizableElementisAbstract, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :generalizable_element_generalization, GeneralizableElementgeneralization, collection: true + attribute :generalizable_element_specialization, GeneralizableElementspecialization, collection: true + attribute :association_link, Associationlink, collection: true + attribute :association_association_end, AssociationassociationEnd, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :namespace_owned_element, NamespaceownedElement, collection: true + attribute :association_connection, Associationconnection, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'isRoot', to: :is_root - map_attribute 'isLeaf', to: :is_leaf - map_attribute 'isAbstract', to: :is_abstract - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'generalization', to: :generalization - map_attribute 'specialization', to: :specialization - map_attribute 'link', to: :link - map_attribute 'associationEnd', to: :association_end - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'GeneralizableElement.isRoot', to: :generalizable_element_is_root - map_element 'GeneralizableElement.isLeaf', to: :generalizable_element_is_leaf - map_element 'GeneralizableElement.isAbstract', to: :generalizable_element_is_abstract - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'GeneralizableElement.generalization', to: :generalizable_element_generalization - map_element 'GeneralizableElement.specialization', to: :generalizable_element_specialization - map_element 'Association.link', to: :association_link - map_element 'Association.associationEnd', to: :association_association_end - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Namespace.ownedElement', to: :namespace_owned_element - map_element 'Association.connection', to: :association_connection + xml do + root "Abstraction" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "isRoot", to: :is_root + map_attribute "isLeaf", to: :is_leaf + map_attribute "isAbstract", to: :is_abstract + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "generalization", to: :generalization + map_attribute "specialization", to: :specialization + map_attribute "link", to: :link + map_attribute "associationEnd", to: :association_end + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "GeneralizableElement.isRoot", to: :generalizable_element_is_root + map_element "GeneralizableElement.isLeaf", to: :generalizable_element_is_leaf + map_element "GeneralizableElement.isAbstract", to: :generalizable_element_is_abstract + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "GeneralizableElement.generalization", to: :generalizable_element_generalization + map_element "GeneralizableElement.specialization", to: :generalizable_element_specialization + map_element "Association.link", to: :association_link + map_element "Association.associationEnd", to: :association_association_end + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Namespace.ownedElement", to: :namespace_owned_element + map_element "Association.connection", to: :association_connection + end + end end end diff --git a/lib/xmi/uml13/action.rb b/lib/xmi/uml13/action.rb index a21a968..4ec852f 100644 --- a/lib/xmi/uml13/action.rb +++ b/lib/xmi/uml13/action.rb @@ -1,146 +1,152 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'actionaction_sequence' -require_relative 'actionactual_argument' -require_relative 'actionis_asynchronous' -require_relative 'actionmessage' -require_relative 'actionrecurrence' -require_relative 'actionrequest' -require_relative 'actionscript' -require_relative 'actiontarget' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'xm_iextension' +require "shale" -class Action < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :is_asynchronous, Shale::Type::String - attribute :script, Shale::Type::Value - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :request, Shale::Type::Value - attribute :message, Shale::Type::Value - attribute :action_sequence, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :action_recurrence, Actionrecurrence, collection: true - attribute :action_target, Actiontarget, collection: true - attribute :action_is_asynchronous, ActionisAsynchronous, collection: true - attribute :action_script, Actionscript, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :action_request, Actionrequest, collection: true - attribute :action_message, Actionmessage, collection: true - attribute :action_action_sequence, ActionactionSequence, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :action_actual_argument, ActionactualArgument, collection: true +require_relative "actionaction_sequence" +require_relative "actionactual_argument" +require_relative "actionis_asynchronous" +require_relative "actionmessage" +require_relative "actionrecurrence" +require_relative "actionrequest" +require_relative "actionscript" +require_relative "actiontarget" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "xm_iextension" - xml do - root 'Action' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Action < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :is_asynchronous, Shale::Type::String + attribute :script, Shale::Type::Value + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :request, Shale::Type::Value + attribute :message, Shale::Type::Value + attribute :action_sequence, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :action_recurrence, Actionrecurrence, collection: true + attribute :action_target, Actiontarget, collection: true + attribute :action_is_asynchronous, ActionisAsynchronous, collection: true + attribute :action_script, Actionscript, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :action_request, Actionrequest, collection: true + attribute :action_message, Actionmessage, collection: true + attribute :action_action_sequence, ActionactionSequence, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :action_actual_argument, ActionactualArgument, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'isAsynchronous', to: :is_asynchronous - map_attribute 'script', to: :script - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'request', to: :request - map_attribute 'message', to: :message - map_attribute 'actionSequence', to: :action_sequence - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'Action.recurrence', to: :action_recurrence - map_element 'Action.target', to: :action_target - map_element 'Action.isAsynchronous', to: :action_is_asynchronous - map_element 'Action.script', to: :action_script - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'Action.request', to: :action_request - map_element 'Action.message', to: :action_message - map_element 'Action.actionSequence', to: :action_action_sequence - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Action.actualArgument', to: :action_actual_argument + xml do + root "Action" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "isAsynchronous", to: :is_asynchronous + map_attribute "script", to: :script + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "request", to: :request + map_attribute "message", to: :message + map_attribute "actionSequence", to: :action_sequence + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "Action.recurrence", to: :action_recurrence + map_element "Action.target", to: :action_target + map_element "Action.isAsynchronous", to: :action_is_asynchronous + map_element "Action.script", to: :action_script + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "Action.request", to: :action_request + map_element "Action.message", to: :action_message + map_element "Action.actionSequence", to: :action_action_sequence + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Action.actualArgument", to: :action_actual_argument + end + end end end diff --git a/lib/xmi/uml13/action_sequence.rb b/lib/xmi/uml13/action_sequence.rb index 62c0e5f..e8be1d5 100644 --- a/lib/xmi/uml13/action_sequence.rb +++ b/lib/xmi/uml13/action_sequence.rb @@ -1,130 +1,136 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'action_sequenceaction' -require_relative 'action_sequencestate' -require_relative 'action_sequencestate2' -require_relative 'action_sequencetransition' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'xm_iextension' +require "shale" -class ActionSequence < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :transition, Shale::Type::Value - attribute :state, Shale::Type::Value - attribute :state2, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :action_sequence_transition, ActionSequencetransition, collection: true - attribute :action_sequence_state, ActionSequencestate, collection: true - attribute :action_sequence_state2, ActionSequencestate2, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :action_sequence_action, ActionSequenceaction, collection: true +require_relative "action_sequenceaction" +require_relative "action_sequencestate" +require_relative "action_sequencestate2" +require_relative "action_sequencetransition" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "xm_iextension" - xml do - root 'ActionSequence' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ActionSequence < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :transition, Shale::Type::Value + attribute :state, Shale::Type::Value + attribute :state2, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :action_sequence_transition, ActionSequencetransition, collection: true + attribute :action_sequence_state, ActionSequencestate, collection: true + attribute :action_sequence_state2, ActionSequencestate2, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :action_sequence_action, ActionSequenceaction, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'transition', to: :transition - map_attribute 'state', to: :state - map_attribute 'state2', to: :state2 - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'ActionSequence.transition', to: :action_sequence_transition - map_element 'ActionSequence.state', to: :action_sequence_state - map_element 'ActionSequence.state2', to: :action_sequence_state2 - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'ActionSequence.action', to: :action_sequence_action + xml do + root "ActionSequence" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "transition", to: :transition + map_attribute "state", to: :state + map_attribute "state2", to: :state2 + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "ActionSequence.transition", to: :action_sequence_transition + map_element "ActionSequence.state", to: :action_sequence_state + map_element "ActionSequence.state2", to: :action_sequence_state2 + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "ActionSequence.action", to: :action_sequence_action + end + end end end diff --git a/lib/xmi/uml13/action_sequenceaction.rb b/lib/xmi/uml13/action_sequenceaction.rb index a5ee700..f83590f 100644 --- a/lib/xmi/uml13/action_sequenceaction.rb +++ b/lib/xmi/uml13/action_sequenceaction.rb @@ -1,38 +1,44 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'action' -require_relative 'call_action' -require_relative 'create_action' -require_relative 'destroy_action' -require_relative 'local_invocation' -require_relative 'return_action' -require_relative 'send_action' -require_relative 'terminate_action' -require_relative 'uninterpreted_action' +require "shale" -class ActionSequenceaction < Shale::Mapper - attribute :action, Action, collection: true - attribute :create_action, CreateAction, collection: true - attribute :call_action, CallAction, collection: true - attribute :local_invocation, LocalInvocation, collection: true - attribute :return_action, ReturnAction, collection: true - attribute :send_action, SendAction, collection: true - attribute :uninterpreted_action, UninterpretedAction, collection: true - attribute :terminate_action, TerminateAction, collection: true - attribute :destroy_action, DestroyAction, collection: true +require_relative "action" +require_relative "call_action" +require_relative "create_action" +require_relative "destroy_action" +require_relative "local_invocation" +require_relative "return_action" +require_relative "send_action" +require_relative "terminate_action" +require_relative "uninterpreted_action" - xml do - root 'ActionSequence.action' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ActionSequenceaction < Shale::Mapper + attribute :action, Action, collection: true + attribute :create_action, CreateAction, collection: true + attribute :call_action, CallAction, collection: true + attribute :local_invocation, LocalInvocation, collection: true + attribute :return_action, ReturnAction, collection: true + attribute :send_action, SendAction, collection: true + attribute :uninterpreted_action, UninterpretedAction, collection: true + attribute :terminate_action, TerminateAction, collection: true + attribute :destroy_action, DestroyAction, collection: true - map_element 'Action', to: :action - map_element 'CreateAction', to: :create_action - map_element 'CallAction', to: :call_action - map_element 'LocalInvocation', to: :local_invocation - map_element 'ReturnAction', to: :return_action - map_element 'SendAction', to: :send_action - map_element 'UninterpretedAction', to: :uninterpreted_action - map_element 'TerminateAction', to: :terminate_action - map_element 'DestroyAction', to: :destroy_action + xml do + root "ActionSequence.action" + namespace "omg.org/UML1.3", "UML" + + map_element "Action", to: :action + map_element "CreateAction", to: :create_action + map_element "CallAction", to: :call_action + map_element "LocalInvocation", to: :local_invocation + map_element "ReturnAction", to: :return_action + map_element "SendAction", to: :send_action + map_element "UninterpretedAction", to: :uninterpreted_action + map_element "TerminateAction", to: :terminate_action + map_element "DestroyAction", to: :destroy_action + end + end end end diff --git a/lib/xmi/uml13/action_sequencestate.rb b/lib/xmi/uml13/action_sequencestate.rb index 37d1163..ef0e4ed 100644 --- a/lib/xmi/uml13/action_sequencestate.rb +++ b/lib/xmi/uml13/action_sequencestate.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'state' +require "shale" -class ActionSequencestate < Shale::Mapper - attribute :state, State, collection: true +require_relative "state" - xml do - root 'ActionSequence.state' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ActionSequencestate < Shale::Mapper + attribute :state, State, collection: true - map_element 'State', to: :state + xml do + root "ActionSequence.state" + namespace "omg.org/UML1.3", "UML" + + map_element "State", to: :state + end + end end end diff --git a/lib/xmi/uml13/action_sequencestate2.rb b/lib/xmi/uml13/action_sequencestate2.rb index ff195a9..44c233b 100644 --- a/lib/xmi/uml13/action_sequencestate2.rb +++ b/lib/xmi/uml13/action_sequencestate2.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'state' +require "shale" -class ActionSequencestate2 < Shale::Mapper - attribute :state, State, collection: true +require_relative "state" - xml do - root 'ActionSequence.state2' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ActionSequencestate2 < Shale::Mapper + attribute :state, State, collection: true - map_element 'State', to: :state + xml do + root "ActionSequence.state2" + namespace "omg.org/UML1.3", "UML" + + map_element "State", to: :state + end + end end end diff --git a/lib/xmi/uml13/action_sequencetransition.rb b/lib/xmi/uml13/action_sequencetransition.rb index 823101d..1a74867 100644 --- a/lib/xmi/uml13/action_sequencetransition.rb +++ b/lib/xmi/uml13/action_sequencetransition.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'transition' +require "shale" -class ActionSequencetransition < Shale::Mapper - attribute :transition, Transition, collection: true +require_relative "transition" - xml do - root 'ActionSequence.transition' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ActionSequencetransition < Shale::Mapper + attribute :transition, Transition, collection: true - map_element 'Transition', to: :transition + xml do + root "ActionSequence.transition" + namespace "omg.org/UML1.3", "UML" + + map_element "Transition", to: :transition + end + end end end diff --git a/lib/xmi/uml13/action_state.rb b/lib/xmi/uml13/action_state.rb index eed6c3e..7082c23 100644 --- a/lib/xmi/uml13/action_state.rb +++ b/lib/xmi/uml13/action_state.rb @@ -1,151 +1,157 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'state_vertexincoming' -require_relative 'state_vertexoutgoing' -require_relative 'state_vertexparent' -require_relative 'stateclassifier_in_state' -require_relative 'statedeferred_event' -require_relative 'stateentry' -require_relative 'stateexit' -require_relative 'stateinternal_transition' -require_relative 'statestate_machine' -require_relative 'xm_iextension' +require "shale" -class ActionState < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :outgoing, Shale::Type::Value - attribute :incoming, Shale::Type::Value - attribute :parent, Shale::Type::Value - attribute :state_machine, Shale::Type::Value - attribute :deferred_event, Shale::Type::Value - attribute :classifier_in_state, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :state_vertex_outgoing, StateVertexoutgoing, collection: true - attribute :state_vertex_incoming, StateVertexincoming, collection: true - attribute :state_vertex_parent, StateVertexparent, collection: true - attribute :state_state_machine, StatestateMachine, collection: true - attribute :state_deferred_event, StatedeferredEvent, collection: true - attribute :state_classifier_in_state, StateclassifierInState, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :state_internal_transition, StateinternalTransition, collection: true - attribute :state_entry, Stateentry, collection: true - attribute :state_exit, Stateexit, collection: true +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "state_vertexincoming" +require_relative "state_vertexoutgoing" +require_relative "state_vertexparent" +require_relative "stateclassifier_in_state" +require_relative "statedeferred_event" +require_relative "stateentry" +require_relative "stateexit" +require_relative "stateinternal_transition" +require_relative "statestate_machine" +require_relative "xm_iextension" - xml do - root 'ActionState' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ActionState < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :outgoing, Shale::Type::Value + attribute :incoming, Shale::Type::Value + attribute :parent, Shale::Type::Value + attribute :state_machine, Shale::Type::Value + attribute :deferred_event, Shale::Type::Value + attribute :classifier_in_state, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :state_vertex_outgoing, StateVertexoutgoing, collection: true + attribute :state_vertex_incoming, StateVertexincoming, collection: true + attribute :state_vertex_parent, StateVertexparent, collection: true + attribute :state_state_machine, StatestateMachine, collection: true + attribute :state_deferred_event, StatedeferredEvent, collection: true + attribute :state_classifier_in_state, StateclassifierInState, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :state_internal_transition, StateinternalTransition, collection: true + attribute :state_entry, Stateentry, collection: true + attribute :state_exit, Stateexit, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'outgoing', to: :outgoing - map_attribute 'incoming', to: :incoming - map_attribute 'parent', to: :parent - map_attribute 'stateMachine', to: :state_machine - map_attribute 'deferredEvent', to: :deferred_event - map_attribute 'classifierInState', to: :classifier_in_state - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'StateVertex.outgoing', to: :state_vertex_outgoing - map_element 'StateVertex.incoming', to: :state_vertex_incoming - map_element 'StateVertex.parent', to: :state_vertex_parent - map_element 'State.stateMachine', to: :state_state_machine - map_element 'State.deferredEvent', to: :state_deferred_event - map_element 'State.classifierInState', to: :state_classifier_in_state - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'State.internalTransition', to: :state_internal_transition - map_element 'State.entry', to: :state_entry - map_element 'State.exit', to: :state_exit + xml do + root "ActionState" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "outgoing", to: :outgoing + map_attribute "incoming", to: :incoming + map_attribute "parent", to: :parent + map_attribute "stateMachine", to: :state_machine + map_attribute "deferredEvent", to: :deferred_event + map_attribute "classifierInState", to: :classifier_in_state + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "StateVertex.outgoing", to: :state_vertex_outgoing + map_element "StateVertex.incoming", to: :state_vertex_incoming + map_element "StateVertex.parent", to: :state_vertex_parent + map_element "State.stateMachine", to: :state_state_machine + map_element "State.deferredEvent", to: :state_deferred_event + map_element "State.classifierInState", to: :state_classifier_in_state + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "State.internalTransition", to: :state_internal_transition + map_element "State.entry", to: :state_entry + map_element "State.exit", to: :state_exit + end + end end end diff --git a/lib/xmi/uml13/actionaction_sequence.rb b/lib/xmi/uml13/actionaction_sequence.rb index c64b437..365cd98 100644 --- a/lib/xmi/uml13/actionaction_sequence.rb +++ b/lib/xmi/uml13/actionaction_sequence.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'action_sequence' +require "shale" -class ActionactionSequence < Shale::Mapper - attribute :action_sequence, ActionSequence, collection: true +require_relative "action_sequence" - xml do - root 'Action.actionSequence' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ActionactionSequence < Shale::Mapper + attribute :action_sequence, ActionSequence, collection: true - map_element 'ActionSequence', to: :action_sequence + xml do + root "Action.actionSequence" + namespace "omg.org/UML1.3", "UML" + + map_element "ActionSequence", to: :action_sequence + end + end end end diff --git a/lib/xmi/uml13/actionactual_argument.rb b/lib/xmi/uml13/actionactual_argument.rb index 85a9ee9..ad529c2 100644 --- a/lib/xmi/uml13/actionactual_argument.rb +++ b/lib/xmi/uml13/actionactual_argument.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'argument' +require "shale" -class ActionactualArgument < Shale::Mapper - attribute :argument, Argument, collection: true +require_relative "argument" - xml do - root 'Action.actualArgument' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ActionactualArgument < Shale::Mapper + attribute :argument, Argument, collection: true - map_element 'Argument', to: :argument + xml do + root "Action.actualArgument" + namespace "omg.org/UML1.3", "UML" + + map_element "Argument", to: :argument + end + end end end diff --git a/lib/xmi/uml13/actionis_asynchronous.rb b/lib/xmi/uml13/actionis_asynchronous.rb index 51e2cf9..c93e19b 100644 --- a/lib/xmi/uml13/actionis_asynchronous.rb +++ b/lib/xmi/uml13/actionis_asynchronous.rb @@ -1,12 +1,18 @@ -require 'shale' +# frozen_string_literal: true -class ActionisAsynchronous < Shale::Mapper - attribute :xmi_value, Shale::Type::String +require "shale" - xml do - root 'Action.isAsynchronous' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ActionisAsynchronous < Shale::Mapper + attribute :xmi_value, Shale::Type::String - map_attribute 'xmi.value', to: :xmi_value + xml do + root "Action.isAsynchronous" + namespace "omg.org/UML1.3", "UML" + + map_attribute "xmi.value", to: :xmi_value + end + end end end diff --git a/lib/xmi/uml13/actionmessage.rb b/lib/xmi/uml13/actionmessage.rb index 4d0a15e..bd4743d 100644 --- a/lib/xmi/uml13/actionmessage.rb +++ b/lib/xmi/uml13/actionmessage.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'message' +require "shale" -class Actionmessage < Shale::Mapper - attribute :message, Message, collection: true +require_relative "message" - xml do - root 'Action.message' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Actionmessage < Shale::Mapper + attribute :message, Message, collection: true - map_element 'Message', to: :message + xml do + root "Action.message" + namespace "omg.org/UML1.3", "UML" + + map_element "Message", to: :message + end + end end end diff --git a/lib/xmi/uml13/actionrecurrence.rb b/lib/xmi/uml13/actionrecurrence.rb index bfc818f..d695ae1 100644 --- a/lib/xmi/uml13/actionrecurrence.rb +++ b/lib/xmi/uml13/actionrecurrence.rb @@ -1,26 +1,32 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'boolean_expression' -require_relative 'expression' -require_relative 'object_set_expression' -require_relative 'procedure_expression' -require_relative 'time_expression' +require "shale" -class Actionrecurrence < Shale::Mapper - attribute :expression, Expression - attribute :procedure_expression, ProcedureExpression - attribute :object_set_expression, ObjectSetExpression - attribute :time_expression, TimeExpression - attribute :boolean_expression, BooleanExpression +require_relative "boolean_expression" +require_relative "expression" +require_relative "object_set_expression" +require_relative "procedure_expression" +require_relative "time_expression" - xml do - root 'Action.recurrence' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Actionrecurrence < Shale::Mapper + attribute :expression, Expression + attribute :procedure_expression, ProcedureExpression + attribute :object_set_expression, ObjectSetExpression + attribute :time_expression, TimeExpression + attribute :boolean_expression, BooleanExpression - map_element 'Expression', to: :expression - map_element 'ProcedureExpression', to: :procedure_expression - map_element 'ObjectSetExpression', to: :object_set_expression - map_element 'TimeExpression', to: :time_expression - map_element 'BooleanExpression', to: :boolean_expression + xml do + root "Action.recurrence" + namespace "omg.org/UML1.3", "UML" + + map_element "Expression", to: :expression + map_element "ProcedureExpression", to: :procedure_expression + map_element "ObjectSetExpression", to: :object_set_expression + map_element "TimeExpression", to: :time_expression + map_element "BooleanExpression", to: :boolean_expression + end + end end end diff --git a/lib/xmi/uml13/actionrequest.rb b/lib/xmi/uml13/actionrequest.rb index 737193d..652b4d6 100644 --- a/lib/xmi/uml13/actionrequest.rb +++ b/lib/xmi/uml13/actionrequest.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'request' +require "shale" -class Actionrequest < Shale::Mapper - attribute :request, Request, collection: true +require_relative "request" - xml do - root 'Action.request' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Actionrequest < Shale::Mapper + attribute :request, Request, collection: true - map_element 'Request', to: :request + xml do + root "Action.request" + namespace "omg.org/UML1.3", "UML" + + map_element "Request", to: :request + end + end end end diff --git a/lib/xmi/uml13/actionscript.rb b/lib/xmi/uml13/actionscript.rb index 96262bf..749b949 100644 --- a/lib/xmi/uml13/actionscript.rb +++ b/lib/xmi/uml13/actionscript.rb @@ -1,16 +1,22 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'xm_ireference' +require "shale" -class Actionscript < Shale::Mapper - attribute :content, Shale::Type::String - attribute :xmi_reference, XMIreference, collection: true +require_relative "xm_ireference" - xml do - root 'Action.script' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Actionscript < Shale::Mapper + attribute :content, Shale::Type::String + attribute :xmi_reference, XMIreference, collection: true - map_content to: :content - map_element 'XMI.reference', to: :xmi_reference, prefix: nil, namespace: nil + xml do + root "Action.script" + namespace "omg.org/UML1.3", "UML" + + map_content to: :content + map_element "XMI.reference", to: :xmi_reference, prefix: nil, namespace: nil + end + end end end diff --git a/lib/xmi/uml13/actiontarget.rb b/lib/xmi/uml13/actiontarget.rb index 8ddd25e..1f5df9c 100644 --- a/lib/xmi/uml13/actiontarget.rb +++ b/lib/xmi/uml13/actiontarget.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'object_set_expression' +require "shale" -class Actiontarget < Shale::Mapper - attribute :object_set_expression, ObjectSetExpression +require_relative "object_set_expression" - xml do - root 'Action.target' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Actiontarget < Shale::Mapper + attribute :object_set_expression, ObjectSetExpression - map_element 'ObjectSetExpression', to: :object_set_expression + xml do + root "Action.target" + namespace "omg.org/UML1.3", "UML" + + map_element "ObjectSetExpression", to: :object_set_expression + end + end end end diff --git a/lib/xmi/uml13/activity_model.rb b/lib/xmi/uml13/activity_model.rb index 48d3a60..8b95860 100644 --- a/lib/xmi/uml13/activity_model.rb +++ b/lib/xmi/uml13/activity_model.rb @@ -1,131 +1,137 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'activity_modelpartition' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'state_machinecontext' -require_relative 'state_machinesubmachine_state' -require_relative 'state_machinetop' -require_relative 'state_machinetransitions' -require_relative 'xm_iextension' +require "shale" -class ActivityModel < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :context, Shale::Type::Value - attribute :submachine_state, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :state_machine_context, StateMachinecontext, collection: true - attribute :state_machine_submachine_state, StateMachinesubmachineState, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :state_machine_top, StateMachinetop, collection: true - attribute :state_machine_transitions, StateMachinetransitions, collection: true - attribute :activity_model_partition, ActivityModelpartition, collection: true +require_relative "activity_modelpartition" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "state_machinecontext" +require_relative "state_machinesubmachine_state" +require_relative "state_machinetop" +require_relative "state_machinetransitions" +require_relative "xm_iextension" - xml do - root 'ActivityModel' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ActivityModel < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :context, Shale::Type::Value + attribute :submachine_state, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :state_machine_context, StateMachinecontext, collection: true + attribute :state_machine_submachine_state, StateMachinesubmachineState, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :state_machine_top, StateMachinetop, collection: true + attribute :state_machine_transitions, StateMachinetransitions, collection: true + attribute :activity_model_partition, ActivityModelpartition, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'context', to: :context - map_attribute 'submachineState', to: :submachine_state - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'StateMachine.context', to: :state_machine_context - map_element 'StateMachine.submachineState', to: :state_machine_submachine_state - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'StateMachine.top', to: :state_machine_top - map_element 'StateMachine.transitions', to: :state_machine_transitions - map_element 'ActivityModel.partition', to: :activity_model_partition + xml do + root "ActivityModel" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "context", to: :context + map_attribute "submachineState", to: :submachine_state + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "StateMachine.context", to: :state_machine_context + map_element "StateMachine.submachineState", to: :state_machine_submachine_state + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "StateMachine.top", to: :state_machine_top + map_element "StateMachine.transitions", to: :state_machine_transitions + map_element "ActivityModel.partition", to: :activity_model_partition + end + end end end diff --git a/lib/xmi/uml13/activity_modelpartition.rb b/lib/xmi/uml13/activity_modelpartition.rb index c2e0c72..73f0f18 100644 --- a/lib/xmi/uml13/activity_modelpartition.rb +++ b/lib/xmi/uml13/activity_modelpartition.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'partition' +require "shale" -class ActivityModelpartition < Shale::Mapper - attribute :partition, Partition, collection: true +require_relative "partition" - xml do - root 'ActivityModel.partition' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ActivityModelpartition < Shale::Mapper + attribute :partition, Partition, collection: true - map_element 'Partition', to: :partition + xml do + root "ActivityModel.partition" + namespace "omg.org/UML1.3", "UML" + + map_element "Partition", to: :partition + end + end end end diff --git a/lib/xmi/uml13/activity_state.rb b/lib/xmi/uml13/activity_state.rb index 14f1098..d2bc17a 100644 --- a/lib/xmi/uml13/activity_state.rb +++ b/lib/xmi/uml13/activity_state.rb @@ -1,150 +1,156 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'state_vertexincoming' -require_relative 'state_vertexoutgoing' -require_relative 'state_vertexparent' -require_relative 'stateclassifier_in_state' -require_relative 'statedeferred_event' -require_relative 'stateentry' -require_relative 'stateexit' -require_relative 'stateinternal_transition' -require_relative 'xm_iextension' +require "shale" -class ActivityState < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :outgoing, Shale::Type::Value - attribute :incoming, Shale::Type::Value - attribute :parent, Shale::Type::Value - attribute :state_state_machine, Shale::Type::Value - attribute :deferred_event, Shale::Type::Value - attribute :classifier_in_state, Shale::Type::Value - attribute :submachine_state_state_machine, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :state_vertex_outgoing, StateVertexoutgoing, collection: true - attribute :state_vertex_incoming, StateVertexincoming, collection: true - attribute :state_vertex_parent, StateVertexparent, collection: true - attribute :state_deferred_event, StatedeferredEvent, collection: true - attribute :state_classifier_in_state, StateclassifierInState, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :state_internal_transition, StateinternalTransition, collection: true - attribute :state_entry, Stateentry, collection: true - attribute :state_exit, Stateexit, collection: true +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "state_vertexincoming" +require_relative "state_vertexoutgoing" +require_relative "state_vertexparent" +require_relative "stateclassifier_in_state" +require_relative "statedeferred_event" +require_relative "stateentry" +require_relative "stateexit" +require_relative "stateinternal_transition" +require_relative "xm_iextension" - xml do - root 'ActivityState' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ActivityState < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :outgoing, Shale::Type::Value + attribute :incoming, Shale::Type::Value + attribute :parent, Shale::Type::Value + attribute :state_state_machine, Shale::Type::Value + attribute :deferred_event, Shale::Type::Value + attribute :classifier_in_state, Shale::Type::Value + attribute :submachine_state_state_machine, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :state_vertex_outgoing, StateVertexoutgoing, collection: true + attribute :state_vertex_incoming, StateVertexincoming, collection: true + attribute :state_vertex_parent, StateVertexparent, collection: true + attribute :state_deferred_event, StatedeferredEvent, collection: true + attribute :state_classifier_in_state, StateclassifierInState, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :state_internal_transition, StateinternalTransition, collection: true + attribute :state_entry, Stateentry, collection: true + attribute :state_exit, Stateexit, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'outgoing', to: :outgoing - map_attribute 'incoming', to: :incoming - map_attribute 'parent', to: :parent - map_attribute 'State.stateMachine', to: :state_state_machine - map_attribute 'deferredEvent', to: :deferred_event - map_attribute 'classifierInState', to: :classifier_in_state - map_attribute 'SubmachineState.stateMachine', to: :submachine_state_state_machine - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'StateVertex.outgoing', to: :state_vertex_outgoing - map_element 'StateVertex.incoming', to: :state_vertex_incoming - map_element 'StateVertex.parent', to: :state_vertex_parent - map_element 'State.deferredEvent', to: :state_deferred_event - map_element 'State.classifierInState', to: :state_classifier_in_state - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'State.internalTransition', to: :state_internal_transition - map_element 'State.entry', to: :state_entry - map_element 'State.exit', to: :state_exit + xml do + root "ActivityState" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "outgoing", to: :outgoing + map_attribute "incoming", to: :incoming + map_attribute "parent", to: :parent + map_attribute "State.stateMachine", to: :state_state_machine + map_attribute "deferredEvent", to: :deferred_event + map_attribute "classifierInState", to: :classifier_in_state + map_attribute "SubmachineState.stateMachine", to: :submachine_state_state_machine + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "StateVertex.outgoing", to: :state_vertex_outgoing + map_element "StateVertex.incoming", to: :state_vertex_incoming + map_element "StateVertex.parent", to: :state_vertex_parent + map_element "State.deferredEvent", to: :state_deferred_event + map_element "State.classifierInState", to: :state_classifier_in_state + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "State.internalTransition", to: :state_internal_transition + map_element "State.entry", to: :state_entry + map_element "State.exit", to: :state_exit + end + end end end diff --git a/lib/xmi/uml13/actor.rb b/lib/xmi/uml13/actor.rb index ed46b82..6e76a0f 100644 --- a/lib/xmi/uml13/actor.rb +++ b/lib/xmi/uml13/actor.rb @@ -1,192 +1,198 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'classifierassociation_end' -require_relative 'classifierclassifier_in_state' -require_relative 'classifierclassifier_role' -require_relative 'classifiercreate_action' -require_relative 'classifierfeature' -require_relative 'classifierinstance' -require_relative 'classifierparameter' -require_relative 'classifierparticipant' -require_relative 'classifierrealization' -require_relative 'classifierspecification' -require_relative 'classifierstructural_feature' -require_relative 'generalizable_elementgeneralization' -require_relative 'generalizable_elementis_abstract' -require_relative 'generalizable_elementis_leaf' -require_relative 'generalizable_elementis_root' -require_relative 'generalizable_elementspecialization' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'namespaceowned_element' -require_relative 'xm_iextension' +require "shale" -class Actor < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :is_root, Shale::Type::String - attribute :is_leaf, Shale::Type::String - attribute :is_abstract, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :model_element_collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :generalization, Shale::Type::Value - attribute :specialization, Shale::Type::Value - attribute :parameter, Shale::Type::Value - attribute :structural_feature, Shale::Type::Value - attribute :specification, Shale::Type::Value - attribute :realization, Shale::Type::Value - attribute :association_end, Shale::Type::Value - attribute :participant, Shale::Type::Value - attribute :create_action, Shale::Type::Value - attribute :instance, Shale::Type::Value - attribute :classifier_collaboration, Shale::Type::Value - attribute :classifier_role, Shale::Type::Value - attribute :classifier_in_state, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :generalizable_element_is_root, GeneralizableElementisRoot, collection: true - attribute :generalizable_element_is_leaf, GeneralizableElementisLeaf, collection: true - attribute :generalizable_element_is_abstract, GeneralizableElementisAbstract, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :generalizable_element_generalization, GeneralizableElementgeneralization, collection: true - attribute :generalizable_element_specialization, GeneralizableElementspecialization, collection: true - attribute :classifier_parameter, Classifierparameter, collection: true - attribute :classifier_structural_feature, ClassifierstructuralFeature, collection: true - attribute :classifier_specification, Classifierspecification, collection: true - attribute :classifier_realization, Classifierrealization, collection: true - attribute :classifier_association_end, ClassifierassociationEnd, collection: true - attribute :classifier_participant, Classifierparticipant, collection: true - attribute :classifier_create_action, ClassifiercreateAction, collection: true - attribute :classifier_instance, Classifierinstance, collection: true - attribute :classifier_classifier_role, ClassifierclassifierRole, collection: true - attribute :classifier_classifier_in_state, ClassifierclassifierInState, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :namespace_owned_element, NamespaceownedElement, collection: true - attribute :classifier_feature, Classifierfeature, collection: true +require_relative "classifierassociation_end" +require_relative "classifierclassifier_in_state" +require_relative "classifierclassifier_role" +require_relative "classifiercreate_action" +require_relative "classifierfeature" +require_relative "classifierinstance" +require_relative "classifierparameter" +require_relative "classifierparticipant" +require_relative "classifierrealization" +require_relative "classifierspecification" +require_relative "classifierstructural_feature" +require_relative "generalizable_elementgeneralization" +require_relative "generalizable_elementis_abstract" +require_relative "generalizable_elementis_leaf" +require_relative "generalizable_elementis_root" +require_relative "generalizable_elementspecialization" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "namespaceowned_element" +require_relative "xm_iextension" - xml do - root 'Actor' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Actor < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :is_root, Shale::Type::String + attribute :is_leaf, Shale::Type::String + attribute :is_abstract, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :model_element_collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :generalization, Shale::Type::Value + attribute :specialization, Shale::Type::Value + attribute :parameter, Shale::Type::Value + attribute :structural_feature, Shale::Type::Value + attribute :specification, Shale::Type::Value + attribute :realization, Shale::Type::Value + attribute :association_end, Shale::Type::Value + attribute :participant, Shale::Type::Value + attribute :create_action, Shale::Type::Value + attribute :instance, Shale::Type::Value + attribute :classifier_collaboration, Shale::Type::Value + attribute :classifier_role, Shale::Type::Value + attribute :classifier_in_state, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :generalizable_element_is_root, GeneralizableElementisRoot, collection: true + attribute :generalizable_element_is_leaf, GeneralizableElementisLeaf, collection: true + attribute :generalizable_element_is_abstract, GeneralizableElementisAbstract, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :generalizable_element_generalization, GeneralizableElementgeneralization, collection: true + attribute :generalizable_element_specialization, GeneralizableElementspecialization, collection: true + attribute :classifier_parameter, Classifierparameter, collection: true + attribute :classifier_structural_feature, ClassifierstructuralFeature, collection: true + attribute :classifier_specification, Classifierspecification, collection: true + attribute :classifier_realization, Classifierrealization, collection: true + attribute :classifier_association_end, ClassifierassociationEnd, collection: true + attribute :classifier_participant, Classifierparticipant, collection: true + attribute :classifier_create_action, ClassifiercreateAction, collection: true + attribute :classifier_instance, Classifierinstance, collection: true + attribute :classifier_classifier_role, ClassifierclassifierRole, collection: true + attribute :classifier_classifier_in_state, ClassifierclassifierInState, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :namespace_owned_element, NamespaceownedElement, collection: true + attribute :classifier_feature, Classifierfeature, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'isRoot', to: :is_root - map_attribute 'isLeaf', to: :is_leaf - map_attribute 'isAbstract', to: :is_abstract - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'ModelElement.collaboration', to: :model_element_collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'generalization', to: :generalization - map_attribute 'specialization', to: :specialization - map_attribute 'parameter', to: :parameter - map_attribute 'structuralFeature', to: :structural_feature - map_attribute 'specification', to: :specification - map_attribute 'realization', to: :realization - map_attribute 'associationEnd', to: :association_end - map_attribute 'participant', to: :participant - map_attribute 'createAction', to: :create_action - map_attribute 'instance', to: :instance - map_attribute 'Classifier.collaboration', to: :classifier_collaboration - map_attribute 'classifierRole', to: :classifier_role - map_attribute 'classifierInState', to: :classifier_in_state - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'GeneralizableElement.isRoot', to: :generalizable_element_is_root - map_element 'GeneralizableElement.isLeaf', to: :generalizable_element_is_leaf - map_element 'GeneralizableElement.isAbstract', to: :generalizable_element_is_abstract - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'GeneralizableElement.generalization', to: :generalizable_element_generalization - map_element 'GeneralizableElement.specialization', to: :generalizable_element_specialization - map_element 'Classifier.parameter', to: :classifier_parameter - map_element 'Classifier.structuralFeature', to: :classifier_structural_feature - map_element 'Classifier.specification', to: :classifier_specification - map_element 'Classifier.realization', to: :classifier_realization - map_element 'Classifier.associationEnd', to: :classifier_association_end - map_element 'Classifier.participant', to: :classifier_participant - map_element 'Classifier.createAction', to: :classifier_create_action - map_element 'Classifier.instance', to: :classifier_instance - map_element 'Classifier.classifierRole', to: :classifier_classifier_role - map_element 'Classifier.classifierInState', to: :classifier_classifier_in_state - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Namespace.ownedElement', to: :namespace_owned_element - map_element 'Classifier.feature', to: :classifier_feature + xml do + root "Actor" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "isRoot", to: :is_root + map_attribute "isLeaf", to: :is_leaf + map_attribute "isAbstract", to: :is_abstract + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "ModelElement.collaboration", to: :model_element_collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "generalization", to: :generalization + map_attribute "specialization", to: :specialization + map_attribute "parameter", to: :parameter + map_attribute "structuralFeature", to: :structural_feature + map_attribute "specification", to: :specification + map_attribute "realization", to: :realization + map_attribute "associationEnd", to: :association_end + map_attribute "participant", to: :participant + map_attribute "createAction", to: :create_action + map_attribute "instance", to: :instance + map_attribute "Classifier.collaboration", to: :classifier_collaboration + map_attribute "classifierRole", to: :classifier_role + map_attribute "classifierInState", to: :classifier_in_state + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "GeneralizableElement.isRoot", to: :generalizable_element_is_root + map_element "GeneralizableElement.isLeaf", to: :generalizable_element_is_leaf + map_element "GeneralizableElement.isAbstract", to: :generalizable_element_is_abstract + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "GeneralizableElement.generalization", to: :generalizable_element_generalization + map_element "GeneralizableElement.specialization", to: :generalizable_element_specialization + map_element "Classifier.parameter", to: :classifier_parameter + map_element "Classifier.structuralFeature", to: :classifier_structural_feature + map_element "Classifier.specification", to: :classifier_specification + map_element "Classifier.realization", to: :classifier_realization + map_element "Classifier.associationEnd", to: :classifier_association_end + map_element "Classifier.participant", to: :classifier_participant + map_element "Classifier.createAction", to: :classifier_create_action + map_element "Classifier.instance", to: :classifier_instance + map_element "Classifier.classifierRole", to: :classifier_classifier_role + map_element "Classifier.classifierInState", to: :classifier_classifier_in_state + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Namespace.ownedElement", to: :namespace_owned_element + map_element "Classifier.feature", to: :classifier_feature + end + end end end diff --git a/lib/xmi/uml13/argument.rb b/lib/xmi/uml13/argument.rb index 82c5747..b37aba8 100644 --- a/lib/xmi/uml13/argument.rb +++ b/lib/xmi/uml13/argument.rb @@ -1,32 +1,38 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'argumentaction' -require_relative 'argumentvalue' -require_relative 'xm_iextension' +require "shale" -class Argument < Shale::Mapper - attribute :action, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :argument_value, Argumentvalue, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :argument_action, Argumentaction, collection: true +require_relative "argumentaction" +require_relative "argumentvalue" +require_relative "xm_iextension" - xml do - root 'Argument' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Argument < Shale::Mapper + attribute :action, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :argument_value, Argumentvalue, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :argument_action, Argumentaction, collection: true - map_attribute 'action', to: :action - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'Argument.value', to: :argument_value - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'Argument.action', to: :argument_action + xml do + root "Argument" + namespace "omg.org/UML1.3", "UML" + + map_attribute "action", to: :action + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "Argument.value", to: :argument_value + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "Argument.action", to: :argument_action + end + end end end diff --git a/lib/xmi/uml13/argumentaction.rb b/lib/xmi/uml13/argumentaction.rb index fc5b402..3ac946d 100644 --- a/lib/xmi/uml13/argumentaction.rb +++ b/lib/xmi/uml13/argumentaction.rb @@ -1,14 +1,23 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'action' +require "shale" -class Argumentaction < Shale::Mapper - attribute :action, Action, collection: true +require_relative "action" - xml do - root 'Argument.action' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Action < Shale::Mapper + end - map_element 'Action', to: :action + class Argumentaction < Shale::Mapper + attribute :action, Action, collection: true + + xml do + root "Argument.action" + namespace "omg.org/UML1.3", "UML" + + map_element "Action", to: :action + end + end end end diff --git a/lib/xmi/uml13/argumentvalue.rb b/lib/xmi/uml13/argumentvalue.rb index acc4e41..5cda404 100644 --- a/lib/xmi/uml13/argumentvalue.rb +++ b/lib/xmi/uml13/argumentvalue.rb @@ -1,26 +1,32 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'boolean_expression' -require_relative 'expression' -require_relative 'object_set_expression' -require_relative 'procedure_expression' -require_relative 'time_expression' +require "shale" -class Argumentvalue < Shale::Mapper - attribute :expression, Expression - attribute :procedure_expression, ProcedureExpression - attribute :object_set_expression, ObjectSetExpression - attribute :time_expression, TimeExpression - attribute :boolean_expression, BooleanExpression +require_relative "boolean_expression" +require_relative "expression" +require_relative "object_set_expression" +require_relative "procedure_expression" +require_relative "time_expression" - xml do - root 'Argument.value' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Argumentvalue < Shale::Mapper + attribute :expression, Expression + attribute :procedure_expression, ProcedureExpression + attribute :object_set_expression, ObjectSetExpression + attribute :time_expression, TimeExpression + attribute :boolean_expression, BooleanExpression - map_element 'Expression', to: :expression - map_element 'ProcedureExpression', to: :procedure_expression - map_element 'ObjectSetExpression', to: :object_set_expression - map_element 'TimeExpression', to: :time_expression - map_element 'BooleanExpression', to: :boolean_expression + xml do + root "Argument.value" + namespace "omg.org/UML1.3", "UML" + + map_element "Expression", to: :expression + map_element "ProcedureExpression", to: :procedure_expression + map_element "ObjectSetExpression", to: :object_set_expression + map_element "TimeExpression", to: :time_expression + map_element "BooleanExpression", to: :boolean_expression + end + end end end diff --git a/lib/xmi/uml13/association.rb b/lib/xmi/uml13/association.rb index a6e7a2d..971ab27 100644 --- a/lib/xmi/uml13/association.rb +++ b/lib/xmi/uml13/association.rb @@ -1,153 +1,188 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'associationassociation_end' -require_relative 'associationconnection' -require_relative 'associationlink' -require_relative 'generalizable_elementgeneralization' -require_relative 'generalizable_elementis_abstract' -require_relative 'generalizable_elementis_leaf' -require_relative 'generalizable_elementis_root' -require_relative 'generalizable_elementspecialization' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'namespaceowned_element' -require_relative 'xm_iextension' +require "shale" -class Association < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :is_root, Shale::Type::String - attribute :is_leaf, Shale::Type::String - attribute :is_abstract, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :generalization, Shale::Type::Value - attribute :specialization, Shale::Type::Value - attribute :link, Shale::Type::Value - attribute :association_end, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :generalizable_element_is_root, GeneralizableElementisRoot, collection: true - attribute :generalizable_element_is_leaf, GeneralizableElementisLeaf, collection: true - attribute :generalizable_element_is_abstract, GeneralizableElementisAbstract, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :generalizable_element_generalization, GeneralizableElementgeneralization, collection: true - attribute :generalizable_element_specialization, GeneralizableElementspecialization, collection: true - attribute :association_link, Associationlink, collection: true - attribute :association_association_end, AssociationassociationEnd, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :namespace_owned_element, NamespaceownedElement, collection: true - attribute :association_connection, Associationconnection, collection: true +puts "HERE" +require_relative "associationassociation_end" +puts "associationassociation_end" +require_relative "associationconnection" +puts "associationconnection" +require_relative "associationlink" +puts "associationlink" +require_relative "generalizable_elementgeneralization" +puts "generalizable_elementgeneralization" +require_relative "generalizable_elementis_abstract" +puts "generalizable_elementis_abstract" +require_relative "generalizable_elementis_leaf" +puts "generalizable_elementis_leaf" +require_relative "generalizable_elementis_root" +puts "generalizable_elementis_root" +require_relative "generalizable_elementspecialization" +puts "generalizable_elementspecialization" +require_relative "model_elementbehavior" +puts "model_elementbehavior" +require_relative "model_elementbinding" +puts "model_elementbinding" +require_relative "model_elementcollaboration" +puts "model_elementcollaboration" +require_relative "model_elementconstraint" +puts "model_elementconstraint" +require_relative "model_elementelement_reference" +puts "model_elementelement_reference" +require_relative "model_elementimplementation" +puts "model_elementimplementation" +require_relative "model_elementname" +puts "model_elementname" +require_relative "model_elementnamespace" +puts "model_elementnamespace" +require_relative "model_elementpartition" +puts "model_elementpartition" +require_relative "model_elementpresentation" +puts "model_elementpresentation" +require_relative "model_elementprovision" +puts "model_elementprovision" +require_relative "model_elementrequirement" +puts "model_elementrequirement" +require_relative "model_elementstereotype" +puts "model_elementstereotype" +require_relative "model_elementtagged_value" +puts "model_elementtagged_value" +require_relative "model_elementtemplate" +puts "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +puts "model_elementtemplate_parameter" +require_relative "model_elementview" +puts "model_elementview" +require_relative "model_elementvisibility" +puts "model_elementvisibility" +require_relative "namespaceowned_element" +puts "namespaceowned_element" +require_relative "xm_iextension" +puts "xm_iextension" - xml do - root 'Association' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Association < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :is_root, Shale::Type::String + attribute :is_leaf, Shale::Type::String + attribute :is_abstract, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :generalization, Shale::Type::Value + attribute :specialization, Shale::Type::Value + attribute :link, Shale::Type::Value + attribute :association_end, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :generalizable_element_is_root, GeneralizableElementisRoot, collection: true + attribute :generalizable_element_is_leaf, GeneralizableElementisLeaf, collection: true + attribute :generalizable_element_is_abstract, GeneralizableElementisAbstract, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :generalizable_element_generalization, GeneralizableElementgeneralization, collection: true + attribute :generalizable_element_specialization, GeneralizableElementspecialization, collection: true + attribute :association_link, Associationlink, collection: true + attribute :association_association_end, AssociationassociationEnd, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :namespace_owned_element, NamespaceownedElement, collection: true + attribute :association_connection, Associationconnection, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'isRoot', to: :is_root - map_attribute 'isLeaf', to: :is_leaf - map_attribute 'isAbstract', to: :is_abstract - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'generalization', to: :generalization - map_attribute 'specialization', to: :specialization - map_attribute 'link', to: :link - map_attribute 'associationEnd', to: :association_end - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'GeneralizableElement.isRoot', to: :generalizable_element_is_root - map_element 'GeneralizableElement.isLeaf', to: :generalizable_element_is_leaf - map_element 'GeneralizableElement.isAbstract', to: :generalizable_element_is_abstract - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'GeneralizableElement.generalization', to: :generalizable_element_generalization - map_element 'GeneralizableElement.specialization', to: :generalizable_element_specialization - map_element 'Association.link', to: :association_link - map_element 'Association.associationEnd', to: :association_association_end - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Namespace.ownedElement', to: :namespace_owned_element - map_element 'Association.connection', to: :association_connection + xml do + root "Association" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "isRoot", to: :is_root + map_attribute "isLeaf", to: :is_leaf + map_attribute "isAbstract", to: :is_abstract + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "generalization", to: :generalization + map_attribute "specialization", to: :specialization + map_attribute "link", to: :link + map_attribute "associationEnd", to: :association_end + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "GeneralizableElement.isRoot", to: :generalizable_element_is_root + map_element "GeneralizableElement.isLeaf", to: :generalizable_element_is_leaf + map_element "GeneralizableElement.isAbstract", to: :generalizable_element_is_abstract + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "GeneralizableElement.generalization", to: :generalizable_element_generalization + map_element "GeneralizableElement.specialization", to: :generalizable_element_specialization + map_element "Association.link", to: :association_link + map_element "Association.associationEnd", to: :association_association_end + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Namespace.ownedElement", to: :namespace_owned_element + map_element "Association.connection", to: :association_connection + end + end end end diff --git a/lib/xmi/uml13/association_class.rb b/lib/xmi/uml13/association_class.rb index 59a3f7f..20188e1 100644 --- a/lib/xmi/uml13/association_class.rb +++ b/lib/xmi/uml13/association_class.rb @@ -1,204 +1,210 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'associationconnection' -require_relative 'associationlink' -require_relative 'classifierclassifier_in_state' -require_relative 'classifierclassifier_role' -require_relative 'classifiercreate_action' -require_relative 'classifierfeature' -require_relative 'classifierinstance' -require_relative 'classifierparameter' -require_relative 'classifierparticipant' -require_relative 'classifierrealization' -require_relative 'classifierspecification' -require_relative 'classifierstructural_feature' -require_relative 'classis_active' -require_relative 'generalizable_elementgeneralization' -require_relative 'generalizable_elementis_abstract' -require_relative 'generalizable_elementis_leaf' -require_relative 'generalizable_elementis_root' -require_relative 'generalizable_elementspecialization' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'namespaceowned_element' -require_relative 'xm_iextension' +require "shale" -class AssociationClass < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :is_root, Shale::Type::String - attribute :is_leaf, Shale::Type::String - attribute :is_abstract, Shale::Type::String - attribute :is_active, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :model_element_collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :generalization, Shale::Type::Value - attribute :specialization, Shale::Type::Value - attribute :parameter, Shale::Type::Value - attribute :structural_feature, Shale::Type::Value - attribute :specification, Shale::Type::Value - attribute :realization, Shale::Type::Value - attribute :classifier_association_end, Shale::Type::Value - attribute :participant, Shale::Type::Value - attribute :create_action, Shale::Type::Value - attribute :instance, Shale::Type::Value - attribute :classifier_collaboration, Shale::Type::Value - attribute :classifier_role, Shale::Type::Value - attribute :classifier_in_state, Shale::Type::Value - attribute :link, Shale::Type::Value - attribute :association_association_end, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :generalizable_element_is_root, GeneralizableElementisRoot, collection: true - attribute :generalizable_element_is_leaf, GeneralizableElementisLeaf, collection: true - attribute :generalizable_element_is_abstract, GeneralizableElementisAbstract, collection: true - attribute :class_is_active, ClassisActive, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :generalizable_element_generalization, GeneralizableElementgeneralization, collection: true - attribute :generalizable_element_specialization, GeneralizableElementspecialization, collection: true - attribute :classifier_parameter, Classifierparameter, collection: true - attribute :classifier_structural_feature, ClassifierstructuralFeature, collection: true - attribute :classifier_specification, Classifierspecification, collection: true - attribute :classifier_realization, Classifierrealization, collection: true - attribute :classifier_participant, Classifierparticipant, collection: true - attribute :classifier_create_action, ClassifiercreateAction, collection: true - attribute :classifier_instance, Classifierinstance, collection: true - attribute :classifier_classifier_role, ClassifierclassifierRole, collection: true - attribute :classifier_classifier_in_state, ClassifierclassifierInState, collection: true - attribute :association_link, Associationlink, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :namespace_owned_element, NamespaceownedElement, collection: true - attribute :classifier_feature, Classifierfeature, collection: true - attribute :association_connection, Associationconnection, collection: true +require_relative "associationconnection" +require_relative "associationlink" +require_relative "classifierclassifier_in_state" +require_relative "classifierclassifier_role" +require_relative "classifiercreate_action" +require_relative "classifierfeature" +require_relative "classifierinstance" +require_relative "classifierparameter" +require_relative "classifierparticipant" +require_relative "classifierrealization" +require_relative "classifierspecification" +require_relative "classifierstructural_feature" +require_relative "classis_active" +require_relative "generalizable_elementgeneralization" +require_relative "generalizable_elementis_abstract" +require_relative "generalizable_elementis_leaf" +require_relative "generalizable_elementis_root" +require_relative "generalizable_elementspecialization" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "namespaceowned_element" +require_relative "xm_iextension" - xml do - root 'AssociationClass' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class AssociationClass < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :is_root, Shale::Type::String + attribute :is_leaf, Shale::Type::String + attribute :is_abstract, Shale::Type::String + attribute :is_active, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :model_element_collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :generalization, Shale::Type::Value + attribute :specialization, Shale::Type::Value + attribute :parameter, Shale::Type::Value + attribute :structural_feature, Shale::Type::Value + attribute :specification, Shale::Type::Value + attribute :realization, Shale::Type::Value + attribute :classifier_association_end, Shale::Type::Value + attribute :participant, Shale::Type::Value + attribute :create_action, Shale::Type::Value + attribute :instance, Shale::Type::Value + attribute :classifier_collaboration, Shale::Type::Value + attribute :classifier_role, Shale::Type::Value + attribute :classifier_in_state, Shale::Type::Value + attribute :link, Shale::Type::Value + attribute :association_association_end, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :generalizable_element_is_root, GeneralizableElementisRoot, collection: true + attribute :generalizable_element_is_leaf, GeneralizableElementisLeaf, collection: true + attribute :generalizable_element_is_abstract, GeneralizableElementisAbstract, collection: true + attribute :class_is_active, ClassisActive, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :generalizable_element_generalization, GeneralizableElementgeneralization, collection: true + attribute :generalizable_element_specialization, GeneralizableElementspecialization, collection: true + attribute :classifier_parameter, Classifierparameter, collection: true + attribute :classifier_structural_feature, ClassifierstructuralFeature, collection: true + attribute :classifier_specification, Classifierspecification, collection: true + attribute :classifier_realization, Classifierrealization, collection: true + attribute :classifier_participant, Classifierparticipant, collection: true + attribute :classifier_create_action, ClassifiercreateAction, collection: true + attribute :classifier_instance, Classifierinstance, collection: true + attribute :classifier_classifier_role, ClassifierclassifierRole, collection: true + attribute :classifier_classifier_in_state, ClassifierclassifierInState, collection: true + attribute :association_link, Associationlink, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :namespace_owned_element, NamespaceownedElement, collection: true + attribute :classifier_feature, Classifierfeature, collection: true + attribute :association_connection, Associationconnection, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'isRoot', to: :is_root - map_attribute 'isLeaf', to: :is_leaf - map_attribute 'isAbstract', to: :is_abstract - map_attribute 'isActive', to: :is_active - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'ModelElement.collaboration', to: :model_element_collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'generalization', to: :generalization - map_attribute 'specialization', to: :specialization - map_attribute 'parameter', to: :parameter - map_attribute 'structuralFeature', to: :structural_feature - map_attribute 'specification', to: :specification - map_attribute 'realization', to: :realization - map_attribute 'Classifier.associationEnd', to: :classifier_association_end - map_attribute 'participant', to: :participant - map_attribute 'createAction', to: :create_action - map_attribute 'instance', to: :instance - map_attribute 'Classifier.collaboration', to: :classifier_collaboration - map_attribute 'classifierRole', to: :classifier_role - map_attribute 'classifierInState', to: :classifier_in_state - map_attribute 'link', to: :link - map_attribute 'Association.associationEnd', to: :association_association_end - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'GeneralizableElement.isRoot', to: :generalizable_element_is_root - map_element 'GeneralizableElement.isLeaf', to: :generalizable_element_is_leaf - map_element 'GeneralizableElement.isAbstract', to: :generalizable_element_is_abstract - map_element 'Class.isActive', to: :class_is_active - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'GeneralizableElement.generalization', to: :generalizable_element_generalization - map_element 'GeneralizableElement.specialization', to: :generalizable_element_specialization - map_element 'Classifier.parameter', to: :classifier_parameter - map_element 'Classifier.structuralFeature', to: :classifier_structural_feature - map_element 'Classifier.specification', to: :classifier_specification - map_element 'Classifier.realization', to: :classifier_realization - map_element 'Classifier.participant', to: :classifier_participant - map_element 'Classifier.createAction', to: :classifier_create_action - map_element 'Classifier.instance', to: :classifier_instance - map_element 'Classifier.classifierRole', to: :classifier_classifier_role - map_element 'Classifier.classifierInState', to: :classifier_classifier_in_state - map_element 'Association.link', to: :association_link - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Namespace.ownedElement', to: :namespace_owned_element - map_element 'Classifier.feature', to: :classifier_feature - map_element 'Association.connection', to: :association_connection + xml do + root "AssociationClass" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "isRoot", to: :is_root + map_attribute "isLeaf", to: :is_leaf + map_attribute "isAbstract", to: :is_abstract + map_attribute "isActive", to: :is_active + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "ModelElement.collaboration", to: :model_element_collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "generalization", to: :generalization + map_attribute "specialization", to: :specialization + map_attribute "parameter", to: :parameter + map_attribute "structuralFeature", to: :structural_feature + map_attribute "specification", to: :specification + map_attribute "realization", to: :realization + map_attribute "Classifier.associationEnd", to: :classifier_association_end + map_attribute "participant", to: :participant + map_attribute "createAction", to: :create_action + map_attribute "instance", to: :instance + map_attribute "Classifier.collaboration", to: :classifier_collaboration + map_attribute "classifierRole", to: :classifier_role + map_attribute "classifierInState", to: :classifier_in_state + map_attribute "link", to: :link + map_attribute "Association.associationEnd", to: :association_association_end + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "GeneralizableElement.isRoot", to: :generalizable_element_is_root + map_element "GeneralizableElement.isLeaf", to: :generalizable_element_is_leaf + map_element "GeneralizableElement.isAbstract", to: :generalizable_element_is_abstract + map_element "Class.isActive", to: :class_is_active + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "GeneralizableElement.generalization", to: :generalizable_element_generalization + map_element "GeneralizableElement.specialization", to: :generalizable_element_specialization + map_element "Classifier.parameter", to: :classifier_parameter + map_element "Classifier.structuralFeature", to: :classifier_structural_feature + map_element "Classifier.specification", to: :classifier_specification + map_element "Classifier.realization", to: :classifier_realization + map_element "Classifier.participant", to: :classifier_participant + map_element "Classifier.createAction", to: :classifier_create_action + map_element "Classifier.instance", to: :classifier_instance + map_element "Classifier.classifierRole", to: :classifier_classifier_role + map_element "Classifier.classifierInState", to: :classifier_classifier_in_state + map_element "Association.link", to: :association_link + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Namespace.ownedElement", to: :namespace_owned_element + map_element "Classifier.feature", to: :classifier_feature + map_element "Association.connection", to: :association_connection + end + end end end diff --git a/lib/xmi/uml13/association_end.rb b/lib/xmi/uml13/association_end.rb index 7c707c3..040230a 100644 --- a/lib/xmi/uml13/association_end.rb +++ b/lib/xmi/uml13/association_end.rb @@ -1,170 +1,176 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'association_endaggregation' -require_relative 'association_endassociation' -require_relative 'association_endassociation_end_role' -require_relative 'association_endchangeable' -require_relative 'association_endis_navigable' -require_relative 'association_endis_ordered' -require_relative 'association_endlink_end' -require_relative 'association_endmultiplicity' -require_relative 'association_endqualifier' -require_relative 'association_endspecification' -require_relative 'association_endtarget_scope' -require_relative 'association_endtype' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'xm_iextension' +require "shale" -class AssociationEnd < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :is_navigable, Shale::Type::String - attribute :is_ordered, Shale::Type::String - attribute :aggregation, Shale::Type::String - attribute :multiplicity, Shale::Type::Value - attribute :changeable, Shale::Type::String - attribute :target_scope, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :type, Shale::Type::Value - attribute :specification, Shale::Type::Value - attribute :association, Shale::Type::Value - attribute :link_end, Shale::Type::Value - attribute :association_end_role, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :association_end_is_navigable, AssociationEndisNavigable, collection: true - attribute :association_end_is_ordered, AssociationEndisOrdered, collection: true - attribute :association_end_aggregation, AssociationEndaggregation, collection: true - attribute :association_end_multiplicity, AssociationEndmultiplicity, collection: true - attribute :association_end_changeable, AssociationEndchangeable, collection: true - attribute :association_end_target_scope, AssociationEndtargetScope, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :association_end_type, AssociationEndtype, collection: true - attribute :association_end_specification, AssociationEndspecification, collection: true - attribute :association_end_association, AssociationEndassociation, collection: true - attribute :association_end_link_end, AssociationEndlinkEnd, collection: true - attribute :association_end_association_end_role, AssociationEndassociationEndRole, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :association_end_qualifier, AssociationEndqualifier, collection: true +require_relative "association_endaggregation" +require_relative "association_endassociation" +require_relative "association_endassociation_end_role" +require_relative "association_endchangeable" +require_relative "association_endis_navigable" +require_relative "association_endis_ordered" +require_relative "association_endlink_end" +require_relative "association_endmultiplicity" +require_relative "association_endqualifier" +require_relative "association_endspecification" +require_relative "association_endtarget_scope" +require_relative "association_endtype" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "xm_iextension" - xml do - root 'AssociationEnd' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class AssociationEnd < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :is_navigable, Shale::Type::String + attribute :is_ordered, Shale::Type::String + attribute :aggregation, Shale::Type::String + attribute :multiplicity, Shale::Type::Value + attribute :changeable, Shale::Type::String + attribute :target_scope, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :type, Shale::Type::Value + attribute :specification, Shale::Type::Value + attribute :association, Shale::Type::Value + attribute :link_end, Shale::Type::Value + attribute :association_end_role, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :association_end_is_navigable, AssociationEndisNavigable, collection: true + attribute :association_end_is_ordered, AssociationEndisOrdered, collection: true + attribute :association_end_aggregation, AssociationEndaggregation, collection: true + attribute :association_end_multiplicity, AssociationEndmultiplicity, collection: true + attribute :association_end_changeable, AssociationEndchangeable, collection: true + attribute :association_end_target_scope, AssociationEndtargetScope, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :association_end_type, AssociationEndtype, collection: true + attribute :association_end_specification, AssociationEndspecification, collection: true + attribute :association_end_association, AssociationEndassociation, collection: true + attribute :association_end_link_end, AssociationEndlinkEnd, collection: true + attribute :association_end_association_end_role, AssociationEndassociationEndRole, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :association_end_qualifier, AssociationEndqualifier, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'isNavigable', to: :is_navigable - map_attribute 'isOrdered', to: :is_ordered - map_attribute 'aggregation', to: :aggregation - map_attribute 'multiplicity', to: :multiplicity - map_attribute 'changeable', to: :changeable - map_attribute 'targetScope', to: :target_scope - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'type', to: :type - map_attribute 'specification', to: :specification - map_attribute 'association', to: :association - map_attribute 'linkEnd', to: :link_end - map_attribute 'associationEndRole', to: :association_end_role - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'AssociationEnd.isNavigable', to: :association_end_is_navigable - map_element 'AssociationEnd.isOrdered', to: :association_end_is_ordered - map_element 'AssociationEnd.aggregation', to: :association_end_aggregation - map_element 'AssociationEnd.multiplicity', to: :association_end_multiplicity - map_element 'AssociationEnd.changeable', to: :association_end_changeable - map_element 'AssociationEnd.targetScope', to: :association_end_target_scope - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'AssociationEnd.type', to: :association_end_type - map_element 'AssociationEnd.specification', to: :association_end_specification - map_element 'AssociationEnd.association', to: :association_end_association - map_element 'AssociationEnd.linkEnd', to: :association_end_link_end - map_element 'AssociationEnd.associationEndRole', to: :association_end_association_end_role - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'AssociationEnd.qualifier', to: :association_end_qualifier + xml do + root "AssociationEnd" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "isNavigable", to: :is_navigable + map_attribute "isOrdered", to: :is_ordered + map_attribute "aggregation", to: :aggregation + map_attribute "multiplicity", to: :multiplicity + map_attribute "changeable", to: :changeable + map_attribute "targetScope", to: :target_scope + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "type", to: :type + map_attribute "specification", to: :specification + map_attribute "association", to: :association + map_attribute "linkEnd", to: :link_end + map_attribute "associationEndRole", to: :association_end_role + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "AssociationEnd.isNavigable", to: :association_end_is_navigable + map_element "AssociationEnd.isOrdered", to: :association_end_is_ordered + map_element "AssociationEnd.aggregation", to: :association_end_aggregation + map_element "AssociationEnd.multiplicity", to: :association_end_multiplicity + map_element "AssociationEnd.changeable", to: :association_end_changeable + map_element "AssociationEnd.targetScope", to: :association_end_target_scope + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "AssociationEnd.type", to: :association_end_type + map_element "AssociationEnd.specification", to: :association_end_specification + map_element "AssociationEnd.association", to: :association_end_association + map_element "AssociationEnd.linkEnd", to: :association_end_link_end + map_element "AssociationEnd.associationEndRole", to: :association_end_association_end_role + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "AssociationEnd.qualifier", to: :association_end_qualifier + end + end end end diff --git a/lib/xmi/uml13/association_end_role.rb b/lib/xmi/uml13/association_end_role.rb index 0c0bd96..778e279 100644 --- a/lib/xmi/uml13/association_end_role.rb +++ b/lib/xmi/uml13/association_end_role.rb @@ -1,180 +1,186 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'association_end_roleassociation_role' -require_relative 'association_end_rolebase' -require_relative 'association_endaggregation' -require_relative 'association_endassociation' -require_relative 'association_endassociation_end_role' -require_relative 'association_endchangeable' -require_relative 'association_endis_navigable' -require_relative 'association_endis_ordered' -require_relative 'association_endlink_end' -require_relative 'association_endmultiplicity' -require_relative 'association_endqualifier' -require_relative 'association_endspecification' -require_relative 'association_endtarget_scope' -require_relative 'association_endtype' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'xm_iextension' +require "shale" -class AssociationEndRole < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :is_navigable, Shale::Type::String - attribute :is_ordered, Shale::Type::String - attribute :aggregation, Shale::Type::String - attribute :multiplicity, Shale::Type::Value - attribute :changeable, Shale::Type::String - attribute :target_scope, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :type, Shale::Type::Value - attribute :specification, Shale::Type::Value - attribute :association, Shale::Type::Value - attribute :link_end, Shale::Type::Value - attribute :association_end_role, Shale::Type::Value - attribute :association_role, Shale::Type::Value - attribute :base, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :association_end_is_navigable, AssociationEndisNavigable, collection: true - attribute :association_end_is_ordered, AssociationEndisOrdered, collection: true - attribute :association_end_aggregation, AssociationEndaggregation, collection: true - attribute :association_end_multiplicity, AssociationEndmultiplicity, collection: true - attribute :association_end_changeable, AssociationEndchangeable, collection: true - attribute :association_end_target_scope, AssociationEndtargetScope, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :association_end_type, AssociationEndtype, collection: true - attribute :association_end_specification, AssociationEndspecification, collection: true - attribute :association_end_association, AssociationEndassociation, collection: true - attribute :association_end_link_end, AssociationEndlinkEnd, collection: true - attribute :association_end_association_end_role, AssociationEndassociationEndRole, collection: true - attribute :association_end_role_association_role, AssociationEndRoleassociationRole, collection: true - attribute :association_end_role_base, AssociationEndRolebase, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :association_end_qualifier, AssociationEndqualifier, collection: true +require_relative "association_end_roleassociation_role" +require_relative "association_end_rolebase" +require_relative "association_endaggregation" +require_relative "association_endassociation" +require_relative "association_endassociation_end_role" +require_relative "association_endchangeable" +require_relative "association_endis_navigable" +require_relative "association_endis_ordered" +require_relative "association_endlink_end" +require_relative "association_endmultiplicity" +require_relative "association_endqualifier" +require_relative "association_endspecification" +require_relative "association_endtarget_scope" +require_relative "association_endtype" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "xm_iextension" - xml do - root 'AssociationEndRole' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class AssociationEndRole < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :is_navigable, Shale::Type::String + attribute :is_ordered, Shale::Type::String + attribute :aggregation, Shale::Type::String + attribute :multiplicity, Shale::Type::Value + attribute :changeable, Shale::Type::String + attribute :target_scope, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :type, Shale::Type::Value + attribute :specification, Shale::Type::Value + attribute :association, Shale::Type::Value + attribute :link_end, Shale::Type::Value + attribute :association_end_role, Shale::Type::Value + attribute :association_role, Shale::Type::Value + attribute :base, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :association_end_is_navigable, AssociationEndisNavigable, collection: true + attribute :association_end_is_ordered, AssociationEndisOrdered, collection: true + attribute :association_end_aggregation, AssociationEndaggregation, collection: true + attribute :association_end_multiplicity, AssociationEndmultiplicity, collection: true + attribute :association_end_changeable, AssociationEndchangeable, collection: true + attribute :association_end_target_scope, AssociationEndtargetScope, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :association_end_type, AssociationEndtype, collection: true + attribute :association_end_specification, AssociationEndspecification, collection: true + attribute :association_end_association, AssociationEndassociation, collection: true + attribute :association_end_link_end, AssociationEndlinkEnd, collection: true + attribute :association_end_association_end_role, AssociationEndassociationEndRole, collection: true + attribute :association_end_role_association_role, AssociationEndRoleassociationRole, collection: true + attribute :association_end_role_base, AssociationEndRolebase, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :association_end_qualifier, AssociationEndqualifier, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'isNavigable', to: :is_navigable - map_attribute 'isOrdered', to: :is_ordered - map_attribute 'aggregation', to: :aggregation - map_attribute 'multiplicity', to: :multiplicity - map_attribute 'changeable', to: :changeable - map_attribute 'targetScope', to: :target_scope - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'type', to: :type - map_attribute 'specification', to: :specification - map_attribute 'association', to: :association - map_attribute 'linkEnd', to: :link_end - map_attribute 'associationEndRole', to: :association_end_role - map_attribute 'associationRole', to: :association_role - map_attribute 'base', to: :base - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'AssociationEnd.isNavigable', to: :association_end_is_navigable - map_element 'AssociationEnd.isOrdered', to: :association_end_is_ordered - map_element 'AssociationEnd.aggregation', to: :association_end_aggregation - map_element 'AssociationEnd.multiplicity', to: :association_end_multiplicity - map_element 'AssociationEnd.changeable', to: :association_end_changeable - map_element 'AssociationEnd.targetScope', to: :association_end_target_scope - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'AssociationEnd.type', to: :association_end_type - map_element 'AssociationEnd.specification', to: :association_end_specification - map_element 'AssociationEnd.association', to: :association_end_association - map_element 'AssociationEnd.linkEnd', to: :association_end_link_end - map_element 'AssociationEnd.associationEndRole', to: :association_end_association_end_role - map_element 'AssociationEndRole.associationRole', to: :association_end_role_association_role - map_element 'AssociationEndRole.base', to: :association_end_role_base - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'AssociationEnd.qualifier', to: :association_end_qualifier + xml do + root "AssociationEndRole" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "isNavigable", to: :is_navigable + map_attribute "isOrdered", to: :is_ordered + map_attribute "aggregation", to: :aggregation + map_attribute "multiplicity", to: :multiplicity + map_attribute "changeable", to: :changeable + map_attribute "targetScope", to: :target_scope + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "type", to: :type + map_attribute "specification", to: :specification + map_attribute "association", to: :association + map_attribute "linkEnd", to: :link_end + map_attribute "associationEndRole", to: :association_end_role + map_attribute "associationRole", to: :association_role + map_attribute "base", to: :base + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "AssociationEnd.isNavigable", to: :association_end_is_navigable + map_element "AssociationEnd.isOrdered", to: :association_end_is_ordered + map_element "AssociationEnd.aggregation", to: :association_end_aggregation + map_element "AssociationEnd.multiplicity", to: :association_end_multiplicity + map_element "AssociationEnd.changeable", to: :association_end_changeable + map_element "AssociationEnd.targetScope", to: :association_end_target_scope + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "AssociationEnd.type", to: :association_end_type + map_element "AssociationEnd.specification", to: :association_end_specification + map_element "AssociationEnd.association", to: :association_end_association + map_element "AssociationEnd.linkEnd", to: :association_end_link_end + map_element "AssociationEnd.associationEndRole", to: :association_end_association_end_role + map_element "AssociationEndRole.associationRole", to: :association_end_role_association_role + map_element "AssociationEndRole.base", to: :association_end_role_base + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "AssociationEnd.qualifier", to: :association_end_qualifier + end + end end end diff --git a/lib/xmi/uml13/association_end_roleassociation_role.rb b/lib/xmi/uml13/association_end_roleassociation_role.rb index d65b2a3..6026a6e 100644 --- a/lib/xmi/uml13/association_end_roleassociation_role.rb +++ b/lib/xmi/uml13/association_end_roleassociation_role.rb @@ -1,14 +1,21 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'association_role' +require "shale" -class AssociationEndRoleassociationRole < Shale::Mapper - attribute :association_role, AssociationRole, collection: true +module Xmi + module Uml13 + class AssociationRole < Shale::Mapper + end - xml do - root 'AssociationEndRole.associationRole' - namespace 'omg.org/UML1.3', 'UML' + class AssociationEndRoleassociationRole < Shale::Mapper + attribute :association_role, AssociationRole, collection: true - map_element 'AssociationRole', to: :association_role + xml do + root "AssociationEndRole.associationRole" + namespace "omg.org/UML1.3", "UML" + + map_element "AssociationRole", to: :association_role + end + end end end diff --git a/lib/xmi/uml13/association_end_rolebase.rb b/lib/xmi/uml13/association_end_rolebase.rb index f7de58c..223772c 100644 --- a/lib/xmi/uml13/association_end_rolebase.rb +++ b/lib/xmi/uml13/association_end_rolebase.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'association_end' +require "shale" -class AssociationEndRolebase < Shale::Mapper - attribute :association_end, AssociationEnd, collection: true +require_relative "association_end" - xml do - root 'AssociationEndRole.base' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class AssociationEndRolebase < Shale::Mapper + attribute :association_end, AssociationEnd, collection: true - map_element 'AssociationEnd', to: :association_end + xml do + root "AssociationEndRole.base" + namespace "omg.org/UML1.3", "UML" + + map_element "AssociationEnd", to: :association_end + end + end end end diff --git a/lib/xmi/uml13/association_endaggregation.rb b/lib/xmi/uml13/association_endaggregation.rb index f286edb..e4daa2e 100644 --- a/lib/xmi/uml13/association_endaggregation.rb +++ b/lib/xmi/uml13/association_endaggregation.rb @@ -1,12 +1,18 @@ -require 'shale' +# frozen_string_literal: true -class AssociationEndaggregation < Shale::Mapper - attribute :xmi_value, Shale::Type::String +require "shale" - xml do - root 'AssociationEnd.aggregation' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class AssociationEndaggregation < Shale::Mapper + attribute :xmi_value, Shale::Type::String - map_attribute 'xmi.value', to: :xmi_value + xml do + root "AssociationEnd.aggregation" + namespace "omg.org/UML1.3", "UML" + + map_attribute "xmi.value", to: :xmi_value + end + end end end diff --git a/lib/xmi/uml13/association_endassociation.rb b/lib/xmi/uml13/association_endassociation.rb index 27800a8..5c3ab2b 100644 --- a/lib/xmi/uml13/association_endassociation.rb +++ b/lib/xmi/uml13/association_endassociation.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'association' +require "shale" -class AssociationEndassociation < Shale::Mapper - attribute :association, Association, collection: true +require_relative "association" - xml do - root 'AssociationEnd.association' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class AssociationEndassociation < Shale::Mapper + attribute :association, Association, collection: true - map_element 'Association', to: :association + xml do + root "AssociationEnd.association" + namespace "omg.org/UML1.3", "UML" + + map_element "Association", to: :association + end + end end end diff --git a/lib/xmi/uml13/association_endassociation_end_role.rb b/lib/xmi/uml13/association_endassociation_end_role.rb index eb48545..4ac22d8 100644 --- a/lib/xmi/uml13/association_endassociation_end_role.rb +++ b/lib/xmi/uml13/association_endassociation_end_role.rb @@ -1,14 +1,21 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'association_end_role' +require "shale" -class AssociationEndassociationEndRole < Shale::Mapper - attribute :association_end_role, AssociationEndRole, collection: true +module Xmi + module Uml13 + class AssociationEndRole < Shale::Mapper + end - xml do - root 'AssociationEnd.associationEndRole' - namespace 'omg.org/UML1.3', 'UML' + class AssociationEndassociationEndRole < Shale::Mapper + attribute :association_end_role, AssociationEndRole, collection: true - map_element 'AssociationEndRole', to: :association_end_role + xml do + root "AssociationEnd.associationEndRole" + namespace "omg.org/UML1.3", "UML" + + map_element "AssociationEndRole", to: :association_end_role + end + end end end diff --git a/lib/xmi/uml13/association_endchangeable.rb b/lib/xmi/uml13/association_endchangeable.rb index 3bbc4cf..fc3d03f 100644 --- a/lib/xmi/uml13/association_endchangeable.rb +++ b/lib/xmi/uml13/association_endchangeable.rb @@ -1,12 +1,18 @@ -require 'shale' +# frozen_string_literal: true -class AssociationEndchangeable < Shale::Mapper - attribute :xmi_value, Shale::Type::String +require "shale" - xml do - root 'AssociationEnd.changeable' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class AssociationEndchangeable < Shale::Mapper + attribute :xmi_value, Shale::Type::String - map_attribute 'xmi.value', to: :xmi_value + xml do + root "AssociationEnd.changeable" + namespace "omg.org/UML1.3", "UML" + + map_attribute "xmi.value", to: :xmi_value + end + end end end diff --git a/lib/xmi/uml13/association_endis_navigable.rb b/lib/xmi/uml13/association_endis_navigable.rb index 8bf2f84..9919888 100644 --- a/lib/xmi/uml13/association_endis_navigable.rb +++ b/lib/xmi/uml13/association_endis_navigable.rb @@ -1,12 +1,18 @@ -require 'shale' +# frozen_string_literal: true -class AssociationEndisNavigable < Shale::Mapper - attribute :xmi_value, Shale::Type::String +require "shale" - xml do - root 'AssociationEnd.isNavigable' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class AssociationEndisNavigable < Shale::Mapper + attribute :xmi_value, Shale::Type::String - map_attribute 'xmi.value', to: :xmi_value + xml do + root "AssociationEnd.isNavigable" + namespace "omg.org/UML1.3", "UML" + + map_attribute "xmi.value", to: :xmi_value + end + end end end diff --git a/lib/xmi/uml13/association_endis_ordered.rb b/lib/xmi/uml13/association_endis_ordered.rb index d07332a..cf59ffc 100644 --- a/lib/xmi/uml13/association_endis_ordered.rb +++ b/lib/xmi/uml13/association_endis_ordered.rb @@ -1,12 +1,18 @@ -require 'shale' +# frozen_string_literal: true -class AssociationEndisOrdered < Shale::Mapper - attribute :xmi_value, Shale::Type::String +require "shale" - xml do - root 'AssociationEnd.isOrdered' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class AssociationEndisOrdered < Shale::Mapper + attribute :xmi_value, Shale::Type::String - map_attribute 'xmi.value', to: :xmi_value + xml do + root "AssociationEnd.isOrdered" + namespace "omg.org/UML1.3", "UML" + + map_attribute "xmi.value", to: :xmi_value + end + end end end diff --git a/lib/xmi/uml13/association_endlink_end.rb b/lib/xmi/uml13/association_endlink_end.rb index 17b8d7c..a58e09a 100644 --- a/lib/xmi/uml13/association_endlink_end.rb +++ b/lib/xmi/uml13/association_endlink_end.rb @@ -1,14 +1,21 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'link_end' +require "shale" -class AssociationEndlinkEnd < Shale::Mapper - attribute :link_end, LinkEnd, collection: true +module Xmi + module Uml13 + class LinkEnd < Shale::Mapper + end - xml do - root 'AssociationEnd.linkEnd' - namespace 'omg.org/UML1.3', 'UML' + class AssociationEndlinkEnd < Shale::Mapper + attribute :link_end, LinkEnd, collection: true - map_element 'LinkEnd', to: :link_end + xml do + root "AssociationEnd.linkEnd" + namespace "omg.org/UML1.3", "UML" + + map_element "LinkEnd", to: :link_end + end + end end end diff --git a/lib/xmi/uml13/association_endmultiplicity.rb b/lib/xmi/uml13/association_endmultiplicity.rb index 097905b..b5b9cb6 100644 --- a/lib/xmi/uml13/association_endmultiplicity.rb +++ b/lib/xmi/uml13/association_endmultiplicity.rb @@ -1,16 +1,22 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'xm_ireference' +require "shale" -class AssociationEndmultiplicity < Shale::Mapper - attribute :content, Shale::Type::String - attribute :xmi_reference, XMIreference, collection: true +require_relative "xm_ireference" - xml do - root 'AssociationEnd.multiplicity' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class AssociationEndmultiplicity < Shale::Mapper + attribute :content, Shale::Type::String + attribute :xmi_reference, XMIreference, collection: true - map_content to: :content - map_element 'XMI.reference', to: :xmi_reference, prefix: nil, namespace: nil + xml do + root "AssociationEnd.multiplicity" + namespace "omg.org/UML1.3", "UML" + + map_content to: :content + map_element "XMI.reference", to: :xmi_reference, prefix: nil, namespace: nil + end + end end end diff --git a/lib/xmi/uml13/association_endqualifier.rb b/lib/xmi/uml13/association_endqualifier.rb index a7988fc..b8dcf83 100644 --- a/lib/xmi/uml13/association_endqualifier.rb +++ b/lib/xmi/uml13/association_endqualifier.rb @@ -1,14 +1,21 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'attribute' +require "shale" -class AssociationEndqualifier < Shale::Mapper - attribute :attribute, Attribute, collection: true +module Xmi + module Uml13 + class Attribute < Shale::Mapper + end - xml do - root 'AssociationEnd.qualifier' - namespace 'omg.org/UML1.3', 'UML' + class AssociationEndqualifier < Shale::Mapper + attribute :attribute, Attribute, collection: true - map_element 'Attribute', to: :attribute + xml do + root "AssociationEnd.qualifier" + namespace "omg.org/UML1.3", "UML" + + map_element "Attribute", to: :attribute + end + end end end diff --git a/lib/xmi/uml13/association_endspecification.rb b/lib/xmi/uml13/association_endspecification.rb index d748026..e1a97e2 100644 --- a/lib/xmi/uml13/association_endspecification.rb +++ b/lib/xmi/uml13/association_endspecification.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'classifier' +require "shale" -class AssociationEndspecification < Shale::Mapper - attribute :classifier, Classifier, collection: true +require_relative "classifier" - xml do - root 'AssociationEnd.specification' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class AssociationEndspecification < Shale::Mapper + attribute :classifier, Classifier, collection: true - map_element 'Classifier', to: :classifier + xml do + root "AssociationEnd.specification" + namespace "omg.org/UML1.3", "UML" + + map_element "Classifier", to: :classifier + end + end end end diff --git a/lib/xmi/uml13/association_endtarget_scope.rb b/lib/xmi/uml13/association_endtarget_scope.rb index edb1069..a726bca 100644 --- a/lib/xmi/uml13/association_endtarget_scope.rb +++ b/lib/xmi/uml13/association_endtarget_scope.rb @@ -1,12 +1,18 @@ -require 'shale' +# frozen_string_literal: true -class AssociationEndtargetScope < Shale::Mapper - attribute :xmi_value, Shale::Type::String +require "shale" - xml do - root 'AssociationEnd.targetScope' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class AssociationEndtargetScope < Shale::Mapper + attribute :xmi_value, Shale::Type::String - map_attribute 'xmi.value', to: :xmi_value + xml do + root "AssociationEnd.targetScope" + namespace "omg.org/UML1.3", "UML" + + map_attribute "xmi.value", to: :xmi_value + end + end end end diff --git a/lib/xmi/uml13/association_endtype.rb b/lib/xmi/uml13/association_endtype.rb index 045fa4e..2692c0f 100644 --- a/lib/xmi/uml13/association_endtype.rb +++ b/lib/xmi/uml13/association_endtype.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'classifier' +require "shale" -class AssociationEndtype < Shale::Mapper - attribute :classifier, Classifier, collection: true +require_relative "classifier" - xml do - root 'AssociationEnd.type' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class AssociationEndtype < Shale::Mapper + attribute :classifier, Classifier, collection: true - map_element 'Classifier', to: :classifier + xml do + root "AssociationEnd.type" + namespace "omg.org/UML1.3", "UML" + + map_element "Classifier", to: :classifier + end + end end end diff --git a/lib/xmi/uml13/association_role.rb b/lib/xmi/uml13/association_role.rb index 50e758c..f413c41 100644 --- a/lib/xmi/uml13/association_role.rb +++ b/lib/xmi/uml13/association_role.rb @@ -1,162 +1,198 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'association_rolebase' -require_relative 'association_rolemultiplicity' -require_relative 'associationassociation_end' -require_relative 'associationconnection' -require_relative 'associationlink' -require_relative 'generalizable_elementgeneralization' -require_relative 'generalizable_elementis_abstract' -require_relative 'generalizable_elementis_leaf' -require_relative 'generalizable_elementis_root' -require_relative 'generalizable_elementspecialization' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'namespaceowned_element' -require_relative 'xm_iextension' +require "shale" -class AssociationRole < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :is_root, Shale::Type::String - attribute :is_leaf, Shale::Type::String - attribute :is_abstract, Shale::Type::String - attribute :multiplicity, Shale::Type::Value - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :model_element_namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :generalization, Shale::Type::Value - attribute :specialization, Shale::Type::Value - attribute :link, Shale::Type::Value - attribute :association_end, Shale::Type::Value - attribute :base, Shale::Type::Value - attribute :association_role_namespace, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :generalizable_element_is_root, GeneralizableElementisRoot, collection: true - attribute :generalizable_element_is_leaf, GeneralizableElementisLeaf, collection: true - attribute :generalizable_element_is_abstract, GeneralizableElementisAbstract, collection: true - attribute :association_role_multiplicity, AssociationRolemultiplicity, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :generalizable_element_generalization, GeneralizableElementgeneralization, collection: true - attribute :generalizable_element_specialization, GeneralizableElementspecialization, collection: true - attribute :association_link, Associationlink, collection: true - attribute :association_association_end, AssociationassociationEnd, collection: true - attribute :association_role_base, AssociationRolebase, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :namespace_owned_element, NamespaceownedElement, collection: true - attribute :association_connection, Associationconnection, collection: true +puts "HERE" +require_relative "association_rolebase" +puts "association_role: association_rolebase" +require_relative "association_rolemultiplicity" +puts "association_role: association_rolemultiplicity" +require_relative "associationassociation_end" +puts "association_role: associationassociation_end" +require_relative "associationconnection" +puts "association_role: associationconnection" +require_relative "associationlink" +puts "association_role: associationlink" +require_relative "generalizable_elementgeneralization" +puts "association_role: generalizable_elementgeneralization" +require_relative "generalizable_elementis_abstract" +puts "association_role: generalizable_elementis_abstract" +require_relative "generalizable_elementis_leaf" +puts "association_role: generalizable_elementis_leaf" +require_relative "generalizable_elementis_root" +puts "association_role: generalizable_elementis_root" +require_relative "generalizable_elementspecialization" +puts "association_role: generalizable_elementspecialization" +require_relative "model_elementbehavior" +puts "association_role: model_elementbehavior" +require_relative "model_elementbinding" +puts "association_role: model_elementbinding" +require_relative "model_elementcollaboration" +puts "association_role: model_elementcollaboration" +require_relative "model_elementconstraint" +puts "association_role: model_elementconstraint" +require_relative "model_elementelement_reference" +puts "association_role: model_elementelement_reference" +require_relative "model_elementimplementation" +puts "association_role: model_elementimplementation" +require_relative "model_elementname" +puts "association_role: model_elementname" +require_relative "model_elementpartition" +puts "association_role: model_elementpartition" +require_relative "model_elementpresentation" +puts "association_role: model_elementpresentation" +require_relative "model_elementprovision" +puts "association_role: model_elementprovision" +require_relative "model_elementrequirement" +puts "association_role: model_elementrequirement" +require_relative "model_elementstereotype" +puts "association_role: model_elementstereotype" +require_relative "model_elementtagged_value" +puts "association_role: model_elementtagged_value" +require_relative "model_elementtemplate" +puts "association_role: model_elementtemplate" +require_relative "model_elementtemplate_parameter" +puts "association_role: model_elementtemplate_parameter" +require_relative "model_elementview" +puts "association_role: model_elementview" +require_relative "model_elementvisibility" +puts "association_role: model_elementvisibility" +require_relative "namespaceowned_element" +puts "association_role: namespaceowned_element" +require_relative "xm_iextension" +puts "association_role: xm_iextension" - xml do - root 'AssociationRole' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class AssociationRole < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :is_root, Shale::Type::String + attribute :is_leaf, Shale::Type::String + attribute :is_abstract, Shale::Type::String + attribute :multiplicity, Shale::Type::Value + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :model_element_namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :generalization, Shale::Type::Value + attribute :specialization, Shale::Type::Value + attribute :link, Shale::Type::Value + attribute :association_end, Shale::Type::Value + attribute :base, Shale::Type::Value + attribute :association_role_namespace, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :generalizable_element_is_root, GeneralizableElementisRoot, collection: true + attribute :generalizable_element_is_leaf, GeneralizableElementisLeaf, collection: true + attribute :generalizable_element_is_abstract, GeneralizableElementisAbstract, collection: true + attribute :association_role_multiplicity, AssociationRolemultiplicity, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :generalizable_element_generalization, GeneralizableElementgeneralization, collection: true + attribute :generalizable_element_specialization, GeneralizableElementspecialization, collection: true + attribute :association_link, Associationlink, collection: true + attribute :association_association_end, AssociationassociationEnd, collection: true + attribute :association_role_base, AssociationRolebase, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :namespace_owned_element, NamespaceownedElement, collection: true + attribute :association_connection, Associationconnection, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'isRoot', to: :is_root - map_attribute 'isLeaf', to: :is_leaf - map_attribute 'isAbstract', to: :is_abstract - map_attribute 'multiplicity', to: :multiplicity - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'ModelElement.namespace', to: :model_element_namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'generalization', to: :generalization - map_attribute 'specialization', to: :specialization - map_attribute 'link', to: :link - map_attribute 'associationEnd', to: :association_end - map_attribute 'base', to: :base - map_attribute 'AssociationRole.namespace', to: :association_role_namespace - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'GeneralizableElement.isRoot', to: :generalizable_element_is_root - map_element 'GeneralizableElement.isLeaf', to: :generalizable_element_is_leaf - map_element 'GeneralizableElement.isAbstract', to: :generalizable_element_is_abstract - map_element 'AssociationRole.multiplicity', to: :association_role_multiplicity - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'GeneralizableElement.generalization', to: :generalizable_element_generalization - map_element 'GeneralizableElement.specialization', to: :generalizable_element_specialization - map_element 'Association.link', to: :association_link - map_element 'Association.associationEnd', to: :association_association_end - map_element 'AssociationRole.base', to: :association_role_base - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Namespace.ownedElement', to: :namespace_owned_element - map_element 'Association.connection', to: :association_connection + xml do + root "AssociationRole" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "isRoot", to: :is_root + map_attribute "isLeaf", to: :is_leaf + map_attribute "isAbstract", to: :is_abstract + map_attribute "multiplicity", to: :multiplicity + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "ModelElement.namespace", to: :model_element_namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "generalization", to: :generalization + map_attribute "specialization", to: :specialization + map_attribute "link", to: :link + map_attribute "associationEnd", to: :association_end + map_attribute "base", to: :base + map_attribute "AssociationRole.namespace", to: :association_role_namespace + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "GeneralizableElement.isRoot", to: :generalizable_element_is_root + map_element "GeneralizableElement.isLeaf", to: :generalizable_element_is_leaf + map_element "GeneralizableElement.isAbstract", to: :generalizable_element_is_abstract + map_element "AssociationRole.multiplicity", to: :association_role_multiplicity + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "GeneralizableElement.generalization", to: :generalizable_element_generalization + map_element "GeneralizableElement.specialization", to: :generalizable_element_specialization + map_element "Association.link", to: :association_link + map_element "Association.associationEnd", to: :association_association_end + map_element "AssociationRole.base", to: :association_role_base + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Namespace.ownedElement", to: :namespace_owned_element + map_element "Association.connection", to: :association_connection + end + end end end diff --git a/lib/xmi/uml13/association_rolebase.rb b/lib/xmi/uml13/association_rolebase.rb index 4e62c5e..1053f31 100644 --- a/lib/xmi/uml13/association_rolebase.rb +++ b/lib/xmi/uml13/association_rolebase.rb @@ -1,14 +1,24 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'association' +require "shale" -class AssociationRolebase < Shale::Mapper - attribute :association, Association, collection: true +# require_relative "association" +puts "association_rolebase: association" - xml do - root 'AssociationRole.base' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Association < Shale::Mapper + end - map_element 'Association', to: :association + class AssociationRolebase < Shale::Mapper + attribute :association, Association, collection: true + + xml do + root "AssociationRole.base" + namespace "omg.org/UML1.3", "UML" + + map_element "Association", to: :association + end + end end end diff --git a/lib/xmi/uml13/association_rolemultiplicity.rb b/lib/xmi/uml13/association_rolemultiplicity.rb index 8cba092..de73ad6 100644 --- a/lib/xmi/uml13/association_rolemultiplicity.rb +++ b/lib/xmi/uml13/association_rolemultiplicity.rb @@ -1,16 +1,22 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'xm_ireference' +require "shale" -class AssociationRolemultiplicity < Shale::Mapper - attribute :content, Shale::Type::String - attribute :xmi_reference, XMIreference, collection: true +require_relative "xm_ireference" - xml do - root 'AssociationRole.multiplicity' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class AssociationRolemultiplicity < Shale::Mapper + attribute :content, Shale::Type::String + attribute :xmi_reference, XMIreference, collection: true - map_content to: :content - map_element 'XMI.reference', to: :xmi_reference, prefix: nil, namespace: nil + xml do + root "AssociationRole.multiplicity" + namespace "omg.org/UML1.3", "UML" + + map_content to: :content + map_element "XMI.reference", to: :xmi_reference, prefix: nil, namespace: nil + end + end end end diff --git a/lib/xmi/uml13/association_rolenamespace.rb b/lib/xmi/uml13/association_rolenamespace.rb index 2248adb..0657fb8 100644 --- a/lib/xmi/uml13/association_rolenamespace.rb +++ b/lib/xmi/uml13/association_rolenamespace.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'collaboration' +require "shale" -class AssociationRolenamespace < Shale::Mapper - attribute :collaboration, Collaboration, collection: true +require_relative "collaboration" - xml do - root 'AssociationRole.namespace' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class AssociationRolenamespace < Shale::Mapper + attribute :collaboration, Collaboration, collection: true - map_element 'Collaboration', to: :collaboration + xml do + root "AssociationRole.namespace" + namespace "omg.org/UML1.3", "UML" + + map_element "Collaboration", to: :collaboration + end + end end end diff --git a/lib/xmi/uml13/associationassociation_end.rb b/lib/xmi/uml13/associationassociation_end.rb index 9615464..d4f9262 100644 --- a/lib/xmi/uml13/associationassociation_end.rb +++ b/lib/xmi/uml13/associationassociation_end.rb @@ -1,14 +1,21 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'association_role' +require "shale" -class AssociationassociationEnd < Shale::Mapper - attribute :association_role, AssociationRole, collection: true +require_relative "association_role" +puts "association_role" - xml do - root 'Association.associationEnd' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class AssociationassociationEnd < Shale::Mapper + attribute :association_role, AssociationRole, collection: true - map_element 'AssociationRole', to: :association_role + xml do + root "Association.associationEnd" + namespace "omg.org/UML1.3", "UML" + + map_element "AssociationRole", to: :association_role + end + end end end diff --git a/lib/xmi/uml13/associationconnection.rb b/lib/xmi/uml13/associationconnection.rb index 028a90c..cdea8da 100644 --- a/lib/xmi/uml13/associationconnection.rb +++ b/lib/xmi/uml13/associationconnection.rb @@ -1,17 +1,25 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'association_end' -require_relative 'association_end_role' +require "shale" -class Associationconnection < Shale::Mapper - attribute :association_end, AssociationEnd, collection: true - attribute :association_end_role, AssociationEndRole, collection: true +require_relative "association_end" +puts "association_end" +require_relative "association_end_role" +puts "association_end_role" - xml do - root 'Association.connection' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Associationconnection < Shale::Mapper + attribute :association_end, AssociationEnd, collection: true + attribute :association_end_role, AssociationEndRole, collection: true - map_element 'AssociationEnd', to: :association_end - map_element 'AssociationEndRole', to: :association_end_role + xml do + root "Association.connection" + namespace "omg.org/UML1.3", "UML" + + map_element "AssociationEnd", to: :association_end + map_element "AssociationEndRole", to: :association_end_role + end + end end end diff --git a/lib/xmi/uml13/associationlink.rb b/lib/xmi/uml13/associationlink.rb index 270ca94..ab09e16 100644 --- a/lib/xmi/uml13/associationlink.rb +++ b/lib/xmi/uml13/associationlink.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'link' +require "shale" -class Associationlink < Shale::Mapper - attribute :link, Link, collection: true +require_relative "link" - xml do - root 'Association.link' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Associationlink < Shale::Mapper + attribute :link, Link, collection: true - map_element 'Link', to: :link + xml do + root "Association.link" + namespace "omg.org/UML1.3", "UML" + + map_element "Link", to: :link + end + end end end diff --git a/lib/xmi/uml13/attribute.rb b/lib/xmi/uml13/attribute.rb index a962163..089b4ce 100644 --- a/lib/xmi/uml13/attribute.rb +++ b/lib/xmi/uml13/attribute.rb @@ -1,160 +1,166 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'attributeassociation_end' -require_relative 'attributeattribute_link' -require_relative 'attributeinitial_value' -require_relative 'featureclassifier_role' -require_relative 'featureowner' -require_relative 'featureowner_scope' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'structural_featurechangeable' -require_relative 'structural_featuremultiplicity' -require_relative 'structural_featuretarget_scope' -require_relative 'structural_featuretype' -require_relative 'xm_iextension' +require "shale" -class Attribute < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :owner_scope, Shale::Type::String - attribute :multiplicity, Shale::Type::Value - attribute :changeable, Shale::Type::String - attribute :target_scope, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :owner, Shale::Type::Value - attribute :classifier_role, Shale::Type::Value - attribute :type, Shale::Type::Value - attribute :association_end, Shale::Type::Value - attribute :attribute_link, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :feature_owner_scope, FeatureownerScope, collection: true - attribute :structural_feature_multiplicity, StructuralFeaturemultiplicity, collection: true - attribute :structural_feature_changeable, StructuralFeaturechangeable, collection: true - attribute :structural_feature_target_scope, StructuralFeaturetargetScope, collection: true - attribute :attribute_initial_value, AttributeinitialValue, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :feature_owner, Featureowner, collection: true - attribute :feature_classifier_role, FeatureclassifierRole, collection: true - attribute :structural_feature_type, StructuralFeaturetype, collection: true - attribute :attribute_association_end, AttributeassociationEnd, collection: true - attribute :attribute_attribute_link, AttributeattributeLink, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true +require_relative "attributeassociation_end" +require_relative "attributeattribute_link" +require_relative "attributeinitial_value" +require_relative "featureclassifier_role" +require_relative "featureowner" +require_relative "featureowner_scope" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "structural_featurechangeable" +require_relative "structural_featuremultiplicity" +require_relative "structural_featuretarget_scope" +require_relative "structural_featuretype" +require_relative "xm_iextension" - xml do - root 'Attribute' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Attribute < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :owner_scope, Shale::Type::String + attribute :multiplicity, Shale::Type::Value + attribute :changeable, Shale::Type::String + attribute :target_scope, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :owner, Shale::Type::Value + attribute :classifier_role, Shale::Type::Value + attribute :type, Shale::Type::Value + attribute :association_end, Shale::Type::Value + attribute :attribute_link, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :feature_owner_scope, FeatureownerScope, collection: true + attribute :structural_feature_multiplicity, StructuralFeaturemultiplicity, collection: true + attribute :structural_feature_changeable, StructuralFeaturechangeable, collection: true + attribute :structural_feature_target_scope, StructuralFeaturetargetScope, collection: true + attribute :attribute_initial_value, AttributeinitialValue, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :feature_owner, Featureowner, collection: true + attribute :feature_classifier_role, FeatureclassifierRole, collection: true + attribute :structural_feature_type, StructuralFeaturetype, collection: true + attribute :attribute_association_end, AttributeassociationEnd, collection: true + attribute :attribute_attribute_link, AttributeattributeLink, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'ownerScope', to: :owner_scope - map_attribute 'multiplicity', to: :multiplicity - map_attribute 'changeable', to: :changeable - map_attribute 'targetScope', to: :target_scope - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'owner', to: :owner - map_attribute 'classifierRole', to: :classifier_role - map_attribute 'type', to: :type - map_attribute 'associationEnd', to: :association_end - map_attribute 'attributeLink', to: :attribute_link - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'Feature.ownerScope', to: :feature_owner_scope - map_element 'StructuralFeature.multiplicity', to: :structural_feature_multiplicity - map_element 'StructuralFeature.changeable', to: :structural_feature_changeable - map_element 'StructuralFeature.targetScope', to: :structural_feature_target_scope - map_element 'Attribute.initialValue', to: :attribute_initial_value - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'Feature.owner', to: :feature_owner - map_element 'Feature.classifierRole', to: :feature_classifier_role - map_element 'StructuralFeature.type', to: :structural_feature_type - map_element 'Attribute.associationEnd', to: :attribute_association_end - map_element 'Attribute.attributeLink', to: :attribute_attribute_link - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value + xml do + root "Attribute" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "ownerScope", to: :owner_scope + map_attribute "multiplicity", to: :multiplicity + map_attribute "changeable", to: :changeable + map_attribute "targetScope", to: :target_scope + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "owner", to: :owner + map_attribute "classifierRole", to: :classifier_role + map_attribute "type", to: :type + map_attribute "associationEnd", to: :association_end + map_attribute "attributeLink", to: :attribute_link + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "Feature.ownerScope", to: :feature_owner_scope + map_element "StructuralFeature.multiplicity", to: :structural_feature_multiplicity + map_element "StructuralFeature.changeable", to: :structural_feature_changeable + map_element "StructuralFeature.targetScope", to: :structural_feature_target_scope + map_element "Attribute.initialValue", to: :attribute_initial_value + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "Feature.owner", to: :feature_owner + map_element "Feature.classifierRole", to: :feature_classifier_role + map_element "StructuralFeature.type", to: :structural_feature_type + map_element "Attribute.associationEnd", to: :attribute_association_end + map_element "Attribute.attributeLink", to: :attribute_attribute_link + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + end + end end end diff --git a/lib/xmi/uml13/attribute_link.rb b/lib/xmi/uml13/attribute_link.rb index 573499b..3e79798 100644 --- a/lib/xmi/uml13/attribute_link.rb +++ b/lib/xmi/uml13/attribute_link.rb @@ -1,127 +1,133 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'attribute_linkattribute' -require_relative 'attribute_linkinstance' -require_relative 'attribute_linkvalue' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'xm_iextension' +require "shale" -class AttributeLink < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :instance, Shale::Type::Value - attribute :attribute, Shale::Type::Value - attribute :value, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :attribute_link_instance, AttributeLinkinstance, collection: true - attribute :attribute_link_attribute, AttributeLinkattribute, collection: true - attribute :attribute_link_value, AttributeLinkvalue, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true +require_relative "attribute_linkattribute" +require_relative "attribute_linkinstance" +require_relative "attribute_linkvalue" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "xm_iextension" - xml do - root 'AttributeLink' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class AttributeLink < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :instance, Shale::Type::Value + attribute :attribute, Shale::Type::Value + attribute :value, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :attribute_link_instance, AttributeLinkinstance, collection: true + attribute :attribute_link_attribute, AttributeLinkattribute, collection: true + attribute :attribute_link_value, AttributeLinkvalue, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'instance', to: :instance - map_attribute 'attribute', to: :attribute - map_attribute 'value', to: :value - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'AttributeLink.instance', to: :attribute_link_instance - map_element 'AttributeLink.attribute', to: :attribute_link_attribute - map_element 'AttributeLink.value', to: :attribute_link_value - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value + xml do + root "AttributeLink" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "instance", to: :instance + map_attribute "attribute", to: :attribute + map_attribute "value", to: :value + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "AttributeLink.instance", to: :attribute_link_instance + map_element "AttributeLink.attribute", to: :attribute_link_attribute + map_element "AttributeLink.value", to: :attribute_link_value + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + end + end end end diff --git a/lib/xmi/uml13/attribute_linkattribute.rb b/lib/xmi/uml13/attribute_linkattribute.rb index 68eb386..da3f7dd 100644 --- a/lib/xmi/uml13/attribute_linkattribute.rb +++ b/lib/xmi/uml13/attribute_linkattribute.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'attribute' +require "shale" -class AttributeLinkattribute < Shale::Mapper - attribute :attribute, Attribute, collection: true +require_relative "attribute" - xml do - root 'AttributeLink.attribute' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class AttributeLinkattribute < Shale::Mapper + attribute :attribute, Attribute, collection: true - map_element 'Attribute', to: :attribute + xml do + root "AttributeLink.attribute" + namespace "omg.org/UML1.3", "UML" + + map_element "Attribute", to: :attribute + end + end end end diff --git a/lib/xmi/uml13/attribute_linkinstance.rb b/lib/xmi/uml13/attribute_linkinstance.rb index 6b82563..55ef0ca 100644 --- a/lib/xmi/uml13/attribute_linkinstance.rb +++ b/lib/xmi/uml13/attribute_linkinstance.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'instance' +require "shale" -class AttributeLinkinstance < Shale::Mapper - attribute :instance, Instance, collection: true +require_relative "instance" - xml do - root 'AttributeLink.instance' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class AttributeLinkinstance < Shale::Mapper + attribute :instance, Instance, collection: true - map_element 'Instance', to: :instance + xml do + root "AttributeLink.instance" + namespace "omg.org/UML1.3", "UML" + + map_element "Instance", to: :instance + end + end end end diff --git a/lib/xmi/uml13/attribute_linkvalue.rb b/lib/xmi/uml13/attribute_linkvalue.rb index d10e0fd..af78b03 100644 --- a/lib/xmi/uml13/attribute_linkvalue.rb +++ b/lib/xmi/uml13/attribute_linkvalue.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'instance' +require "shale" -class AttributeLinkvalue < Shale::Mapper - attribute :instance, Instance, collection: true +require_relative "instance" - xml do - root 'AttributeLink.value' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class AttributeLinkvalue < Shale::Mapper + attribute :instance, Instance, collection: true - map_element 'Instance', to: :instance + xml do + root "AttributeLink.value" + namespace "omg.org/UML1.3", "UML" + + map_element "Instance", to: :instance + end + end end end diff --git a/lib/xmi/uml13/attributeassociation_end.rb b/lib/xmi/uml13/attributeassociation_end.rb index 8d2c819..c14088f 100644 --- a/lib/xmi/uml13/attributeassociation_end.rb +++ b/lib/xmi/uml13/attributeassociation_end.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'association_end' +require "shale" -class AttributeassociationEnd < Shale::Mapper - attribute :association_end, AssociationEnd, collection: true +require_relative "association_end" - xml do - root 'Attribute.associationEnd' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class AttributeassociationEnd < Shale::Mapper + attribute :association_end, AssociationEnd, collection: true - map_element 'AssociationEnd', to: :association_end + xml do + root "Attribute.associationEnd" + namespace "omg.org/UML1.3", "UML" + + map_element "AssociationEnd", to: :association_end + end + end end end diff --git a/lib/xmi/uml13/attributeattribute_link.rb b/lib/xmi/uml13/attributeattribute_link.rb index 79d135c..f0108dc 100644 --- a/lib/xmi/uml13/attributeattribute_link.rb +++ b/lib/xmi/uml13/attributeattribute_link.rb @@ -1,14 +1,21 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'attribute_link' +require "shale" -class AttributeattributeLink < Shale::Mapper - attribute :attribute_link, AttributeLink, collection: true +module Xmi + module Uml13 + class AttributeLink < Shale::Mapper + end - xml do - root 'Attribute.attributeLink' - namespace 'omg.org/UML1.3', 'UML' + class AttributeattributeLink < Shale::Mapper + attribute :attribute_link, AttributeLink, collection: true - map_element 'AttributeLink', to: :attribute_link + xml do + root "Attribute.attributeLink" + namespace "omg.org/UML1.3", "UML" + + map_element "AttributeLink", to: :attribute_link + end + end end end diff --git a/lib/xmi/uml13/attributeinitial_value.rb b/lib/xmi/uml13/attributeinitial_value.rb index 1a71149..acaabd4 100644 --- a/lib/xmi/uml13/attributeinitial_value.rb +++ b/lib/xmi/uml13/attributeinitial_value.rb @@ -1,26 +1,32 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'boolean_expression' -require_relative 'expression' -require_relative 'object_set_expression' -require_relative 'procedure_expression' -require_relative 'time_expression' +require "shale" -class AttributeinitialValue < Shale::Mapper - attribute :expression, Expression - attribute :procedure_expression, ProcedureExpression - attribute :object_set_expression, ObjectSetExpression - attribute :time_expression, TimeExpression - attribute :boolean_expression, BooleanExpression +require_relative "boolean_expression" +require_relative "expression" +require_relative "object_set_expression" +require_relative "procedure_expression" +require_relative "time_expression" - xml do - root 'Attribute.initialValue' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class AttributeinitialValue < Shale::Mapper + attribute :expression, Expression + attribute :procedure_expression, ProcedureExpression + attribute :object_set_expression, ObjectSetExpression + attribute :time_expression, TimeExpression + attribute :boolean_expression, BooleanExpression - map_element 'Expression', to: :expression - map_element 'ProcedureExpression', to: :procedure_expression - map_element 'ObjectSetExpression', to: :object_set_expression - map_element 'TimeExpression', to: :time_expression - map_element 'BooleanExpression', to: :boolean_expression + xml do + root "Attribute.initialValue" + namespace "omg.org/UML1.3", "UML" + + map_element "Expression", to: :expression + map_element "ProcedureExpression", to: :procedure_expression + map_element "ObjectSetExpression", to: :object_set_expression + map_element "TimeExpression", to: :time_expression + map_element "BooleanExpression", to: :boolean_expression + end + end end end diff --git a/lib/xmi/uml13/auxiliary_elements.rb b/lib/xmi/uml13/auxiliary_elements.rb index b0dbd50..bd7d69d 100644 --- a/lib/xmi/uml13/auxiliary_elements.rb +++ b/lib/xmi/uml13/auxiliary_elements.rb @@ -1,48 +1,54 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'binding' -require_relative 'comment' -require_relative 'component' -require_relative 'node' -require_relative 'presentation' -require_relative 'refinement' -require_relative 'trace' -require_relative 'usage' -require_relative 'view_element' +require "shale" -class AuxiliaryElements < Shale::Mapper - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :refinement, Refinement, collection: true - attribute :usage, Usage, collection: true - attribute :trace, Trace, collection: true - attribute :binding, Binding, collection: true - attribute :node, Node, collection: true - attribute :component, Component, collection: true - attribute :comment, Comment, collection: true - attribute :view_element, ViewElement, collection: true - attribute :presentation, Presentation, collection: true +require_relative "binding" +require_relative "comment" +require_relative "component" +require_relative "node" +require_relative "presentation" +require_relative "refinement" +require_relative "trace" +require_relative "usage" +require_relative "view_element" - xml do - root 'Auxiliary_Elements' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class AuxiliaryElements < Shale::Mapper + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :refinement, Refinement, collection: true + attribute :usage, Usage, collection: true + attribute :trace, Trace, collection: true + attribute :binding, Binding, collection: true + attribute :node, Node, collection: true + attribute :component, Component, collection: true + attribute :comment, Comment, collection: true + attribute :view_element, ViewElement, collection: true + attribute :presentation, Presentation, collection: true - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'Refinement', to: :refinement - map_element 'Usage', to: :usage - map_element 'Trace', to: :trace - map_element 'Binding', to: :binding - map_element 'Node', to: :node - map_element 'Component', to: :component - map_element 'Comment', to: :comment - map_element 'ViewElement', to: :view_element - map_element 'Presentation', to: :presentation + xml do + root "Auxiliary_Elements" + namespace "omg.org/UML1.3", "UML" + + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "Refinement", to: :refinement + map_element "Usage", to: :usage + map_element "Trace", to: :trace + map_element "Binding", to: :binding + map_element "Node", to: :node + map_element "Component", to: :component + map_element "Comment", to: :comment + map_element "ViewElement", to: :view_element + map_element "Presentation", to: :presentation + end + end end end diff --git a/lib/xmi/uml13/behavioral_elements.rb b/lib/xmi/uml13/behavioral_elements.rb index 17cfab2..9c090ac 100644 --- a/lib/xmi/uml13/behavioral_elements.rb +++ b/lib/xmi/uml13/behavioral_elements.rb @@ -1,33 +1,39 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'collaborations' -require_relative 'common_behavior' -require_relative 'state_machines' -require_relative 'use_cases' +require "shale" -class BehavioralElements < Shale::Mapper - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :common_behavior, CommonBehavior, collection: true - attribute :collaborations, Collaborations, collection: true - attribute :use_cases, UseCases, collection: true - attribute :state_machines, StateMachines, collection: true +require_relative "collaborations" +require_relative "common_behavior" +require_relative "state_machines" +require_relative "use_cases" - xml do - root 'Behavioral_Elements' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class BehavioralElements < Shale::Mapper + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :common_behavior, CommonBehavior, collection: true + attribute :collaborations, Collaborations, collection: true + attribute :use_cases, UseCases, collection: true + attribute :state_machines, StateMachines, collection: true - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'Common_Behavior', to: :common_behavior - map_element 'Collaborations', to: :collaborations - map_element 'Use_Cases', to: :use_cases - map_element 'State_Machines', to: :state_machines + xml do + root "Behavioral_Elements" + namespace "omg.org/UML1.3", "UML" + + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "Common_Behavior", to: :common_behavior + map_element "Collaborations", to: :collaborations + map_element "Use_Cases", to: :use_cases + map_element "State_Machines", to: :state_machines + end + end end end diff --git a/lib/xmi/uml13/behavioral_feature.rb b/lib/xmi/uml13/behavioral_feature.rb index 44a9e6c..1a69a64 100644 --- a/lib/xmi/uml13/behavioral_feature.rb +++ b/lib/xmi/uml13/behavioral_feature.rb @@ -1,140 +1,146 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'behavioral_featureis_query' -require_relative 'behavioral_featureparameter' -require_relative 'behavioral_featureraised_exception' -require_relative 'featureclassifier_role' -require_relative 'featureowner' -require_relative 'featureowner_scope' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'xm_iextension' +require "shale" -class BehavioralFeature < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :owner_scope, Shale::Type::String - attribute :is_query, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :owner, Shale::Type::Value - attribute :classifier_role, Shale::Type::Value - attribute :raised_exception, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :feature_owner_scope, FeatureownerScope, collection: true - attribute :behavioral_feature_is_query, BehavioralFeatureisQuery, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :feature_owner, Featureowner, collection: true - attribute :feature_classifier_role, FeatureclassifierRole, collection: true - attribute :behavioral_feature_raised_exception, BehavioralFeatureraisedException, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :behavioral_feature_parameter, BehavioralFeatureparameter, collection: true +require_relative "behavioral_featureis_query" +require_relative "behavioral_featureparameter" +require_relative "behavioral_featureraised_exception" +require_relative "featureclassifier_role" +require_relative "featureowner" +require_relative "featureowner_scope" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "xm_iextension" - xml do - root 'BehavioralFeature' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class BehavioralFeature < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :owner_scope, Shale::Type::String + attribute :is_query, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :owner, Shale::Type::Value + attribute :classifier_role, Shale::Type::Value + attribute :raised_exception, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :feature_owner_scope, FeatureownerScope, collection: true + attribute :behavioral_feature_is_query, BehavioralFeatureisQuery, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :feature_owner, Featureowner, collection: true + attribute :feature_classifier_role, FeatureclassifierRole, collection: true + attribute :behavioral_feature_raised_exception, BehavioralFeatureraisedException, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :behavioral_feature_parameter, BehavioralFeatureparameter, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'ownerScope', to: :owner_scope - map_attribute 'isQuery', to: :is_query - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'owner', to: :owner - map_attribute 'classifierRole', to: :classifier_role - map_attribute 'raisedException', to: :raised_exception - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'Feature.ownerScope', to: :feature_owner_scope - map_element 'BehavioralFeature.isQuery', to: :behavioral_feature_is_query - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'Feature.owner', to: :feature_owner - map_element 'Feature.classifierRole', to: :feature_classifier_role - map_element 'BehavioralFeature.raisedException', to: :behavioral_feature_raised_exception - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'BehavioralFeature.parameter', to: :behavioral_feature_parameter + xml do + root "BehavioralFeature" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "ownerScope", to: :owner_scope + map_attribute "isQuery", to: :is_query + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "owner", to: :owner + map_attribute "classifierRole", to: :classifier_role + map_attribute "raisedException", to: :raised_exception + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "Feature.ownerScope", to: :feature_owner_scope + map_element "BehavioralFeature.isQuery", to: :behavioral_feature_is_query + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "Feature.owner", to: :feature_owner + map_element "Feature.classifierRole", to: :feature_classifier_role + map_element "BehavioralFeature.raisedException", to: :behavioral_feature_raised_exception + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "BehavioralFeature.parameter", to: :behavioral_feature_parameter + end + end end end diff --git a/lib/xmi/uml13/behavioral_featureis_query.rb b/lib/xmi/uml13/behavioral_featureis_query.rb index 6e4948b..19dca40 100644 --- a/lib/xmi/uml13/behavioral_featureis_query.rb +++ b/lib/xmi/uml13/behavioral_featureis_query.rb @@ -1,12 +1,18 @@ -require 'shale' +# frozen_string_literal: true -class BehavioralFeatureisQuery < Shale::Mapper - attribute :xmi_value, Shale::Type::String +require "shale" - xml do - root 'BehavioralFeature.isQuery' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class BehavioralFeatureisQuery < Shale::Mapper + attribute :xmi_value, Shale::Type::String - map_attribute 'xmi.value', to: :xmi_value + xml do + root "BehavioralFeature.isQuery" + namespace "omg.org/UML1.3", "UML" + + map_attribute "xmi.value", to: :xmi_value + end + end end end diff --git a/lib/xmi/uml13/behavioral_featureparameter.rb b/lib/xmi/uml13/behavioral_featureparameter.rb index 6fc0efd..3633a04 100644 --- a/lib/xmi/uml13/behavioral_featureparameter.rb +++ b/lib/xmi/uml13/behavioral_featureparameter.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'parameter' +require "shale" -class BehavioralFeatureparameter < Shale::Mapper - attribute :parameter, Parameter, collection: true +require_relative "parameter" - xml do - root 'BehavioralFeature.parameter' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class BehavioralFeatureparameter < Shale::Mapper + attribute :parameter, Parameter, collection: true - map_element 'Parameter', to: :parameter + xml do + root "BehavioralFeature.parameter" + namespace "omg.org/UML1.3", "UML" + + map_element "Parameter", to: :parameter + end + end end end diff --git a/lib/xmi/uml13/behavioral_featureraised_exception.rb b/lib/xmi/uml13/behavioral_featureraised_exception.rb index 3d09318..1296042 100644 --- a/lib/xmi/uml13/behavioral_featureraised_exception.rb +++ b/lib/xmi/uml13/behavioral_featureraised_exception.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'exception' +require "shale" -class BehavioralFeatureraisedException < Shale::Mapper - attribute :exception, Exception, collection: true +require_relative "exception" - xml do - root 'BehavioralFeature.raisedException' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class BehavioralFeatureraisedException < Shale::Mapper + attribute :exception, Exception, collection: true - map_element 'Exception', to: :exception + xml do + root "BehavioralFeature.raisedException" + namespace "omg.org/UML1.3", "UML" + + map_element "Exception", to: :exception + end + end end end diff --git a/lib/xmi/uml13/binding.rb b/lib/xmi/uml13/binding.rb index 1cd4738..c91fbe7 100644 --- a/lib/xmi/uml13/binding.rb +++ b/lib/xmi/uml13/binding.rb @@ -1,138 +1,144 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'bindingargument' -require_relative 'dependencyclient' -require_relative 'dependencydescription' -require_relative 'dependencyowning_dependency' -require_relative 'dependencysub_dependencies' -require_relative 'dependencysupplier' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'xm_iextension' +require "shale" -class Binding < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :description, Shale::Type::Value - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :owning_dependency, Shale::Type::Value - attribute :client, Shale::Type::Value - attribute :supplier, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :dependency_description, Dependencydescription, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :dependency_owning_dependency, DependencyowningDependency, collection: true - attribute :dependency_client, Dependencyclient, collection: true - attribute :dependency_supplier, Dependencysupplier, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :dependency_sub_dependencies, DependencysubDependencies, collection: true - attribute :binding_argument, Bindingargument, collection: true +require_relative "bindingargument" +require_relative "dependencyclient" +require_relative "dependencydescription" +require_relative "dependencyowning_dependency" +require_relative "dependencysub_dependencies" +require_relative "dependencysupplier" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "xm_iextension" - xml do - root 'Binding' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Binding < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :description, Shale::Type::Value + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :owning_dependency, Shale::Type::Value + attribute :client, Shale::Type::Value + attribute :supplier, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :dependency_description, Dependencydescription, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :dependency_owning_dependency, DependencyowningDependency, collection: true + attribute :dependency_client, Dependencyclient, collection: true + attribute :dependency_supplier, Dependencysupplier, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :dependency_sub_dependencies, DependencysubDependencies, collection: true + attribute :binding_argument, Bindingargument, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'description', to: :description - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'owningDependency', to: :owning_dependency - map_attribute 'client', to: :client - map_attribute 'supplier', to: :supplier - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'Dependency.description', to: :dependency_description - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'Dependency.owningDependency', to: :dependency_owning_dependency - map_element 'Dependency.client', to: :dependency_client - map_element 'Dependency.supplier', to: :dependency_supplier - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Dependency.subDependencies', to: :dependency_sub_dependencies - map_element 'Binding.argument', to: :binding_argument + xml do + root "Binding" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "description", to: :description + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "owningDependency", to: :owning_dependency + map_attribute "client", to: :client + map_attribute "supplier", to: :supplier + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "Dependency.description", to: :dependency_description + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "Dependency.owningDependency", to: :dependency_owning_dependency + map_element "Dependency.client", to: :dependency_client + map_element "Dependency.supplier", to: :dependency_supplier + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Dependency.subDependencies", to: :dependency_sub_dependencies + map_element "Binding.argument", to: :binding_argument + end + end end end diff --git a/lib/xmi/uml13/bindingargument.rb b/lib/xmi/uml13/bindingargument.rb index 69d914c..69723f8 100644 --- a/lib/xmi/uml13/bindingargument.rb +++ b/lib/xmi/uml13/bindingargument.rb @@ -1,266 +1,272 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'action' -require_relative 'action_sequence' -require_relative 'action_state' -require_relative 'activity_model' -require_relative 'activity_state' -require_relative 'actor' -require_relative 'association' -require_relative 'association_class' -require_relative 'association_end' -require_relative 'association_end_role' -require_relative 'association_role' -require_relative 'attribute' -require_relative 'attribute_link' -require_relative 'behavioral_feature' -require_relative 'binding' -require_relative 'call_action' -require_relative 'call_event' -require_relative 'change_event' -require_relative 'class' -require_relative 'classifier' -require_relative 'classifier_in_state' -require_relative 'classifier_role' -require_relative 'collaboration' -require_relative 'comment' -require_relative 'component' -require_relative 'composite_state' -require_relative 'constraint' -require_relative 'create_action' -require_relative 'data_type' -require_relative 'data_value' -require_relative 'dependency' -require_relative 'destroy_action' -require_relative 'enumeration' -require_relative 'event' -require_relative 'exception' -require_relative 'feature' -require_relative 'generalizable_element' -require_relative 'generalization' -require_relative 'guard' -require_relative 'instance' -require_relative 'interaction' -require_relative 'interface' -require_relative 'link' -require_relative 'link_end' -require_relative 'link_object' -require_relative 'local_invocation' -require_relative 'message' -require_relative 'message_instance' -require_relative 'method' -require_relative 'model' -require_relative 'model_element' -require_relative 'namespace' -require_relative 'node' -require_relative 'object' -require_relative 'object_flow_state' -require_relative 'operation' -require_relative 'package' -require_relative 'parameter' -require_relative 'partition' -require_relative 'primitive' -require_relative 'pseudo_state' -require_relative 'reception' -require_relative 'refinement' -require_relative 'request' -require_relative 'return_action' -require_relative 'send_action' -require_relative 'signal' -require_relative 'signal_event' -require_relative 'simple_state' -require_relative 'state' -require_relative 'state_machine' -require_relative 'state_vertex' -require_relative 'stereotype' -require_relative 'structural_feature' -require_relative 'structure' -require_relative 'submachine_state' -require_relative 'subsystem' -require_relative 'terminate_action' -require_relative 'time_event' -require_relative 'trace' -require_relative 'transition' -require_relative 'uninterpreted_action' -require_relative 'usage' -require_relative 'use_case' -require_relative 'use_case_instance' +require "shale" -class Bindingargument < Shale::Mapper - attribute :model_element, ModelElement, collection: true - attribute :comment, Comment, collection: true - attribute :namespace, Namespace, collection: true - attribute :generalizable_element, GeneralizableElement, collection: true - attribute :feature, Feature, collection: true - attribute :parameter, Parameter, collection: true - attribute :constraint, Constraint, collection: true - attribute :dependency, Dependency, collection: true - attribute :generalization, Generalization, collection: true - attribute :association_end, AssociationEnd, collection: true - attribute :request, Request, collection: true - attribute :action_sequence, ActionSequence, collection: true - attribute :action, Action, collection: true - attribute :link, Link, collection: true - attribute :link_end, LinkEnd, collection: true - attribute :instance, Instance, collection: true - attribute :attribute_link, AttributeLink, collection: true - attribute :message_instance, MessageInstance, collection: true - attribute :interaction, Interaction, collection: true - attribute :message, Message, collection: true - attribute :state_machine, StateMachine, collection: true - attribute :guard, Guard, collection: true - attribute :state_vertex, StateVertex, collection: true - attribute :transition, Transition, collection: true - attribute :event, Event, collection: true - attribute :partition, Partition, collection: true - attribute :collaboration, Collaboration, collection: true - attribute :classifier, Classifier, collection: true - attribute :association, Association, collection: true - attribute :stereotype, Stereotype, collection: true - attribute :package, Package, collection: true - attribute :signal, Signal, collection: true - attribute :node, Node, collection: true - attribute :component, Component, collection: true - attribute :interface, Interface, collection: true - attribute :class, Class, collection: true - attribute :data_type, DataType, collection: true - attribute :subsystem, Subsystem, collection: true - attribute :classifier_role, ClassifierRole, collection: true - attribute :actor, Actor, collection: true - attribute :use_case, UseCase, collection: true - attribute :classifier_in_state, ClassifierInState, collection: true - attribute :association_class, AssociationClass, collection: true - attribute :enumeration, Enumeration, collection: true - attribute :primitive, Primitive, collection: true - attribute :structure, Structure, collection: true - attribute :association_role, AssociationRole, collection: true - attribute :model, Model, collection: true - attribute :exception, Exception, collection: true - attribute :structural_feature, StructuralFeature, collection: true - attribute :behavioral_feature, BehavioralFeature, collection: true - attribute :attribute, Attribute, collection: true - attribute :operation, Operation, collection: true - attribute :method, Method, collection: true - attribute :reception, Reception, collection: true - attribute :refinement, Refinement, collection: true - attribute :usage, Usage, collection: true - attribute :trace, Trace, collection: true - attribute :binding, Binding, collection: true - attribute :association_end_role, AssociationEndRole, collection: true - attribute :create_action, CreateAction, collection: true - attribute :call_action, CallAction, collection: true - attribute :local_invocation, LocalInvocation, collection: true - attribute :return_action, ReturnAction, collection: true - attribute :send_action, SendAction, collection: true - attribute :uninterpreted_action, UninterpretedAction, collection: true - attribute :terminate_action, TerminateAction, collection: true - attribute :destroy_action, DestroyAction, collection: true - attribute :link_object, LinkObject, collection: true - attribute :object, Object, collection: true - attribute :data_value, DataValue, collection: true - attribute :use_case_instance, UseCaseInstance, collection: true - attribute :activity_model, ActivityModel, collection: true - attribute :pseudo_state, PseudoState, collection: true - attribute :state, State, collection: true - attribute :composite_state, CompositeState, collection: true - attribute :simple_state, SimpleState, collection: true - attribute :submachine_state, SubmachineState, collection: true - attribute :action_state, ActionState, collection: true - attribute :object_flow_state, ObjectFlowState, collection: true - attribute :activity_state, ActivityState, collection: true - attribute :signal_event, SignalEvent, collection: true - attribute :call_event, CallEvent, collection: true - attribute :time_event, TimeEvent, collection: true - attribute :change_event, ChangeEvent, collection: true +require_relative "action" +require_relative "action_sequence" +require_relative "action_state" +require_relative "activity_model" +require_relative "activity_state" +require_relative "actor" +require_relative "association" +require_relative "association_class" +require_relative "association_end" +require_relative "association_end_role" +require_relative "association_role" +require_relative "attribute" +require_relative "attribute_link" +require_relative "behavioral_feature" +require_relative "binding" +require_relative "call_action" +require_relative "call_event" +require_relative "change_event" +require_relative "class" +require_relative "classifier" +require_relative "classifier_in_state" +require_relative "classifier_role" +require_relative "collaboration" +require_relative "comment" +require_relative "component" +require_relative "composite_state" +require_relative "constraint" +require_relative "create_action" +require_relative "data_type" +require_relative "data_value" +require_relative "dependency" +require_relative "destroy_action" +require_relative "enumeration" +require_relative "event" +require_relative "exception" +require_relative "feature" +require_relative "generalizable_element" +require_relative "generalization" +require_relative "guard" +require_relative "instance" +require_relative "interaction" +require_relative "interface" +require_relative "link" +require_relative "link_end" +require_relative "link_object" +require_relative "local_invocation" +require_relative "message" +require_relative "message_instance" +require_relative "method" +require_relative "model" +require_relative "model_element" +require_relative "namespace" +require_relative "node" +require_relative "object" +require_relative "object_flow_state" +require_relative "operation" +require_relative "package" +require_relative "parameter" +require_relative "partition" +require_relative "primitive" +require_relative "pseudo_state" +require_relative "reception" +require_relative "refinement" +require_relative "request" +require_relative "return_action" +require_relative "send_action" +require_relative "signal" +require_relative "signal_event" +require_relative "simple_state" +require_relative "state" +require_relative "state_machine" +require_relative "state_vertex" +require_relative "stereotype" +require_relative "structural_feature" +require_relative "structure" +require_relative "submachine_state" +require_relative "subsystem" +require_relative "terminate_action" +require_relative "time_event" +require_relative "trace" +require_relative "transition" +require_relative "uninterpreted_action" +require_relative "usage" +require_relative "use_case" +require_relative "use_case_instance" - xml do - root 'Binding.argument' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Bindingargument < Shale::Mapper + attribute :model_element, ModelElement, collection: true + attribute :comment, Comment, collection: true + attribute :namespace, Namespace, collection: true + attribute :generalizable_element, GeneralizableElement, collection: true + attribute :feature, Feature, collection: true + attribute :parameter, Parameter, collection: true + attribute :constraint, Constraint, collection: true + attribute :dependency, Dependency, collection: true + attribute :generalization, Generalization, collection: true + attribute :association_end, AssociationEnd, collection: true + attribute :request, Request, collection: true + attribute :action_sequence, ActionSequence, collection: true + attribute :action, Action, collection: true + attribute :link, Link, collection: true + attribute :link_end, LinkEnd, collection: true + attribute :instance, Instance, collection: true + attribute :attribute_link, AttributeLink, collection: true + attribute :message_instance, MessageInstance, collection: true + attribute :interaction, Interaction, collection: true + attribute :message, Message, collection: true + attribute :state_machine, StateMachine, collection: true + attribute :guard, Guard, collection: true + attribute :state_vertex, StateVertex, collection: true + attribute :transition, Transition, collection: true + attribute :event, Event, collection: true + attribute :partition, Partition, collection: true + attribute :collaboration, Collaboration, collection: true + attribute :classifier, Classifier, collection: true + attribute :association, Association, collection: true + attribute :stereotype, Stereotype, collection: true + attribute :package, Package, collection: true + attribute :signal, Signal, collection: true + attribute :node, Node, collection: true + attribute :component, Component, collection: true + attribute :interface, Interface, collection: true + attribute :class, Class, collection: true + attribute :data_type, DataType, collection: true + attribute :subsystem, Subsystem, collection: true + attribute :classifier_role, ClassifierRole, collection: true + attribute :actor, Actor, collection: true + attribute :use_case, UseCase, collection: true + attribute :classifier_in_state, ClassifierInState, collection: true + attribute :association_class, AssociationClass, collection: true + attribute :enumeration, Enumeration, collection: true + attribute :primitive, Primitive, collection: true + attribute :structure, Structure, collection: true + attribute :association_role, AssociationRole, collection: true + attribute :model, Model, collection: true + attribute :exception, Exception, collection: true + attribute :structural_feature, StructuralFeature, collection: true + attribute :behavioral_feature, BehavioralFeature, collection: true + attribute :attribute, Attribute, collection: true + attribute :operation, Operation, collection: true + attribute :method, Method, collection: true + attribute :reception, Reception, collection: true + attribute :refinement, Refinement, collection: true + attribute :usage, Usage, collection: true + attribute :trace, Trace, collection: true + attribute :binding, Binding, collection: true + attribute :association_end_role, AssociationEndRole, collection: true + attribute :create_action, CreateAction, collection: true + attribute :call_action, CallAction, collection: true + attribute :local_invocation, LocalInvocation, collection: true + attribute :return_action, ReturnAction, collection: true + attribute :send_action, SendAction, collection: true + attribute :uninterpreted_action, UninterpretedAction, collection: true + attribute :terminate_action, TerminateAction, collection: true + attribute :destroy_action, DestroyAction, collection: true + attribute :link_object, LinkObject, collection: true + attribute :object, Object, collection: true + attribute :data_value, DataValue, collection: true + attribute :use_case_instance, UseCaseInstance, collection: true + attribute :activity_model, ActivityModel, collection: true + attribute :pseudo_state, PseudoState, collection: true + attribute :state, State, collection: true + attribute :composite_state, CompositeState, collection: true + attribute :simple_state, SimpleState, collection: true + attribute :submachine_state, SubmachineState, collection: true + attribute :action_state, ActionState, collection: true + attribute :object_flow_state, ObjectFlowState, collection: true + attribute :activity_state, ActivityState, collection: true + attribute :signal_event, SignalEvent, collection: true + attribute :call_event, CallEvent, collection: true + attribute :time_event, TimeEvent, collection: true + attribute :change_event, ChangeEvent, collection: true - map_element 'ModelElement', to: :model_element - map_element 'Comment', to: :comment - map_element 'Namespace', to: :namespace - map_element 'GeneralizableElement', to: :generalizable_element - map_element 'Feature', to: :feature - map_element 'Parameter', to: :parameter - map_element 'Constraint', to: :constraint - map_element 'Dependency', to: :dependency - map_element 'Generalization', to: :generalization - map_element 'AssociationEnd', to: :association_end - map_element 'Request', to: :request - map_element 'ActionSequence', to: :action_sequence - map_element 'Action', to: :action - map_element 'Link', to: :link - map_element 'LinkEnd', to: :link_end - map_element 'Instance', to: :instance - map_element 'AttributeLink', to: :attribute_link - map_element 'MessageInstance', to: :message_instance - map_element 'Interaction', to: :interaction - map_element 'Message', to: :message - map_element 'StateMachine', to: :state_machine - map_element 'Guard', to: :guard - map_element 'StateVertex', to: :state_vertex - map_element 'Transition', to: :transition - map_element 'Event', to: :event - map_element 'Partition', to: :partition - map_element 'Collaboration', to: :collaboration - map_element 'Classifier', to: :classifier - map_element 'Association', to: :association - map_element 'Stereotype', to: :stereotype - map_element 'Package', to: :package - map_element 'Signal', to: :signal - map_element 'Node', to: :node - map_element 'Component', to: :component - map_element 'Interface', to: :interface - map_element 'Class', to: :class - map_element 'DataType', to: :data_type - map_element 'Subsystem', to: :subsystem - map_element 'ClassifierRole', to: :classifier_role - map_element 'Actor', to: :actor - map_element 'UseCase', to: :use_case - map_element 'ClassifierInState', to: :classifier_in_state - map_element 'AssociationClass', to: :association_class - map_element 'Enumeration', to: :enumeration - map_element 'Primitive', to: :primitive - map_element 'Structure', to: :structure - map_element 'AssociationRole', to: :association_role - map_element 'Model', to: :model - map_element 'Exception', to: :exception - map_element 'StructuralFeature', to: :structural_feature - map_element 'BehavioralFeature', to: :behavioral_feature - map_element 'Attribute', to: :attribute - map_element 'Operation', to: :operation - map_element 'Method', to: :method - map_element 'Reception', to: :reception - map_element 'Refinement', to: :refinement - map_element 'Usage', to: :usage - map_element 'Trace', to: :trace - map_element 'Binding', to: :binding - map_element 'AssociationEndRole', to: :association_end_role - map_element 'CreateAction', to: :create_action - map_element 'CallAction', to: :call_action - map_element 'LocalInvocation', to: :local_invocation - map_element 'ReturnAction', to: :return_action - map_element 'SendAction', to: :send_action - map_element 'UninterpretedAction', to: :uninterpreted_action - map_element 'TerminateAction', to: :terminate_action - map_element 'DestroyAction', to: :destroy_action - map_element 'LinkObject', to: :link_object - map_element 'Object', to: :object - map_element 'DataValue', to: :data_value - map_element 'UseCaseInstance', to: :use_case_instance - map_element 'ActivityModel', to: :activity_model - map_element 'PseudoState', to: :pseudo_state - map_element 'State', to: :state - map_element 'CompositeState', to: :composite_state - map_element 'SimpleState', to: :simple_state - map_element 'SubmachineState', to: :submachine_state - map_element 'ActionState', to: :action_state - map_element 'ObjectFlowState', to: :object_flow_state - map_element 'ActivityState', to: :activity_state - map_element 'SignalEvent', to: :signal_event - map_element 'CallEvent', to: :call_event - map_element 'TimeEvent', to: :time_event - map_element 'ChangeEvent', to: :change_event + xml do + root "Binding.argument" + namespace "omg.org/UML1.3", "UML" + + map_element "ModelElement", to: :model_element + map_element "Comment", to: :comment + map_element "Namespace", to: :namespace + map_element "GeneralizableElement", to: :generalizable_element + map_element "Feature", to: :feature + map_element "Parameter", to: :parameter + map_element "Constraint", to: :constraint + map_element "Dependency", to: :dependency + map_element "Generalization", to: :generalization + map_element "AssociationEnd", to: :association_end + map_element "Request", to: :request + map_element "ActionSequence", to: :action_sequence + map_element "Action", to: :action + map_element "Link", to: :link + map_element "LinkEnd", to: :link_end + map_element "Instance", to: :instance + map_element "AttributeLink", to: :attribute_link + map_element "MessageInstance", to: :message_instance + map_element "Interaction", to: :interaction + map_element "Message", to: :message + map_element "StateMachine", to: :state_machine + map_element "Guard", to: :guard + map_element "StateVertex", to: :state_vertex + map_element "Transition", to: :transition + map_element "Event", to: :event + map_element "Partition", to: :partition + map_element "Collaboration", to: :collaboration + map_element "Classifier", to: :classifier + map_element "Association", to: :association + map_element "Stereotype", to: :stereotype + map_element "Package", to: :package + map_element "Signal", to: :signal + map_element "Node", to: :node + map_element "Component", to: :component + map_element "Interface", to: :interface + map_element "Class", to: :class + map_element "DataType", to: :data_type + map_element "Subsystem", to: :subsystem + map_element "ClassifierRole", to: :classifier_role + map_element "Actor", to: :actor + map_element "UseCase", to: :use_case + map_element "ClassifierInState", to: :classifier_in_state + map_element "AssociationClass", to: :association_class + map_element "Enumeration", to: :enumeration + map_element "Primitive", to: :primitive + map_element "Structure", to: :structure + map_element "AssociationRole", to: :association_role + map_element "Model", to: :model + map_element "Exception", to: :exception + map_element "StructuralFeature", to: :structural_feature + map_element "BehavioralFeature", to: :behavioral_feature + map_element "Attribute", to: :attribute + map_element "Operation", to: :operation + map_element "Method", to: :method + map_element "Reception", to: :reception + map_element "Refinement", to: :refinement + map_element "Usage", to: :usage + map_element "Trace", to: :trace + map_element "Binding", to: :binding + map_element "AssociationEndRole", to: :association_end_role + map_element "CreateAction", to: :create_action + map_element "CallAction", to: :call_action + map_element "LocalInvocation", to: :local_invocation + map_element "ReturnAction", to: :return_action + map_element "SendAction", to: :send_action + map_element "UninterpretedAction", to: :uninterpreted_action + map_element "TerminateAction", to: :terminate_action + map_element "DestroyAction", to: :destroy_action + map_element "LinkObject", to: :link_object + map_element "Object", to: :object + map_element "DataValue", to: :data_value + map_element "UseCaseInstance", to: :use_case_instance + map_element "ActivityModel", to: :activity_model + map_element "PseudoState", to: :pseudo_state + map_element "State", to: :state + map_element "CompositeState", to: :composite_state + map_element "SimpleState", to: :simple_state + map_element "SubmachineState", to: :submachine_state + map_element "ActionState", to: :action_state + map_element "ObjectFlowState", to: :object_flow_state + map_element "ActivityState", to: :activity_state + map_element "SignalEvent", to: :signal_event + map_element "CallEvent", to: :call_event + map_element "TimeEvent", to: :time_event + map_element "ChangeEvent", to: :change_event + end + end end end diff --git a/lib/xmi/uml13/boolean_expression.rb b/lib/xmi/uml13/boolean_expression.rb index f1e2785..a763dd9 100644 --- a/lib/xmi/uml13/boolean_expression.rb +++ b/lib/xmi/uml13/boolean_expression.rb @@ -1,34 +1,40 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'expressionbody' -require_relative 'expressionlanguage' -require_relative 'xm_iextension' +require "shale" -class BooleanExpression < Shale::Mapper - attribute :language, Shale::Type::Value - attribute :body, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :expression_language, Expressionlanguage, collection: true - attribute :expression_body, Expressionbody, collection: true - attribute :xmi_extension, XMIextension, collection: true +require_relative "expressionbody" +require_relative "expressionlanguage" +require_relative "xm_iextension" - xml do - root 'BooleanExpression' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class BooleanExpression < Shale::Mapper + attribute :language, Shale::Type::Value + attribute :body, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :expression_language, Expressionlanguage, collection: true + attribute :expression_body, Expressionbody, collection: true + attribute :xmi_extension, XMIextension, collection: true - map_attribute 'language', to: :language - map_attribute 'body', to: :body - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'Expression.language', to: :expression_language - map_element 'Expression.body', to: :expression_body - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil + xml do + root "BooleanExpression" + namespace "omg.org/UML1.3", "UML" + + map_attribute "language", to: :language + map_attribute "body", to: :body + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "Expression.language", to: :expression_language + map_element "Expression.body", to: :expression_body + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + end + end end end diff --git a/lib/xmi/uml13/call_action.rb b/lib/xmi/uml13/call_action.rb index 8e28aec..395766d 100644 --- a/lib/xmi/uml13/call_action.rb +++ b/lib/xmi/uml13/call_action.rb @@ -1,151 +1,157 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'actionaction_sequence' -require_relative 'actionactual_argument' -require_relative 'actionis_asynchronous' -require_relative 'actionmessage' -require_relative 'actionrecurrence' -require_relative 'actionrequest' -require_relative 'actionscript' -require_relative 'actiontarget' -require_relative 'call_actionmode' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'xm_iextension' +require "shale" -class CallAction < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :is_asynchronous, Shale::Type::String - attribute :script, Shale::Type::Value - attribute :mode, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :request, Shale::Type::Value - attribute :message, Shale::Type::Value - attribute :action_sequence, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :action_recurrence, Actionrecurrence, collection: true - attribute :action_target, Actiontarget, collection: true - attribute :action_is_asynchronous, ActionisAsynchronous, collection: true - attribute :action_script, Actionscript, collection: true - attribute :call_action_mode, CallActionmode, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :action_request, Actionrequest, collection: true - attribute :action_message, Actionmessage, collection: true - attribute :action_action_sequence, ActionactionSequence, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :action_actual_argument, ActionactualArgument, collection: true +require_relative "actionaction_sequence" +require_relative "actionactual_argument" +require_relative "actionis_asynchronous" +require_relative "actionmessage" +require_relative "actionrecurrence" +require_relative "actionrequest" +require_relative "actionscript" +require_relative "actiontarget" +require_relative "call_actionmode" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "xm_iextension" - xml do - root 'CallAction' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class CallAction < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :is_asynchronous, Shale::Type::String + attribute :script, Shale::Type::Value + attribute :mode, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :request, Shale::Type::Value + attribute :message, Shale::Type::Value + attribute :action_sequence, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :action_recurrence, Actionrecurrence, collection: true + attribute :action_target, Actiontarget, collection: true + attribute :action_is_asynchronous, ActionisAsynchronous, collection: true + attribute :action_script, Actionscript, collection: true + attribute :call_action_mode, CallActionmode, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :action_request, Actionrequest, collection: true + attribute :action_message, Actionmessage, collection: true + attribute :action_action_sequence, ActionactionSequence, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :action_actual_argument, ActionactualArgument, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'isAsynchronous', to: :is_asynchronous - map_attribute 'script', to: :script - map_attribute 'mode', to: :mode - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'request', to: :request - map_attribute 'message', to: :message - map_attribute 'actionSequence', to: :action_sequence - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'Action.recurrence', to: :action_recurrence - map_element 'Action.target', to: :action_target - map_element 'Action.isAsynchronous', to: :action_is_asynchronous - map_element 'Action.script', to: :action_script - map_element 'CallAction.mode', to: :call_action_mode - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'Action.request', to: :action_request - map_element 'Action.message', to: :action_message - map_element 'Action.actionSequence', to: :action_action_sequence - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Action.actualArgument', to: :action_actual_argument + xml do + root "CallAction" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "isAsynchronous", to: :is_asynchronous + map_attribute "script", to: :script + map_attribute "mode", to: :mode + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "request", to: :request + map_attribute "message", to: :message + map_attribute "actionSequence", to: :action_sequence + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "Action.recurrence", to: :action_recurrence + map_element "Action.target", to: :action_target + map_element "Action.isAsynchronous", to: :action_is_asynchronous + map_element "Action.script", to: :action_script + map_element "CallAction.mode", to: :call_action_mode + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "Action.request", to: :action_request + map_element "Action.message", to: :action_message + map_element "Action.actionSequence", to: :action_action_sequence + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Action.actualArgument", to: :action_actual_argument + end + end end end diff --git a/lib/xmi/uml13/call_actionmode.rb b/lib/xmi/uml13/call_actionmode.rb index f4fee5c..936f3c3 100644 --- a/lib/xmi/uml13/call_actionmode.rb +++ b/lib/xmi/uml13/call_actionmode.rb @@ -1,12 +1,18 @@ -require 'shale' +# frozen_string_literal: true -class CallActionmode < Shale::Mapper - attribute :xmi_value, Shale::Type::String +require "shale" - xml do - root 'CallAction.mode' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class CallActionmode < Shale::Mapper + attribute :xmi_value, Shale::Type::String - map_attribute 'xmi.value', to: :xmi_value + xml do + root "CallAction.mode" + namespace "omg.org/UML1.3", "UML" + + map_attribute "xmi.value", to: :xmi_value + end + end end end diff --git a/lib/xmi/uml13/call_event.rb b/lib/xmi/uml13/call_event.rb index dce28b5..cb53567 100644 --- a/lib/xmi/uml13/call_event.rb +++ b/lib/xmi/uml13/call_event.rb @@ -1,127 +1,133 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'call_eventoperation' -require_relative 'eventstate' -require_relative 'eventtransition' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'xm_iextension' +require "shale" -class CallEvent < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :state, Shale::Type::Value - attribute :transition, Shale::Type::Value - attribute :operation, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :event_state, Eventstate, collection: true - attribute :event_transition, Eventtransition, collection: true - attribute :call_event_operation, CallEventoperation, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true +require_relative "call_eventoperation" +require_relative "eventstate" +require_relative "eventtransition" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "xm_iextension" - xml do - root 'CallEvent' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class CallEvent < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :state, Shale::Type::Value + attribute :transition, Shale::Type::Value + attribute :operation, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :event_state, Eventstate, collection: true + attribute :event_transition, Eventtransition, collection: true + attribute :call_event_operation, CallEventoperation, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'state', to: :state - map_attribute 'transition', to: :transition - map_attribute 'operation', to: :operation - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'Event.state', to: :event_state - map_element 'Event.transition', to: :event_transition - map_element 'CallEvent.operation', to: :call_event_operation - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value + xml do + root "CallEvent" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "state", to: :state + map_attribute "transition", to: :transition + map_attribute "operation", to: :operation + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "Event.state", to: :event_state + map_element "Event.transition", to: :event_transition + map_element "CallEvent.operation", to: :call_event_operation + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + end + end end end diff --git a/lib/xmi/uml13/call_eventoperation.rb b/lib/xmi/uml13/call_eventoperation.rb index 0f130cf..357019b 100644 --- a/lib/xmi/uml13/call_eventoperation.rb +++ b/lib/xmi/uml13/call_eventoperation.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'operation' +require "shale" -class CallEventoperation < Shale::Mapper - attribute :operation, Operation, collection: true +require_relative "operation" - xml do - root 'CallEvent.operation' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class CallEventoperation < Shale::Mapper + attribute :operation, Operation, collection: true - map_element 'Operation', to: :operation + xml do + root "CallEvent.operation" + namespace "omg.org/UML1.3", "UML" + + map_element "Operation", to: :operation + end + end end end diff --git a/lib/xmi/uml13/change_event.rb b/lib/xmi/uml13/change_event.rb index 22f9d2c..d15ab5d 100644 --- a/lib/xmi/uml13/change_event.rb +++ b/lib/xmi/uml13/change_event.rb @@ -1,125 +1,131 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'change_eventchange_expression' -require_relative 'eventstate' -require_relative 'eventtransition' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'xm_iextension' +require "shale" -class ChangeEvent < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :state, Shale::Type::Value - attribute :transition, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :change_event_change_expression, ChangeEventchangeExpression, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :event_state, Eventstate, collection: true - attribute :event_transition, Eventtransition, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true +require_relative "change_eventchange_expression" +require_relative "eventstate" +require_relative "eventtransition" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "xm_iextension" - xml do - root 'ChangeEvent' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ChangeEvent < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :state, Shale::Type::Value + attribute :transition, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :change_event_change_expression, ChangeEventchangeExpression, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :event_state, Eventstate, collection: true + attribute :event_transition, Eventtransition, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'state', to: :state - map_attribute 'transition', to: :transition - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'ChangeEvent.changeExpression', to: :change_event_change_expression - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'Event.state', to: :event_state - map_element 'Event.transition', to: :event_transition - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value + xml do + root "ChangeEvent" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "state", to: :state + map_attribute "transition", to: :transition + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "ChangeEvent.changeExpression", to: :change_event_change_expression + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "Event.state", to: :event_state + map_element "Event.transition", to: :event_transition + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + end + end end end diff --git a/lib/xmi/uml13/change_eventchange_expression.rb b/lib/xmi/uml13/change_eventchange_expression.rb index 7e14fd8..3cfca81 100644 --- a/lib/xmi/uml13/change_eventchange_expression.rb +++ b/lib/xmi/uml13/change_eventchange_expression.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'boolean_expression' +require "shale" -class ChangeEventchangeExpression < Shale::Mapper - attribute :boolean_expression, BooleanExpression +require_relative "boolean_expression" - xml do - root 'ChangeEvent.changeExpression' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ChangeEventchangeExpression < Shale::Mapper + attribute :boolean_expression, BooleanExpression - map_element 'BooleanExpression', to: :boolean_expression + xml do + root "ChangeEvent.changeExpression" + namespace "omg.org/UML1.3", "UML" + + map_element "BooleanExpression", to: :boolean_expression + end + end end end diff --git a/lib/xmi/uml13/class.rb b/lib/xmi/uml13/class.rb index 4bb1a89..323901f 100644 --- a/lib/xmi/uml13/class.rb +++ b/lib/xmi/uml13/class.rb @@ -1,197 +1,203 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'classifierassociation_end' -require_relative 'classifierclassifier_in_state' -require_relative 'classifierclassifier_role' -require_relative 'classifiercreate_action' -require_relative 'classifierfeature' -require_relative 'classifierinstance' -require_relative 'classifierparameter' -require_relative 'classifierparticipant' -require_relative 'classifierrealization' -require_relative 'classifierspecification' -require_relative 'classifierstructural_feature' -require_relative 'classis_active' -require_relative 'generalizable_elementgeneralization' -require_relative 'generalizable_elementis_abstract' -require_relative 'generalizable_elementis_leaf' -require_relative 'generalizable_elementis_root' -require_relative 'generalizable_elementspecialization' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'namespaceowned_element' -require_relative 'xm_iextension' +require "shale" -class Class < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :is_root, Shale::Type::String - attribute :is_leaf, Shale::Type::String - attribute :is_abstract, Shale::Type::String - attribute :is_active, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :model_element_collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :generalization, Shale::Type::Value - attribute :specialization, Shale::Type::Value - attribute :parameter, Shale::Type::Value - attribute :structural_feature, Shale::Type::Value - attribute :specification, Shale::Type::Value - attribute :realization, Shale::Type::Value - attribute :association_end, Shale::Type::Value - attribute :participant, Shale::Type::Value - attribute :create_action, Shale::Type::Value - attribute :instance, Shale::Type::Value - attribute :classifier_collaboration, Shale::Type::Value - attribute :classifier_role, Shale::Type::Value - attribute :classifier_in_state, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :generalizable_element_is_root, GeneralizableElementisRoot, collection: true - attribute :generalizable_element_is_leaf, GeneralizableElementisLeaf, collection: true - attribute :generalizable_element_is_abstract, GeneralizableElementisAbstract, collection: true - attribute :class_is_active, ClassisActive, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :generalizable_element_generalization, GeneralizableElementgeneralization, collection: true - attribute :generalizable_element_specialization, GeneralizableElementspecialization, collection: true - attribute :classifier_parameter, Classifierparameter, collection: true - attribute :classifier_structural_feature, ClassifierstructuralFeature, collection: true - attribute :classifier_specification, Classifierspecification, collection: true - attribute :classifier_realization, Classifierrealization, collection: true - attribute :classifier_association_end, ClassifierassociationEnd, collection: true - attribute :classifier_participant, Classifierparticipant, collection: true - attribute :classifier_create_action, ClassifiercreateAction, collection: true - attribute :classifier_instance, Classifierinstance, collection: true - attribute :classifier_classifier_role, ClassifierclassifierRole, collection: true - attribute :classifier_classifier_in_state, ClassifierclassifierInState, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :namespace_owned_element, NamespaceownedElement, collection: true - attribute :classifier_feature, Classifierfeature, collection: true +require_relative "classifierassociation_end" +require_relative "classifierclassifier_in_state" +require_relative "classifierclassifier_role" +require_relative "classifiercreate_action" +require_relative "classifierfeature" +require_relative "classifierinstance" +require_relative "classifierparameter" +require_relative "classifierparticipant" +require_relative "classifierrealization" +require_relative "classifierspecification" +require_relative "classifierstructural_feature" +require_relative "classis_active" +require_relative "generalizable_elementgeneralization" +require_relative "generalizable_elementis_abstract" +require_relative "generalizable_elementis_leaf" +require_relative "generalizable_elementis_root" +require_relative "generalizable_elementspecialization" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "namespaceowned_element" +require_relative "xm_iextension" - xml do - root 'Class' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Class < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :is_root, Shale::Type::String + attribute :is_leaf, Shale::Type::String + attribute :is_abstract, Shale::Type::String + attribute :is_active, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :model_element_collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :generalization, Shale::Type::Value + attribute :specialization, Shale::Type::Value + attribute :parameter, Shale::Type::Value + attribute :structural_feature, Shale::Type::Value + attribute :specification, Shale::Type::Value + attribute :realization, Shale::Type::Value + attribute :association_end, Shale::Type::Value + attribute :participant, Shale::Type::Value + attribute :create_action, Shale::Type::Value + attribute :instance, Shale::Type::Value + attribute :classifier_collaboration, Shale::Type::Value + attribute :classifier_role, Shale::Type::Value + attribute :classifier_in_state, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :generalizable_element_is_root, GeneralizableElementisRoot, collection: true + attribute :generalizable_element_is_leaf, GeneralizableElementisLeaf, collection: true + attribute :generalizable_element_is_abstract, GeneralizableElementisAbstract, collection: true + attribute :class_is_active, ClassisActive, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :generalizable_element_generalization, GeneralizableElementgeneralization, collection: true + attribute :generalizable_element_specialization, GeneralizableElementspecialization, collection: true + attribute :classifier_parameter, Classifierparameter, collection: true + attribute :classifier_structural_feature, ClassifierstructuralFeature, collection: true + attribute :classifier_specification, Classifierspecification, collection: true + attribute :classifier_realization, Classifierrealization, collection: true + attribute :classifier_association_end, ClassifierassociationEnd, collection: true + attribute :classifier_participant, Classifierparticipant, collection: true + attribute :classifier_create_action, ClassifiercreateAction, collection: true + attribute :classifier_instance, Classifierinstance, collection: true + attribute :classifier_classifier_role, ClassifierclassifierRole, collection: true + attribute :classifier_classifier_in_state, ClassifierclassifierInState, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :namespace_owned_element, NamespaceownedElement, collection: true + attribute :classifier_feature, Classifierfeature, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'isRoot', to: :is_root - map_attribute 'isLeaf', to: :is_leaf - map_attribute 'isAbstract', to: :is_abstract - map_attribute 'isActive', to: :is_active - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'ModelElement.collaboration', to: :model_element_collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'generalization', to: :generalization - map_attribute 'specialization', to: :specialization - map_attribute 'parameter', to: :parameter - map_attribute 'structuralFeature', to: :structural_feature - map_attribute 'specification', to: :specification - map_attribute 'realization', to: :realization - map_attribute 'associationEnd', to: :association_end - map_attribute 'participant', to: :participant - map_attribute 'createAction', to: :create_action - map_attribute 'instance', to: :instance - map_attribute 'Classifier.collaboration', to: :classifier_collaboration - map_attribute 'classifierRole', to: :classifier_role - map_attribute 'classifierInState', to: :classifier_in_state - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'GeneralizableElement.isRoot', to: :generalizable_element_is_root - map_element 'GeneralizableElement.isLeaf', to: :generalizable_element_is_leaf - map_element 'GeneralizableElement.isAbstract', to: :generalizable_element_is_abstract - map_element 'Class.isActive', to: :class_is_active - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'GeneralizableElement.generalization', to: :generalizable_element_generalization - map_element 'GeneralizableElement.specialization', to: :generalizable_element_specialization - map_element 'Classifier.parameter', to: :classifier_parameter - map_element 'Classifier.structuralFeature', to: :classifier_structural_feature - map_element 'Classifier.specification', to: :classifier_specification - map_element 'Classifier.realization', to: :classifier_realization - map_element 'Classifier.associationEnd', to: :classifier_association_end - map_element 'Classifier.participant', to: :classifier_participant - map_element 'Classifier.createAction', to: :classifier_create_action - map_element 'Classifier.instance', to: :classifier_instance - map_element 'Classifier.classifierRole', to: :classifier_classifier_role - map_element 'Classifier.classifierInState', to: :classifier_classifier_in_state - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Namespace.ownedElement', to: :namespace_owned_element - map_element 'Classifier.feature', to: :classifier_feature + xml do + root "Class" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "isRoot", to: :is_root + map_attribute "isLeaf", to: :is_leaf + map_attribute "isAbstract", to: :is_abstract + map_attribute "isActive", to: :is_active + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "ModelElement.collaboration", to: :model_element_collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "generalization", to: :generalization + map_attribute "specialization", to: :specialization + map_attribute "parameter", to: :parameter + map_attribute "structuralFeature", to: :structural_feature + map_attribute "specification", to: :specification + map_attribute "realization", to: :realization + map_attribute "associationEnd", to: :association_end + map_attribute "participant", to: :participant + map_attribute "createAction", to: :create_action + map_attribute "instance", to: :instance + map_attribute "Classifier.collaboration", to: :classifier_collaboration + map_attribute "classifierRole", to: :classifier_role + map_attribute "classifierInState", to: :classifier_in_state + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "GeneralizableElement.isRoot", to: :generalizable_element_is_root + map_element "GeneralizableElement.isLeaf", to: :generalizable_element_is_leaf + map_element "GeneralizableElement.isAbstract", to: :generalizable_element_is_abstract + map_element "Class.isActive", to: :class_is_active + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "GeneralizableElement.generalization", to: :generalizable_element_generalization + map_element "GeneralizableElement.specialization", to: :generalizable_element_specialization + map_element "Classifier.parameter", to: :classifier_parameter + map_element "Classifier.structuralFeature", to: :classifier_structural_feature + map_element "Classifier.specification", to: :classifier_specification + map_element "Classifier.realization", to: :classifier_realization + map_element "Classifier.associationEnd", to: :classifier_association_end + map_element "Classifier.participant", to: :classifier_participant + map_element "Classifier.createAction", to: :classifier_create_action + map_element "Classifier.instance", to: :classifier_instance + map_element "Classifier.classifierRole", to: :classifier_classifier_role + map_element "Classifier.classifierInState", to: :classifier_classifier_in_state + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Namespace.ownedElement", to: :namespace_owned_element + map_element "Classifier.feature", to: :classifier_feature + end + end end end diff --git a/lib/xmi/uml13/classifier.rb b/lib/xmi/uml13/classifier.rb index 0eecdd6..8f3d43a 100644 --- a/lib/xmi/uml13/classifier.rb +++ b/lib/xmi/uml13/classifier.rb @@ -1,192 +1,198 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'classifierassociation_end' -require_relative 'classifierclassifier_in_state' -require_relative 'classifierclassifier_role' -require_relative 'classifiercreate_action' -require_relative 'classifierfeature' -require_relative 'classifierinstance' -require_relative 'classifierparameter' -require_relative 'classifierparticipant' -require_relative 'classifierrealization' -require_relative 'classifierspecification' -require_relative 'classifierstructural_feature' -require_relative 'generalizable_elementgeneralization' -require_relative 'generalizable_elementis_abstract' -require_relative 'generalizable_elementis_leaf' -require_relative 'generalizable_elementis_root' -require_relative 'generalizable_elementspecialization' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'namespaceowned_element' -require_relative 'xm_iextension' +require "shale" -class Classifier < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :is_root, Shale::Type::String - attribute :is_leaf, Shale::Type::String - attribute :is_abstract, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :model_element_collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :generalization, Shale::Type::Value - attribute :specialization, Shale::Type::Value - attribute :parameter, Shale::Type::Value - attribute :structural_feature, Shale::Type::Value - attribute :specification, Shale::Type::Value - attribute :realization, Shale::Type::Value - attribute :association_end, Shale::Type::Value - attribute :participant, Shale::Type::Value - attribute :create_action, Shale::Type::Value - attribute :instance, Shale::Type::Value - attribute :classifier_collaboration, Shale::Type::Value - attribute :classifier_role, Shale::Type::Value - attribute :classifier_in_state, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :generalizable_element_is_root, GeneralizableElementisRoot, collection: true - attribute :generalizable_element_is_leaf, GeneralizableElementisLeaf, collection: true - attribute :generalizable_element_is_abstract, GeneralizableElementisAbstract, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :generalizable_element_generalization, GeneralizableElementgeneralization, collection: true - attribute :generalizable_element_specialization, GeneralizableElementspecialization, collection: true - attribute :classifier_parameter, Classifierparameter, collection: true - attribute :classifier_structural_feature, ClassifierstructuralFeature, collection: true - attribute :classifier_specification, Classifierspecification, collection: true - attribute :classifier_realization, Classifierrealization, collection: true - attribute :classifier_association_end, ClassifierassociationEnd, collection: true - attribute :classifier_participant, Classifierparticipant, collection: true - attribute :classifier_create_action, ClassifiercreateAction, collection: true - attribute :classifier_instance, Classifierinstance, collection: true - attribute :classifier_classifier_role, ClassifierclassifierRole, collection: true - attribute :classifier_classifier_in_state, ClassifierclassifierInState, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :namespace_owned_element, NamespaceownedElement, collection: true - attribute :classifier_feature, Classifierfeature, collection: true +require_relative "classifierassociation_end" +require_relative "classifierclassifier_in_state" +require_relative "classifierclassifier_role" +require_relative "classifiercreate_action" +require_relative "classifierfeature" +require_relative "classifierinstance" +require_relative "classifierparameter" +require_relative "classifierparticipant" +require_relative "classifierrealization" +require_relative "classifierspecification" +require_relative "classifierstructural_feature" +require_relative "generalizable_elementgeneralization" +require_relative "generalizable_elementis_abstract" +require_relative "generalizable_elementis_leaf" +require_relative "generalizable_elementis_root" +require_relative "generalizable_elementspecialization" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "namespaceowned_element" +require_relative "xm_iextension" - xml do - root 'Classifier' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Classifier < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :is_root, Shale::Type::String + attribute :is_leaf, Shale::Type::String + attribute :is_abstract, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :model_element_collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :generalization, Shale::Type::Value + attribute :specialization, Shale::Type::Value + attribute :parameter, Shale::Type::Value + attribute :structural_feature, Shale::Type::Value + attribute :specification, Shale::Type::Value + attribute :realization, Shale::Type::Value + attribute :association_end, Shale::Type::Value + attribute :participant, Shale::Type::Value + attribute :create_action, Shale::Type::Value + attribute :instance, Shale::Type::Value + attribute :classifier_collaboration, Shale::Type::Value + attribute :classifier_role, Shale::Type::Value + attribute :classifier_in_state, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :generalizable_element_is_root, GeneralizableElementisRoot, collection: true + attribute :generalizable_element_is_leaf, GeneralizableElementisLeaf, collection: true + attribute :generalizable_element_is_abstract, GeneralizableElementisAbstract, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :generalizable_element_generalization, GeneralizableElementgeneralization, collection: true + attribute :generalizable_element_specialization, GeneralizableElementspecialization, collection: true + attribute :classifier_parameter, Classifierparameter, collection: true + attribute :classifier_structural_feature, ClassifierstructuralFeature, collection: true + attribute :classifier_specification, Classifierspecification, collection: true + attribute :classifier_realization, Classifierrealization, collection: true + attribute :classifier_association_end, ClassifierassociationEnd, collection: true + attribute :classifier_participant, Classifierparticipant, collection: true + attribute :classifier_create_action, ClassifiercreateAction, collection: true + attribute :classifier_instance, Classifierinstance, collection: true + attribute :classifier_classifier_role, ClassifierclassifierRole, collection: true + attribute :classifier_classifier_in_state, ClassifierclassifierInState, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :namespace_owned_element, NamespaceownedElement, collection: true + attribute :classifier_feature, Classifierfeature, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'isRoot', to: :is_root - map_attribute 'isLeaf', to: :is_leaf - map_attribute 'isAbstract', to: :is_abstract - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'ModelElement.collaboration', to: :model_element_collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'generalization', to: :generalization - map_attribute 'specialization', to: :specialization - map_attribute 'parameter', to: :parameter - map_attribute 'structuralFeature', to: :structural_feature - map_attribute 'specification', to: :specification - map_attribute 'realization', to: :realization - map_attribute 'associationEnd', to: :association_end - map_attribute 'participant', to: :participant - map_attribute 'createAction', to: :create_action - map_attribute 'instance', to: :instance - map_attribute 'Classifier.collaboration', to: :classifier_collaboration - map_attribute 'classifierRole', to: :classifier_role - map_attribute 'classifierInState', to: :classifier_in_state - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'GeneralizableElement.isRoot', to: :generalizable_element_is_root - map_element 'GeneralizableElement.isLeaf', to: :generalizable_element_is_leaf - map_element 'GeneralizableElement.isAbstract', to: :generalizable_element_is_abstract - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'GeneralizableElement.generalization', to: :generalizable_element_generalization - map_element 'GeneralizableElement.specialization', to: :generalizable_element_specialization - map_element 'Classifier.parameter', to: :classifier_parameter - map_element 'Classifier.structuralFeature', to: :classifier_structural_feature - map_element 'Classifier.specification', to: :classifier_specification - map_element 'Classifier.realization', to: :classifier_realization - map_element 'Classifier.associationEnd', to: :classifier_association_end - map_element 'Classifier.participant', to: :classifier_participant - map_element 'Classifier.createAction', to: :classifier_create_action - map_element 'Classifier.instance', to: :classifier_instance - map_element 'Classifier.classifierRole', to: :classifier_classifier_role - map_element 'Classifier.classifierInState', to: :classifier_classifier_in_state - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Namespace.ownedElement', to: :namespace_owned_element - map_element 'Classifier.feature', to: :classifier_feature + xml do + root "Classifier" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "isRoot", to: :is_root + map_attribute "isLeaf", to: :is_leaf + map_attribute "isAbstract", to: :is_abstract + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "ModelElement.collaboration", to: :model_element_collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "generalization", to: :generalization + map_attribute "specialization", to: :specialization + map_attribute "parameter", to: :parameter + map_attribute "structuralFeature", to: :structural_feature + map_attribute "specification", to: :specification + map_attribute "realization", to: :realization + map_attribute "associationEnd", to: :association_end + map_attribute "participant", to: :participant + map_attribute "createAction", to: :create_action + map_attribute "instance", to: :instance + map_attribute "Classifier.collaboration", to: :classifier_collaboration + map_attribute "classifierRole", to: :classifier_role + map_attribute "classifierInState", to: :classifier_in_state + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "GeneralizableElement.isRoot", to: :generalizable_element_is_root + map_element "GeneralizableElement.isLeaf", to: :generalizable_element_is_leaf + map_element "GeneralizableElement.isAbstract", to: :generalizable_element_is_abstract + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "GeneralizableElement.generalization", to: :generalizable_element_generalization + map_element "GeneralizableElement.specialization", to: :generalizable_element_specialization + map_element "Classifier.parameter", to: :classifier_parameter + map_element "Classifier.structuralFeature", to: :classifier_structural_feature + map_element "Classifier.specification", to: :classifier_specification + map_element "Classifier.realization", to: :classifier_realization + map_element "Classifier.associationEnd", to: :classifier_association_end + map_element "Classifier.participant", to: :classifier_participant + map_element "Classifier.createAction", to: :classifier_create_action + map_element "Classifier.instance", to: :classifier_instance + map_element "Classifier.classifierRole", to: :classifier_classifier_role + map_element "Classifier.classifierInState", to: :classifier_classifier_in_state + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Namespace.ownedElement", to: :namespace_owned_element + map_element "Classifier.feature", to: :classifier_feature + end + end end end diff --git a/lib/xmi/uml13/classifier_in_state.rb b/lib/xmi/uml13/classifier_in_state.rb index f188b7d..79ee173 100644 --- a/lib/xmi/uml13/classifier_in_state.rb +++ b/lib/xmi/uml13/classifier_in_state.rb @@ -1,207 +1,213 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'classifier_in_statein_state' -require_relative 'classifier_in_stateobject_flow_state' -require_relative 'classifier_in_statetype' -require_relative 'classifierassociation_end' -require_relative 'classifierclassifier_in_state' -require_relative 'classifierclassifier_role' -require_relative 'classifiercreate_action' -require_relative 'classifierfeature' -require_relative 'classifierinstance' -require_relative 'classifierparameter' -require_relative 'classifierparticipant' -require_relative 'classifierrealization' -require_relative 'classifierspecification' -require_relative 'classifierstructural_feature' -require_relative 'generalizable_elementgeneralization' -require_relative 'generalizable_elementis_abstract' -require_relative 'generalizable_elementis_leaf' -require_relative 'generalizable_elementis_root' -require_relative 'generalizable_elementspecialization' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'namespaceowned_element' -require_relative 'xm_iextension' +require "shale" -class ClassifierInState < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :is_root, Shale::Type::String - attribute :is_leaf, Shale::Type::String - attribute :is_abstract, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :model_element_collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :generalization, Shale::Type::Value - attribute :specialization, Shale::Type::Value - attribute :parameter, Shale::Type::Value - attribute :structural_feature, Shale::Type::Value - attribute :specification, Shale::Type::Value - attribute :realization, Shale::Type::Value - attribute :association_end, Shale::Type::Value - attribute :participant, Shale::Type::Value - attribute :create_action, Shale::Type::Value - attribute :instance, Shale::Type::Value - attribute :classifier_collaboration, Shale::Type::Value - attribute :classifier_role, Shale::Type::Value - attribute :classifier_in_state, Shale::Type::Value - attribute :object_flow_state, Shale::Type::Value - attribute :in_state, Shale::Type::Value - attribute :type, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :generalizable_element_is_root, GeneralizableElementisRoot, collection: true - attribute :generalizable_element_is_leaf, GeneralizableElementisLeaf, collection: true - attribute :generalizable_element_is_abstract, GeneralizableElementisAbstract, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :generalizable_element_generalization, GeneralizableElementgeneralization, collection: true - attribute :generalizable_element_specialization, GeneralizableElementspecialization, collection: true - attribute :classifier_parameter, Classifierparameter, collection: true - attribute :classifier_structural_feature, ClassifierstructuralFeature, collection: true - attribute :classifier_specification, Classifierspecification, collection: true - attribute :classifier_realization, Classifierrealization, collection: true - attribute :classifier_association_end, ClassifierassociationEnd, collection: true - attribute :classifier_participant, Classifierparticipant, collection: true - attribute :classifier_create_action, ClassifiercreateAction, collection: true - attribute :classifier_instance, Classifierinstance, collection: true - attribute :classifier_classifier_role, ClassifierclassifierRole, collection: true - attribute :classifier_classifier_in_state, ClassifierclassifierInState, collection: true - attribute :classifier_in_state_object_flow_state, ClassifierInStateobjectFlowState, collection: true - attribute :classifier_in_state_in_state, ClassifierInStateinState, collection: true - attribute :classifier_in_state_type, ClassifierInStatetype, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :namespace_owned_element, NamespaceownedElement, collection: true - attribute :classifier_feature, Classifierfeature, collection: true +require_relative "classifier_in_statein_state" +require_relative "classifier_in_stateobject_flow_state" +require_relative "classifier_in_statetype" +require_relative "classifierassociation_end" +require_relative "classifierclassifier_in_state" +require_relative "classifierclassifier_role" +require_relative "classifiercreate_action" +require_relative "classifierfeature" +require_relative "classifierinstance" +require_relative "classifierparameter" +require_relative "classifierparticipant" +require_relative "classifierrealization" +require_relative "classifierspecification" +require_relative "classifierstructural_feature" +require_relative "generalizable_elementgeneralization" +require_relative "generalizable_elementis_abstract" +require_relative "generalizable_elementis_leaf" +require_relative "generalizable_elementis_root" +require_relative "generalizable_elementspecialization" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "namespaceowned_element" +require_relative "xm_iextension" - xml do - root 'ClassifierInState' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ClassifierInState < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :is_root, Shale::Type::String + attribute :is_leaf, Shale::Type::String + attribute :is_abstract, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :model_element_collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :generalization, Shale::Type::Value + attribute :specialization, Shale::Type::Value + attribute :parameter, Shale::Type::Value + attribute :structural_feature, Shale::Type::Value + attribute :specification, Shale::Type::Value + attribute :realization, Shale::Type::Value + attribute :association_end, Shale::Type::Value + attribute :participant, Shale::Type::Value + attribute :create_action, Shale::Type::Value + attribute :instance, Shale::Type::Value + attribute :classifier_collaboration, Shale::Type::Value + attribute :classifier_role, Shale::Type::Value + attribute :classifier_in_state, Shale::Type::Value + attribute :object_flow_state, Shale::Type::Value + attribute :in_state, Shale::Type::Value + attribute :type, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :generalizable_element_is_root, GeneralizableElementisRoot, collection: true + attribute :generalizable_element_is_leaf, GeneralizableElementisLeaf, collection: true + attribute :generalizable_element_is_abstract, GeneralizableElementisAbstract, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :generalizable_element_generalization, GeneralizableElementgeneralization, collection: true + attribute :generalizable_element_specialization, GeneralizableElementspecialization, collection: true + attribute :classifier_parameter, Classifierparameter, collection: true + attribute :classifier_structural_feature, ClassifierstructuralFeature, collection: true + attribute :classifier_specification, Classifierspecification, collection: true + attribute :classifier_realization, Classifierrealization, collection: true + attribute :classifier_association_end, ClassifierassociationEnd, collection: true + attribute :classifier_participant, Classifierparticipant, collection: true + attribute :classifier_create_action, ClassifiercreateAction, collection: true + attribute :classifier_instance, Classifierinstance, collection: true + attribute :classifier_classifier_role, ClassifierclassifierRole, collection: true + attribute :classifier_classifier_in_state, ClassifierclassifierInState, collection: true + attribute :classifier_in_state_object_flow_state, ClassifierInStateobjectFlowState, collection: true + attribute :classifier_in_state_in_state, ClassifierInStateinState, collection: true + attribute :classifier_in_state_type, ClassifierInStatetype, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :namespace_owned_element, NamespaceownedElement, collection: true + attribute :classifier_feature, Classifierfeature, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'isRoot', to: :is_root - map_attribute 'isLeaf', to: :is_leaf - map_attribute 'isAbstract', to: :is_abstract - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'ModelElement.collaboration', to: :model_element_collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'generalization', to: :generalization - map_attribute 'specialization', to: :specialization - map_attribute 'parameter', to: :parameter - map_attribute 'structuralFeature', to: :structural_feature - map_attribute 'specification', to: :specification - map_attribute 'realization', to: :realization - map_attribute 'associationEnd', to: :association_end - map_attribute 'participant', to: :participant - map_attribute 'createAction', to: :create_action - map_attribute 'instance', to: :instance - map_attribute 'Classifier.collaboration', to: :classifier_collaboration - map_attribute 'classifierRole', to: :classifier_role - map_attribute 'classifierInState', to: :classifier_in_state - map_attribute 'objectFlowState', to: :object_flow_state - map_attribute 'inState', to: :in_state - map_attribute 'type', to: :type - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'GeneralizableElement.isRoot', to: :generalizable_element_is_root - map_element 'GeneralizableElement.isLeaf', to: :generalizable_element_is_leaf - map_element 'GeneralizableElement.isAbstract', to: :generalizable_element_is_abstract - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'GeneralizableElement.generalization', to: :generalizable_element_generalization - map_element 'GeneralizableElement.specialization', to: :generalizable_element_specialization - map_element 'Classifier.parameter', to: :classifier_parameter - map_element 'Classifier.structuralFeature', to: :classifier_structural_feature - map_element 'Classifier.specification', to: :classifier_specification - map_element 'Classifier.realization', to: :classifier_realization - map_element 'Classifier.associationEnd', to: :classifier_association_end - map_element 'Classifier.participant', to: :classifier_participant - map_element 'Classifier.createAction', to: :classifier_create_action - map_element 'Classifier.instance', to: :classifier_instance - map_element 'Classifier.classifierRole', to: :classifier_classifier_role - map_element 'Classifier.classifierInState', to: :classifier_classifier_in_state - map_element 'ClassifierInState.objectFlowState', to: :classifier_in_state_object_flow_state - map_element 'ClassifierInState.inState', to: :classifier_in_state_in_state - map_element 'ClassifierInState.type', to: :classifier_in_state_type - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Namespace.ownedElement', to: :namespace_owned_element - map_element 'Classifier.feature', to: :classifier_feature + xml do + root "ClassifierInState" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "isRoot", to: :is_root + map_attribute "isLeaf", to: :is_leaf + map_attribute "isAbstract", to: :is_abstract + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "ModelElement.collaboration", to: :model_element_collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "generalization", to: :generalization + map_attribute "specialization", to: :specialization + map_attribute "parameter", to: :parameter + map_attribute "structuralFeature", to: :structural_feature + map_attribute "specification", to: :specification + map_attribute "realization", to: :realization + map_attribute "associationEnd", to: :association_end + map_attribute "participant", to: :participant + map_attribute "createAction", to: :create_action + map_attribute "instance", to: :instance + map_attribute "Classifier.collaboration", to: :classifier_collaboration + map_attribute "classifierRole", to: :classifier_role + map_attribute "classifierInState", to: :classifier_in_state + map_attribute "objectFlowState", to: :object_flow_state + map_attribute "inState", to: :in_state + map_attribute "type", to: :type + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "GeneralizableElement.isRoot", to: :generalizable_element_is_root + map_element "GeneralizableElement.isLeaf", to: :generalizable_element_is_leaf + map_element "GeneralizableElement.isAbstract", to: :generalizable_element_is_abstract + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "GeneralizableElement.generalization", to: :generalizable_element_generalization + map_element "GeneralizableElement.specialization", to: :generalizable_element_specialization + map_element "Classifier.parameter", to: :classifier_parameter + map_element "Classifier.structuralFeature", to: :classifier_structural_feature + map_element "Classifier.specification", to: :classifier_specification + map_element "Classifier.realization", to: :classifier_realization + map_element "Classifier.associationEnd", to: :classifier_association_end + map_element "Classifier.participant", to: :classifier_participant + map_element "Classifier.createAction", to: :classifier_create_action + map_element "Classifier.instance", to: :classifier_instance + map_element "Classifier.classifierRole", to: :classifier_classifier_role + map_element "Classifier.classifierInState", to: :classifier_classifier_in_state + map_element "ClassifierInState.objectFlowState", to: :classifier_in_state_object_flow_state + map_element "ClassifierInState.inState", to: :classifier_in_state_in_state + map_element "ClassifierInState.type", to: :classifier_in_state_type + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Namespace.ownedElement", to: :namespace_owned_element + map_element "Classifier.feature", to: :classifier_feature + end + end end end diff --git a/lib/xmi/uml13/classifier_in_statein_state.rb b/lib/xmi/uml13/classifier_in_statein_state.rb index b45b024..376cdfb 100644 --- a/lib/xmi/uml13/classifier_in_statein_state.rb +++ b/lib/xmi/uml13/classifier_in_statein_state.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'state' +require "shale" -class ClassifierInStateinState < Shale::Mapper - attribute :state, State, collection: true +require_relative "state" - xml do - root 'ClassifierInState.inState' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ClassifierInStateinState < Shale::Mapper + attribute :state, State, collection: true - map_element 'State', to: :state + xml do + root "ClassifierInState.inState" + namespace "omg.org/UML1.3", "UML" + + map_element "State", to: :state + end + end end end diff --git a/lib/xmi/uml13/classifier_in_stateobject_flow_state.rb b/lib/xmi/uml13/classifier_in_stateobject_flow_state.rb index 7da45bf..56da925 100644 --- a/lib/xmi/uml13/classifier_in_stateobject_flow_state.rb +++ b/lib/xmi/uml13/classifier_in_stateobject_flow_state.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'object_flow_state' +require "shale" -class ClassifierInStateobjectFlowState < Shale::Mapper - attribute :object_flow_state, ObjectFlowState, collection: true +require_relative "object_flow_state" - xml do - root 'ClassifierInState.objectFlowState' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ClassifierInStateobjectFlowState < Shale::Mapper + attribute :object_flow_state, ObjectFlowState, collection: true - map_element 'ObjectFlowState', to: :object_flow_state + xml do + root "ClassifierInState.objectFlowState" + namespace "omg.org/UML1.3", "UML" + + map_element "ObjectFlowState", to: :object_flow_state + end + end end end diff --git a/lib/xmi/uml13/classifier_in_statetype.rb b/lib/xmi/uml13/classifier_in_statetype.rb index 5454d3b..192bab9 100644 --- a/lib/xmi/uml13/classifier_in_statetype.rb +++ b/lib/xmi/uml13/classifier_in_statetype.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'classifier' +require "shale" -class ClassifierInStatetype < Shale::Mapper - attribute :classifier, Classifier, collection: true +require_relative "classifier" - xml do - root 'ClassifierInState.type' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ClassifierInStatetype < Shale::Mapper + attribute :classifier, Classifier, collection: true - map_element 'Classifier', to: :classifier + xml do + root "ClassifierInState.type" + namespace "omg.org/UML1.3", "UML" + + map_element "Classifier", to: :classifier + end + end end end diff --git a/lib/xmi/uml13/classifier_role.rb b/lib/xmi/uml13/classifier_role.rb index 02cb835..9f6850a 100644 --- a/lib/xmi/uml13/classifier_role.rb +++ b/lib/xmi/uml13/classifier_role.rb @@ -1,221 +1,227 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'classifier_roleassociation_end_role' -require_relative 'classifier_roleavailable_feature' -require_relative 'classifier_rolebase' -require_relative 'classifier_rolemessage' -require_relative 'classifier_rolemessage2' -require_relative 'classifier_rolemultiplicity' -require_relative 'classifierassociation_end' -require_relative 'classifierclassifier_in_state' -require_relative 'classifierclassifier_role' -require_relative 'classifiercreate_action' -require_relative 'classifierfeature' -require_relative 'classifierinstance' -require_relative 'classifierparameter' -require_relative 'classifierparticipant' -require_relative 'classifierrealization' -require_relative 'classifierspecification' -require_relative 'classifierstructural_feature' -require_relative 'generalizable_elementgeneralization' -require_relative 'generalizable_elementis_abstract' -require_relative 'generalizable_elementis_leaf' -require_relative 'generalizable_elementis_root' -require_relative 'generalizable_elementspecialization' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'namespaceowned_element' -require_relative 'xm_iextension' +require "shale" -class ClassifierRole < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :is_root, Shale::Type::String - attribute :is_leaf, Shale::Type::String - attribute :is_abstract, Shale::Type::String - attribute :multiplicity, Shale::Type::Value - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :model_element_namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :model_element_collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :generalization, Shale::Type::Value - attribute :specialization, Shale::Type::Value - attribute :parameter, Shale::Type::Value - attribute :structural_feature, Shale::Type::Value - attribute :specification, Shale::Type::Value - attribute :realization, Shale::Type::Value - attribute :association_end, Shale::Type::Value - attribute :participant, Shale::Type::Value - attribute :create_action, Shale::Type::Value - attribute :instance, Shale::Type::Value - attribute :classifier_collaboration, Shale::Type::Value - attribute :classifier_role, Shale::Type::Value - attribute :classifier_in_state, Shale::Type::Value - attribute :association_end_role, Shale::Type::Value - attribute :classifier_role_namespace, Shale::Type::Value - attribute :message2, Shale::Type::Value - attribute :message, Shale::Type::Value - attribute :base, Shale::Type::Value - attribute :available_feature, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :generalizable_element_is_root, GeneralizableElementisRoot, collection: true - attribute :generalizable_element_is_leaf, GeneralizableElementisLeaf, collection: true - attribute :generalizable_element_is_abstract, GeneralizableElementisAbstract, collection: true - attribute :classifier_role_multiplicity, ClassifierRolemultiplicity, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :generalizable_element_generalization, GeneralizableElementgeneralization, collection: true - attribute :generalizable_element_specialization, GeneralizableElementspecialization, collection: true - attribute :classifier_parameter, Classifierparameter, collection: true - attribute :classifier_structural_feature, ClassifierstructuralFeature, collection: true - attribute :classifier_specification, Classifierspecification, collection: true - attribute :classifier_realization, Classifierrealization, collection: true - attribute :classifier_association_end, ClassifierassociationEnd, collection: true - attribute :classifier_participant, Classifierparticipant, collection: true - attribute :classifier_create_action, ClassifiercreateAction, collection: true - attribute :classifier_instance, Classifierinstance, collection: true - attribute :classifier_classifier_role, ClassifierclassifierRole, collection: true - attribute :classifier_classifier_in_state, ClassifierclassifierInState, collection: true - attribute :classifier_role_association_end_role, ClassifierRoleassociationEndRole, collection: true - attribute :classifier_role_message2, ClassifierRolemessage2, collection: true - attribute :classifier_role_message, ClassifierRolemessage, collection: true - attribute :classifier_role_base, ClassifierRolebase, collection: true - attribute :classifier_role_available_feature, ClassifierRoleavailableFeature, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :namespace_owned_element, NamespaceownedElement, collection: true - attribute :classifier_feature, Classifierfeature, collection: true +require_relative "classifier_roleassociation_end_role" +require_relative "classifier_roleavailable_feature" +require_relative "classifier_rolebase" +require_relative "classifier_rolemessage" +require_relative "classifier_rolemessage2" +require_relative "classifier_rolemultiplicity" +require_relative "classifierassociation_end" +require_relative "classifierclassifier_in_state" +require_relative "classifierclassifier_role" +require_relative "classifiercreate_action" +require_relative "classifierfeature" +require_relative "classifierinstance" +require_relative "classifierparameter" +require_relative "classifierparticipant" +require_relative "classifierrealization" +require_relative "classifierspecification" +require_relative "classifierstructural_feature" +require_relative "generalizable_elementgeneralization" +require_relative "generalizable_elementis_abstract" +require_relative "generalizable_elementis_leaf" +require_relative "generalizable_elementis_root" +require_relative "generalizable_elementspecialization" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "namespaceowned_element" +require_relative "xm_iextension" - xml do - root 'ClassifierRole' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ClassifierRole < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :is_root, Shale::Type::String + attribute :is_leaf, Shale::Type::String + attribute :is_abstract, Shale::Type::String + attribute :multiplicity, Shale::Type::Value + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :model_element_namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :model_element_collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :generalization, Shale::Type::Value + attribute :specialization, Shale::Type::Value + attribute :parameter, Shale::Type::Value + attribute :structural_feature, Shale::Type::Value + attribute :specification, Shale::Type::Value + attribute :realization, Shale::Type::Value + attribute :association_end, Shale::Type::Value + attribute :participant, Shale::Type::Value + attribute :create_action, Shale::Type::Value + attribute :instance, Shale::Type::Value + attribute :classifier_collaboration, Shale::Type::Value + attribute :classifier_role, Shale::Type::Value + attribute :classifier_in_state, Shale::Type::Value + attribute :association_end_role, Shale::Type::Value + attribute :classifier_role_namespace, Shale::Type::Value + attribute :message2, Shale::Type::Value + attribute :message, Shale::Type::Value + attribute :base, Shale::Type::Value + attribute :available_feature, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :generalizable_element_is_root, GeneralizableElementisRoot, collection: true + attribute :generalizable_element_is_leaf, GeneralizableElementisLeaf, collection: true + attribute :generalizable_element_is_abstract, GeneralizableElementisAbstract, collection: true + attribute :classifier_role_multiplicity, ClassifierRolemultiplicity, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :generalizable_element_generalization, GeneralizableElementgeneralization, collection: true + attribute :generalizable_element_specialization, GeneralizableElementspecialization, collection: true + attribute :classifier_parameter, Classifierparameter, collection: true + attribute :classifier_structural_feature, ClassifierstructuralFeature, collection: true + attribute :classifier_specification, Classifierspecification, collection: true + attribute :classifier_realization, Classifierrealization, collection: true + attribute :classifier_association_end, ClassifierassociationEnd, collection: true + attribute :classifier_participant, Classifierparticipant, collection: true + attribute :classifier_create_action, ClassifiercreateAction, collection: true + attribute :classifier_instance, Classifierinstance, collection: true + attribute :classifier_classifier_role, ClassifierclassifierRole, collection: true + attribute :classifier_classifier_in_state, ClassifierclassifierInState, collection: true + attribute :classifier_role_association_end_role, ClassifierRoleassociationEndRole, collection: true + attribute :classifier_role_message2, ClassifierRolemessage2, collection: true + attribute :classifier_role_message, ClassifierRolemessage, collection: true + attribute :classifier_role_base, ClassifierRolebase, collection: true + attribute :classifier_role_available_feature, ClassifierRoleavailableFeature, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :namespace_owned_element, NamespaceownedElement, collection: true + attribute :classifier_feature, Classifierfeature, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'isRoot', to: :is_root - map_attribute 'isLeaf', to: :is_leaf - map_attribute 'isAbstract', to: :is_abstract - map_attribute 'multiplicity', to: :multiplicity - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'ModelElement.namespace', to: :model_element_namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'ModelElement.collaboration', to: :model_element_collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'generalization', to: :generalization - map_attribute 'specialization', to: :specialization - map_attribute 'parameter', to: :parameter - map_attribute 'structuralFeature', to: :structural_feature - map_attribute 'specification', to: :specification - map_attribute 'realization', to: :realization - map_attribute 'associationEnd', to: :association_end - map_attribute 'participant', to: :participant - map_attribute 'createAction', to: :create_action - map_attribute 'instance', to: :instance - map_attribute 'Classifier.collaboration', to: :classifier_collaboration - map_attribute 'classifierRole', to: :classifier_role - map_attribute 'classifierInState', to: :classifier_in_state - map_attribute 'associationEndRole', to: :association_end_role - map_attribute 'ClassifierRole.namespace', to: :classifier_role_namespace - map_attribute 'message2', to: :message2 - map_attribute 'message', to: :message - map_attribute 'base', to: :base - map_attribute 'availableFeature', to: :available_feature - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'GeneralizableElement.isRoot', to: :generalizable_element_is_root - map_element 'GeneralizableElement.isLeaf', to: :generalizable_element_is_leaf - map_element 'GeneralizableElement.isAbstract', to: :generalizable_element_is_abstract - map_element 'ClassifierRole.multiplicity', to: :classifier_role_multiplicity - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'GeneralizableElement.generalization', to: :generalizable_element_generalization - map_element 'GeneralizableElement.specialization', to: :generalizable_element_specialization - map_element 'Classifier.parameter', to: :classifier_parameter - map_element 'Classifier.structuralFeature', to: :classifier_structural_feature - map_element 'Classifier.specification', to: :classifier_specification - map_element 'Classifier.realization', to: :classifier_realization - map_element 'Classifier.associationEnd', to: :classifier_association_end - map_element 'Classifier.participant', to: :classifier_participant - map_element 'Classifier.createAction', to: :classifier_create_action - map_element 'Classifier.instance', to: :classifier_instance - map_element 'Classifier.classifierRole', to: :classifier_classifier_role - map_element 'Classifier.classifierInState', to: :classifier_classifier_in_state - map_element 'ClassifierRole.associationEndRole', to: :classifier_role_association_end_role - map_element 'ClassifierRole.message2', to: :classifier_role_message2 - map_element 'ClassifierRole.message', to: :classifier_role_message - map_element 'ClassifierRole.base', to: :classifier_role_base - map_element 'ClassifierRole.availableFeature', to: :classifier_role_available_feature - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Namespace.ownedElement', to: :namespace_owned_element - map_element 'Classifier.feature', to: :classifier_feature + xml do + root "ClassifierRole" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "isRoot", to: :is_root + map_attribute "isLeaf", to: :is_leaf + map_attribute "isAbstract", to: :is_abstract + map_attribute "multiplicity", to: :multiplicity + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "ModelElement.namespace", to: :model_element_namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "ModelElement.collaboration", to: :model_element_collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "generalization", to: :generalization + map_attribute "specialization", to: :specialization + map_attribute "parameter", to: :parameter + map_attribute "structuralFeature", to: :structural_feature + map_attribute "specification", to: :specification + map_attribute "realization", to: :realization + map_attribute "associationEnd", to: :association_end + map_attribute "participant", to: :participant + map_attribute "createAction", to: :create_action + map_attribute "instance", to: :instance + map_attribute "Classifier.collaboration", to: :classifier_collaboration + map_attribute "classifierRole", to: :classifier_role + map_attribute "classifierInState", to: :classifier_in_state + map_attribute "associationEndRole", to: :association_end_role + map_attribute "ClassifierRole.namespace", to: :classifier_role_namespace + map_attribute "message2", to: :message2 + map_attribute "message", to: :message + map_attribute "base", to: :base + map_attribute "availableFeature", to: :available_feature + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "GeneralizableElement.isRoot", to: :generalizable_element_is_root + map_element "GeneralizableElement.isLeaf", to: :generalizable_element_is_leaf + map_element "GeneralizableElement.isAbstract", to: :generalizable_element_is_abstract + map_element "ClassifierRole.multiplicity", to: :classifier_role_multiplicity + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "GeneralizableElement.generalization", to: :generalizable_element_generalization + map_element "GeneralizableElement.specialization", to: :generalizable_element_specialization + map_element "Classifier.parameter", to: :classifier_parameter + map_element "Classifier.structuralFeature", to: :classifier_structural_feature + map_element "Classifier.specification", to: :classifier_specification + map_element "Classifier.realization", to: :classifier_realization + map_element "Classifier.associationEnd", to: :classifier_association_end + map_element "Classifier.participant", to: :classifier_participant + map_element "Classifier.createAction", to: :classifier_create_action + map_element "Classifier.instance", to: :classifier_instance + map_element "Classifier.classifierRole", to: :classifier_classifier_role + map_element "Classifier.classifierInState", to: :classifier_classifier_in_state + map_element "ClassifierRole.associationEndRole", to: :classifier_role_association_end_role + map_element "ClassifierRole.message2", to: :classifier_role_message2 + map_element "ClassifierRole.message", to: :classifier_role_message + map_element "ClassifierRole.base", to: :classifier_role_base + map_element "ClassifierRole.availableFeature", to: :classifier_role_available_feature + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Namespace.ownedElement", to: :namespace_owned_element + map_element "Classifier.feature", to: :classifier_feature + end + end end end diff --git a/lib/xmi/uml13/classifier_roleassociation_end_role.rb b/lib/xmi/uml13/classifier_roleassociation_end_role.rb index 49e0974..9b9ed5f 100644 --- a/lib/xmi/uml13/classifier_roleassociation_end_role.rb +++ b/lib/xmi/uml13/classifier_roleassociation_end_role.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'association_end_role' +require "shale" -class ClassifierRoleassociationEndRole < Shale::Mapper - attribute :association_end_role, AssociationEndRole, collection: true +require_relative "association_end_role" - xml do - root 'ClassifierRole.associationEndRole' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ClassifierRoleassociationEndRole < Shale::Mapper + attribute :association_end_role, AssociationEndRole, collection: true - map_element 'AssociationEndRole', to: :association_end_role + xml do + root "ClassifierRole.associationEndRole" + namespace "omg.org/UML1.3", "UML" + + map_element "AssociationEndRole", to: :association_end_role + end + end end end diff --git a/lib/xmi/uml13/classifier_roleavailable_feature.rb b/lib/xmi/uml13/classifier_roleavailable_feature.rb index c859f0a..91342b2 100644 --- a/lib/xmi/uml13/classifier_roleavailable_feature.rb +++ b/lib/xmi/uml13/classifier_roleavailable_feature.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'feature' +require "shale" -class ClassifierRoleavailableFeature < Shale::Mapper - attribute :feature, Feature, collection: true +require_relative "feature" - xml do - root 'ClassifierRole.availableFeature' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ClassifierRoleavailableFeature < Shale::Mapper + attribute :feature, Feature, collection: true - map_element 'Feature', to: :feature + xml do + root "ClassifierRole.availableFeature" + namespace "omg.org/UML1.3", "UML" + + map_element "Feature", to: :feature + end + end end end diff --git a/lib/xmi/uml13/classifier_rolebase.rb b/lib/xmi/uml13/classifier_rolebase.rb index 87a0155..44f5093 100644 --- a/lib/xmi/uml13/classifier_rolebase.rb +++ b/lib/xmi/uml13/classifier_rolebase.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'classifier' +require "shale" -class ClassifierRolebase < Shale::Mapper - attribute :classifier, Classifier, collection: true +require_relative "classifier" - xml do - root 'ClassifierRole.base' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ClassifierRolebase < Shale::Mapper + attribute :classifier, Classifier, collection: true - map_element 'Classifier', to: :classifier + xml do + root "ClassifierRole.base" + namespace "omg.org/UML1.3", "UML" + + map_element "Classifier", to: :classifier + end + end end end diff --git a/lib/xmi/uml13/classifier_rolemessage.rb b/lib/xmi/uml13/classifier_rolemessage.rb index d87af49..3490a16 100644 --- a/lib/xmi/uml13/classifier_rolemessage.rb +++ b/lib/xmi/uml13/classifier_rolemessage.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'message' +require "shale" -class ClassifierRolemessage < Shale::Mapper - attribute :message, Message, collection: true +require_relative "message" - xml do - root 'ClassifierRole.message' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ClassifierRolemessage < Shale::Mapper + attribute :message, Message, collection: true - map_element 'Message', to: :message + xml do + root "ClassifierRole.message" + namespace "omg.org/UML1.3", "UML" + + map_element "Message", to: :message + end + end end end diff --git a/lib/xmi/uml13/classifier_rolemessage2.rb b/lib/xmi/uml13/classifier_rolemessage2.rb index 418c70d..6c56425 100644 --- a/lib/xmi/uml13/classifier_rolemessage2.rb +++ b/lib/xmi/uml13/classifier_rolemessage2.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'message' +require "shale" -class ClassifierRolemessage2 < Shale::Mapper - attribute :message, Message, collection: true +require_relative "message" - xml do - root 'ClassifierRole.message2' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ClassifierRolemessage2 < Shale::Mapper + attribute :message, Message, collection: true - map_element 'Message', to: :message + xml do + root "ClassifierRole.message2" + namespace "omg.org/UML1.3", "UML" + + map_element "Message", to: :message + end + end end end diff --git a/lib/xmi/uml13/classifier_rolemultiplicity.rb b/lib/xmi/uml13/classifier_rolemultiplicity.rb index 28bb6af..701c2d4 100644 --- a/lib/xmi/uml13/classifier_rolemultiplicity.rb +++ b/lib/xmi/uml13/classifier_rolemultiplicity.rb @@ -1,16 +1,22 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'xm_ireference' +require "shale" -class ClassifierRolemultiplicity < Shale::Mapper - attribute :content, Shale::Type::String - attribute :xmi_reference, XMIreference, collection: true +require_relative "xm_ireference" - xml do - root 'ClassifierRole.multiplicity' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ClassifierRolemultiplicity < Shale::Mapper + attribute :content, Shale::Type::String + attribute :xmi_reference, XMIreference, collection: true - map_content to: :content - map_element 'XMI.reference', to: :xmi_reference, prefix: nil, namespace: nil + xml do + root "ClassifierRole.multiplicity" + namespace "omg.org/UML1.3", "UML" + + map_content to: :content + map_element "XMI.reference", to: :xmi_reference, prefix: nil, namespace: nil + end + end end end diff --git a/lib/xmi/uml13/classifier_rolenamespace.rb b/lib/xmi/uml13/classifier_rolenamespace.rb index a54b6fc..7dda559 100644 --- a/lib/xmi/uml13/classifier_rolenamespace.rb +++ b/lib/xmi/uml13/classifier_rolenamespace.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'collaboration' +require "shale" -class ClassifierRolenamespace < Shale::Mapper - attribute :collaboration, Collaboration, collection: true +require_relative "collaboration" - xml do - root 'ClassifierRole.namespace' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ClassifierRolenamespace < Shale::Mapper + attribute :collaboration, Collaboration, collection: true - map_element 'Collaboration', to: :collaboration + xml do + root "ClassifierRole.namespace" + namespace "omg.org/UML1.3", "UML" + + map_element "Collaboration", to: :collaboration + end + end end end diff --git a/lib/xmi/uml13/classifierassociation_end.rb b/lib/xmi/uml13/classifierassociation_end.rb index 712617f..4540fad 100644 --- a/lib/xmi/uml13/classifierassociation_end.rb +++ b/lib/xmi/uml13/classifierassociation_end.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'association_end' +require "shale" -class ClassifierassociationEnd < Shale::Mapper - attribute :association_end, AssociationEnd, collection: true +require_relative "association_end" - xml do - root 'Classifier.associationEnd' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ClassifierassociationEnd < Shale::Mapper + attribute :association_end, AssociationEnd, collection: true - map_element 'AssociationEnd', to: :association_end + xml do + root "Classifier.associationEnd" + namespace "omg.org/UML1.3", "UML" + + map_element "AssociationEnd", to: :association_end + end + end end end diff --git a/lib/xmi/uml13/classifierclassifier_in_state.rb b/lib/xmi/uml13/classifierclassifier_in_state.rb index 61c5947..9606446 100644 --- a/lib/xmi/uml13/classifierclassifier_in_state.rb +++ b/lib/xmi/uml13/classifierclassifier_in_state.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'classifier_in_state' +require "shale" -class ClassifierclassifierInState < Shale::Mapper - attribute :classifier_in_state, ClassifierInState, collection: true +require_relative "classifier_in_state" - xml do - root 'Classifier.classifierInState' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ClassifierclassifierInState < Shale::Mapper + attribute :classifier_in_state, ClassifierInState, collection: true - map_element 'ClassifierInState', to: :classifier_in_state + xml do + root "Classifier.classifierInState" + namespace "omg.org/UML1.3", "UML" + + map_element "ClassifierInState", to: :classifier_in_state + end + end end end diff --git a/lib/xmi/uml13/classifierclassifier_role.rb b/lib/xmi/uml13/classifierclassifier_role.rb index 4a76bb4..a7a8187 100644 --- a/lib/xmi/uml13/classifierclassifier_role.rb +++ b/lib/xmi/uml13/classifierclassifier_role.rb @@ -1,14 +1,23 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'classifier_role' +require "shale" -class ClassifierclassifierRole < Shale::Mapper - attribute :classifier_role, ClassifierRole, collection: true +require_relative "classifier_role" - xml do - root 'Classifier.classifierRole' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ClassifierRole < Shale::Mapper + end - map_element 'ClassifierRole', to: :classifier_role + class ClassifierclassifierRole < Shale::Mapper + attribute :classifier_role, ClassifierRole, collection: true + + xml do + root "Classifier.classifierRole" + namespace "omg.org/UML1.3", "UML" + + map_element "ClassifierRole", to: :classifier_role + end + end end end diff --git a/lib/xmi/uml13/classifiercollaboration.rb b/lib/xmi/uml13/classifiercollaboration.rb index 7c0f407..3fa8e87 100644 --- a/lib/xmi/uml13/classifiercollaboration.rb +++ b/lib/xmi/uml13/classifiercollaboration.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'collaboration' +require "shale" -class Classifiercollaboration < Shale::Mapper - attribute :collaboration, Collaboration, collection: true +require_relative "collaboration" - xml do - root 'Classifier.collaboration' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Classifiercollaboration < Shale::Mapper + attribute :collaboration, Collaboration, collection: true - map_element 'Collaboration', to: :collaboration + xml do + root "Classifier.collaboration" + namespace "omg.org/UML1.3", "UML" + + map_element "Collaboration", to: :collaboration + end + end end end diff --git a/lib/xmi/uml13/classifiercreate_action.rb b/lib/xmi/uml13/classifiercreate_action.rb index a16e88d..6379a23 100644 --- a/lib/xmi/uml13/classifiercreate_action.rb +++ b/lib/xmi/uml13/classifiercreate_action.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'create_action' +require "shale" -class ClassifiercreateAction < Shale::Mapper - attribute :create_action, CreateAction, collection: true +require_relative "create_action" - xml do - root 'Classifier.createAction' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ClassifiercreateAction < Shale::Mapper + attribute :create_action, CreateAction, collection: true - map_element 'CreateAction', to: :create_action + xml do + root "Classifier.createAction" + namespace "omg.org/UML1.3", "UML" + + map_element "CreateAction", to: :create_action + end + end end end diff --git a/lib/xmi/uml13/classifierfeature.rb b/lib/xmi/uml13/classifierfeature.rb index 2a47599..d9c4c02 100644 --- a/lib/xmi/uml13/classifierfeature.rb +++ b/lib/xmi/uml13/classifierfeature.rb @@ -1,32 +1,38 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'attribute' -require_relative 'behavioral_feature' -require_relative 'feature' -require_relative 'method' -require_relative 'operation' -require_relative 'reception' -require_relative 'structural_feature' +require "shale" -class Classifierfeature < Shale::Mapper - attribute :feature, Feature, collection: true - attribute :structural_feature, StructuralFeature, collection: true - attribute :behavioral_feature, BehavioralFeature, collection: true - attribute :attribute, Attribute, collection: true - attribute :operation, Operation, collection: true - attribute :method, Method, collection: true - attribute :reception, Reception, collection: true +require_relative "attribute" +require_relative "behavioral_feature" +require_relative "feature" +require_relative "method" +require_relative "operation" +require_relative "reception" +require_relative "structural_feature" - xml do - root 'Classifier.feature' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Classifierfeature < Shale::Mapper + attribute :feature, Feature, collection: true + attribute :structural_feature, StructuralFeature, collection: true + attribute :behavioral_feature, BehavioralFeature, collection: true + attribute :attribute, Attribute, collection: true + attribute :operation, Operation, collection: true + attribute :method, Method, collection: true + attribute :reception, Reception, collection: true - map_element 'Feature', to: :feature - map_element 'StructuralFeature', to: :structural_feature - map_element 'BehavioralFeature', to: :behavioral_feature - map_element 'Attribute', to: :attribute - map_element 'Operation', to: :operation - map_element 'Method', to: :method - map_element 'Reception', to: :reception + xml do + root "Classifier.feature" + namespace "omg.org/UML1.3", "UML" + + map_element "Feature", to: :feature + map_element "StructuralFeature", to: :structural_feature + map_element "BehavioralFeature", to: :behavioral_feature + map_element "Attribute", to: :attribute + map_element "Operation", to: :operation + map_element "Method", to: :method + map_element "Reception", to: :reception + end + end end end diff --git a/lib/xmi/uml13/classifierinstance.rb b/lib/xmi/uml13/classifierinstance.rb index 65b12ea..0408e36 100644 --- a/lib/xmi/uml13/classifierinstance.rb +++ b/lib/xmi/uml13/classifierinstance.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'instance' +require "shale" -class Classifierinstance < Shale::Mapper - attribute :instance, Instance, collection: true +require_relative "instance" - xml do - root 'Classifier.instance' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Classifierinstance < Shale::Mapper + attribute :instance, Instance, collection: true - map_element 'Instance', to: :instance + xml do + root "Classifier.instance" + namespace "omg.org/UML1.3", "UML" + + map_element "Instance", to: :instance + end + end end end diff --git a/lib/xmi/uml13/classifierparameter.rb b/lib/xmi/uml13/classifierparameter.rb index beee7c1..e9a8c5a 100644 --- a/lib/xmi/uml13/classifierparameter.rb +++ b/lib/xmi/uml13/classifierparameter.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'parameter' +require "shale" -class Classifierparameter < Shale::Mapper - attribute :parameter, Parameter, collection: true +require_relative "parameter" - xml do - root 'Classifier.parameter' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Classifierparameter < Shale::Mapper + attribute :parameter, Parameter, collection: true - map_element 'Parameter', to: :parameter + xml do + root "Classifier.parameter" + namespace "omg.org/UML1.3", "UML" + + map_element "Parameter", to: :parameter + end + end end end diff --git a/lib/xmi/uml13/classifierparticipant.rb b/lib/xmi/uml13/classifierparticipant.rb index f77b6c4..b5ee637 100644 --- a/lib/xmi/uml13/classifierparticipant.rb +++ b/lib/xmi/uml13/classifierparticipant.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'association_end' +require "shale" -class Classifierparticipant < Shale::Mapper - attribute :association_end, AssociationEnd, collection: true +require_relative "association_end" - xml do - root 'Classifier.participant' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Classifierparticipant < Shale::Mapper + attribute :association_end, AssociationEnd, collection: true - map_element 'AssociationEnd', to: :association_end + xml do + root "Classifier.participant" + namespace "omg.org/UML1.3", "UML" + + map_element "AssociationEnd", to: :association_end + end + end end end diff --git a/lib/xmi/uml13/classifierrealization.rb b/lib/xmi/uml13/classifierrealization.rb index 4e467e0..583a7bd 100644 --- a/lib/xmi/uml13/classifierrealization.rb +++ b/lib/xmi/uml13/classifierrealization.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'classifier' +require "shale" -class Classifierrealization < Shale::Mapper - attribute :classifier, Classifier, collection: true +require_relative "classifier" - xml do - root 'Classifier.realization' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Classifierrealization < Shale::Mapper + attribute :classifier, Classifier, collection: true - map_element 'Classifier', to: :classifier + xml do + root "Classifier.realization" + namespace "omg.org/UML1.3", "UML" + + map_element "Classifier", to: :classifier + end + end end end diff --git a/lib/xmi/uml13/classifierspecification.rb b/lib/xmi/uml13/classifierspecification.rb index 76c5f5a..3f19407 100644 --- a/lib/xmi/uml13/classifierspecification.rb +++ b/lib/xmi/uml13/classifierspecification.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'classifier' +require "shale" -class Classifierspecification < Shale::Mapper - attribute :classifier, Classifier, collection: true +require_relative "classifier" - xml do - root 'Classifier.specification' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Classifierspecification < Shale::Mapper + attribute :classifier, Classifier, collection: true - map_element 'Classifier', to: :classifier + xml do + root "Classifier.specification" + namespace "omg.org/UML1.3", "UML" + + map_element "Classifier", to: :classifier + end + end end end diff --git a/lib/xmi/uml13/classifierstructural_feature.rb b/lib/xmi/uml13/classifierstructural_feature.rb index aa2c8f4..82ba69e 100644 --- a/lib/xmi/uml13/classifierstructural_feature.rb +++ b/lib/xmi/uml13/classifierstructural_feature.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'structural_feature' +require "shale" -class ClassifierstructuralFeature < Shale::Mapper - attribute :structural_feature, StructuralFeature, collection: true +require_relative "structural_feature" - xml do - root 'Classifier.structuralFeature' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ClassifierstructuralFeature < Shale::Mapper + attribute :structural_feature, StructuralFeature, collection: true - map_element 'StructuralFeature', to: :structural_feature + xml do + root "Classifier.structuralFeature" + namespace "omg.org/UML1.3", "UML" + + map_element "StructuralFeature", to: :structural_feature + end + end end end diff --git a/lib/xmi/uml13/classis_active.rb b/lib/xmi/uml13/classis_active.rb index 51e09fc..bf4f39d 100644 --- a/lib/xmi/uml13/classis_active.rb +++ b/lib/xmi/uml13/classis_active.rb @@ -1,12 +1,18 @@ -require 'shale' +# frozen_string_literal: true -class ClassisActive < Shale::Mapper - attribute :xmi_value, Shale::Type::String +require "shale" - xml do - root 'Class.isActive' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ClassisActive < Shale::Mapper + attribute :xmi_value, Shale::Type::String - map_attribute 'xmi.value', to: :xmi_value + xml do + root "Class.isActive" + namespace "omg.org/UML1.3", "UML" + + map_attribute "xmi.value", to: :xmi_value + end + end end end diff --git a/lib/xmi/uml13/collaboration.rb b/lib/xmi/uml13/collaboration.rb index aebceab..06459cf 100644 --- a/lib/xmi/uml13/collaboration.rb +++ b/lib/xmi/uml13/collaboration.rb @@ -1,133 +1,139 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'collaborationconstraining_element' -require_relative 'collaborationinteraction' -require_relative 'collaborationrepresented_classifier' -require_relative 'collaborationrepresented_operation' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'namespaceowned_element' -require_relative 'xm_iextension' +require "shale" -class Collaboration < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :represented_classifier, Shale::Type::Value - attribute :represented_operation, Shale::Type::Value - attribute :constraining_element, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :collaboration_represented_classifier, CollaborationrepresentedClassifier, collection: true - attribute :collaboration_represented_operation, CollaborationrepresentedOperation, collection: true - attribute :collaboration_constraining_element, CollaborationconstrainingElement, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :namespace_owned_element, NamespaceownedElement, collection: true - attribute :collaboration_interaction, Collaborationinteraction, collection: true +require_relative "collaborationconstraining_element" +require_relative "collaborationinteraction" +require_relative "collaborationrepresented_classifier" +require_relative "collaborationrepresented_operation" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "namespaceowned_element" +require_relative "xm_iextension" - xml do - root 'Collaboration' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Collaboration < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :represented_classifier, Shale::Type::Value + attribute :represented_operation, Shale::Type::Value + attribute :constraining_element, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :collaboration_represented_classifier, CollaborationrepresentedClassifier, collection: true + attribute :collaboration_represented_operation, CollaborationrepresentedOperation, collection: true + attribute :collaboration_constraining_element, CollaborationconstrainingElement, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :namespace_owned_element, NamespaceownedElement, collection: true + attribute :collaboration_interaction, Collaborationinteraction, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'representedClassifier', to: :represented_classifier - map_attribute 'representedOperation', to: :represented_operation - map_attribute 'constrainingElement', to: :constraining_element - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'Collaboration.representedClassifier', to: :collaboration_represented_classifier - map_element 'Collaboration.representedOperation', to: :collaboration_represented_operation - map_element 'Collaboration.constrainingElement', to: :collaboration_constraining_element - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Namespace.ownedElement', to: :namespace_owned_element - map_element 'Collaboration.interaction', to: :collaboration_interaction + xml do + root "Collaboration" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "representedClassifier", to: :represented_classifier + map_attribute "representedOperation", to: :represented_operation + map_attribute "constrainingElement", to: :constraining_element + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "Collaboration.representedClassifier", to: :collaboration_represented_classifier + map_element "Collaboration.representedOperation", to: :collaboration_represented_operation + map_element "Collaboration.constrainingElement", to: :collaboration_constraining_element + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Namespace.ownedElement", to: :namespace_owned_element + map_element "Collaboration.interaction", to: :collaboration_interaction + end + end end end diff --git a/lib/xmi/uml13/collaborationconstraining_element.rb b/lib/xmi/uml13/collaborationconstraining_element.rb index f48fa49..e1f4803 100644 --- a/lib/xmi/uml13/collaborationconstraining_element.rb +++ b/lib/xmi/uml13/collaborationconstraining_element.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'model_element' +require "shale" -class CollaborationconstrainingElement < Shale::Mapper - attribute :model_element, ModelElement, collection: true +require_relative "model_element" - xml do - root 'Collaboration.constrainingElement' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class CollaborationconstrainingElement < Shale::Mapper + attribute :model_element, ModelElement, collection: true - map_element 'ModelElement', to: :model_element + xml do + root "Collaboration.constrainingElement" + namespace "omg.org/UML1.3", "UML" + + map_element "ModelElement", to: :model_element + end + end end end diff --git a/lib/xmi/uml13/collaborationinteraction.rb b/lib/xmi/uml13/collaborationinteraction.rb index 95d7b82..85d7ff8 100644 --- a/lib/xmi/uml13/collaborationinteraction.rb +++ b/lib/xmi/uml13/collaborationinteraction.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'interaction' +require "shale" -class Collaborationinteraction < Shale::Mapper - attribute :interaction, Interaction, collection: true +require_relative "interaction" - xml do - root 'Collaboration.interaction' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Collaborationinteraction < Shale::Mapper + attribute :interaction, Interaction, collection: true - map_element 'Interaction', to: :interaction + xml do + root "Collaboration.interaction" + namespace "omg.org/UML1.3", "UML" + + map_element "Interaction", to: :interaction + end + end end end diff --git a/lib/xmi/uml13/collaborationrepresented_classifier.rb b/lib/xmi/uml13/collaborationrepresented_classifier.rb index 79b3555..e096cf1 100644 --- a/lib/xmi/uml13/collaborationrepresented_classifier.rb +++ b/lib/xmi/uml13/collaborationrepresented_classifier.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'classifier' +require "shale" -class CollaborationrepresentedClassifier < Shale::Mapper - attribute :classifier, Classifier, collection: true +require_relative "classifier" - xml do - root 'Collaboration.representedClassifier' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class CollaborationrepresentedClassifier < Shale::Mapper + attribute :classifier, Classifier, collection: true - map_element 'Classifier', to: :classifier + xml do + root "Collaboration.representedClassifier" + namespace "omg.org/UML1.3", "UML" + + map_element "Classifier", to: :classifier + end + end end end diff --git a/lib/xmi/uml13/collaborationrepresented_operation.rb b/lib/xmi/uml13/collaborationrepresented_operation.rb index eb1f257..1b66f91 100644 --- a/lib/xmi/uml13/collaborationrepresented_operation.rb +++ b/lib/xmi/uml13/collaborationrepresented_operation.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'operation' +require "shale" -class CollaborationrepresentedOperation < Shale::Mapper - attribute :operation, Operation, collection: true +require_relative "operation" - xml do - root 'Collaboration.representedOperation' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class CollaborationrepresentedOperation < Shale::Mapper + attribute :operation, Operation, collection: true - map_element 'Operation', to: :operation + xml do + root "Collaboration.representedOperation" + namespace "omg.org/UML1.3", "UML" + + map_element "Operation", to: :operation + end + end end end diff --git a/lib/xmi/uml13/collaborations.rb b/lib/xmi/uml13/collaborations.rb index 394018c..e352cf0 100644 --- a/lib/xmi/uml13/collaborations.rb +++ b/lib/xmi/uml13/collaborations.rb @@ -1,39 +1,45 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'association_end_role' -require_relative 'association_role' -require_relative 'classifier_role' -require_relative 'collaboration' -require_relative 'interaction' -require_relative 'message' +require "shale" -class Collaborations < Shale::Mapper - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :collaboration, Collaboration, collection: true - attribute :interaction, Interaction, collection: true - attribute :association_role, AssociationRole, collection: true - attribute :association_end_role, AssociationEndRole, collection: true - attribute :message, Message, collection: true - attribute :classifier_role, ClassifierRole, collection: true +require_relative "association_end_role" +require_relative "association_role" +require_relative "classifier_role" +require_relative "collaboration" +require_relative "interaction" +require_relative "message" - xml do - root 'Collaborations' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Collaborations < Shale::Mapper + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :collaboration, Collaboration, collection: true + attribute :interaction, Interaction, collection: true + attribute :association_role, AssociationRole, collection: true + attribute :association_end_role, AssociationEndRole, collection: true + attribute :message, Message, collection: true + attribute :classifier_role, ClassifierRole, collection: true - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'Collaboration', to: :collaboration - map_element 'Interaction', to: :interaction - map_element 'AssociationRole', to: :association_role - map_element 'AssociationEndRole', to: :association_end_role - map_element 'Message', to: :message - map_element 'ClassifierRole', to: :classifier_role + xml do + root "Collaborations" + namespace "omg.org/UML1.3", "UML" + + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "Collaboration", to: :collaboration + map_element "Interaction", to: :interaction + map_element "AssociationRole", to: :association_role + map_element "AssociationEndRole", to: :association_end_role + map_element "Message", to: :message + map_element "ClassifierRole", to: :classifier_role + end + end end end diff --git a/lib/xmi/uml13/comment.rb b/lib/xmi/uml13/comment.rb index 992840d..c653435 100644 --- a/lib/xmi/uml13/comment.rb +++ b/lib/xmi/uml13/comment.rb @@ -1,112 +1,118 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'xm_iextension' +require "shale" -class Comment < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "xm_iextension" - xml do - root 'Comment' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Comment < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value + xml do + root "Comment" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + end + end end end diff --git a/lib/xmi/uml13/common_behavior.rb b/lib/xmi/uml13/common_behavior.rb index 191ca96..f786975 100644 --- a/lib/xmi/uml13/common_behavior.rb +++ b/lib/xmi/uml13/common_behavior.rb @@ -1,90 +1,96 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'action' -require_relative 'action_sequence' -require_relative 'argument' -require_relative 'attribute_link' -require_relative 'call_action' -require_relative 'create_action' -require_relative 'data_value' -require_relative 'destroy_action' -require_relative 'exception' -require_relative 'instance' -require_relative 'link' -require_relative 'link_end' -require_relative 'link_object' -require_relative 'local_invocation' -require_relative 'message_instance' -require_relative 'object' -require_relative 'reception' -require_relative 'request' -require_relative 'return_action' -require_relative 'send_action' -require_relative 'signal' -require_relative 'terminate_action' -require_relative 'uninterpreted_action' +require "shale" -class CommonBehavior < Shale::Mapper - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :request, Request, collection: true - attribute :signal, Signal, collection: true - attribute :exception, Exception, collection: true - attribute :reception, Reception, collection: true - attribute :argument, Argument, collection: true - attribute :action_sequence, ActionSequence, collection: true - attribute :action, Action, collection: true - attribute :create_action, CreateAction, collection: true - attribute :call_action, CallAction, collection: true - attribute :local_invocation, LocalInvocation, collection: true - attribute :return_action, ReturnAction, collection: true - attribute :send_action, SendAction, collection: true - attribute :uninterpreted_action, UninterpretedAction, collection: true - attribute :terminate_action, TerminateAction, collection: true - attribute :destroy_action, DestroyAction, collection: true - attribute :link, Link, collection: true - attribute :link_end, LinkEnd, collection: true - attribute :instance, Instance, collection: true - attribute :attribute_link, AttributeLink, collection: true - attribute :object, Object, collection: true - attribute :data_value, DataValue, collection: true - attribute :link_object, LinkObject, collection: true - attribute :message_instance, MessageInstance, collection: true +require_relative "action" +require_relative "action_sequence" +require_relative "argument" +require_relative "attribute_link" +require_relative "call_action" +require_relative "create_action" +require_relative "data_value" +require_relative "destroy_action" +require_relative "exception" +require_relative "instance" +require_relative "link" +require_relative "link_end" +require_relative "link_object" +require_relative "local_invocation" +require_relative "message_instance" +require_relative "object" +require_relative "reception" +require_relative "request" +require_relative "return_action" +require_relative "send_action" +require_relative "signal" +require_relative "terminate_action" +require_relative "uninterpreted_action" - xml do - root 'Common_Behavior' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class CommonBehavior < Shale::Mapper + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :request, Request, collection: true + attribute :signal, Signal, collection: true + attribute :exception, Exception, collection: true + attribute :reception, Reception, collection: true + attribute :argument, Argument, collection: true + attribute :action_sequence, ActionSequence, collection: true + attribute :action, Action, collection: true + attribute :create_action, CreateAction, collection: true + attribute :call_action, CallAction, collection: true + attribute :local_invocation, LocalInvocation, collection: true + attribute :return_action, ReturnAction, collection: true + attribute :send_action, SendAction, collection: true + attribute :uninterpreted_action, UninterpretedAction, collection: true + attribute :terminate_action, TerminateAction, collection: true + attribute :destroy_action, DestroyAction, collection: true + attribute :link, Link, collection: true + attribute :link_end, LinkEnd, collection: true + attribute :instance, Instance, collection: true + attribute :attribute_link, AttributeLink, collection: true + attribute :object, Object, collection: true + attribute :data_value, DataValue, collection: true + attribute :link_object, LinkObject, collection: true + attribute :message_instance, MessageInstance, collection: true - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'Request', to: :request - map_element 'Signal', to: :signal - map_element 'Exception', to: :exception - map_element 'Reception', to: :reception - map_element 'Argument', to: :argument - map_element 'ActionSequence', to: :action_sequence - map_element 'Action', to: :action - map_element 'CreateAction', to: :create_action - map_element 'CallAction', to: :call_action - map_element 'LocalInvocation', to: :local_invocation - map_element 'ReturnAction', to: :return_action - map_element 'SendAction', to: :send_action - map_element 'UninterpretedAction', to: :uninterpreted_action - map_element 'TerminateAction', to: :terminate_action - map_element 'DestroyAction', to: :destroy_action - map_element 'Link', to: :link - map_element 'LinkEnd', to: :link_end - map_element 'Instance', to: :instance - map_element 'AttributeLink', to: :attribute_link - map_element 'Object', to: :object - map_element 'DataValue', to: :data_value - map_element 'LinkObject', to: :link_object - map_element 'MessageInstance', to: :message_instance + xml do + root "Common_Behavior" + namespace "omg.org/UML1.3", "UML" + + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "Request", to: :request + map_element "Signal", to: :signal + map_element "Exception", to: :exception + map_element "Reception", to: :reception + map_element "Argument", to: :argument + map_element "ActionSequence", to: :action_sequence + map_element "Action", to: :action + map_element "CreateAction", to: :create_action + map_element "CallAction", to: :call_action + map_element "LocalInvocation", to: :local_invocation + map_element "ReturnAction", to: :return_action + map_element "SendAction", to: :send_action + map_element "UninterpretedAction", to: :uninterpreted_action + map_element "TerminateAction", to: :terminate_action + map_element "DestroyAction", to: :destroy_action + map_element "Link", to: :link + map_element "LinkEnd", to: :link_end + map_element "Instance", to: :instance + map_element "AttributeLink", to: :attribute_link + map_element "Object", to: :object + map_element "DataValue", to: :data_value + map_element "LinkObject", to: :link_object + map_element "MessageInstance", to: :message_instance + end + end end end diff --git a/lib/xmi/uml13/component.rb b/lib/xmi/uml13/component.rb index 1a84b18..f2a7470 100644 --- a/lib/xmi/uml13/component.rb +++ b/lib/xmi/uml13/component.rb @@ -1,202 +1,208 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'classifierassociation_end' -require_relative 'classifierclassifier_in_state' -require_relative 'classifierclassifier_role' -require_relative 'classifiercreate_action' -require_relative 'classifierfeature' -require_relative 'classifierinstance' -require_relative 'classifierparameter' -require_relative 'classifierparticipant' -require_relative 'classifierrealization' -require_relative 'classifierspecification' -require_relative 'classifierstructural_feature' -require_relative 'componentdeployment' -require_relative 'componentimplements' -require_relative 'generalizable_elementgeneralization' -require_relative 'generalizable_elementis_abstract' -require_relative 'generalizable_elementis_leaf' -require_relative 'generalizable_elementis_root' -require_relative 'generalizable_elementspecialization' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'namespaceowned_element' -require_relative 'xm_iextension' +require "shale" -class Component < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :is_root, Shale::Type::String - attribute :is_leaf, Shale::Type::String - attribute :is_abstract, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :model_element_collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :generalization, Shale::Type::Value - attribute :specialization, Shale::Type::Value - attribute :parameter, Shale::Type::Value - attribute :structural_feature, Shale::Type::Value - attribute :specification, Shale::Type::Value - attribute :realization, Shale::Type::Value - attribute :association_end, Shale::Type::Value - attribute :participant, Shale::Type::Value - attribute :create_action, Shale::Type::Value - attribute :instance, Shale::Type::Value - attribute :classifier_collaboration, Shale::Type::Value - attribute :classifier_role, Shale::Type::Value - attribute :classifier_in_state, Shale::Type::Value - attribute :deployment, Shale::Type::Value - attribute :implements, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :generalizable_element_is_root, GeneralizableElementisRoot, collection: true - attribute :generalizable_element_is_leaf, GeneralizableElementisLeaf, collection: true - attribute :generalizable_element_is_abstract, GeneralizableElementisAbstract, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :generalizable_element_generalization, GeneralizableElementgeneralization, collection: true - attribute :generalizable_element_specialization, GeneralizableElementspecialization, collection: true - attribute :classifier_parameter, Classifierparameter, collection: true - attribute :classifier_structural_feature, ClassifierstructuralFeature, collection: true - attribute :classifier_specification, Classifierspecification, collection: true - attribute :classifier_realization, Classifierrealization, collection: true - attribute :classifier_association_end, ClassifierassociationEnd, collection: true - attribute :classifier_participant, Classifierparticipant, collection: true - attribute :classifier_create_action, ClassifiercreateAction, collection: true - attribute :classifier_instance, Classifierinstance, collection: true - attribute :classifier_classifier_role, ClassifierclassifierRole, collection: true - attribute :classifier_classifier_in_state, ClassifierclassifierInState, collection: true - attribute :component_deployment, Componentdeployment, collection: true - attribute :component_implements, Componentimplements, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :namespace_owned_element, NamespaceownedElement, collection: true - attribute :classifier_feature, Classifierfeature, collection: true +require_relative "classifierassociation_end" +require_relative "classifierclassifier_in_state" +require_relative "classifierclassifier_role" +require_relative "classifiercreate_action" +require_relative "classifierfeature" +require_relative "classifierinstance" +require_relative "classifierparameter" +require_relative "classifierparticipant" +require_relative "classifierrealization" +require_relative "classifierspecification" +require_relative "classifierstructural_feature" +require_relative "componentdeployment" +require_relative "componentimplements" +require_relative "generalizable_elementgeneralization" +require_relative "generalizable_elementis_abstract" +require_relative "generalizable_elementis_leaf" +require_relative "generalizable_elementis_root" +require_relative "generalizable_elementspecialization" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "namespaceowned_element" +require_relative "xm_iextension" - xml do - root 'Component' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Component < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :is_root, Shale::Type::String + attribute :is_leaf, Shale::Type::String + attribute :is_abstract, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :model_element_collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :generalization, Shale::Type::Value + attribute :specialization, Shale::Type::Value + attribute :parameter, Shale::Type::Value + attribute :structural_feature, Shale::Type::Value + attribute :specification, Shale::Type::Value + attribute :realization, Shale::Type::Value + attribute :association_end, Shale::Type::Value + attribute :participant, Shale::Type::Value + attribute :create_action, Shale::Type::Value + attribute :instance, Shale::Type::Value + attribute :classifier_collaboration, Shale::Type::Value + attribute :classifier_role, Shale::Type::Value + attribute :classifier_in_state, Shale::Type::Value + attribute :deployment, Shale::Type::Value + attribute :implements, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :generalizable_element_is_root, GeneralizableElementisRoot, collection: true + attribute :generalizable_element_is_leaf, GeneralizableElementisLeaf, collection: true + attribute :generalizable_element_is_abstract, GeneralizableElementisAbstract, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :generalizable_element_generalization, GeneralizableElementgeneralization, collection: true + attribute :generalizable_element_specialization, GeneralizableElementspecialization, collection: true + attribute :classifier_parameter, Classifierparameter, collection: true + attribute :classifier_structural_feature, ClassifierstructuralFeature, collection: true + attribute :classifier_specification, Classifierspecification, collection: true + attribute :classifier_realization, Classifierrealization, collection: true + attribute :classifier_association_end, ClassifierassociationEnd, collection: true + attribute :classifier_participant, Classifierparticipant, collection: true + attribute :classifier_create_action, ClassifiercreateAction, collection: true + attribute :classifier_instance, Classifierinstance, collection: true + attribute :classifier_classifier_role, ClassifierclassifierRole, collection: true + attribute :classifier_classifier_in_state, ClassifierclassifierInState, collection: true + attribute :component_deployment, Componentdeployment, collection: true + attribute :component_implements, Componentimplements, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :namespace_owned_element, NamespaceownedElement, collection: true + attribute :classifier_feature, Classifierfeature, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'isRoot', to: :is_root - map_attribute 'isLeaf', to: :is_leaf - map_attribute 'isAbstract', to: :is_abstract - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'ModelElement.collaboration', to: :model_element_collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'generalization', to: :generalization - map_attribute 'specialization', to: :specialization - map_attribute 'parameter', to: :parameter - map_attribute 'structuralFeature', to: :structural_feature - map_attribute 'specification', to: :specification - map_attribute 'realization', to: :realization - map_attribute 'associationEnd', to: :association_end - map_attribute 'participant', to: :participant - map_attribute 'createAction', to: :create_action - map_attribute 'instance', to: :instance - map_attribute 'Classifier.collaboration', to: :classifier_collaboration - map_attribute 'classifierRole', to: :classifier_role - map_attribute 'classifierInState', to: :classifier_in_state - map_attribute 'deployment', to: :deployment - map_attribute 'implements', to: :implements - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'GeneralizableElement.isRoot', to: :generalizable_element_is_root - map_element 'GeneralizableElement.isLeaf', to: :generalizable_element_is_leaf - map_element 'GeneralizableElement.isAbstract', to: :generalizable_element_is_abstract - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'GeneralizableElement.generalization', to: :generalizable_element_generalization - map_element 'GeneralizableElement.specialization', to: :generalizable_element_specialization - map_element 'Classifier.parameter', to: :classifier_parameter - map_element 'Classifier.structuralFeature', to: :classifier_structural_feature - map_element 'Classifier.specification', to: :classifier_specification - map_element 'Classifier.realization', to: :classifier_realization - map_element 'Classifier.associationEnd', to: :classifier_association_end - map_element 'Classifier.participant', to: :classifier_participant - map_element 'Classifier.createAction', to: :classifier_create_action - map_element 'Classifier.instance', to: :classifier_instance - map_element 'Classifier.classifierRole', to: :classifier_classifier_role - map_element 'Classifier.classifierInState', to: :classifier_classifier_in_state - map_element 'Component.deployment', to: :component_deployment - map_element 'Component.implements', to: :component_implements - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Namespace.ownedElement', to: :namespace_owned_element - map_element 'Classifier.feature', to: :classifier_feature + xml do + root "Component" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "isRoot", to: :is_root + map_attribute "isLeaf", to: :is_leaf + map_attribute "isAbstract", to: :is_abstract + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "ModelElement.collaboration", to: :model_element_collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "generalization", to: :generalization + map_attribute "specialization", to: :specialization + map_attribute "parameter", to: :parameter + map_attribute "structuralFeature", to: :structural_feature + map_attribute "specification", to: :specification + map_attribute "realization", to: :realization + map_attribute "associationEnd", to: :association_end + map_attribute "participant", to: :participant + map_attribute "createAction", to: :create_action + map_attribute "instance", to: :instance + map_attribute "Classifier.collaboration", to: :classifier_collaboration + map_attribute "classifierRole", to: :classifier_role + map_attribute "classifierInState", to: :classifier_in_state + map_attribute "deployment", to: :deployment + map_attribute "implements", to: :implements + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "GeneralizableElement.isRoot", to: :generalizable_element_is_root + map_element "GeneralizableElement.isLeaf", to: :generalizable_element_is_leaf + map_element "GeneralizableElement.isAbstract", to: :generalizable_element_is_abstract + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "GeneralizableElement.generalization", to: :generalizable_element_generalization + map_element "GeneralizableElement.specialization", to: :generalizable_element_specialization + map_element "Classifier.parameter", to: :classifier_parameter + map_element "Classifier.structuralFeature", to: :classifier_structural_feature + map_element "Classifier.specification", to: :classifier_specification + map_element "Classifier.realization", to: :classifier_realization + map_element "Classifier.associationEnd", to: :classifier_association_end + map_element "Classifier.participant", to: :classifier_participant + map_element "Classifier.createAction", to: :classifier_create_action + map_element "Classifier.instance", to: :classifier_instance + map_element "Classifier.classifierRole", to: :classifier_classifier_role + map_element "Classifier.classifierInState", to: :classifier_classifier_in_state + map_element "Component.deployment", to: :component_deployment + map_element "Component.implements", to: :component_implements + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Namespace.ownedElement", to: :namespace_owned_element + map_element "Classifier.feature", to: :classifier_feature + end + end end end diff --git a/lib/xmi/uml13/componentdeployment.rb b/lib/xmi/uml13/componentdeployment.rb index 716e54f..69b98d7 100644 --- a/lib/xmi/uml13/componentdeployment.rb +++ b/lib/xmi/uml13/componentdeployment.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'node' +require "shale" -class Componentdeployment < Shale::Mapper - attribute :node, Node, collection: true +require_relative "node" - xml do - root 'Component.deployment' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Componentdeployment < Shale::Mapper + attribute :node, Node, collection: true - map_element 'Node', to: :node + xml do + root "Component.deployment" + namespace "omg.org/UML1.3", "UML" + + map_element "Node", to: :node + end + end end end diff --git a/lib/xmi/uml13/componentimplements.rb b/lib/xmi/uml13/componentimplements.rb index 75085ac..645fc57 100644 --- a/lib/xmi/uml13/componentimplements.rb +++ b/lib/xmi/uml13/componentimplements.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'model_element' +require "shale" -class Componentimplements < Shale::Mapper - attribute :model_element, ModelElement, collection: true +require_relative "model_element" - xml do - root 'Component.implements' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Componentimplements < Shale::Mapper + attribute :model_element, ModelElement, collection: true - map_element 'ModelElement', to: :model_element + xml do + root "Component.implements" + namespace "omg.org/UML1.3", "UML" + + map_element "ModelElement", to: :model_element + end + end end end diff --git a/lib/xmi/uml13/composite_state.rb b/lib/xmi/uml13/composite_state.rb index 4c081d3..821bb78 100644 --- a/lib/xmi/uml13/composite_state.rb +++ b/lib/xmi/uml13/composite_state.rb @@ -1,159 +1,165 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'composite_stateis_concurrent' -require_relative 'composite_statesubstate' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'state_vertexincoming' -require_relative 'state_vertexoutgoing' -require_relative 'state_vertexparent' -require_relative 'stateclassifier_in_state' -require_relative 'statedeferred_event' -require_relative 'stateentry' -require_relative 'stateexit' -require_relative 'stateinternal_transition' -require_relative 'statestate_machine' -require_relative 'xm_iextension' +require "shale" -class CompositeState < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :is_concurrent, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :outgoing, Shale::Type::Value - attribute :incoming, Shale::Type::Value - attribute :parent, Shale::Type::Value - attribute :state_machine, Shale::Type::Value - attribute :deferred_event, Shale::Type::Value - attribute :classifier_in_state, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :composite_state_is_concurrent, CompositeStateisConcurrent, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :state_vertex_outgoing, StateVertexoutgoing, collection: true - attribute :state_vertex_incoming, StateVertexincoming, collection: true - attribute :state_vertex_parent, StateVertexparent, collection: true - attribute :state_state_machine, StatestateMachine, collection: true - attribute :state_deferred_event, StatedeferredEvent, collection: true - attribute :state_classifier_in_state, StateclassifierInState, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :state_internal_transition, StateinternalTransition, collection: true - attribute :state_entry, Stateentry, collection: true - attribute :state_exit, Stateexit, collection: true - attribute :composite_state_substate, CompositeStatesubstate, collection: true +require_relative "composite_stateis_concurrent" +require_relative "composite_statesubstate" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "state_vertexincoming" +require_relative "state_vertexoutgoing" +require_relative "state_vertexparent" +require_relative "stateclassifier_in_state" +require_relative "statedeferred_event" +require_relative "stateentry" +require_relative "stateexit" +require_relative "stateinternal_transition" +require_relative "statestate_machine" +require_relative "xm_iextension" - xml do - root 'CompositeState' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class CompositeState < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :is_concurrent, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :outgoing, Shale::Type::Value + attribute :incoming, Shale::Type::Value + attribute :parent, Shale::Type::Value + attribute :state_machine, Shale::Type::Value + attribute :deferred_event, Shale::Type::Value + attribute :classifier_in_state, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :composite_state_is_concurrent, CompositeStateisConcurrent, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :state_vertex_outgoing, StateVertexoutgoing, collection: true + attribute :state_vertex_incoming, StateVertexincoming, collection: true + attribute :state_vertex_parent, StateVertexparent, collection: true + attribute :state_state_machine, StatestateMachine, collection: true + attribute :state_deferred_event, StatedeferredEvent, collection: true + attribute :state_classifier_in_state, StateclassifierInState, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :state_internal_transition, StateinternalTransition, collection: true + attribute :state_entry, Stateentry, collection: true + attribute :state_exit, Stateexit, collection: true + attribute :composite_state_substate, CompositeStatesubstate, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'isConcurrent', to: :is_concurrent - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'outgoing', to: :outgoing - map_attribute 'incoming', to: :incoming - map_attribute 'parent', to: :parent - map_attribute 'stateMachine', to: :state_machine - map_attribute 'deferredEvent', to: :deferred_event - map_attribute 'classifierInState', to: :classifier_in_state - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'CompositeState.isConcurrent', to: :composite_state_is_concurrent - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'StateVertex.outgoing', to: :state_vertex_outgoing - map_element 'StateVertex.incoming', to: :state_vertex_incoming - map_element 'StateVertex.parent', to: :state_vertex_parent - map_element 'State.stateMachine', to: :state_state_machine - map_element 'State.deferredEvent', to: :state_deferred_event - map_element 'State.classifierInState', to: :state_classifier_in_state - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'State.internalTransition', to: :state_internal_transition - map_element 'State.entry', to: :state_entry - map_element 'State.exit', to: :state_exit - map_element 'CompositeState.substate', to: :composite_state_substate + xml do + root "CompositeState" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "isConcurrent", to: :is_concurrent + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "outgoing", to: :outgoing + map_attribute "incoming", to: :incoming + map_attribute "parent", to: :parent + map_attribute "stateMachine", to: :state_machine + map_attribute "deferredEvent", to: :deferred_event + map_attribute "classifierInState", to: :classifier_in_state + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "CompositeState.isConcurrent", to: :composite_state_is_concurrent + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "StateVertex.outgoing", to: :state_vertex_outgoing + map_element "StateVertex.incoming", to: :state_vertex_incoming + map_element "StateVertex.parent", to: :state_vertex_parent + map_element "State.stateMachine", to: :state_state_machine + map_element "State.deferredEvent", to: :state_deferred_event + map_element "State.classifierInState", to: :state_classifier_in_state + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "State.internalTransition", to: :state_internal_transition + map_element "State.entry", to: :state_entry + map_element "State.exit", to: :state_exit + map_element "CompositeState.substate", to: :composite_state_substate + end + end end end diff --git a/lib/xmi/uml13/composite_stateis_concurrent.rb b/lib/xmi/uml13/composite_stateis_concurrent.rb index 7f747fb..1a988e2 100644 --- a/lib/xmi/uml13/composite_stateis_concurrent.rb +++ b/lib/xmi/uml13/composite_stateis_concurrent.rb @@ -1,12 +1,18 @@ -require 'shale' +# frozen_string_literal: true -class CompositeStateisConcurrent < Shale::Mapper - attribute :xmi_value, Shale::Type::String +require "shale" - xml do - root 'CompositeState.isConcurrent' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class CompositeStateisConcurrent < Shale::Mapper + attribute :xmi_value, Shale::Type::String - map_attribute 'xmi.value', to: :xmi_value + xml do + root "CompositeState.isConcurrent" + namespace "omg.org/UML1.3", "UML" + + map_attribute "xmi.value", to: :xmi_value + end + end end end diff --git a/lib/xmi/uml13/composite_statesubstate.rb b/lib/xmi/uml13/composite_statesubstate.rb index 71e3eb3..6dfcd1b 100644 --- a/lib/xmi/uml13/composite_statesubstate.rb +++ b/lib/xmi/uml13/composite_statesubstate.rb @@ -1,38 +1,44 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'action_state' -require_relative 'activity_state' -require_relative 'composite_state' -require_relative 'object_flow_state' -require_relative 'pseudo_state' -require_relative 'simple_state' -require_relative 'state' -require_relative 'state_vertex' -require_relative 'submachine_state' +require "shale" -class CompositeStatesubstate < Shale::Mapper - attribute :state_vertex, StateVertex, collection: true - attribute :pseudo_state, PseudoState, collection: true - attribute :state, State, collection: true - attribute :composite_state, CompositeState, collection: true - attribute :simple_state, SimpleState, collection: true - attribute :submachine_state, SubmachineState, collection: true - attribute :action_state, ActionState, collection: true - attribute :object_flow_state, ObjectFlowState, collection: true - attribute :activity_state, ActivityState, collection: true +require_relative "action_state" +require_relative "activity_state" +require_relative "composite_state" +require_relative "object_flow_state" +require_relative "pseudo_state" +require_relative "simple_state" +require_relative "state" +require_relative "state_vertex" +require_relative "submachine_state" - xml do - root 'CompositeState.substate' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class CompositeStatesubstate < Shale::Mapper + attribute :state_vertex, StateVertex, collection: true + attribute :pseudo_state, PseudoState, collection: true + attribute :state, State, collection: true + attribute :composite_state, CompositeState, collection: true + attribute :simple_state, SimpleState, collection: true + attribute :submachine_state, SubmachineState, collection: true + attribute :action_state, ActionState, collection: true + attribute :object_flow_state, ObjectFlowState, collection: true + attribute :activity_state, ActivityState, collection: true - map_element 'StateVertex', to: :state_vertex - map_element 'PseudoState', to: :pseudo_state - map_element 'State', to: :state - map_element 'CompositeState', to: :composite_state - map_element 'SimpleState', to: :simple_state - map_element 'SubmachineState', to: :submachine_state - map_element 'ActionState', to: :action_state - map_element 'ObjectFlowState', to: :object_flow_state - map_element 'ActivityState', to: :activity_state + xml do + root "CompositeState.substate" + namespace "omg.org/UML1.3", "UML" + + map_element "StateVertex", to: :state_vertex + map_element "PseudoState", to: :pseudo_state + map_element "State", to: :state + map_element "CompositeState", to: :composite_state + map_element "SimpleState", to: :simple_state + map_element "SubmachineState", to: :submachine_state + map_element "ActionState", to: :action_state + map_element "ObjectFlowState", to: :object_flow_state + map_element "ActivityState", to: :activity_state + end + end end end diff --git a/lib/xmi/uml13/constraint.rb b/lib/xmi/uml13/constraint.rb index b5980bd..a7d7964 100644 --- a/lib/xmi/uml13/constraint.rb +++ b/lib/xmi/uml13/constraint.rb @@ -1,125 +1,131 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'constraintbody' -require_relative 'constraintconstrained_element' -require_relative 'constraintconstrained_stereotype' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'xm_iextension' +require "shale" -class Constraint < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :constrained_element, Shale::Type::Value - attribute :constrained_stereotype, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :constraint_body, Constraintbody, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :constraint_constrained_element, ConstraintconstrainedElement, collection: true - attribute :constraint_constrained_stereotype, ConstraintconstrainedStereotype, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true +require_relative "constraintbody" +require_relative "constraintconstrained_element" +require_relative "constraintconstrained_stereotype" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "xm_iextension" - xml do - root 'Constraint' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Constraint < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :constrained_element, Shale::Type::Value + attribute :constrained_stereotype, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :constraint_body, Constraintbody, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :constraint_constrained_element, ConstraintconstrainedElement, collection: true + attribute :constraint_constrained_stereotype, ConstraintconstrainedStereotype, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'constrainedElement', to: :constrained_element - map_attribute 'constrainedStereotype', to: :constrained_stereotype - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'Constraint.body', to: :constraint_body - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'Constraint.constrainedElement', to: :constraint_constrained_element - map_element 'Constraint.constrainedStereotype', to: :constraint_constrained_stereotype - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value + xml do + root "Constraint" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "constrainedElement", to: :constrained_element + map_attribute "constrainedStereotype", to: :constrained_stereotype + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "Constraint.body", to: :constraint_body + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "Constraint.constrainedElement", to: :constraint_constrained_element + map_element "Constraint.constrainedStereotype", to: :constraint_constrained_stereotype + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + end + end end end diff --git a/lib/xmi/uml13/constraintbody.rb b/lib/xmi/uml13/constraintbody.rb index 0d31484..e47ac47 100644 --- a/lib/xmi/uml13/constraintbody.rb +++ b/lib/xmi/uml13/constraintbody.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'boolean_expression' +require "shale" -class Constraintbody < Shale::Mapper - attribute :boolean_expression, BooleanExpression +require_relative "boolean_expression" - xml do - root 'Constraint.body' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Constraintbody < Shale::Mapper + attribute :boolean_expression, BooleanExpression - map_element 'BooleanExpression', to: :boolean_expression + xml do + root "Constraint.body" + namespace "omg.org/UML1.3", "UML" + + map_element "BooleanExpression", to: :boolean_expression + end + end end end diff --git a/lib/xmi/uml13/constraintconstrained_element.rb b/lib/xmi/uml13/constraintconstrained_element.rb index 22607f9..408e22d 100644 --- a/lib/xmi/uml13/constraintconstrained_element.rb +++ b/lib/xmi/uml13/constraintconstrained_element.rb @@ -1,14 +1,21 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'model_element' +require "shale" -class ConstraintconstrainedElement < Shale::Mapper - attribute :model_element, ModelElement, collection: true +module Xmi + module Uml13 + class ModelElement < Shale::Mapper + end - xml do - root 'Constraint.constrainedElement' - namespace 'omg.org/UML1.3', 'UML' + class ConstraintconstrainedElement < Shale::Mapper + attribute :model_element, ModelElement, collection: true - map_element 'ModelElement', to: :model_element + xml do + root "Constraint.constrainedElement" + namespace "omg.org/UML1.3", "UML" + + map_element "ModelElement", to: :model_element + end + end end end diff --git a/lib/xmi/uml13/constraintconstrained_stereotype.rb b/lib/xmi/uml13/constraintconstrained_stereotype.rb index 614f536..a7e757e 100644 --- a/lib/xmi/uml13/constraintconstrained_stereotype.rb +++ b/lib/xmi/uml13/constraintconstrained_stereotype.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'stereotype' +require "shale" -class ConstraintconstrainedStereotype < Shale::Mapper - attribute :stereotype, Stereotype, collection: true +require_relative "stereotype" - xml do - root 'Constraint.constrainedStereotype' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ConstraintconstrainedStereotype < Shale::Mapper + attribute :stereotype, Stereotype, collection: true - map_element 'Stereotype', to: :stereotype + xml do + root "Constraint.constrainedStereotype" + namespace "omg.org/UML1.3", "UML" + + map_element "Stereotype", to: :stereotype + end + end end end diff --git a/lib/xmi/uml13/core.rb b/lib/xmi/uml13/core.rb index 7792ae1..aed49c6 100644 --- a/lib/xmi/uml13/core.rb +++ b/lib/xmi/uml13/core.rb @@ -1,84 +1,90 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'association' -require_relative 'association_class' -require_relative 'association_end' -require_relative 'attribute' -require_relative 'behavioral_feature' -require_relative 'class' -require_relative 'classifier' -require_relative 'constraint' -require_relative 'data_type' -require_relative 'dependency' -require_relative 'element' -require_relative 'feature' -require_relative 'generalizable_element' -require_relative 'generalization' -require_relative 'interface' -require_relative 'method' -require_relative 'model_element' -require_relative 'namespace' -require_relative 'operation' -require_relative 'parameter' -require_relative 'structural_feature' +require "shale" -class Core < Shale::Mapper - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :element, Element, collection: true - attribute :model_element, ModelElement, collection: true - attribute :namespace, Namespace, collection: true - attribute :generalizable_element, GeneralizableElement, collection: true - attribute :classifier, Classifier, collection: true - attribute :interface, Interface, collection: true - attribute :class, Class, collection: true - attribute :data_type, DataType, collection: true - attribute :feature, Feature, collection: true - attribute :structural_feature, StructuralFeature, collection: true - attribute :behavioral_feature, BehavioralFeature, collection: true - attribute :operation, Operation, collection: true - attribute :method, Method, collection: true - attribute :parameter, Parameter, collection: true - attribute :constraint, Constraint, collection: true - attribute :dependency, Dependency, collection: true - attribute :generalization, Generalization, collection: true - attribute :association_end, AssociationEnd, collection: true - attribute :association, Association, collection: true - attribute :association_class, AssociationClass, collection: true - attribute :attribute, Attribute, collection: true +require_relative "association" +require_relative "association_class" +require_relative "association_end" +require_relative "attribute" +require_relative "behavioral_feature" +require_relative "class" +require_relative "classifier" +require_relative "constraint" +require_relative "data_type" +require_relative "dependency" +require_relative "element" +require_relative "feature" +require_relative "generalizable_element" +require_relative "generalization" +require_relative "interface" +require_relative "method" +require_relative "model_element" +require_relative "namespace" +require_relative "operation" +require_relative "parameter" +require_relative "structural_feature" - xml do - root 'Core' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Core < Shale::Mapper + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :element, Element, collection: true + attribute :model_element, ModelElement, collection: true + attribute :namespace, Namespace, collection: true + attribute :generalizable_element, GeneralizableElement, collection: true + attribute :classifier, Classifier, collection: true + attribute :interface, Interface, collection: true + attribute :class, Class, collection: true + attribute :data_type, DataType, collection: true + attribute :feature, Feature, collection: true + attribute :structural_feature, StructuralFeature, collection: true + attribute :behavioral_feature, BehavioralFeature, collection: true + attribute :operation, Operation, collection: true + attribute :method, Method, collection: true + attribute :parameter, Parameter, collection: true + attribute :constraint, Constraint, collection: true + attribute :dependency, Dependency, collection: true + attribute :generalization, Generalization, collection: true + attribute :association_end, AssociationEnd, collection: true + attribute :association, Association, collection: true + attribute :association_class, AssociationClass, collection: true + attribute :attribute, Attribute, collection: true - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'Element', to: :element - map_element 'ModelElement', to: :model_element - map_element 'Namespace', to: :namespace - map_element 'GeneralizableElement', to: :generalizable_element - map_element 'Classifier', to: :classifier - map_element 'Interface', to: :interface - map_element 'Class', to: :class - map_element 'DataType', to: :data_type - map_element 'Feature', to: :feature - map_element 'StructuralFeature', to: :structural_feature - map_element 'BehavioralFeature', to: :behavioral_feature - map_element 'Operation', to: :operation - map_element 'Method', to: :method - map_element 'Parameter', to: :parameter - map_element 'Constraint', to: :constraint - map_element 'Dependency', to: :dependency - map_element 'Generalization', to: :generalization - map_element 'AssociationEnd', to: :association_end - map_element 'Association', to: :association - map_element 'AssociationClass', to: :association_class - map_element 'Attribute', to: :attribute + xml do + root "Core" + namespace "omg.org/UML1.3", "UML" + + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "Element", to: :element + map_element "ModelElement", to: :model_element + map_element "Namespace", to: :namespace + map_element "GeneralizableElement", to: :generalizable_element + map_element "Classifier", to: :classifier + map_element "Interface", to: :interface + map_element "Class", to: :class + map_element "DataType", to: :data_type + map_element "Feature", to: :feature + map_element "StructuralFeature", to: :structural_feature + map_element "BehavioralFeature", to: :behavioral_feature + map_element "Operation", to: :operation + map_element "Method", to: :method + map_element "Parameter", to: :parameter + map_element "Constraint", to: :constraint + map_element "Dependency", to: :dependency + map_element "Generalization", to: :generalization + map_element "AssociationEnd", to: :association_end + map_element "Association", to: :association + map_element "AssociationClass", to: :association_class + map_element "Attribute", to: :attribute + end + end end end diff --git a/lib/xmi/uml13/create_action.rb b/lib/xmi/uml13/create_action.rb index acbb362..6dc2922 100644 --- a/lib/xmi/uml13/create_action.rb +++ b/lib/xmi/uml13/create_action.rb @@ -1,151 +1,157 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'actionaction_sequence' -require_relative 'actionactual_argument' -require_relative 'actionis_asynchronous' -require_relative 'actionmessage' -require_relative 'actionrecurrence' -require_relative 'actionrequest' -require_relative 'actionscript' -require_relative 'actiontarget' -require_relative 'create_actioninstantiation' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'xm_iextension' +require "shale" -class CreateAction < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :is_asynchronous, Shale::Type::String - attribute :script, Shale::Type::Value - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :request, Shale::Type::Value - attribute :message, Shale::Type::Value - attribute :action_sequence, Shale::Type::Value - attribute :instantiation, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :action_recurrence, Actionrecurrence, collection: true - attribute :action_target, Actiontarget, collection: true - attribute :action_is_asynchronous, ActionisAsynchronous, collection: true - attribute :action_script, Actionscript, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :action_request, Actionrequest, collection: true - attribute :action_message, Actionmessage, collection: true - attribute :action_action_sequence, ActionactionSequence, collection: true - attribute :create_action_instantiation, CreateActioninstantiation, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :action_actual_argument, ActionactualArgument, collection: true +require_relative "actionaction_sequence" +require_relative "actionactual_argument" +require_relative "actionis_asynchronous" +require_relative "actionmessage" +require_relative "actionrecurrence" +require_relative "actionrequest" +require_relative "actionscript" +require_relative "actiontarget" +require_relative "create_actioninstantiation" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "xm_iextension" - xml do - root 'CreateAction' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class CreateAction < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :is_asynchronous, Shale::Type::String + attribute :script, Shale::Type::Value + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :request, Shale::Type::Value + attribute :message, Shale::Type::Value + attribute :action_sequence, Shale::Type::Value + attribute :instantiation, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :action_recurrence, Actionrecurrence, collection: true + attribute :action_target, Actiontarget, collection: true + attribute :action_is_asynchronous, ActionisAsynchronous, collection: true + attribute :action_script, Actionscript, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :action_request, Actionrequest, collection: true + attribute :action_message, Actionmessage, collection: true + attribute :action_action_sequence, ActionactionSequence, collection: true + attribute :create_action_instantiation, CreateActioninstantiation, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :action_actual_argument, ActionactualArgument, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'isAsynchronous', to: :is_asynchronous - map_attribute 'script', to: :script - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'request', to: :request - map_attribute 'message', to: :message - map_attribute 'actionSequence', to: :action_sequence - map_attribute 'instantiation', to: :instantiation - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'Action.recurrence', to: :action_recurrence - map_element 'Action.target', to: :action_target - map_element 'Action.isAsynchronous', to: :action_is_asynchronous - map_element 'Action.script', to: :action_script - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'Action.request', to: :action_request - map_element 'Action.message', to: :action_message - map_element 'Action.actionSequence', to: :action_action_sequence - map_element 'CreateAction.instantiation', to: :create_action_instantiation - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Action.actualArgument', to: :action_actual_argument + xml do + root "CreateAction" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "isAsynchronous", to: :is_asynchronous + map_attribute "script", to: :script + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "request", to: :request + map_attribute "message", to: :message + map_attribute "actionSequence", to: :action_sequence + map_attribute "instantiation", to: :instantiation + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "Action.recurrence", to: :action_recurrence + map_element "Action.target", to: :action_target + map_element "Action.isAsynchronous", to: :action_is_asynchronous + map_element "Action.script", to: :action_script + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "Action.request", to: :action_request + map_element "Action.message", to: :action_message + map_element "Action.actionSequence", to: :action_action_sequence + map_element "CreateAction.instantiation", to: :create_action_instantiation + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Action.actualArgument", to: :action_actual_argument + end + end end end diff --git a/lib/xmi/uml13/create_actioninstantiation.rb b/lib/xmi/uml13/create_actioninstantiation.rb index 9b332f8..83d7d99 100644 --- a/lib/xmi/uml13/create_actioninstantiation.rb +++ b/lib/xmi/uml13/create_actioninstantiation.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'classifier' +require "shale" -class CreateActioninstantiation < Shale::Mapper - attribute :classifier, Classifier, collection: true +require_relative "classifier" - xml do - root 'CreateAction.instantiation' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class CreateActioninstantiation < Shale::Mapper + attribute :classifier, Classifier, collection: true - map_element 'Classifier', to: :classifier + xml do + root "CreateAction.instantiation" + namespace "omg.org/UML1.3", "UML" + + map_element "Classifier", to: :classifier + end + end end end diff --git a/lib/xmi/uml13/data_type.rb b/lib/xmi/uml13/data_type.rb index 82e5464..94cceae 100644 --- a/lib/xmi/uml13/data_type.rb +++ b/lib/xmi/uml13/data_type.rb @@ -1,192 +1,198 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'classifierassociation_end' -require_relative 'classifierclassifier_in_state' -require_relative 'classifierclassifier_role' -require_relative 'classifiercreate_action' -require_relative 'classifierfeature' -require_relative 'classifierinstance' -require_relative 'classifierparameter' -require_relative 'classifierparticipant' -require_relative 'classifierrealization' -require_relative 'classifierspecification' -require_relative 'classifierstructural_feature' -require_relative 'generalizable_elementgeneralization' -require_relative 'generalizable_elementis_abstract' -require_relative 'generalizable_elementis_leaf' -require_relative 'generalizable_elementis_root' -require_relative 'generalizable_elementspecialization' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'namespaceowned_element' -require_relative 'xm_iextension' +require "shale" -class DataType < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :is_root, Shale::Type::String - attribute :is_leaf, Shale::Type::String - attribute :is_abstract, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :model_element_collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :generalization, Shale::Type::Value - attribute :specialization, Shale::Type::Value - attribute :parameter, Shale::Type::Value - attribute :structural_feature, Shale::Type::Value - attribute :specification, Shale::Type::Value - attribute :realization, Shale::Type::Value - attribute :association_end, Shale::Type::Value - attribute :participant, Shale::Type::Value - attribute :create_action, Shale::Type::Value - attribute :instance, Shale::Type::Value - attribute :classifier_collaboration, Shale::Type::Value - attribute :classifier_role, Shale::Type::Value - attribute :classifier_in_state, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :generalizable_element_is_root, GeneralizableElementisRoot, collection: true - attribute :generalizable_element_is_leaf, GeneralizableElementisLeaf, collection: true - attribute :generalizable_element_is_abstract, GeneralizableElementisAbstract, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :generalizable_element_generalization, GeneralizableElementgeneralization, collection: true - attribute :generalizable_element_specialization, GeneralizableElementspecialization, collection: true - attribute :classifier_parameter, Classifierparameter, collection: true - attribute :classifier_structural_feature, ClassifierstructuralFeature, collection: true - attribute :classifier_specification, Classifierspecification, collection: true - attribute :classifier_realization, Classifierrealization, collection: true - attribute :classifier_association_end, ClassifierassociationEnd, collection: true - attribute :classifier_participant, Classifierparticipant, collection: true - attribute :classifier_create_action, ClassifiercreateAction, collection: true - attribute :classifier_instance, Classifierinstance, collection: true - attribute :classifier_classifier_role, ClassifierclassifierRole, collection: true - attribute :classifier_classifier_in_state, ClassifierclassifierInState, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :namespace_owned_element, NamespaceownedElement, collection: true - attribute :classifier_feature, Classifierfeature, collection: true +require_relative "classifierassociation_end" +require_relative "classifierclassifier_in_state" +require_relative "classifierclassifier_role" +require_relative "classifiercreate_action" +require_relative "classifierfeature" +require_relative "classifierinstance" +require_relative "classifierparameter" +require_relative "classifierparticipant" +require_relative "classifierrealization" +require_relative "classifierspecification" +require_relative "classifierstructural_feature" +require_relative "generalizable_elementgeneralization" +require_relative "generalizable_elementis_abstract" +require_relative "generalizable_elementis_leaf" +require_relative "generalizable_elementis_root" +require_relative "generalizable_elementspecialization" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "namespaceowned_element" +require_relative "xm_iextension" - xml do - root 'DataType' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class DataType < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :is_root, Shale::Type::String + attribute :is_leaf, Shale::Type::String + attribute :is_abstract, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :model_element_collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :generalization, Shale::Type::Value + attribute :specialization, Shale::Type::Value + attribute :parameter, Shale::Type::Value + attribute :structural_feature, Shale::Type::Value + attribute :specification, Shale::Type::Value + attribute :realization, Shale::Type::Value + attribute :association_end, Shale::Type::Value + attribute :participant, Shale::Type::Value + attribute :create_action, Shale::Type::Value + attribute :instance, Shale::Type::Value + attribute :classifier_collaboration, Shale::Type::Value + attribute :classifier_role, Shale::Type::Value + attribute :classifier_in_state, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :generalizable_element_is_root, GeneralizableElementisRoot, collection: true + attribute :generalizable_element_is_leaf, GeneralizableElementisLeaf, collection: true + attribute :generalizable_element_is_abstract, GeneralizableElementisAbstract, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :generalizable_element_generalization, GeneralizableElementgeneralization, collection: true + attribute :generalizable_element_specialization, GeneralizableElementspecialization, collection: true + attribute :classifier_parameter, Classifierparameter, collection: true + attribute :classifier_structural_feature, ClassifierstructuralFeature, collection: true + attribute :classifier_specification, Classifierspecification, collection: true + attribute :classifier_realization, Classifierrealization, collection: true + attribute :classifier_association_end, ClassifierassociationEnd, collection: true + attribute :classifier_participant, Classifierparticipant, collection: true + attribute :classifier_create_action, ClassifiercreateAction, collection: true + attribute :classifier_instance, Classifierinstance, collection: true + attribute :classifier_classifier_role, ClassifierclassifierRole, collection: true + attribute :classifier_classifier_in_state, ClassifierclassifierInState, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :namespace_owned_element, NamespaceownedElement, collection: true + attribute :classifier_feature, Classifierfeature, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'isRoot', to: :is_root - map_attribute 'isLeaf', to: :is_leaf - map_attribute 'isAbstract', to: :is_abstract - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'ModelElement.collaboration', to: :model_element_collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'generalization', to: :generalization - map_attribute 'specialization', to: :specialization - map_attribute 'parameter', to: :parameter - map_attribute 'structuralFeature', to: :structural_feature - map_attribute 'specification', to: :specification - map_attribute 'realization', to: :realization - map_attribute 'associationEnd', to: :association_end - map_attribute 'participant', to: :participant - map_attribute 'createAction', to: :create_action - map_attribute 'instance', to: :instance - map_attribute 'Classifier.collaboration', to: :classifier_collaboration - map_attribute 'classifierRole', to: :classifier_role - map_attribute 'classifierInState', to: :classifier_in_state - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'GeneralizableElement.isRoot', to: :generalizable_element_is_root - map_element 'GeneralizableElement.isLeaf', to: :generalizable_element_is_leaf - map_element 'GeneralizableElement.isAbstract', to: :generalizable_element_is_abstract - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'GeneralizableElement.generalization', to: :generalizable_element_generalization - map_element 'GeneralizableElement.specialization', to: :generalizable_element_specialization - map_element 'Classifier.parameter', to: :classifier_parameter - map_element 'Classifier.structuralFeature', to: :classifier_structural_feature - map_element 'Classifier.specification', to: :classifier_specification - map_element 'Classifier.realization', to: :classifier_realization - map_element 'Classifier.associationEnd', to: :classifier_association_end - map_element 'Classifier.participant', to: :classifier_participant - map_element 'Classifier.createAction', to: :classifier_create_action - map_element 'Classifier.instance', to: :classifier_instance - map_element 'Classifier.classifierRole', to: :classifier_classifier_role - map_element 'Classifier.classifierInState', to: :classifier_classifier_in_state - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Namespace.ownedElement', to: :namespace_owned_element - map_element 'Classifier.feature', to: :classifier_feature + xml do + root "DataType" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "isRoot", to: :is_root + map_attribute "isLeaf", to: :is_leaf + map_attribute "isAbstract", to: :is_abstract + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "ModelElement.collaboration", to: :model_element_collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "generalization", to: :generalization + map_attribute "specialization", to: :specialization + map_attribute "parameter", to: :parameter + map_attribute "structuralFeature", to: :structural_feature + map_attribute "specification", to: :specification + map_attribute "realization", to: :realization + map_attribute "associationEnd", to: :association_end + map_attribute "participant", to: :participant + map_attribute "createAction", to: :create_action + map_attribute "instance", to: :instance + map_attribute "Classifier.collaboration", to: :classifier_collaboration + map_attribute "classifierRole", to: :classifier_role + map_attribute "classifierInState", to: :classifier_in_state + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "GeneralizableElement.isRoot", to: :generalizable_element_is_root + map_element "GeneralizableElement.isLeaf", to: :generalizable_element_is_leaf + map_element "GeneralizableElement.isAbstract", to: :generalizable_element_is_abstract + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "GeneralizableElement.generalization", to: :generalizable_element_generalization + map_element "GeneralizableElement.specialization", to: :generalizable_element_specialization + map_element "Classifier.parameter", to: :classifier_parameter + map_element "Classifier.structuralFeature", to: :classifier_structural_feature + map_element "Classifier.specification", to: :classifier_specification + map_element "Classifier.realization", to: :classifier_realization + map_element "Classifier.associationEnd", to: :classifier_association_end + map_element "Classifier.participant", to: :classifier_participant + map_element "Classifier.createAction", to: :classifier_create_action + map_element "Classifier.instance", to: :classifier_instance + map_element "Classifier.classifierRole", to: :classifier_classifier_role + map_element "Classifier.classifierInState", to: :classifier_classifier_in_state + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Namespace.ownedElement", to: :namespace_owned_element + map_element "Classifier.feature", to: :classifier_feature + end + end end end diff --git a/lib/xmi/uml13/data_types.rb b/lib/xmi/uml13/data_types.rb index 0562d95..e06cc23 100644 --- a/lib/xmi/uml13/data_types.rb +++ b/lib/xmi/uml13/data_types.rb @@ -1,60 +1,66 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'boolean_expression' -require_relative 'enumeration' -require_relative 'enumeration_literal' -require_relative 'expression' -require_relative 'geometry' -require_relative 'graphic_marker' -require_relative 'mapping' -require_relative 'multiplicity_range' -require_relative 'object_set_expression' -require_relative 'primitive' -require_relative 'procedure_expression' -require_relative 'structure' -require_relative 'time_expression' +require "shale" -class DataTypes < Shale::Mapper - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :enumeration, Enumeration, collection: true - attribute :enumeration_literal, EnumerationLiteral, collection: true - attribute :primitive, Primitive, collection: true - attribute :structure, Structure, collection: true - attribute :multiplicity_range, MultiplicityRange, collection: true - attribute :geometry, Geometry, collection: true - attribute :graphic_marker, GraphicMarker, collection: true - attribute :mapping, Mapping, collection: true - attribute :expression, Expression, collection: true - attribute :procedure_expression, ProcedureExpression, collection: true - attribute :object_set_expression, ObjectSetExpression, collection: true - attribute :time_expression, TimeExpression, collection: true - attribute :boolean_expression, BooleanExpression, collection: true +require_relative "boolean_expression" +require_relative "enumeration" +require_relative "enumeration_literal" +require_relative "expression" +require_relative "geometry" +require_relative "graphic_marker" +require_relative "mapping" +require_relative "multiplicity_range" +require_relative "object_set_expression" +require_relative "primitive" +require_relative "procedure_expression" +require_relative "structure" +require_relative "time_expression" - xml do - root 'Data_Types' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class DataTypes < Shale::Mapper + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :enumeration, Enumeration, collection: true + attribute :enumeration_literal, EnumerationLiteral, collection: true + attribute :primitive, Primitive, collection: true + attribute :structure, Structure, collection: true + attribute :multiplicity_range, MultiplicityRange, collection: true + attribute :geometry, Geometry, collection: true + attribute :graphic_marker, GraphicMarker, collection: true + attribute :mapping, Mapping, collection: true + attribute :expression, Expression, collection: true + attribute :procedure_expression, ProcedureExpression, collection: true + attribute :object_set_expression, ObjectSetExpression, collection: true + attribute :time_expression, TimeExpression, collection: true + attribute :boolean_expression, BooleanExpression, collection: true - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'Enumeration', to: :enumeration - map_element 'EnumerationLiteral', to: :enumeration_literal - map_element 'Primitive', to: :primitive - map_element 'Structure', to: :structure - map_element 'MultiplicityRange', to: :multiplicity_range - map_element 'Geometry', to: :geometry - map_element 'GraphicMarker', to: :graphic_marker - map_element 'Mapping', to: :mapping - map_element 'Expression', to: :expression - map_element 'ProcedureExpression', to: :procedure_expression - map_element 'ObjectSetExpression', to: :object_set_expression - map_element 'TimeExpression', to: :time_expression - map_element 'BooleanExpression', to: :boolean_expression + xml do + root "Data_Types" + namespace "omg.org/UML1.3", "UML" + + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "Enumeration", to: :enumeration + map_element "EnumerationLiteral", to: :enumeration_literal + map_element "Primitive", to: :primitive + map_element "Structure", to: :structure + map_element "MultiplicityRange", to: :multiplicity_range + map_element "Geometry", to: :geometry + map_element "GraphicMarker", to: :graphic_marker + map_element "Mapping", to: :mapping + map_element "Expression", to: :expression + map_element "ProcedureExpression", to: :procedure_expression + map_element "ObjectSetExpression", to: :object_set_expression + map_element "TimeExpression", to: :time_expression + map_element "BooleanExpression", to: :boolean_expression + end + end end end diff --git a/lib/xmi/uml13/data_value.rb b/lib/xmi/uml13/data_value.rb index fc761d0..cc87ca1 100644 --- a/lib/xmi/uml13/data_value.rb +++ b/lib/xmi/uml13/data_value.rb @@ -1,145 +1,151 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'instanceattribute_link' -require_relative 'instanceclassifier' -require_relative 'instancelink_end' -require_relative 'instancemessage_instance' -require_relative 'instancemessage_instance2' -require_relative 'instancemessage_instance3' -require_relative 'instanceslot' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'xm_iextension' +require "shale" -class DataValue < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :link_end, Shale::Type::Value - attribute :message_instance3, Shale::Type::Value - attribute :message_instance2, Shale::Type::Value - attribute :message_instance, Shale::Type::Value - attribute :attribute_link, Shale::Type::Value - attribute :classifier, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :instance_link_end, InstancelinkEnd, collection: true - attribute :instance_message_instance3, InstancemessageInstance3, collection: true - attribute :instance_message_instance2, InstancemessageInstance2, collection: true - attribute :instance_message_instance, InstancemessageInstance, collection: true - attribute :instance_attribute_link, InstanceattributeLink, collection: true - attribute :instance_classifier, Instanceclassifier, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :instance_slot, Instanceslot, collection: true +require_relative "instanceattribute_link" +require_relative "instanceclassifier" +require_relative "instancelink_end" +require_relative "instancemessage_instance" +require_relative "instancemessage_instance2" +require_relative "instancemessage_instance3" +require_relative "instanceslot" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "xm_iextension" - xml do - root 'DataValue' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class DataValue < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :link_end, Shale::Type::Value + attribute :message_instance3, Shale::Type::Value + attribute :message_instance2, Shale::Type::Value + attribute :message_instance, Shale::Type::Value + attribute :attribute_link, Shale::Type::Value + attribute :classifier, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :instance_link_end, InstancelinkEnd, collection: true + attribute :instance_message_instance3, InstancemessageInstance3, collection: true + attribute :instance_message_instance2, InstancemessageInstance2, collection: true + attribute :instance_message_instance, InstancemessageInstance, collection: true + attribute :instance_attribute_link, InstanceattributeLink, collection: true + attribute :instance_classifier, Instanceclassifier, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :instance_slot, Instanceslot, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'linkEnd', to: :link_end - map_attribute 'messageInstance3', to: :message_instance3 - map_attribute 'messageInstance2', to: :message_instance2 - map_attribute 'messageInstance', to: :message_instance - map_attribute 'attributeLink', to: :attribute_link - map_attribute 'classifier', to: :classifier - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'Instance.linkEnd', to: :instance_link_end - map_element 'Instance.messageInstance3', to: :instance_message_instance3 - map_element 'Instance.messageInstance2', to: :instance_message_instance2 - map_element 'Instance.messageInstance', to: :instance_message_instance - map_element 'Instance.attributeLink', to: :instance_attribute_link - map_element 'Instance.classifier', to: :instance_classifier - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Instance.slot', to: :instance_slot + xml do + root "DataValue" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "linkEnd", to: :link_end + map_attribute "messageInstance3", to: :message_instance3 + map_attribute "messageInstance2", to: :message_instance2 + map_attribute "messageInstance", to: :message_instance + map_attribute "attributeLink", to: :attribute_link + map_attribute "classifier", to: :classifier + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "Instance.linkEnd", to: :instance_link_end + map_element "Instance.messageInstance3", to: :instance_message_instance3 + map_element "Instance.messageInstance2", to: :instance_message_instance2 + map_element "Instance.messageInstance", to: :instance_message_instance + map_element "Instance.attributeLink", to: :instance_attribute_link + map_element "Instance.classifier", to: :instance_classifier + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Instance.slot", to: :instance_slot + end + end end end diff --git a/lib/xmi/uml13/dependency.rb b/lib/xmi/uml13/dependency.rb index 52af0bd..46ac01b 100644 --- a/lib/xmi/uml13/dependency.rb +++ b/lib/xmi/uml13/dependency.rb @@ -1,135 +1,141 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'dependencyclient' -require_relative 'dependencydescription' -require_relative 'dependencyowning_dependency' -require_relative 'dependencysub_dependencies' -require_relative 'dependencysupplier' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'xm_iextension' +require "shale" -class Dependency < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :description, Shale::Type::Value - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :owning_dependency, Shale::Type::Value - attribute :client, Shale::Type::Value - attribute :supplier, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :dependency_description, Dependencydescription, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :dependency_owning_dependency, DependencyowningDependency, collection: true - attribute :dependency_client, Dependencyclient, collection: true - attribute :dependency_supplier, Dependencysupplier, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :dependency_sub_dependencies, DependencysubDependencies, collection: true +require_relative "dependencyclient" +require_relative "dependencydescription" +require_relative "dependencyowning_dependency" +require_relative "dependencysub_dependencies" +require_relative "dependencysupplier" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "xm_iextension" - xml do - root 'Dependency' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Dependency < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :description, Shale::Type::Value + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :owning_dependency, Shale::Type::Value + attribute :client, Shale::Type::Value + attribute :supplier, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :dependency_description, Dependencydescription, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :dependency_owning_dependency, DependencyowningDependency, collection: true + attribute :dependency_client, Dependencyclient, collection: true + attribute :dependency_supplier, Dependencysupplier, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :dependency_sub_dependencies, DependencysubDependencies, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'description', to: :description - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'owningDependency', to: :owning_dependency - map_attribute 'client', to: :client - map_attribute 'supplier', to: :supplier - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'Dependency.description', to: :dependency_description - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'Dependency.owningDependency', to: :dependency_owning_dependency - map_element 'Dependency.client', to: :dependency_client - map_element 'Dependency.supplier', to: :dependency_supplier - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Dependency.subDependencies', to: :dependency_sub_dependencies + xml do + root "Dependency" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "description", to: :description + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "owningDependency", to: :owning_dependency + map_attribute "client", to: :client + map_attribute "supplier", to: :supplier + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "Dependency.description", to: :dependency_description + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "Dependency.owningDependency", to: :dependency_owning_dependency + map_element "Dependency.client", to: :dependency_client + map_element "Dependency.supplier", to: :dependency_supplier + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Dependency.subDependencies", to: :dependency_sub_dependencies + end + end end end diff --git a/lib/xmi/uml13/dependencyclient.rb b/lib/xmi/uml13/dependencyclient.rb index 27f54cf..9d74694 100644 --- a/lib/xmi/uml13/dependencyclient.rb +++ b/lib/xmi/uml13/dependencyclient.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'model_element' +require "shale" -class Dependencyclient < Shale::Mapper - attribute :model_element, ModelElement, collection: true +require_relative "model_element" - xml do - root 'Dependency.client' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Dependencyclient < Shale::Mapper + attribute :model_element, ModelElement, collection: true - map_element 'ModelElement', to: :model_element + xml do + root "Dependency.client" + namespace "omg.org/UML1.3", "UML" + + map_element "ModelElement", to: :model_element + end + end end end diff --git a/lib/xmi/uml13/dependencydescription.rb b/lib/xmi/uml13/dependencydescription.rb index 10dd98b..0a5d930 100644 --- a/lib/xmi/uml13/dependencydescription.rb +++ b/lib/xmi/uml13/dependencydescription.rb @@ -1,16 +1,22 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'xm_ireference' +require "shale" -class Dependencydescription < Shale::Mapper - attribute :content, Shale::Type::String - attribute :xmi_reference, XMIreference, collection: true +require_relative "xm_ireference" - xml do - root 'Dependency.description' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Dependencydescription < Shale::Mapper + attribute :content, Shale::Type::String + attribute :xmi_reference, XMIreference, collection: true - map_content to: :content - map_element 'XMI.reference', to: :xmi_reference, prefix: nil, namespace: nil + xml do + root "Dependency.description" + namespace "omg.org/UML1.3", "UML" + + map_content to: :content + map_element "XMI.reference", to: :xmi_reference, prefix: nil, namespace: nil + end + end end end diff --git a/lib/xmi/uml13/dependencyowning_dependency.rb b/lib/xmi/uml13/dependencyowning_dependency.rb index 3768765..76a6c18 100644 --- a/lib/xmi/uml13/dependencyowning_dependency.rb +++ b/lib/xmi/uml13/dependencyowning_dependency.rb @@ -1,14 +1,21 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'dependency' +require "shale" -class DependencyowningDependency < Shale::Mapper - attribute :dependency, Dependency, collection: true +module Xmi + module Uml13 + class Dependency < Shale::Mapper + end - xml do - root 'Dependency.owningDependency' - namespace 'omg.org/UML1.3', 'UML' + class DependencyowningDependency < Shale::Mapper + attribute :dependency, Dependency, collection: true - map_element 'Dependency', to: :dependency + xml do + root "Dependency.owningDependency" + namespace "omg.org/UML1.3", "UML" + + map_element "Dependency", to: :dependency + end + end end end diff --git a/lib/xmi/uml13/dependencysub_dependencies.rb b/lib/xmi/uml13/dependencysub_dependencies.rb index bf87658..79a0e45 100644 --- a/lib/xmi/uml13/dependencysub_dependencies.rb +++ b/lib/xmi/uml13/dependencysub_dependencies.rb @@ -1,26 +1,32 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'binding' -require_relative 'dependency' -require_relative 'refinement' -require_relative 'trace' -require_relative 'usage' +require "shale" -class DependencysubDependencies < Shale::Mapper - attribute :dependency, Dependency, collection: true - attribute :refinement, Refinement, collection: true - attribute :usage, Usage, collection: true - attribute :trace, Trace, collection: true - attribute :binding, Binding, collection: true +require_relative "binding" +require_relative "dependency" +require_relative "refinement" +require_relative "trace" +require_relative "usage" - xml do - root 'Dependency.subDependencies' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class DependencysubDependencies < Shale::Mapper + attribute :dependency, Dependency, collection: true + attribute :refinement, Refinement, collection: true + attribute :usage, Usage, collection: true + attribute :trace, Trace, collection: true + attribute :binding, Binding, collection: true - map_element 'Dependency', to: :dependency - map_element 'Refinement', to: :refinement - map_element 'Usage', to: :usage - map_element 'Trace', to: :trace - map_element 'Binding', to: :binding + xml do + root "Dependency.subDependencies" + namespace "omg.org/UML1.3", "UML" + + map_element "Dependency", to: :dependency + map_element "Refinement", to: :refinement + map_element "Usage", to: :usage + map_element "Trace", to: :trace + map_element "Binding", to: :binding + end + end end end diff --git a/lib/xmi/uml13/dependencysupplier.rb b/lib/xmi/uml13/dependencysupplier.rb index fc732df..5c5c0ef 100644 --- a/lib/xmi/uml13/dependencysupplier.rb +++ b/lib/xmi/uml13/dependencysupplier.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'model_element' +require "shale" -class Dependencysupplier < Shale::Mapper - attribute :model_element, ModelElement, collection: true +require_relative "model_element" - xml do - root 'Dependency.supplier' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Dependencysupplier < Shale::Mapper + attribute :model_element, ModelElement, collection: true - map_element 'ModelElement', to: :model_element + xml do + root "Dependency.supplier" + namespace "omg.org/UML1.3", "UML" + + map_element "ModelElement", to: :model_element + end + end end end diff --git a/lib/xmi/uml13/destroy_action.rb b/lib/xmi/uml13/destroy_action.rb index 5795183..8c761c6 100644 --- a/lib/xmi/uml13/destroy_action.rb +++ b/lib/xmi/uml13/destroy_action.rb @@ -1,146 +1,152 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'actionaction_sequence' -require_relative 'actionactual_argument' -require_relative 'actionis_asynchronous' -require_relative 'actionmessage' -require_relative 'actionrecurrence' -require_relative 'actionrequest' -require_relative 'actionscript' -require_relative 'actiontarget' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'xm_iextension' +require "shale" -class DestroyAction < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :is_asynchronous, Shale::Type::String - attribute :script, Shale::Type::Value - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :request, Shale::Type::Value - attribute :message, Shale::Type::Value - attribute :action_sequence, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :action_recurrence, Actionrecurrence, collection: true - attribute :action_target, Actiontarget, collection: true - attribute :action_is_asynchronous, ActionisAsynchronous, collection: true - attribute :action_script, Actionscript, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :action_request, Actionrequest, collection: true - attribute :action_message, Actionmessage, collection: true - attribute :action_action_sequence, ActionactionSequence, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :action_actual_argument, ActionactualArgument, collection: true +require_relative "actionaction_sequence" +require_relative "actionactual_argument" +require_relative "actionis_asynchronous" +require_relative "actionmessage" +require_relative "actionrecurrence" +require_relative "actionrequest" +require_relative "actionscript" +require_relative "actiontarget" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "xm_iextension" - xml do - root 'DestroyAction' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class DestroyAction < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :is_asynchronous, Shale::Type::String + attribute :script, Shale::Type::Value + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :request, Shale::Type::Value + attribute :message, Shale::Type::Value + attribute :action_sequence, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :action_recurrence, Actionrecurrence, collection: true + attribute :action_target, Actiontarget, collection: true + attribute :action_is_asynchronous, ActionisAsynchronous, collection: true + attribute :action_script, Actionscript, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :action_request, Actionrequest, collection: true + attribute :action_message, Actionmessage, collection: true + attribute :action_action_sequence, ActionactionSequence, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :action_actual_argument, ActionactualArgument, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'isAsynchronous', to: :is_asynchronous - map_attribute 'script', to: :script - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'request', to: :request - map_attribute 'message', to: :message - map_attribute 'actionSequence', to: :action_sequence - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'Action.recurrence', to: :action_recurrence - map_element 'Action.target', to: :action_target - map_element 'Action.isAsynchronous', to: :action_is_asynchronous - map_element 'Action.script', to: :action_script - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'Action.request', to: :action_request - map_element 'Action.message', to: :action_message - map_element 'Action.actionSequence', to: :action_action_sequence - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Action.actualArgument', to: :action_actual_argument + xml do + root "DestroyAction" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "isAsynchronous", to: :is_asynchronous + map_attribute "script", to: :script + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "request", to: :request + map_attribute "message", to: :message + map_attribute "actionSequence", to: :action_sequence + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "Action.recurrence", to: :action_recurrence + map_element "Action.target", to: :action_target + map_element "Action.isAsynchronous", to: :action_is_asynchronous + map_element "Action.script", to: :action_script + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "Action.request", to: :action_request + map_element "Action.message", to: :action_message + map_element "Action.actionSequence", to: :action_action_sequence + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Action.actualArgument", to: :action_actual_argument + end + end end end diff --git a/lib/xmi/uml13/diagram.rb b/lib/xmi/uml13/diagram.rb index 8ad2fd4..47e7434 100644 --- a/lib/xmi/uml13/diagram.rb +++ b/lib/xmi/uml13/diagram.rb @@ -1,46 +1,52 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'diagram_compositions' -require_relative 'diagram_properties' -require_relative 'diagramelement' -require_relative 'model_elementtagged_value' -require_relative 'xm_iextension' +require "shale" -class Diagram < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :tool_name, Shale::Type::Value - attribute :diagram_type, Shale::Type::Value - attribute :style, Shale::Type::Value - attribute :owner, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :diagram_properties, DiagramProperties, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :diagram_element, Diagramelement, collection: true - attribute :diagram_compositions, DiagramCompositions, collection: true +require_relative "diagram_compositions" +require_relative "diagram_properties" +require_relative "diagramelement" +require_relative "model_elementtagged_value" +require_relative "xm_iextension" - xml do - root 'Diagram' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Diagram < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :tool_name, Shale::Type::Value + attribute :diagram_type, Shale::Type::Value + attribute :style, Shale::Type::Value + attribute :owner, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :diagram_properties, DiagramProperties, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :diagram_element, Diagramelement, collection: true + attribute :diagram_compositions, DiagramCompositions, collection: true - map_attribute 'name', to: :name - map_attribute 'toolName', to: :tool_name - map_attribute 'diagramType', to: :diagram_type - map_attribute 'style', to: :style - map_attribute 'owner', to: :owner - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'DiagramProperties', to: :diagram_properties - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Diagram.element', to: :diagram_element - map_element 'DiagramCompositions', to: :diagram_compositions + xml do + root "Diagram" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "toolName", to: :tool_name + map_attribute "diagramType", to: :diagram_type + map_attribute "style", to: :style + map_attribute "owner", to: :owner + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "DiagramProperties", to: :diagram_properties + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Diagram.element", to: :diagram_element + map_element "DiagramCompositions", to: :diagram_compositions + end + end end end diff --git a/lib/xmi/uml13/diagram_compositions.rb b/lib/xmi/uml13/diagram_compositions.rb index 768358d..e876753 100644 --- a/lib/xmi/uml13/diagram_compositions.rb +++ b/lib/xmi/uml13/diagram_compositions.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'diagramelement' +require "shale" -class DiagramCompositions < Shale::Mapper - attribute :diagram_element, Diagramelement, collection: true +require_relative "diagramelement" - xml do - root 'DiagramCompositions' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class DiagramCompositions < Shale::Mapper + attribute :diagram_element, Diagramelement, collection: true - map_element 'Diagram.element', to: :diagram_element + xml do + root "DiagramCompositions" + namespace "omg.org/UML1.3", "UML" + + map_element "Diagram.element", to: :diagram_element + end + end end end diff --git a/lib/xmi/uml13/diagram_element.rb b/lib/xmi/uml13/diagram_element.rb index 81509a8..1c37d32 100644 --- a/lib/xmi/uml13/diagram_element.rb +++ b/lib/xmi/uml13/diagram_element.rb @@ -1,38 +1,44 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'diagram_element_properties' -require_relative 'model_elementtagged_value' -require_relative 'xm_iextension' +require "shale" -class DiagramElement < Shale::Mapper - attribute :geometry, Shale::Type::Value - attribute :style, Shale::Type::Value - attribute :subject, Shale::Type::Value - attribute :seqno, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :diagram_element_properties, DiagramElementProperties - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue +require_relative "diagram_element_properties" +require_relative "model_elementtagged_value" +require_relative "xm_iextension" - xml do - root 'DiagramElement' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class DiagramElement < Shale::Mapper + attribute :geometry, Shale::Type::Value + attribute :style, Shale::Type::Value + attribute :subject, Shale::Type::Value + attribute :seqno, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :diagram_element_properties, DiagramElementProperties + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue - map_attribute 'geometry', to: :geometry - map_attribute 'style', to: :style - map_attribute 'subject', to: :subject - map_attribute 'seqno', to: :seqno - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'DiagramElementProperties', to: :diagram_element_properties - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value + xml do + root "DiagramElement" + namespace "omg.org/UML1.3", "UML" + + map_attribute "geometry", to: :geometry + map_attribute "style", to: :style + map_attribute "subject", to: :subject + map_attribute "seqno", to: :seqno + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "DiagramElementProperties", to: :diagram_element_properties + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + end + end end end diff --git a/lib/xmi/uml13/diagram_element_properties.rb b/lib/xmi/uml13/diagram_element_properties.rb index 1795071..09e6cf4 100644 --- a/lib/xmi/uml13/diagram_element_properties.rb +++ b/lib/xmi/uml13/diagram_element_properties.rb @@ -1,17 +1,23 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'diagram_elementgeometry' -require_relative 'diagram_elementstyle' +require "shale" -class DiagramElementProperties < Shale::Mapper - attribute :diagram_element_geometry, DiagramElementgeometry - attribute :diagram_element_style, DiagramElementstyle +require_relative "diagram_elementgeometry" +require_relative "diagram_elementstyle" - xml do - root 'DiagramElementProperties' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class DiagramElementProperties < Shale::Mapper + attribute :diagram_element_geometry, DiagramElementgeometry + attribute :diagram_element_style, DiagramElementstyle - map_element 'DiagramElement.geometry', to: :diagram_element_geometry - map_element 'DiagramElement.style', to: :diagram_element_style + xml do + root "DiagramElementProperties" + namespace "omg.org/UML1.3", "UML" + + map_element "DiagramElement.geometry", to: :diagram_element_geometry + map_element "DiagramElement.style", to: :diagram_element_style + end + end end end diff --git a/lib/xmi/uml13/diagram_elementdiagram.rb b/lib/xmi/uml13/diagram_elementdiagram.rb index 585c03d..45f94f8 100644 --- a/lib/xmi/uml13/diagram_elementdiagram.rb +++ b/lib/xmi/uml13/diagram_elementdiagram.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'diagram' +require "shale" -class DiagramElementdiagram < Shale::Mapper - attribute :diagram, Diagram +require_relative "diagram" - xml do - root 'DiagramElement.diagram' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class DiagramElementdiagram < Shale::Mapper + attribute :diagram, Diagram - map_element 'Diagram', to: :diagram + xml do + root "DiagramElement.diagram" + namespace "omg.org/UML1.3", "UML" + + map_element "Diagram", to: :diagram + end + end end end diff --git a/lib/xmi/uml13/diagram_elementgeometry.rb b/lib/xmi/uml13/diagram_elementgeometry.rb index 1820fe9..e63f737 100644 --- a/lib/xmi/uml13/diagram_elementgeometry.rb +++ b/lib/xmi/uml13/diagram_elementgeometry.rb @@ -1,16 +1,22 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'xm_ireference' +require "shale" -class DiagramElementgeometry < Shale::Mapper - attribute :content, Shale::Type::String - attribute :xmi_reference, XMIreference, collection: true +require_relative "xm_ireference" - xml do - root 'DiagramElement.geometry' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class DiagramElementgeometry < Shale::Mapper + attribute :content, Shale::Type::String + attribute :xmi_reference, XMIreference, collection: true - map_content to: :content - map_element 'XMI.reference', to: :xmi_reference, prefix: nil, namespace: nil + xml do + root "DiagramElement.geometry" + namespace "omg.org/UML1.3", "UML" + + map_content to: :content + map_element "XMI.reference", to: :xmi_reference, prefix: nil, namespace: nil + end + end end end diff --git a/lib/xmi/uml13/diagram_elementstyle.rb b/lib/xmi/uml13/diagram_elementstyle.rb index 75acfe8..90990b2 100644 --- a/lib/xmi/uml13/diagram_elementstyle.rb +++ b/lib/xmi/uml13/diagram_elementstyle.rb @@ -1,16 +1,22 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'xm_ireference' +require "shale" -class DiagramElementstyle < Shale::Mapper - attribute :content, Shale::Type::String - attribute :xmi_reference, XMIreference, collection: true +require_relative "xm_ireference" - xml do - root 'DiagramElement.style' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class DiagramElementstyle < Shale::Mapper + attribute :content, Shale::Type::String + attribute :xmi_reference, XMIreference, collection: true - map_content to: :content - map_element 'XMI.reference', to: :xmi_reference, prefix: nil, namespace: nil + xml do + root "DiagramElement.style" + namespace "omg.org/UML1.3", "UML" + + map_content to: :content + map_element "XMI.reference", to: :xmi_reference, prefix: nil, namespace: nil + end + end end end diff --git a/lib/xmi/uml13/diagram_properties.rb b/lib/xmi/uml13/diagram_properties.rb index 7ed9b03..253d419 100644 --- a/lib/xmi/uml13/diagram_properties.rb +++ b/lib/xmi/uml13/diagram_properties.rb @@ -1,23 +1,29 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'diagramdiagram_type' -require_relative 'diagramname' -require_relative 'diagramstyle' -require_relative 'diagramtool_name' +require "shale" -class DiagramProperties < Shale::Mapper - attribute :diagram_name, Diagramname - attribute :diagram_tool_name, DiagramtoolName - attribute :diagram_diagram_type, DiagramdiagramType - attribute :diagram_style, Diagramstyle +require_relative "diagramdiagram_type" +require_relative "diagramname" +require_relative "diagramstyle" +require_relative "diagramtool_name" - xml do - root 'DiagramProperties' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class DiagramProperties < Shale::Mapper + attribute :diagram_name, Diagramname + attribute :diagram_tool_name, DiagramtoolName + attribute :diagram_diagram_type, DiagramdiagramType + attribute :diagram_style, Diagramstyle - map_element 'Diagram.name', to: :diagram_name - map_element 'Diagram.toolName', to: :diagram_tool_name - map_element 'Diagram.diagramType', to: :diagram_diagram_type - map_element 'Diagram.style', to: :diagram_style + xml do + root "DiagramProperties" + namespace "omg.org/UML1.3", "UML" + + map_element "Diagram.name", to: :diagram_name + map_element "Diagram.toolName", to: :diagram_tool_name + map_element "Diagram.diagramType", to: :diagram_diagram_type + map_element "Diagram.style", to: :diagram_style + end + end end end diff --git a/lib/xmi/uml13/diagramdiagram_type.rb b/lib/xmi/uml13/diagramdiagram_type.rb index f96bf4f..bec8337 100644 --- a/lib/xmi/uml13/diagramdiagram_type.rb +++ b/lib/xmi/uml13/diagramdiagram_type.rb @@ -1,16 +1,22 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'xm_ireference' +require "shale" -class DiagramdiagramType < Shale::Mapper - attribute :content, Shale::Type::String - attribute :xmi_reference, XMIreference, collection: true +require_relative "xm_ireference" - xml do - root 'Diagram.diagramType' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class DiagramdiagramType < Shale::Mapper + attribute :content, Shale::Type::String + attribute :xmi_reference, XMIreference, collection: true - map_content to: :content - map_element 'XMI.reference', to: :xmi_reference, prefix: nil, namespace: nil + xml do + root "Diagram.diagramType" + namespace "omg.org/UML1.3", "UML" + + map_content to: :content + map_element "XMI.reference", to: :xmi_reference, prefix: nil, namespace: nil + end + end end end diff --git a/lib/xmi/uml13/diagramelement.rb b/lib/xmi/uml13/diagramelement.rb index e77d8cd..49e7fd8 100644 --- a/lib/xmi/uml13/diagramelement.rb +++ b/lib/xmi/uml13/diagramelement.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'diagram_element' +require "shale" -class Diagramelement < Shale::Mapper - attribute :diagram_element, DiagramElement, collection: true +require_relative "diagram_element" - xml do - root 'Diagram.element' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Diagramelement < Shale::Mapper + attribute :diagram_element, DiagramElement, collection: true - map_element 'DiagramElement', to: :diagram_element + xml do + root "Diagram.element" + namespace "omg.org/UML1.3", "UML" + + map_element "DiagramElement", to: :diagram_element + end + end end end diff --git a/lib/xmi/uml13/diagramname.rb b/lib/xmi/uml13/diagramname.rb index 691e0b6..aae7d88 100644 --- a/lib/xmi/uml13/diagramname.rb +++ b/lib/xmi/uml13/diagramname.rb @@ -1,16 +1,22 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'xm_ireference' +require "shale" -class Diagramname < Shale::Mapper - attribute :content, Shale::Type::String - attribute :xmi_reference, XMIreference, collection: true +require_relative "xm_ireference" - xml do - root 'Diagram.name' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Diagramname < Shale::Mapper + attribute :content, Shale::Type::String + attribute :xmi_reference, XMIreference, collection: true - map_content to: :content - map_element 'XMI.reference', to: :xmi_reference, prefix: nil, namespace: nil + xml do + root "Diagram.name" + namespace "omg.org/UML1.3", "UML" + + map_content to: :content + map_element "XMI.reference", to: :xmi_reference, prefix: nil, namespace: nil + end + end end end diff --git a/lib/xmi/uml13/diagramowner.rb b/lib/xmi/uml13/diagramowner.rb index 9967a2e..2fd7cc5 100644 --- a/lib/xmi/uml13/diagramowner.rb +++ b/lib/xmi/uml13/diagramowner.rb @@ -1,239 +1,245 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'abstraction' -require_relative 'action' -require_relative 'action_sequence' -require_relative 'action_state' -require_relative 'activity_model' -require_relative 'actor' -require_relative 'argument' -require_relative 'association' -require_relative 'association_class' -require_relative 'association_end' -require_relative 'association_end_role' -require_relative 'association_role' -require_relative 'attribute' -require_relative 'attribute_link' -require_relative 'behavioral_feature' -require_relative 'binding' -require_relative 'call_action' -require_relative 'call_event' -require_relative 'change_event' -require_relative 'class' -require_relative 'classifier' -require_relative 'classifier_in_state' -require_relative 'classifier_role' -require_relative 'collaboration' -require_relative 'comment' -require_relative 'component' -require_relative 'composite_state' -require_relative 'constraint' -require_relative 'create_action' -require_relative 'data_type' -require_relative 'data_value' -require_relative 'dependency' -require_relative 'destroy_action' -require_relative 'event' -require_relative 'exception' -require_relative 'feature' -require_relative 'generalizable_element' -require_relative 'generalization' -require_relative 'guard' -require_relative 'instance' -require_relative 'interaction' -require_relative 'interface' -require_relative 'link' -require_relative 'link_end' -require_relative 'link_object' -require_relative 'message' -require_relative 'method' -require_relative 'model' -require_relative 'model_element' -require_relative 'namespace' -require_relative 'node' -require_relative 'object' -require_relative 'object_flow_state' -require_relative 'operation' -require_relative 'package' -require_relative 'parameter' -require_relative 'partition' -require_relative 'reception' -require_relative 'return_action' -require_relative 'send_action' -require_relative 'signal' -require_relative 'signal_event' -require_relative 'simple_state' -require_relative 'state' -require_relative 'state_machine' -require_relative 'state_vertex' -require_relative 'stereotype' -require_relative 'structural_feature' -require_relative 'submachine_state' -require_relative 'subsystem' -require_relative 'terminate_action' -require_relative 'time_event' -require_relative 'transition' -require_relative 'uninterpreted_action' -require_relative 'usage' -require_relative 'use_case' +require "shale" -class Diagramowner < Shale::Mapper - attribute :model_element, ModelElement - attribute :namespace, Namespace - attribute :classifier, Classifier - attribute :class, Class - attribute :association_class, AssociationClass - attribute :data_type, DataType - attribute :interface, Interface - attribute :component, Component - attribute :node, Node - attribute :signal, Signal - attribute :exception, Exception - attribute :use_case, UseCase - attribute :actor, Actor - attribute :classifier_role, ClassifierRole - attribute :classifier_in_state, ClassifierInState - attribute :subsystem, Subsystem - attribute :collaboration, Collaboration - attribute :package, Package - attribute :model, Model - attribute :association_end, AssociationEnd - attribute :association_end_role, AssociationEndRole - attribute :constraint, Constraint - attribute :generalizable_element, GeneralizableElement - attribute :association, Association - attribute :association_role, AssociationRole - attribute :stereotype, Stereotype - attribute :parameter, Parameter - attribute :feature, Feature - attribute :structural_feature, StructuralFeature - attribute :attribute, Attribute - attribute :behavioral_feature, BehavioralFeature - attribute :operation, Operation - attribute :method, Method - attribute :reception, Reception - attribute :comment, Comment - attribute :generalization, Generalization - attribute :dependency, Dependency - attribute :abstraction, Abstraction - attribute :usage, Usage - attribute :binding, Binding - attribute :instance, Instance - attribute :object, Object - attribute :link_object, LinkObject - attribute :data_value, DataValue - attribute :action, Action - attribute :create_action, CreateAction - attribute :destroy_action, DestroyAction - attribute :uninterpreted_action, UninterpretedAction - attribute :call_action, CallAction - attribute :send_action, SendAction - attribute :action_sequence, ActionSequence - attribute :return_action, ReturnAction - attribute :terminate_action, TerminateAction - attribute :attribute_link, AttributeLink - attribute :argument, Argument - attribute :link, Link - attribute :link_end, LinkEnd - attribute :state_machine, StateMachine - attribute :activity_model, ActivityModel - attribute :event, Event - attribute :time_event, TimeEvent - attribute :call_event, CallEvent - attribute :signal_event, SignalEvent - attribute :change_event, ChangeEvent - attribute :transition, Transition - attribute :state_vertex, StateVertex - attribute :state, State - attribute :composite_state, CompositeState - attribute :submachine_state, SubmachineState - attribute :simple_state, SimpleState - attribute :object_flow_state, ObjectFlowState - attribute :action_state, ActionState - attribute :guard, Guard - attribute :message, Message - attribute :interaction, Interaction - attribute :partition, Partition +require_relative "abstraction" +require_relative "action" +require_relative "action_sequence" +require_relative "action_state" +require_relative "activity_model" +require_relative "actor" +require_relative "argument" +require_relative "association" +require_relative "association_class" +require_relative "association_end" +require_relative "association_end_role" +require_relative "association_role" +require_relative "attribute" +require_relative "attribute_link" +require_relative "behavioral_feature" +require_relative "binding" +require_relative "call_action" +require_relative "call_event" +require_relative "change_event" +require_relative "class" +require_relative "classifier" +require_relative "classifier_in_state" +require_relative "classifier_role" +require_relative "collaboration" +require_relative "comment" +require_relative "component" +require_relative "composite_state" +require_relative "constraint" +require_relative "create_action" +require_relative "data_type" +require_relative "data_value" +require_relative "dependency" +require_relative "destroy_action" +require_relative "event" +require_relative "exception" +require_relative "feature" +require_relative "generalizable_element" +require_relative "generalization" +require_relative "guard" +require_relative "instance" +require_relative "interaction" +require_relative "interface" +require_relative "link" +require_relative "link_end" +require_relative "link_object" +require_relative "message" +require_relative "method" +require_relative "model" +require_relative "model_element" +require_relative "namespace" +require_relative "node" +require_relative "object" +require_relative "object_flow_state" +require_relative "operation" +require_relative "package" +require_relative "parameter" +require_relative "partition" +require_relative "reception" +require_relative "return_action" +require_relative "send_action" +require_relative "signal" +require_relative "signal_event" +require_relative "simple_state" +require_relative "state" +require_relative "state_machine" +require_relative "state_vertex" +require_relative "stereotype" +require_relative "structural_feature" +require_relative "submachine_state" +require_relative "subsystem" +require_relative "terminate_action" +require_relative "time_event" +require_relative "transition" +require_relative "uninterpreted_action" +require_relative "usage" +require_relative "use_case" - xml do - root 'Diagram.owner' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Diagramowner < Shale::Mapper + attribute :model_element, ModelElement + attribute :namespace, Namespace + attribute :classifier, Classifier + attribute :class, Class + attribute :association_class, AssociationClass + attribute :data_type, DataType + attribute :interface, Interface + attribute :component, Component + attribute :node, Node + attribute :signal, Signal + attribute :exception, Exception + attribute :use_case, UseCase + attribute :actor, Actor + attribute :classifier_role, ClassifierRole + attribute :classifier_in_state, ClassifierInState + attribute :subsystem, Subsystem + attribute :collaboration, Collaboration + attribute :package, Package + attribute :model, Model + attribute :association_end, AssociationEnd + attribute :association_end_role, AssociationEndRole + attribute :constraint, Constraint + attribute :generalizable_element, GeneralizableElement + attribute :association, Association + attribute :association_role, AssociationRole + attribute :stereotype, Stereotype + attribute :parameter, Parameter + attribute :feature, Feature + attribute :structural_feature, StructuralFeature + attribute :attribute, Attribute + attribute :behavioral_feature, BehavioralFeature + attribute :operation, Operation + attribute :method, Method + attribute :reception, Reception + attribute :comment, Comment + attribute :generalization, Generalization + attribute :dependency, Dependency + attribute :abstraction, Abstraction + attribute :usage, Usage + attribute :binding, Binding + attribute :instance, Instance + attribute :object, Object + attribute :link_object, LinkObject + attribute :data_value, DataValue + attribute :action, Action + attribute :create_action, CreateAction + attribute :destroy_action, DestroyAction + attribute :uninterpreted_action, UninterpretedAction + attribute :call_action, CallAction + attribute :send_action, SendAction + attribute :action_sequence, ActionSequence + attribute :return_action, ReturnAction + attribute :terminate_action, TerminateAction + attribute :attribute_link, AttributeLink + attribute :argument, Argument + attribute :link, Link + attribute :link_end, LinkEnd + attribute :state_machine, StateMachine + attribute :activity_model, ActivityModel + attribute :event, Event + attribute :time_event, TimeEvent + attribute :call_event, CallEvent + attribute :signal_event, SignalEvent + attribute :change_event, ChangeEvent + attribute :transition, Transition + attribute :state_vertex, StateVertex + attribute :state, State + attribute :composite_state, CompositeState + attribute :submachine_state, SubmachineState + attribute :simple_state, SimpleState + attribute :object_flow_state, ObjectFlowState + attribute :action_state, ActionState + attribute :guard, Guard + attribute :message, Message + attribute :interaction, Interaction + attribute :partition, Partition - map_element 'ModelElement', to: :model_element - map_element 'Namespace', to: :namespace - map_element 'Classifier', to: :classifier - map_element 'Class', to: :class - map_element 'AssociationClass', to: :association_class - map_element 'DataType', to: :data_type - map_element 'Interface', to: :interface - map_element 'Component', to: :component - map_element 'Node', to: :node - map_element 'Signal', to: :signal - map_element 'Exception', to: :exception - map_element 'UseCase', to: :use_case - map_element 'Actor', to: :actor - map_element 'ClassifierRole', to: :classifier_role - map_element 'ClassifierInState', to: :classifier_in_state - map_element 'Subsystem', to: :subsystem - map_element 'Collaboration', to: :collaboration - map_element 'Package', to: :package - map_element 'Model', to: :model - map_element 'AssociationEnd', to: :association_end - map_element 'AssociationEndRole', to: :association_end_role - map_element 'Constraint', to: :constraint - map_element 'GeneralizableElement', to: :generalizable_element - map_element 'Association', to: :association - map_element 'AssociationRole', to: :association_role - map_element 'Stereotype', to: :stereotype - map_element 'Parameter', to: :parameter - map_element 'Feature', to: :feature - map_element 'StructuralFeature', to: :structural_feature - map_element 'Attribute', to: :attribute - map_element 'BehavioralFeature', to: :behavioral_feature - map_element 'Operation', to: :operation - map_element 'Method', to: :method - map_element 'Reception', to: :reception - map_element 'Comment', to: :comment - map_element 'Generalization', to: :generalization - map_element 'Dependency', to: :dependency - map_element 'Abstraction', to: :abstraction - map_element 'Usage', to: :usage - map_element 'Binding', to: :binding - map_element 'Instance', to: :instance - map_element 'Object', to: :object - map_element 'LinkObject', to: :link_object - map_element 'DataValue', to: :data_value - map_element 'Action', to: :action - map_element 'CreateAction', to: :create_action - map_element 'DestroyAction', to: :destroy_action - map_element 'UninterpretedAction', to: :uninterpreted_action - map_element 'CallAction', to: :call_action - map_element 'SendAction', to: :send_action - map_element 'ActionSequence', to: :action_sequence - map_element 'ReturnAction', to: :return_action - map_element 'TerminateAction', to: :terminate_action - map_element 'AttributeLink', to: :attribute_link - map_element 'Argument', to: :argument - map_element 'Link', to: :link - map_element 'LinkEnd', to: :link_end - map_element 'StateMachine', to: :state_machine - map_element 'ActivityModel', to: :activity_model - map_element 'Event', to: :event - map_element 'TimeEvent', to: :time_event - map_element 'CallEvent', to: :call_event - map_element 'SignalEvent', to: :signal_event - map_element 'ChangeEvent', to: :change_event - map_element 'Transition', to: :transition - map_element 'StateVertex', to: :state_vertex - map_element 'State', to: :state - map_element 'CompositeState', to: :composite_state - map_element 'SubmachineState', to: :submachine_state - map_element 'SimpleState', to: :simple_state - map_element 'ObjectFlowState', to: :object_flow_state - map_element 'ActionState', to: :action_state - map_element 'Guard', to: :guard - map_element 'Message', to: :message - map_element 'Interaction', to: :interaction - map_element 'Partition', to: :partition + xml do + root "Diagram.owner" + namespace "omg.org/UML1.3", "UML" + + map_element "ModelElement", to: :model_element + map_element "Namespace", to: :namespace + map_element "Classifier", to: :classifier + map_element "Class", to: :class + map_element "AssociationClass", to: :association_class + map_element "DataType", to: :data_type + map_element "Interface", to: :interface + map_element "Component", to: :component + map_element "Node", to: :node + map_element "Signal", to: :signal + map_element "Exception", to: :exception + map_element "UseCase", to: :use_case + map_element "Actor", to: :actor + map_element "ClassifierRole", to: :classifier_role + map_element "ClassifierInState", to: :classifier_in_state + map_element "Subsystem", to: :subsystem + map_element "Collaboration", to: :collaboration + map_element "Package", to: :package + map_element "Model", to: :model + map_element "AssociationEnd", to: :association_end + map_element "AssociationEndRole", to: :association_end_role + map_element "Constraint", to: :constraint + map_element "GeneralizableElement", to: :generalizable_element + map_element "Association", to: :association + map_element "AssociationRole", to: :association_role + map_element "Stereotype", to: :stereotype + map_element "Parameter", to: :parameter + map_element "Feature", to: :feature + map_element "StructuralFeature", to: :structural_feature + map_element "Attribute", to: :attribute + map_element "BehavioralFeature", to: :behavioral_feature + map_element "Operation", to: :operation + map_element "Method", to: :method + map_element "Reception", to: :reception + map_element "Comment", to: :comment + map_element "Generalization", to: :generalization + map_element "Dependency", to: :dependency + map_element "Abstraction", to: :abstraction + map_element "Usage", to: :usage + map_element "Binding", to: :binding + map_element "Instance", to: :instance + map_element "Object", to: :object + map_element "LinkObject", to: :link_object + map_element "DataValue", to: :data_value + map_element "Action", to: :action + map_element "CreateAction", to: :create_action + map_element "DestroyAction", to: :destroy_action + map_element "UninterpretedAction", to: :uninterpreted_action + map_element "CallAction", to: :call_action + map_element "SendAction", to: :send_action + map_element "ActionSequence", to: :action_sequence + map_element "ReturnAction", to: :return_action + map_element "TerminateAction", to: :terminate_action + map_element "AttributeLink", to: :attribute_link + map_element "Argument", to: :argument + map_element "Link", to: :link + map_element "LinkEnd", to: :link_end + map_element "StateMachine", to: :state_machine + map_element "ActivityModel", to: :activity_model + map_element "Event", to: :event + map_element "TimeEvent", to: :time_event + map_element "CallEvent", to: :call_event + map_element "SignalEvent", to: :signal_event + map_element "ChangeEvent", to: :change_event + map_element "Transition", to: :transition + map_element "StateVertex", to: :state_vertex + map_element "State", to: :state + map_element "CompositeState", to: :composite_state + map_element "SubmachineState", to: :submachine_state + map_element "SimpleState", to: :simple_state + map_element "ObjectFlowState", to: :object_flow_state + map_element "ActionState", to: :action_state + map_element "Guard", to: :guard + map_element "Message", to: :message + map_element "Interaction", to: :interaction + map_element "Partition", to: :partition + end + end end end diff --git a/lib/xmi/uml13/diagramstyle.rb b/lib/xmi/uml13/diagramstyle.rb index 8750fb4..7f4998e 100644 --- a/lib/xmi/uml13/diagramstyle.rb +++ b/lib/xmi/uml13/diagramstyle.rb @@ -1,16 +1,22 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'xm_ireference' +require "shale" -class Diagramstyle < Shale::Mapper - attribute :content, Shale::Type::String - attribute :xmi_reference, XMIreference, collection: true +require_relative "xm_ireference" - xml do - root 'Diagram.style' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Diagramstyle < Shale::Mapper + attribute :content, Shale::Type::String + attribute :xmi_reference, XMIreference, collection: true - map_content to: :content - map_element 'XMI.reference', to: :xmi_reference, prefix: nil, namespace: nil + xml do + root "Diagram.style" + namespace "omg.org/UML1.3", "UML" + + map_content to: :content + map_element "XMI.reference", to: :xmi_reference, prefix: nil, namespace: nil + end + end end end diff --git a/lib/xmi/uml13/diagramtool_name.rb b/lib/xmi/uml13/diagramtool_name.rb index 721561f..5185937 100644 --- a/lib/xmi/uml13/diagramtool_name.rb +++ b/lib/xmi/uml13/diagramtool_name.rb @@ -1,16 +1,22 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'xm_ireference' +require "shale" -class DiagramtoolName < Shale::Mapper - attribute :content, Shale::Type::String - attribute :xmi_reference, XMIreference, collection: true +require_relative "xm_ireference" - xml do - root 'Diagram.toolName' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class DiagramtoolName < Shale::Mapper + attribute :content, Shale::Type::String + attribute :xmi_reference, XMIreference, collection: true - map_content to: :content - map_element 'XMI.reference', to: :xmi_reference, prefix: nil, namespace: nil + xml do + root "Diagram.toolName" + namespace "omg.org/UML1.3", "UML" + + map_content to: :content + map_element "XMI.reference", to: :xmi_reference, prefix: nil, namespace: nil + end + end end end diff --git a/lib/xmi/uml13/element.rb b/lib/xmi/uml13/element.rb index a9ec114..13ff0ac 100644 --- a/lib/xmi/uml13/element.rb +++ b/lib/xmi/uml13/element.rb @@ -1,24 +1,30 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'xm_iextension' +require "shale" -class Element < Shale::Mapper - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :xmi_extension, XMIextension, collection: true +require_relative "xm_iextension" - xml do - root 'Element' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Element < Shale::Mapper + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :xmi_extension, XMIextension, collection: true - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil + xml do + root "Element" + namespace "omg.org/UML1.3", "UML" + + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + end + end end end diff --git a/lib/xmi/uml13/element_reference.rb b/lib/xmi/uml13/element_reference.rb index 16b4713..569828c 100644 --- a/lib/xmi/uml13/element_reference.rb +++ b/lib/xmi/uml13/element_reference.rb @@ -1,44 +1,50 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'element_referencealias' -require_relative 'element_referencepackage' -require_relative 'element_referencereferenced_element' -require_relative 'element_referencevisibility' -require_relative 'xm_iextension' +require "shale" -class ElementReference < Shale::Mapper - attribute :visibility, Shale::Type::String - attribute :alias, Shale::Type::Value - attribute :referenced_element, Shale::Type::Value - attribute :package, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :element_reference_visibility, ElementReferencevisibility, collection: true - attribute :element_reference_alias, ElementReferencealias, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :element_reference_referenced_element, ElementReferencereferencedElement, collection: true - attribute :element_reference_package, ElementReferencepackage, collection: true +require_relative "element_referencealias" +require_relative "element_referencepackage" +require_relative "element_referencereferenced_element" +require_relative "element_referencevisibility" +require_relative "xm_iextension" - xml do - root 'ElementReference' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ElementReference < Shale::Mapper + attribute :visibility, Shale::Type::String + attribute :alias, Shale::Type::Value + attribute :referenced_element, Shale::Type::Value + attribute :package, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :element_reference_visibility, ElementReferencevisibility, collection: true + attribute :element_reference_alias, ElementReferencealias, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :element_reference_referenced_element, ElementReferencereferencedElement, collection: true + attribute :element_reference_package, ElementReferencepackage, collection: true - map_attribute 'visibility', to: :visibility - map_attribute 'alias', to: :alias - map_attribute 'referencedElement', to: :referenced_element - map_attribute 'package', to: :package - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ElementReference.visibility', to: :element_reference_visibility - map_element 'ElementReference.alias', to: :element_reference_alias - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ElementReference.referencedElement', to: :element_reference_referenced_element - map_element 'ElementReference.package', to: :element_reference_package + xml do + root "ElementReference" + namespace "omg.org/UML1.3", "UML" + + map_attribute "visibility", to: :visibility + map_attribute "alias", to: :alias + map_attribute "referencedElement", to: :referenced_element + map_attribute "package", to: :package + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ElementReference.visibility", to: :element_reference_visibility + map_element "ElementReference.alias", to: :element_reference_alias + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ElementReference.referencedElement", to: :element_reference_referenced_element + map_element "ElementReference.package", to: :element_reference_package + end + end end end diff --git a/lib/xmi/uml13/element_referencealias.rb b/lib/xmi/uml13/element_referencealias.rb index 7f9ea7d..a33e162 100644 --- a/lib/xmi/uml13/element_referencealias.rb +++ b/lib/xmi/uml13/element_referencealias.rb @@ -1,16 +1,22 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'xm_ireference' +require "shale" -class ElementReferencealias < Shale::Mapper - attribute :content, Shale::Type::String - attribute :xmi_reference, XMIreference, collection: true +require_relative "xm_ireference" - xml do - root 'ElementReference.alias' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ElementReferencealias < Shale::Mapper + attribute :content, Shale::Type::String + attribute :xmi_reference, XMIreference, collection: true - map_content to: :content - map_element 'XMI.reference', to: :xmi_reference, prefix: nil, namespace: nil + xml do + root "ElementReference.alias" + namespace "omg.org/UML1.3", "UML" + + map_content to: :content + map_element "XMI.reference", to: :xmi_reference, prefix: nil, namespace: nil + end + end end end diff --git a/lib/xmi/uml13/element_referencepackage.rb b/lib/xmi/uml13/element_referencepackage.rb index 89ff4f1..efe8f74 100644 --- a/lib/xmi/uml13/element_referencepackage.rb +++ b/lib/xmi/uml13/element_referencepackage.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'package' +require "shale" -class ElementReferencepackage < Shale::Mapper - attribute :package, Package, collection: true +require_relative "package" - xml do - root 'ElementReference.package' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ElementReferencepackage < Shale::Mapper + attribute :package, Package, collection: true - map_element 'Package', to: :package + xml do + root "ElementReference.package" + namespace "omg.org/UML1.3", "UML" + + map_element "Package", to: :package + end + end end end diff --git a/lib/xmi/uml13/element_referencereferenced_element.rb b/lib/xmi/uml13/element_referencereferenced_element.rb index ff18c37..f871220 100644 --- a/lib/xmi/uml13/element_referencereferenced_element.rb +++ b/lib/xmi/uml13/element_referencereferenced_element.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'model_element' +require "shale" -class ElementReferencereferencedElement < Shale::Mapper - attribute :model_element, ModelElement, collection: true +require_relative "model_element" - xml do - root 'ElementReference.referencedElement' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ElementReferencereferencedElement < Shale::Mapper + attribute :model_element, ModelElement, collection: true - map_element 'ModelElement', to: :model_element + xml do + root "ElementReference.referencedElement" + namespace "omg.org/UML1.3", "UML" + + map_element "ModelElement", to: :model_element + end + end end end diff --git a/lib/xmi/uml13/element_referencevisibility.rb b/lib/xmi/uml13/element_referencevisibility.rb index d3f1e0c..0f5a981 100644 --- a/lib/xmi/uml13/element_referencevisibility.rb +++ b/lib/xmi/uml13/element_referencevisibility.rb @@ -1,12 +1,18 @@ -require 'shale' +# frozen_string_literal: true -class ElementReferencevisibility < Shale::Mapper - attribute :xmi_value, Shale::Type::String +require "shale" - xml do - root 'ElementReference.visibility' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ElementReferencevisibility < Shale::Mapper + attribute :xmi_value, Shale::Type::String - map_attribute 'xmi.value', to: :xmi_value + xml do + root "ElementReference.visibility" + namespace "omg.org/UML1.3", "UML" + + map_attribute "xmi.value", to: :xmi_value + end + end end end diff --git a/lib/xmi/uml13/enumeration.rb b/lib/xmi/uml13/enumeration.rb index 54fabc1..bc8c73b 100644 --- a/lib/xmi/uml13/enumeration.rb +++ b/lib/xmi/uml13/enumeration.rb @@ -1,195 +1,201 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'classifierassociation_end' -require_relative 'classifierclassifier_in_state' -require_relative 'classifierclassifier_role' -require_relative 'classifiercreate_action' -require_relative 'classifierfeature' -require_relative 'classifierinstance' -require_relative 'classifierparameter' -require_relative 'classifierparticipant' -require_relative 'classifierrealization' -require_relative 'classifierspecification' -require_relative 'classifierstructural_feature' -require_relative 'enumerationliteral' -require_relative 'generalizable_elementgeneralization' -require_relative 'generalizable_elementis_abstract' -require_relative 'generalizable_elementis_leaf' -require_relative 'generalizable_elementis_root' -require_relative 'generalizable_elementspecialization' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'namespaceowned_element' -require_relative 'xm_iextension' +require "shale" -class Enumeration < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :is_root, Shale::Type::String - attribute :is_leaf, Shale::Type::String - attribute :is_abstract, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :model_element_collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :generalization, Shale::Type::Value - attribute :specialization, Shale::Type::Value - attribute :parameter, Shale::Type::Value - attribute :structural_feature, Shale::Type::Value - attribute :specification, Shale::Type::Value - attribute :realization, Shale::Type::Value - attribute :association_end, Shale::Type::Value - attribute :participant, Shale::Type::Value - attribute :create_action, Shale::Type::Value - attribute :instance, Shale::Type::Value - attribute :classifier_collaboration, Shale::Type::Value - attribute :classifier_role, Shale::Type::Value - attribute :classifier_in_state, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :generalizable_element_is_root, GeneralizableElementisRoot, collection: true - attribute :generalizable_element_is_leaf, GeneralizableElementisLeaf, collection: true - attribute :generalizable_element_is_abstract, GeneralizableElementisAbstract, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :generalizable_element_generalization, GeneralizableElementgeneralization, collection: true - attribute :generalizable_element_specialization, GeneralizableElementspecialization, collection: true - attribute :classifier_parameter, Classifierparameter, collection: true - attribute :classifier_structural_feature, ClassifierstructuralFeature, collection: true - attribute :classifier_specification, Classifierspecification, collection: true - attribute :classifier_realization, Classifierrealization, collection: true - attribute :classifier_association_end, ClassifierassociationEnd, collection: true - attribute :classifier_participant, Classifierparticipant, collection: true - attribute :classifier_create_action, ClassifiercreateAction, collection: true - attribute :classifier_instance, Classifierinstance, collection: true - attribute :classifier_classifier_role, ClassifierclassifierRole, collection: true - attribute :classifier_classifier_in_state, ClassifierclassifierInState, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :namespace_owned_element, NamespaceownedElement, collection: true - attribute :classifier_feature, Classifierfeature, collection: true - attribute :enumeration_literal, Enumerationliteral, collection: true +require_relative "classifierassociation_end" +require_relative "classifierclassifier_in_state" +require_relative "classifierclassifier_role" +require_relative "classifiercreate_action" +require_relative "classifierfeature" +require_relative "classifierinstance" +require_relative "classifierparameter" +require_relative "classifierparticipant" +require_relative "classifierrealization" +require_relative "classifierspecification" +require_relative "classifierstructural_feature" +require_relative "enumerationliteral" +require_relative "generalizable_elementgeneralization" +require_relative "generalizable_elementis_abstract" +require_relative "generalizable_elementis_leaf" +require_relative "generalizable_elementis_root" +require_relative "generalizable_elementspecialization" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "namespaceowned_element" +require_relative "xm_iextension" - xml do - root 'Enumeration' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Enumeration < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :is_root, Shale::Type::String + attribute :is_leaf, Shale::Type::String + attribute :is_abstract, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :model_element_collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :generalization, Shale::Type::Value + attribute :specialization, Shale::Type::Value + attribute :parameter, Shale::Type::Value + attribute :structural_feature, Shale::Type::Value + attribute :specification, Shale::Type::Value + attribute :realization, Shale::Type::Value + attribute :association_end, Shale::Type::Value + attribute :participant, Shale::Type::Value + attribute :create_action, Shale::Type::Value + attribute :instance, Shale::Type::Value + attribute :classifier_collaboration, Shale::Type::Value + attribute :classifier_role, Shale::Type::Value + attribute :classifier_in_state, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :generalizable_element_is_root, GeneralizableElementisRoot, collection: true + attribute :generalizable_element_is_leaf, GeneralizableElementisLeaf, collection: true + attribute :generalizable_element_is_abstract, GeneralizableElementisAbstract, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :generalizable_element_generalization, GeneralizableElementgeneralization, collection: true + attribute :generalizable_element_specialization, GeneralizableElementspecialization, collection: true + attribute :classifier_parameter, Classifierparameter, collection: true + attribute :classifier_structural_feature, ClassifierstructuralFeature, collection: true + attribute :classifier_specification, Classifierspecification, collection: true + attribute :classifier_realization, Classifierrealization, collection: true + attribute :classifier_association_end, ClassifierassociationEnd, collection: true + attribute :classifier_participant, Classifierparticipant, collection: true + attribute :classifier_create_action, ClassifiercreateAction, collection: true + attribute :classifier_instance, Classifierinstance, collection: true + attribute :classifier_classifier_role, ClassifierclassifierRole, collection: true + attribute :classifier_classifier_in_state, ClassifierclassifierInState, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :namespace_owned_element, NamespaceownedElement, collection: true + attribute :classifier_feature, Classifierfeature, collection: true + attribute :enumeration_literal, Enumerationliteral, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'isRoot', to: :is_root - map_attribute 'isLeaf', to: :is_leaf - map_attribute 'isAbstract', to: :is_abstract - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'ModelElement.collaboration', to: :model_element_collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'generalization', to: :generalization - map_attribute 'specialization', to: :specialization - map_attribute 'parameter', to: :parameter - map_attribute 'structuralFeature', to: :structural_feature - map_attribute 'specification', to: :specification - map_attribute 'realization', to: :realization - map_attribute 'associationEnd', to: :association_end - map_attribute 'participant', to: :participant - map_attribute 'createAction', to: :create_action - map_attribute 'instance', to: :instance - map_attribute 'Classifier.collaboration', to: :classifier_collaboration - map_attribute 'classifierRole', to: :classifier_role - map_attribute 'classifierInState', to: :classifier_in_state - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'GeneralizableElement.isRoot', to: :generalizable_element_is_root - map_element 'GeneralizableElement.isLeaf', to: :generalizable_element_is_leaf - map_element 'GeneralizableElement.isAbstract', to: :generalizable_element_is_abstract - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'GeneralizableElement.generalization', to: :generalizable_element_generalization - map_element 'GeneralizableElement.specialization', to: :generalizable_element_specialization - map_element 'Classifier.parameter', to: :classifier_parameter - map_element 'Classifier.structuralFeature', to: :classifier_structural_feature - map_element 'Classifier.specification', to: :classifier_specification - map_element 'Classifier.realization', to: :classifier_realization - map_element 'Classifier.associationEnd', to: :classifier_association_end - map_element 'Classifier.participant', to: :classifier_participant - map_element 'Classifier.createAction', to: :classifier_create_action - map_element 'Classifier.instance', to: :classifier_instance - map_element 'Classifier.classifierRole', to: :classifier_classifier_role - map_element 'Classifier.classifierInState', to: :classifier_classifier_in_state - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Namespace.ownedElement', to: :namespace_owned_element - map_element 'Classifier.feature', to: :classifier_feature - map_element 'Enumeration.literal', to: :enumeration_literal + xml do + root "Enumeration" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "isRoot", to: :is_root + map_attribute "isLeaf", to: :is_leaf + map_attribute "isAbstract", to: :is_abstract + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "ModelElement.collaboration", to: :model_element_collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "generalization", to: :generalization + map_attribute "specialization", to: :specialization + map_attribute "parameter", to: :parameter + map_attribute "structuralFeature", to: :structural_feature + map_attribute "specification", to: :specification + map_attribute "realization", to: :realization + map_attribute "associationEnd", to: :association_end + map_attribute "participant", to: :participant + map_attribute "createAction", to: :create_action + map_attribute "instance", to: :instance + map_attribute "Classifier.collaboration", to: :classifier_collaboration + map_attribute "classifierRole", to: :classifier_role + map_attribute "classifierInState", to: :classifier_in_state + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "GeneralizableElement.isRoot", to: :generalizable_element_is_root + map_element "GeneralizableElement.isLeaf", to: :generalizable_element_is_leaf + map_element "GeneralizableElement.isAbstract", to: :generalizable_element_is_abstract + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "GeneralizableElement.generalization", to: :generalizable_element_generalization + map_element "GeneralizableElement.specialization", to: :generalizable_element_specialization + map_element "Classifier.parameter", to: :classifier_parameter + map_element "Classifier.structuralFeature", to: :classifier_structural_feature + map_element "Classifier.specification", to: :classifier_specification + map_element "Classifier.realization", to: :classifier_realization + map_element "Classifier.associationEnd", to: :classifier_association_end + map_element "Classifier.participant", to: :classifier_participant + map_element "Classifier.createAction", to: :classifier_create_action + map_element "Classifier.instance", to: :classifier_instance + map_element "Classifier.classifierRole", to: :classifier_classifier_role + map_element "Classifier.classifierInState", to: :classifier_classifier_in_state + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Namespace.ownedElement", to: :namespace_owned_element + map_element "Classifier.feature", to: :classifier_feature + map_element "Enumeration.literal", to: :enumeration_literal + end + end end end diff --git a/lib/xmi/uml13/enumeration_literal.rb b/lib/xmi/uml13/enumeration_literal.rb index 52bca51..aa1b3f5 100644 --- a/lib/xmi/uml13/enumeration_literal.rb +++ b/lib/xmi/uml13/enumeration_literal.rb @@ -1,34 +1,40 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'enumeration_literalenumeration' -require_relative 'enumeration_literalname' -require_relative 'xm_iextension' +require "shale" -class EnumerationLiteral < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :enumeration, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :enumeration_literal_name, EnumerationLiteralname, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :enumeration_literal_enumeration, EnumerationLiteralenumeration, collection: true +require_relative "enumeration_literalenumeration" +require_relative "enumeration_literalname" +require_relative "xm_iextension" - xml do - root 'EnumerationLiteral' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class EnumerationLiteral < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :enumeration, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :enumeration_literal_name, EnumerationLiteralname, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :enumeration_literal_enumeration, EnumerationLiteralenumeration, collection: true - map_attribute 'name', to: :name - map_attribute 'enumeration', to: :enumeration - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'EnumerationLiteral.name', to: :enumeration_literal_name - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'EnumerationLiteral.enumeration', to: :enumeration_literal_enumeration + xml do + root "EnumerationLiteral" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "enumeration", to: :enumeration + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "EnumerationLiteral.name", to: :enumeration_literal_name + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "EnumerationLiteral.enumeration", to: :enumeration_literal_enumeration + end + end end end diff --git a/lib/xmi/uml13/enumeration_literalenumeration.rb b/lib/xmi/uml13/enumeration_literalenumeration.rb index b5d3a55..87276bb 100644 --- a/lib/xmi/uml13/enumeration_literalenumeration.rb +++ b/lib/xmi/uml13/enumeration_literalenumeration.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'enumeration' +require "shale" -class EnumerationLiteralenumeration < Shale::Mapper - attribute :enumeration, Enumeration, collection: true +require_relative "enumeration" - xml do - root 'EnumerationLiteral.enumeration' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class EnumerationLiteralenumeration < Shale::Mapper + attribute :enumeration, Enumeration, collection: true - map_element 'Enumeration', to: :enumeration + xml do + root "EnumerationLiteral.enumeration" + namespace "omg.org/UML1.3", "UML" + + map_element "Enumeration", to: :enumeration + end + end end end diff --git a/lib/xmi/uml13/enumeration_literalname.rb b/lib/xmi/uml13/enumeration_literalname.rb index d8c8fd9..d39f613 100644 --- a/lib/xmi/uml13/enumeration_literalname.rb +++ b/lib/xmi/uml13/enumeration_literalname.rb @@ -1,16 +1,22 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'xm_ireference' +require "shale" -class EnumerationLiteralname < Shale::Mapper - attribute :content, Shale::Type::String - attribute :xmi_reference, XMIreference, collection: true +require_relative "xm_ireference" - xml do - root 'EnumerationLiteral.name' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class EnumerationLiteralname < Shale::Mapper + attribute :content, Shale::Type::String + attribute :xmi_reference, XMIreference, collection: true - map_content to: :content - map_element 'XMI.reference', to: :xmi_reference, prefix: nil, namespace: nil + xml do + root "EnumerationLiteral.name" + namespace "omg.org/UML1.3", "UML" + + map_content to: :content + map_element "XMI.reference", to: :xmi_reference, prefix: nil, namespace: nil + end + end end end diff --git a/lib/xmi/uml13/enumerationliteral.rb b/lib/xmi/uml13/enumerationliteral.rb index 461f92f..a568c04 100644 --- a/lib/xmi/uml13/enumerationliteral.rb +++ b/lib/xmi/uml13/enumerationliteral.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'enumeration_literal' +require "shale" -class Enumerationliteral < Shale::Mapper - attribute :enumeration_literal, EnumerationLiteral, collection: true +require_relative "enumeration_literal" - xml do - root 'Enumeration.literal' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Enumerationliteral < Shale::Mapper + attribute :enumeration_literal, EnumerationLiteral, collection: true - map_element 'EnumerationLiteral', to: :enumeration_literal + xml do + root "Enumeration.literal" + namespace "omg.org/UML1.3", "UML" + + map_element "EnumerationLiteral", to: :enumeration_literal + end + end end end diff --git a/lib/xmi/uml13/event.rb b/lib/xmi/uml13/event.rb index 41f358e..d25be8b 100644 --- a/lib/xmi/uml13/event.rb +++ b/lib/xmi/uml13/event.rb @@ -1,122 +1,128 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'eventstate' -require_relative 'eventtransition' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'xm_iextension' +require "shale" -class Event < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :state, Shale::Type::Value - attribute :transition, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :event_state, Eventstate, collection: true - attribute :event_transition, Eventtransition, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true +require_relative "eventstate" +require_relative "eventtransition" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "xm_iextension" - xml do - root 'Event' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Event < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :state, Shale::Type::Value + attribute :transition, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :event_state, Eventstate, collection: true + attribute :event_transition, Eventtransition, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'state', to: :state - map_attribute 'transition', to: :transition - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'Event.state', to: :event_state - map_element 'Event.transition', to: :event_transition - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value + xml do + root "Event" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "state", to: :state + map_attribute "transition", to: :transition + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "Event.state", to: :event_state + map_element "Event.transition", to: :event_transition + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + end + end end end diff --git a/lib/xmi/uml13/eventstate.rb b/lib/xmi/uml13/eventstate.rb index 6378f7b..59c9485 100644 --- a/lib/xmi/uml13/eventstate.rb +++ b/lib/xmi/uml13/eventstate.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'state' +require "shale" -class Eventstate < Shale::Mapper - attribute :state, State, collection: true +require_relative "state" - xml do - root 'Event.state' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Eventstate < Shale::Mapper + attribute :state, State, collection: true - map_element 'State', to: :state + xml do + root "Event.state" + namespace "omg.org/UML1.3", "UML" + + map_element "State", to: :state + end + end end end diff --git a/lib/xmi/uml13/eventtransition.rb b/lib/xmi/uml13/eventtransition.rb index 566c941..f746421 100644 --- a/lib/xmi/uml13/eventtransition.rb +++ b/lib/xmi/uml13/eventtransition.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'transition' +require "shale" -class Eventtransition < Shale::Mapper - attribute :transition, Transition, collection: true +require_relative "transition" - xml do - root 'Event.transition' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Eventtransition < Shale::Mapper + attribute :transition, Transition, collection: true - map_element 'Transition', to: :transition + xml do + root "Event.transition" + namespace "omg.org/UML1.3", "UML" + + map_element "Transition", to: :transition + end + end end end diff --git a/lib/xmi/uml13/exception.rb b/lib/xmi/uml13/exception.rb index 0fc42d4..09646da 100644 --- a/lib/xmi/uml13/exception.rb +++ b/lib/xmi/uml13/exception.rb @@ -1,168 +1,174 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'exceptioncontext' -require_relative 'generalizable_elementgeneralization' -require_relative 'generalizable_elementis_abstract' -require_relative 'generalizable_elementis_leaf' -require_relative 'generalizable_elementis_root' -require_relative 'generalizable_elementspecialization' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'namespaceowned_element' -require_relative 'requestaction' -require_relative 'requestmessage_instance' -require_relative 'signaloccurrence' -require_relative 'signalparameter' -require_relative 'signalreception' -require_relative 'xm_iextension' +require "shale" -class Exception < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :is_root, Shale::Type::String - attribute :is_leaf, Shale::Type::String - attribute :is_abstract, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :generalization, Shale::Type::Value - attribute :specialization, Shale::Type::Value - attribute :action, Shale::Type::Value - attribute :message_instance, Shale::Type::Value - attribute :reception, Shale::Type::Value - attribute :occurrence, Shale::Type::Value - attribute :context, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :generalizable_element_is_root, GeneralizableElementisRoot, collection: true - attribute :generalizable_element_is_leaf, GeneralizableElementisLeaf, collection: true - attribute :generalizable_element_is_abstract, GeneralizableElementisAbstract, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :generalizable_element_generalization, GeneralizableElementgeneralization, collection: true - attribute :generalizable_element_specialization, GeneralizableElementspecialization, collection: true - attribute :request_action, Requestaction, collection: true - attribute :request_message_instance, RequestmessageInstance, collection: true - attribute :signal_reception, Signalreception, collection: true - attribute :signal_occurrence, Signaloccurrence, collection: true - attribute :exception_context, Exceptioncontext, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :namespace_owned_element, NamespaceownedElement, collection: true - attribute :signal_parameter, Signalparameter, collection: true +require_relative "exceptioncontext" +require_relative "generalizable_elementgeneralization" +require_relative "generalizable_elementis_abstract" +require_relative "generalizable_elementis_leaf" +require_relative "generalizable_elementis_root" +require_relative "generalizable_elementspecialization" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "namespaceowned_element" +require_relative "requestaction" +require_relative "requestmessage_instance" +require_relative "signaloccurrence" +require_relative "signalparameter" +require_relative "signalreception" +require_relative "xm_iextension" - xml do - root 'Exception' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Exception < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :is_root, Shale::Type::String + attribute :is_leaf, Shale::Type::String + attribute :is_abstract, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :generalization, Shale::Type::Value + attribute :specialization, Shale::Type::Value + attribute :action, Shale::Type::Value + attribute :message_instance, Shale::Type::Value + attribute :reception, Shale::Type::Value + attribute :occurrence, Shale::Type::Value + attribute :context, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :generalizable_element_is_root, GeneralizableElementisRoot, collection: true + attribute :generalizable_element_is_leaf, GeneralizableElementisLeaf, collection: true + attribute :generalizable_element_is_abstract, GeneralizableElementisAbstract, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :generalizable_element_generalization, GeneralizableElementgeneralization, collection: true + attribute :generalizable_element_specialization, GeneralizableElementspecialization, collection: true + attribute :request_action, Requestaction, collection: true + attribute :request_message_instance, RequestmessageInstance, collection: true + attribute :signal_reception, Signalreception, collection: true + attribute :signal_occurrence, Signaloccurrence, collection: true + attribute :exception_context, Exceptioncontext, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :namespace_owned_element, NamespaceownedElement, collection: true + attribute :signal_parameter, Signalparameter, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'isRoot', to: :is_root - map_attribute 'isLeaf', to: :is_leaf - map_attribute 'isAbstract', to: :is_abstract - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'generalization', to: :generalization - map_attribute 'specialization', to: :specialization - map_attribute 'action', to: :action - map_attribute 'messageInstance', to: :message_instance - map_attribute 'reception', to: :reception - map_attribute 'occurrence', to: :occurrence - map_attribute 'context', to: :context - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'GeneralizableElement.isRoot', to: :generalizable_element_is_root - map_element 'GeneralizableElement.isLeaf', to: :generalizable_element_is_leaf - map_element 'GeneralizableElement.isAbstract', to: :generalizable_element_is_abstract - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'GeneralizableElement.generalization', to: :generalizable_element_generalization - map_element 'GeneralizableElement.specialization', to: :generalizable_element_specialization - map_element 'Request.action', to: :request_action - map_element 'Request.messageInstance', to: :request_message_instance - map_element 'Signal.reception', to: :signal_reception - map_element 'Signal.occurrence', to: :signal_occurrence - map_element 'Exception.context', to: :exception_context - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Namespace.ownedElement', to: :namespace_owned_element - map_element 'Signal.parameter', to: :signal_parameter + xml do + root "Exception" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "isRoot", to: :is_root + map_attribute "isLeaf", to: :is_leaf + map_attribute "isAbstract", to: :is_abstract + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "generalization", to: :generalization + map_attribute "specialization", to: :specialization + map_attribute "action", to: :action + map_attribute "messageInstance", to: :message_instance + map_attribute "reception", to: :reception + map_attribute "occurrence", to: :occurrence + map_attribute "context", to: :context + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "GeneralizableElement.isRoot", to: :generalizable_element_is_root + map_element "GeneralizableElement.isLeaf", to: :generalizable_element_is_leaf + map_element "GeneralizableElement.isAbstract", to: :generalizable_element_is_abstract + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "GeneralizableElement.generalization", to: :generalizable_element_generalization + map_element "GeneralizableElement.specialization", to: :generalizable_element_specialization + map_element "Request.action", to: :request_action + map_element "Request.messageInstance", to: :request_message_instance + map_element "Signal.reception", to: :signal_reception + map_element "Signal.occurrence", to: :signal_occurrence + map_element "Exception.context", to: :exception_context + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Namespace.ownedElement", to: :namespace_owned_element + map_element "Signal.parameter", to: :signal_parameter + end + end end end diff --git a/lib/xmi/uml13/exceptioncontext.rb b/lib/xmi/uml13/exceptioncontext.rb index 42e2680..be5aaf8 100644 --- a/lib/xmi/uml13/exceptioncontext.rb +++ b/lib/xmi/uml13/exceptioncontext.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'behavioral_feature' +require "shale" -class Exceptioncontext < Shale::Mapper - attribute :behavioral_feature, BehavioralFeature, collection: true +require_relative "behavioral_feature" - xml do - root 'Exception.context' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Exceptioncontext < Shale::Mapper + attribute :behavioral_feature, BehavioralFeature, collection: true - map_element 'BehavioralFeature', to: :behavioral_feature + xml do + root "Exception.context" + namespace "omg.org/UML1.3", "UML" + + map_element "BehavioralFeature", to: :behavioral_feature + end + end end end diff --git a/lib/xmi/uml13/expression.rb b/lib/xmi/uml13/expression.rb index 9c85d2c..5ae99d1 100644 --- a/lib/xmi/uml13/expression.rb +++ b/lib/xmi/uml13/expression.rb @@ -1,34 +1,40 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'expressionbody' -require_relative 'expressionlanguage' -require_relative 'xm_iextension' +require "shale" -class Expression < Shale::Mapper - attribute :language, Shale::Type::Value - attribute :body, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :expression_language, Expressionlanguage, collection: true - attribute :expression_body, Expressionbody, collection: true - attribute :xmi_extension, XMIextension, collection: true +require_relative "expressionbody" +require_relative "expressionlanguage" +require_relative "xm_iextension" - xml do - root 'Expression' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Expression < Shale::Mapper + attribute :language, Shale::Type::Value + attribute :body, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :expression_language, Expressionlanguage, collection: true + attribute :expression_body, Expressionbody, collection: true + attribute :xmi_extension, XMIextension, collection: true - map_attribute 'language', to: :language - map_attribute 'body', to: :body - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'Expression.language', to: :expression_language - map_element 'Expression.body', to: :expression_body - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil + xml do + root "Expression" + namespace "omg.org/UML1.3", "UML" + + map_attribute "language", to: :language + map_attribute "body", to: :body + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "Expression.language", to: :expression_language + map_element "Expression.body", to: :expression_body + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + end + end end end diff --git a/lib/xmi/uml13/expressionbody.rb b/lib/xmi/uml13/expressionbody.rb index ae32c2c..fd215fb 100644 --- a/lib/xmi/uml13/expressionbody.rb +++ b/lib/xmi/uml13/expressionbody.rb @@ -1,16 +1,22 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'xm_ireference' +require "shale" -class Expressionbody < Shale::Mapper - attribute :content, Shale::Type::String - attribute :xmi_reference, XMIreference, collection: true +require_relative "xm_ireference" - xml do - root 'Expression.body' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Expressionbody < Shale::Mapper + attribute :content, Shale::Type::String + attribute :xmi_reference, XMIreference, collection: true - map_content to: :content - map_element 'XMI.reference', to: :xmi_reference, prefix: nil, namespace: nil + xml do + root "Expression.body" + namespace "omg.org/UML1.3", "UML" + + map_content to: :content + map_element "XMI.reference", to: :xmi_reference, prefix: nil, namespace: nil + end + end end end diff --git a/lib/xmi/uml13/expressionlanguage.rb b/lib/xmi/uml13/expressionlanguage.rb index 21f468a..1be7464 100644 --- a/lib/xmi/uml13/expressionlanguage.rb +++ b/lib/xmi/uml13/expressionlanguage.rb @@ -1,16 +1,22 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'xm_ireference' +require "shale" -class Expressionlanguage < Shale::Mapper - attribute :content, Shale::Type::String - attribute :xmi_reference, XMIreference, collection: true +require_relative "xm_ireference" - xml do - root 'Expression.language' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Expressionlanguage < Shale::Mapper + attribute :content, Shale::Type::String + attribute :xmi_reference, XMIreference, collection: true - map_content to: :content - map_element 'XMI.reference', to: :xmi_reference, prefix: nil, namespace: nil + xml do + root "Expression.language" + namespace "omg.org/UML1.3", "UML" + + map_content to: :content + map_element "XMI.reference", to: :xmi_reference, prefix: nil, namespace: nil + end + end end end diff --git a/lib/xmi/uml13/extension_mechanisms.rb b/lib/xmi/uml13/extension_mechanisms.rb index 1ae39c5..4bf9c30 100644 --- a/lib/xmi/uml13/extension_mechanisms.rb +++ b/lib/xmi/uml13/extension_mechanisms.rb @@ -1,27 +1,33 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'stereotype' -require_relative 'tagged_value' +require "shale" -class ExtensionMechanisms < Shale::Mapper - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :tagged_value, TaggedValue, collection: true - attribute :stereotype, Stereotype, collection: true +require_relative "stereotype" +require_relative "tagged_value" - xml do - root 'Extension_Mechanisms' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ExtensionMechanisms < Shale::Mapper + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :tagged_value, TaggedValue, collection: true + attribute :stereotype, Stereotype, collection: true - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'TaggedValue', to: :tagged_value - map_element 'Stereotype', to: :stereotype + xml do + root "Extension_Mechanisms" + namespace "omg.org/UML1.3", "UML" + + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "TaggedValue", to: :tagged_value + map_element "Stereotype", to: :stereotype + end + end end end diff --git a/lib/xmi/uml13/feature.rb b/lib/xmi/uml13/feature.rb index 79473ba..fb8e8f8 100644 --- a/lib/xmi/uml13/feature.rb +++ b/lib/xmi/uml13/feature.rb @@ -1,127 +1,133 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'featureclassifier_role' -require_relative 'featureowner' -require_relative 'featureowner_scope' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'xm_iextension' +require "shale" -class Feature < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :owner_scope, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :owner, Shale::Type::Value - attribute :classifier_role, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :feature_owner_scope, FeatureownerScope, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :feature_owner, Featureowner, collection: true - attribute :feature_classifier_role, FeatureclassifierRole, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true +require_relative "featureclassifier_role" +require_relative "featureowner" +require_relative "featureowner_scope" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "xm_iextension" - xml do - root 'Feature' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Feature < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :owner_scope, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :owner, Shale::Type::Value + attribute :classifier_role, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :feature_owner_scope, FeatureownerScope, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :feature_owner, Featureowner, collection: true + attribute :feature_classifier_role, FeatureclassifierRole, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'ownerScope', to: :owner_scope - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'owner', to: :owner - map_attribute 'classifierRole', to: :classifier_role - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'Feature.ownerScope', to: :feature_owner_scope - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'Feature.owner', to: :feature_owner - map_element 'Feature.classifierRole', to: :feature_classifier_role - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value + xml do + root "Feature" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "ownerScope", to: :owner_scope + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "owner", to: :owner + map_attribute "classifierRole", to: :classifier_role + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "Feature.ownerScope", to: :feature_owner_scope + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "Feature.owner", to: :feature_owner + map_element "Feature.classifierRole", to: :feature_classifier_role + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + end + end end end diff --git a/lib/xmi/uml13/featureclassifier_role.rb b/lib/xmi/uml13/featureclassifier_role.rb index c3b0aa1..028525b 100644 --- a/lib/xmi/uml13/featureclassifier_role.rb +++ b/lib/xmi/uml13/featureclassifier_role.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'classifier_role' +require "shale" -class FeatureclassifierRole < Shale::Mapper - attribute :classifier_role, ClassifierRole, collection: true +require_relative "classifier_role" - xml do - root 'Feature.classifierRole' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class FeatureclassifierRole < Shale::Mapper + attribute :classifier_role, ClassifierRole, collection: true - map_element 'ClassifierRole', to: :classifier_role + xml do + root "Feature.classifierRole" + namespace "omg.org/UML1.3", "UML" + + map_element "ClassifierRole", to: :classifier_role + end + end end end diff --git a/lib/xmi/uml13/featureowner.rb b/lib/xmi/uml13/featureowner.rb index 31e0d07..18a7446 100644 --- a/lib/xmi/uml13/featureowner.rb +++ b/lib/xmi/uml13/featureowner.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'classifier' +require "shale" -class Featureowner < Shale::Mapper - attribute :classifier, Classifier, collection: true +require_relative "classifier" - xml do - root 'Feature.owner' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Featureowner < Shale::Mapper + attribute :classifier, Classifier, collection: true - map_element 'Classifier', to: :classifier + xml do + root "Feature.owner" + namespace "omg.org/UML1.3", "UML" + + map_element "Classifier", to: :classifier + end + end end end diff --git a/lib/xmi/uml13/featureowner_scope.rb b/lib/xmi/uml13/featureowner_scope.rb index e9e056d..33d7c79 100644 --- a/lib/xmi/uml13/featureowner_scope.rb +++ b/lib/xmi/uml13/featureowner_scope.rb @@ -1,12 +1,18 @@ -require 'shale' +# frozen_string_literal: true -class FeatureownerScope < Shale::Mapper - attribute :xmi_value, Shale::Type::String +require "shale" - xml do - root 'Feature.ownerScope' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class FeatureownerScope < Shale::Mapper + attribute :xmi_value, Shale::Type::String - map_attribute 'xmi.value', to: :xmi_value + xml do + root "Feature.ownerScope" + namespace "omg.org/UML1.3", "UML" + + map_attribute "xmi.value", to: :xmi_value + end + end end end diff --git a/lib/xmi/uml13/foundation.rb b/lib/xmi/uml13/foundation.rb index 4d999ea..d6bbdd0 100644 --- a/lib/xmi/uml13/foundation.rb +++ b/lib/xmi/uml13/foundation.rb @@ -1,33 +1,39 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'auxiliary_elements' -require_relative 'core' -require_relative 'data_types' -require_relative 'extension_mechanisms' +require "shale" -class Foundation < Shale::Mapper - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :auxiliary_elements, AuxiliaryElements, collection: true - attribute :core, Core, collection: true - attribute :extension_mechanisms, ExtensionMechanisms, collection: true - attribute :data_types, DataTypes, collection: true +require_relative "auxiliary_elements" +require_relative "core" +require_relative "data_types" +require_relative "extension_mechanisms" - xml do - root 'Foundation' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Foundation < Shale::Mapper + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :auxiliary_elements, AuxiliaryElements, collection: true + attribute :core, Core, collection: true + attribute :extension_mechanisms, ExtensionMechanisms, collection: true + attribute :data_types, DataTypes, collection: true - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'Auxiliary_Elements', to: :auxiliary_elements - map_element 'Core', to: :core - map_element 'Extension_Mechanisms', to: :extension_mechanisms - map_element 'Data_Types', to: :data_types + xml do + root "Foundation" + namespace "omg.org/UML1.3", "UML" + + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "Auxiliary_Elements", to: :auxiliary_elements + map_element "Core", to: :core + map_element "Extension_Mechanisms", to: :extension_mechanisms + map_element "Data_Types", to: :data_types + end + end end end diff --git a/lib/xmi/uml13/generalizable_element.rb b/lib/xmi/uml13/generalizable_element.rb index 8bf5c4e..e439f81 100644 --- a/lib/xmi/uml13/generalizable_element.rb +++ b/lib/xmi/uml13/generalizable_element.rb @@ -1,140 +1,146 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'generalizable_elementgeneralization' -require_relative 'generalizable_elementis_abstract' -require_relative 'generalizable_elementis_leaf' -require_relative 'generalizable_elementis_root' -require_relative 'generalizable_elementspecialization' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'namespaceowned_element' -require_relative 'xm_iextension' +require "shale" -class GeneralizableElement < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :is_root, Shale::Type::String - attribute :is_leaf, Shale::Type::String - attribute :is_abstract, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :generalization, Shale::Type::Value - attribute :specialization, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :generalizable_element_is_root, GeneralizableElementisRoot, collection: true - attribute :generalizable_element_is_leaf, GeneralizableElementisLeaf, collection: true - attribute :generalizable_element_is_abstract, GeneralizableElementisAbstract, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :generalizable_element_generalization, GeneralizableElementgeneralization, collection: true - attribute :generalizable_element_specialization, GeneralizableElementspecialization, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :namespace_owned_element, NamespaceownedElement, collection: true +require_relative "generalizable_elementgeneralization" +require_relative "generalizable_elementis_abstract" +require_relative "generalizable_elementis_leaf" +require_relative "generalizable_elementis_root" +require_relative "generalizable_elementspecialization" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "namespaceowned_element" +require_relative "xm_iextension" - xml do - root 'GeneralizableElement' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class GeneralizableElement < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :is_root, Shale::Type::String + attribute :is_leaf, Shale::Type::String + attribute :is_abstract, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :generalization, Shale::Type::Value + attribute :specialization, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :generalizable_element_is_root, GeneralizableElementisRoot, collection: true + attribute :generalizable_element_is_leaf, GeneralizableElementisLeaf, collection: true + attribute :generalizable_element_is_abstract, GeneralizableElementisAbstract, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :generalizable_element_generalization, GeneralizableElementgeneralization, collection: true + attribute :generalizable_element_specialization, GeneralizableElementspecialization, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :namespace_owned_element, NamespaceownedElement, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'isRoot', to: :is_root - map_attribute 'isLeaf', to: :is_leaf - map_attribute 'isAbstract', to: :is_abstract - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'generalization', to: :generalization - map_attribute 'specialization', to: :specialization - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'GeneralizableElement.isRoot', to: :generalizable_element_is_root - map_element 'GeneralizableElement.isLeaf', to: :generalizable_element_is_leaf - map_element 'GeneralizableElement.isAbstract', to: :generalizable_element_is_abstract - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'GeneralizableElement.generalization', to: :generalizable_element_generalization - map_element 'GeneralizableElement.specialization', to: :generalizable_element_specialization - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Namespace.ownedElement', to: :namespace_owned_element + xml do + root "GeneralizableElement" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "isRoot", to: :is_root + map_attribute "isLeaf", to: :is_leaf + map_attribute "isAbstract", to: :is_abstract + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "generalization", to: :generalization + map_attribute "specialization", to: :specialization + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "GeneralizableElement.isRoot", to: :generalizable_element_is_root + map_element "GeneralizableElement.isLeaf", to: :generalizable_element_is_leaf + map_element "GeneralizableElement.isAbstract", to: :generalizable_element_is_abstract + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "GeneralizableElement.generalization", to: :generalizable_element_generalization + map_element "GeneralizableElement.specialization", to: :generalizable_element_specialization + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Namespace.ownedElement", to: :namespace_owned_element + end + end end end diff --git a/lib/xmi/uml13/generalizable_elementgeneralization.rb b/lib/xmi/uml13/generalizable_elementgeneralization.rb index a35ea24..6f2532e 100644 --- a/lib/xmi/uml13/generalizable_elementgeneralization.rb +++ b/lib/xmi/uml13/generalizable_elementgeneralization.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'generalization' +require "shale" -class GeneralizableElementgeneralization < Shale::Mapper - attribute :generalization, Generalization, collection: true +require_relative "generalization" - xml do - root 'GeneralizableElement.generalization' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class GeneralizableElementgeneralization < Shale::Mapper + attribute :generalization, Generalization, collection: true - map_element 'Generalization', to: :generalization + xml do + root "GeneralizableElement.generalization" + namespace "omg.org/UML1.3", "UML" + + map_element "Generalization", to: :generalization + end + end end end diff --git a/lib/xmi/uml13/generalizable_elementis_abstract.rb b/lib/xmi/uml13/generalizable_elementis_abstract.rb index 0e3989a..2a6375b 100644 --- a/lib/xmi/uml13/generalizable_elementis_abstract.rb +++ b/lib/xmi/uml13/generalizable_elementis_abstract.rb @@ -1,12 +1,18 @@ -require 'shale' +# frozen_string_literal: true -class GeneralizableElementisAbstract < Shale::Mapper - attribute :xmi_value, Shale::Type::String +require "shale" - xml do - root 'GeneralizableElement.isAbstract' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class GeneralizableElementisAbstract < Shale::Mapper + attribute :xmi_value, Shale::Type::String - map_attribute 'xmi.value', to: :xmi_value + xml do + root "GeneralizableElement.isAbstract" + namespace "omg.org/UML1.3", "UML" + + map_attribute "xmi.value", to: :xmi_value + end + end end end diff --git a/lib/xmi/uml13/generalizable_elementis_leaf.rb b/lib/xmi/uml13/generalizable_elementis_leaf.rb index 073074d..b083cd6 100644 --- a/lib/xmi/uml13/generalizable_elementis_leaf.rb +++ b/lib/xmi/uml13/generalizable_elementis_leaf.rb @@ -1,12 +1,18 @@ -require 'shale' +# frozen_string_literal: true -class GeneralizableElementisLeaf < Shale::Mapper - attribute :xmi_value, Shale::Type::String +require "shale" - xml do - root 'GeneralizableElement.isLeaf' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class GeneralizableElementisLeaf < Shale::Mapper + attribute :xmi_value, Shale::Type::String - map_attribute 'xmi.value', to: :xmi_value + xml do + root "GeneralizableElement.isLeaf" + namespace "omg.org/UML1.3", "UML" + + map_attribute "xmi.value", to: :xmi_value + end + end end end diff --git a/lib/xmi/uml13/generalizable_elementis_root.rb b/lib/xmi/uml13/generalizable_elementis_root.rb index 2006e82..5905899 100644 --- a/lib/xmi/uml13/generalizable_elementis_root.rb +++ b/lib/xmi/uml13/generalizable_elementis_root.rb @@ -1,12 +1,18 @@ -require 'shale' +# frozen_string_literal: true -class GeneralizableElementisRoot < Shale::Mapper - attribute :xmi_value, Shale::Type::String +require "shale" - xml do - root 'GeneralizableElement.isRoot' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class GeneralizableElementisRoot < Shale::Mapper + attribute :xmi_value, Shale::Type::String - map_attribute 'xmi.value', to: :xmi_value + xml do + root "GeneralizableElement.isRoot" + namespace "omg.org/UML1.3", "UML" + + map_attribute "xmi.value", to: :xmi_value + end + end end end diff --git a/lib/xmi/uml13/generalizable_elementspecialization.rb b/lib/xmi/uml13/generalizable_elementspecialization.rb index 7290d78..4d625c9 100644 --- a/lib/xmi/uml13/generalizable_elementspecialization.rb +++ b/lib/xmi/uml13/generalizable_elementspecialization.rb @@ -1,14 +1,21 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'generalization' +require "shale" -class GeneralizableElementspecialization < Shale::Mapper - attribute :generalization, Generalization, collection: true +module Xmi + module Uml13 + class Generalization < Shale::Mapper + end - xml do - root 'GeneralizableElement.specialization' - namespace 'omg.org/UML1.3', 'UML' + class GeneralizableElementspecialization < Shale::Mapper + attribute :generalization, Generalization, collection: true - map_element 'Generalization', to: :generalization + xml do + root "GeneralizableElement.specialization" + namespace "omg.org/UML1.3", "UML" + + map_element "Generalization", to: :generalization + end + end end end diff --git a/lib/xmi/uml13/generalization.rb b/lib/xmi/uml13/generalization.rb index b48c787..9b536e2 100644 --- a/lib/xmi/uml13/generalization.rb +++ b/lib/xmi/uml13/generalization.rb @@ -1,127 +1,133 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'generalizationdiscriminator' -require_relative 'generalizationsubtype' -require_relative 'generalizationsupertype' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'xm_iextension' +require "shale" -class Generalization < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :discriminator, Shale::Type::Value - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :subtype, Shale::Type::Value - attribute :supertype, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :generalization_discriminator, Generalizationdiscriminator, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :generalization_subtype, Generalizationsubtype, collection: true - attribute :generalization_supertype, Generalizationsupertype, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true +require_relative "generalizationdiscriminator" +require_relative "generalizationsubtype" +require_relative "generalizationsupertype" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "xm_iextension" - xml do - root 'Generalization' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Generalization < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :discriminator, Shale::Type::Value + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :subtype, Shale::Type::Value + attribute :supertype, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :generalization_discriminator, Generalizationdiscriminator, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :generalization_subtype, Generalizationsubtype, collection: true + attribute :generalization_supertype, Generalizationsupertype, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'discriminator', to: :discriminator - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'subtype', to: :subtype - map_attribute 'supertype', to: :supertype - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'Generalization.discriminator', to: :generalization_discriminator - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'Generalization.subtype', to: :generalization_subtype - map_element 'Generalization.supertype', to: :generalization_supertype - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value + xml do + root "Generalization" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "discriminator", to: :discriminator + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "subtype", to: :subtype + map_attribute "supertype", to: :supertype + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "Generalization.discriminator", to: :generalization_discriminator + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "Generalization.subtype", to: :generalization_subtype + map_element "Generalization.supertype", to: :generalization_supertype + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + end + end end end diff --git a/lib/xmi/uml13/generalizationdiscriminator.rb b/lib/xmi/uml13/generalizationdiscriminator.rb index efae120..46a9399 100644 --- a/lib/xmi/uml13/generalizationdiscriminator.rb +++ b/lib/xmi/uml13/generalizationdiscriminator.rb @@ -1,16 +1,22 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'xm_ireference' +require "shale" -class Generalizationdiscriminator < Shale::Mapper - attribute :content, Shale::Type::String - attribute :xmi_reference, XMIreference, collection: true +require_relative "xm_ireference" - xml do - root 'Generalization.discriminator' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Generalizationdiscriminator < Shale::Mapper + attribute :content, Shale::Type::String + attribute :xmi_reference, XMIreference, collection: true - map_content to: :content - map_element 'XMI.reference', to: :xmi_reference, prefix: nil, namespace: nil + xml do + root "Generalization.discriminator" + namespace "omg.org/UML1.3", "UML" + + map_content to: :content + map_element "XMI.reference", to: :xmi_reference, prefix: nil, namespace: nil + end + end end end diff --git a/lib/xmi/uml13/generalizationsubtype.rb b/lib/xmi/uml13/generalizationsubtype.rb index 43728b4..0b35809 100644 --- a/lib/xmi/uml13/generalizationsubtype.rb +++ b/lib/xmi/uml13/generalizationsubtype.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'generalizable_element' +require "shale" -class Generalizationsubtype < Shale::Mapper - attribute :generalizable_element, GeneralizableElement, collection: true +require_relative "generalizable_element" - xml do - root 'Generalization.subtype' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Generalizationsubtype < Shale::Mapper + attribute :generalizable_element, GeneralizableElement, collection: true - map_element 'GeneralizableElement', to: :generalizable_element + xml do + root "Generalization.subtype" + namespace "omg.org/UML1.3", "UML" + + map_element "GeneralizableElement", to: :generalizable_element + end + end end end diff --git a/lib/xmi/uml13/generalizationsupertype.rb b/lib/xmi/uml13/generalizationsupertype.rb index 9f078ad..bcf3a52 100644 --- a/lib/xmi/uml13/generalizationsupertype.rb +++ b/lib/xmi/uml13/generalizationsupertype.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'generalizable_element' +require "shale" -class Generalizationsupertype < Shale::Mapper - attribute :generalizable_element, GeneralizableElement, collection: true +require_relative "generalizable_element" - xml do - root 'Generalization.supertype' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Generalizationsupertype < Shale::Mapper + attribute :generalizable_element, GeneralizableElement, collection: true - map_element 'GeneralizableElement', to: :generalizable_element + xml do + root "Generalization.supertype" + namespace "omg.org/UML1.3", "UML" + + map_element "GeneralizableElement", to: :generalizable_element + end + end end end diff --git a/lib/xmi/uml13/geometry.rb b/lib/xmi/uml13/geometry.rb index a36da1a..f56bddd 100644 --- a/lib/xmi/uml13/geometry.rb +++ b/lib/xmi/uml13/geometry.rb @@ -1,29 +1,35 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'geometrybody' -require_relative 'xm_iextension' +require "shale" -class Geometry < Shale::Mapper - attribute :body, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :geometry_body, Geometrybody, collection: true - attribute :xmi_extension, XMIextension, collection: true +require_relative "geometrybody" +require_relative "xm_iextension" - xml do - root 'Geometry' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Geometry < Shale::Mapper + attribute :body, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :geometry_body, Geometrybody, collection: true + attribute :xmi_extension, XMIextension, collection: true - map_attribute 'body', to: :body - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'Geometry.body', to: :geometry_body - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil + xml do + root "Geometry" + namespace "omg.org/UML1.3", "UML" + + map_attribute "body", to: :body + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "Geometry.body", to: :geometry_body + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + end + end end end diff --git a/lib/xmi/uml13/geometrybody.rb b/lib/xmi/uml13/geometrybody.rb index 93fa6b1..0d575c4 100644 --- a/lib/xmi/uml13/geometrybody.rb +++ b/lib/xmi/uml13/geometrybody.rb @@ -1,16 +1,22 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'xm_ireference' +require "shale" -class Geometrybody < Shale::Mapper - attribute :content, Shale::Type::String - attribute :xmi_reference, XMIreference, collection: true +require_relative "xm_ireference" - xml do - root 'Geometry.body' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Geometrybody < Shale::Mapper + attribute :content, Shale::Type::String + attribute :xmi_reference, XMIreference, collection: true - map_content to: :content - map_element 'XMI.reference', to: :xmi_reference, prefix: nil, namespace: nil + xml do + root "Geometry.body" + namespace "omg.org/UML1.3", "UML" + + map_content to: :content + map_element "XMI.reference", to: :xmi_reference, prefix: nil, namespace: nil + end + end end end diff --git a/lib/xmi/uml13/graphic_marker.rb b/lib/xmi/uml13/graphic_marker.rb index 8ad9978..2fce546 100644 --- a/lib/xmi/uml13/graphic_marker.rb +++ b/lib/xmi/uml13/graphic_marker.rb @@ -1,29 +1,35 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'graphic_markerbody' -require_relative 'xm_iextension' +require "shale" -class GraphicMarker < Shale::Mapper - attribute :body, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :graphic_marker_body, GraphicMarkerbody, collection: true - attribute :xmi_extension, XMIextension, collection: true +require_relative "graphic_markerbody" +require_relative "xm_iextension" - xml do - root 'GraphicMarker' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class GraphicMarker < Shale::Mapper + attribute :body, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :graphic_marker_body, GraphicMarkerbody, collection: true + attribute :xmi_extension, XMIextension, collection: true - map_attribute 'body', to: :body - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'GraphicMarker.body', to: :graphic_marker_body - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil + xml do + root "GraphicMarker" + namespace "omg.org/UML1.3", "UML" + + map_attribute "body", to: :body + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "GraphicMarker.body", to: :graphic_marker_body + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + end + end end end diff --git a/lib/xmi/uml13/graphic_markerbody.rb b/lib/xmi/uml13/graphic_markerbody.rb index b2f6367..67923da 100644 --- a/lib/xmi/uml13/graphic_markerbody.rb +++ b/lib/xmi/uml13/graphic_markerbody.rb @@ -1,16 +1,22 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'xm_ireference' +require "shale" -class GraphicMarkerbody < Shale::Mapper - attribute :content, Shale::Type::String - attribute :xmi_reference, XMIreference, collection: true +require_relative "xm_ireference" - xml do - root 'GraphicMarker.body' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class GraphicMarkerbody < Shale::Mapper + attribute :content, Shale::Type::String + attribute :xmi_reference, XMIreference, collection: true - map_content to: :content - map_element 'XMI.reference', to: :xmi_reference, prefix: nil, namespace: nil + xml do + root "GraphicMarker.body" + namespace "omg.org/UML1.3", "UML" + + map_content to: :content + map_element "XMI.reference", to: :xmi_reference, prefix: nil, namespace: nil + end + end end end diff --git a/lib/xmi/uml13/guard.rb b/lib/xmi/uml13/guard.rb index ee5edcd..89c5add 100644 --- a/lib/xmi/uml13/guard.rb +++ b/lib/xmi/uml13/guard.rb @@ -1,120 +1,126 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'guardexpression' -require_relative 'guardtransition' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'xm_iextension' +require "shale" -class Guard < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :transition, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :guard_expression, Guardexpression, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :guard_transition, Guardtransition, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true +require_relative "guardexpression" +require_relative "guardtransition" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "xm_iextension" - xml do - root 'Guard' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Guard < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :transition, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :guard_expression, Guardexpression, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :guard_transition, Guardtransition, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'transition', to: :transition - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'Guard.expression', to: :guard_expression - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'Guard.transition', to: :guard_transition - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value + xml do + root "Guard" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "transition", to: :transition + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "Guard.expression", to: :guard_expression + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "Guard.transition", to: :guard_transition + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + end + end end end diff --git a/lib/xmi/uml13/guardexpression.rb b/lib/xmi/uml13/guardexpression.rb index d085e9a..156ebf5 100644 --- a/lib/xmi/uml13/guardexpression.rb +++ b/lib/xmi/uml13/guardexpression.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'boolean_expression' +require "shale" -class Guardexpression < Shale::Mapper - attribute :boolean_expression, BooleanExpression +require_relative "boolean_expression" - xml do - root 'Guard.expression' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Guardexpression < Shale::Mapper + attribute :boolean_expression, BooleanExpression - map_element 'BooleanExpression', to: :boolean_expression + xml do + root "Guard.expression" + namespace "omg.org/UML1.3", "UML" + + map_element "BooleanExpression", to: :boolean_expression + end + end end end diff --git a/lib/xmi/uml13/guardtransition.rb b/lib/xmi/uml13/guardtransition.rb index 9b70817..24e420a 100644 --- a/lib/xmi/uml13/guardtransition.rb +++ b/lib/xmi/uml13/guardtransition.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'transition' +require "shale" -class Guardtransition < Shale::Mapper - attribute :transition, Transition, collection: true +require_relative "transition" - xml do - root 'Guard.transition' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Guardtransition < Shale::Mapper + attribute :transition, Transition, collection: true - map_element 'Transition', to: :transition + xml do + root "Guard.transition" + namespace "omg.org/UML1.3", "UML" + + map_element "Transition", to: :transition + end + end end end diff --git a/lib/xmi/uml13/instance.rb b/lib/xmi/uml13/instance.rb index 2d6dfc1..a191079 100644 --- a/lib/xmi/uml13/instance.rb +++ b/lib/xmi/uml13/instance.rb @@ -1,145 +1,151 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'instanceattribute_link' -require_relative 'instanceclassifier' -require_relative 'instancelink_end' -require_relative 'instancemessage_instance' -require_relative 'instancemessage_instance2' -require_relative 'instancemessage_instance3' -require_relative 'instanceslot' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'xm_iextension' +require "shale" -class Instance < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :link_end, Shale::Type::Value - attribute :message_instance3, Shale::Type::Value - attribute :message_instance2, Shale::Type::Value - attribute :message_instance, Shale::Type::Value - attribute :attribute_link, Shale::Type::Value - attribute :classifier, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :instance_link_end, InstancelinkEnd, collection: true - attribute :instance_message_instance3, InstancemessageInstance3, collection: true - attribute :instance_message_instance2, InstancemessageInstance2, collection: true - attribute :instance_message_instance, InstancemessageInstance, collection: true - attribute :instance_attribute_link, InstanceattributeLink, collection: true - attribute :instance_classifier, Instanceclassifier, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :instance_slot, Instanceslot, collection: true +require_relative "instanceattribute_link" +require_relative "instanceclassifier" +require_relative "instancelink_end" +require_relative "instancemessage_instance" +require_relative "instancemessage_instance2" +require_relative "instancemessage_instance3" +require_relative "instanceslot" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "xm_iextension" - xml do - root 'Instance' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Instance < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :link_end, Shale::Type::Value + attribute :message_instance3, Shale::Type::Value + attribute :message_instance2, Shale::Type::Value + attribute :message_instance, Shale::Type::Value + attribute :attribute_link, Shale::Type::Value + attribute :classifier, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :instance_link_end, InstancelinkEnd, collection: true + attribute :instance_message_instance3, InstancemessageInstance3, collection: true + attribute :instance_message_instance2, InstancemessageInstance2, collection: true + attribute :instance_message_instance, InstancemessageInstance, collection: true + attribute :instance_attribute_link, InstanceattributeLink, collection: true + attribute :instance_classifier, Instanceclassifier, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :instance_slot, Instanceslot, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'linkEnd', to: :link_end - map_attribute 'messageInstance3', to: :message_instance3 - map_attribute 'messageInstance2', to: :message_instance2 - map_attribute 'messageInstance', to: :message_instance - map_attribute 'attributeLink', to: :attribute_link - map_attribute 'classifier', to: :classifier - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'Instance.linkEnd', to: :instance_link_end - map_element 'Instance.messageInstance3', to: :instance_message_instance3 - map_element 'Instance.messageInstance2', to: :instance_message_instance2 - map_element 'Instance.messageInstance', to: :instance_message_instance - map_element 'Instance.attributeLink', to: :instance_attribute_link - map_element 'Instance.classifier', to: :instance_classifier - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Instance.slot', to: :instance_slot + xml do + root "Instance" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "linkEnd", to: :link_end + map_attribute "messageInstance3", to: :message_instance3 + map_attribute "messageInstance2", to: :message_instance2 + map_attribute "messageInstance", to: :message_instance + map_attribute "attributeLink", to: :attribute_link + map_attribute "classifier", to: :classifier + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "Instance.linkEnd", to: :instance_link_end + map_element "Instance.messageInstance3", to: :instance_message_instance3 + map_element "Instance.messageInstance2", to: :instance_message_instance2 + map_element "Instance.messageInstance", to: :instance_message_instance + map_element "Instance.attributeLink", to: :instance_attribute_link + map_element "Instance.classifier", to: :instance_classifier + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Instance.slot", to: :instance_slot + end + end end end diff --git a/lib/xmi/uml13/instanceattribute_link.rb b/lib/xmi/uml13/instanceattribute_link.rb index f41be71..ff3191f 100644 --- a/lib/xmi/uml13/instanceattribute_link.rb +++ b/lib/xmi/uml13/instanceattribute_link.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'attribute_link' +require "shale" -class InstanceattributeLink < Shale::Mapper - attribute :attribute_link, AttributeLink, collection: true +require_relative "attribute_link" - xml do - root 'Instance.attributeLink' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class InstanceattributeLink < Shale::Mapper + attribute :attribute_link, AttributeLink, collection: true - map_element 'AttributeLink', to: :attribute_link + xml do + root "Instance.attributeLink" + namespace "omg.org/UML1.3", "UML" + + map_element "AttributeLink", to: :attribute_link + end + end end end diff --git a/lib/xmi/uml13/instanceclassifier.rb b/lib/xmi/uml13/instanceclassifier.rb index 7a1eddf..086a2c1 100644 --- a/lib/xmi/uml13/instanceclassifier.rb +++ b/lib/xmi/uml13/instanceclassifier.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'classifier' +require "shale" -class Instanceclassifier < Shale::Mapper - attribute :classifier, Classifier, collection: true +require_relative "classifier" - xml do - root 'Instance.classifier' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Instanceclassifier < Shale::Mapper + attribute :classifier, Classifier, collection: true - map_element 'Classifier', to: :classifier + xml do + root "Instance.classifier" + namespace "omg.org/UML1.3", "UML" + + map_element "Classifier", to: :classifier + end + end end end diff --git a/lib/xmi/uml13/instancelink_end.rb b/lib/xmi/uml13/instancelink_end.rb index 792ff9e..8a5b711 100644 --- a/lib/xmi/uml13/instancelink_end.rb +++ b/lib/xmi/uml13/instancelink_end.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'link_end' +require "shale" -class InstancelinkEnd < Shale::Mapper - attribute :link_end, LinkEnd, collection: true +require_relative "link_end" - xml do - root 'Instance.linkEnd' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class InstancelinkEnd < Shale::Mapper + attribute :link_end, LinkEnd, collection: true - map_element 'LinkEnd', to: :link_end + xml do + root "Instance.linkEnd" + namespace "omg.org/UML1.3", "UML" + + map_element "LinkEnd", to: :link_end + end + end end end diff --git a/lib/xmi/uml13/instancemessage_instance.rb b/lib/xmi/uml13/instancemessage_instance.rb index 0049c11..aa1e806 100644 --- a/lib/xmi/uml13/instancemessage_instance.rb +++ b/lib/xmi/uml13/instancemessage_instance.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'message_instance' +require "shale" -class InstancemessageInstance < Shale::Mapper - attribute :message_instance, MessageInstance, collection: true +require_relative "message_instance" - xml do - root 'Instance.messageInstance' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class InstancemessageInstance < Shale::Mapper + attribute :message_instance, MessageInstance, collection: true - map_element 'MessageInstance', to: :message_instance + xml do + root "Instance.messageInstance" + namespace "omg.org/UML1.3", "UML" + + map_element "MessageInstance", to: :message_instance + end + end end end diff --git a/lib/xmi/uml13/instancemessage_instance2.rb b/lib/xmi/uml13/instancemessage_instance2.rb index 1b06e91..0e809e0 100644 --- a/lib/xmi/uml13/instancemessage_instance2.rb +++ b/lib/xmi/uml13/instancemessage_instance2.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'message_instance' +require "shale" -class InstancemessageInstance2 < Shale::Mapper - attribute :message_instance, MessageInstance, collection: true +require_relative "message_instance" - xml do - root 'Instance.messageInstance2' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class InstancemessageInstance2 < Shale::Mapper + attribute :message_instance, MessageInstance, collection: true - map_element 'MessageInstance', to: :message_instance + xml do + root "Instance.messageInstance2" + namespace "omg.org/UML1.3", "UML" + + map_element "MessageInstance", to: :message_instance + end + end end end diff --git a/lib/xmi/uml13/instancemessage_instance3.rb b/lib/xmi/uml13/instancemessage_instance3.rb index 0075df8..b433616 100644 --- a/lib/xmi/uml13/instancemessage_instance3.rb +++ b/lib/xmi/uml13/instancemessage_instance3.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'message_instance' +require "shale" -class InstancemessageInstance3 < Shale::Mapper - attribute :message_instance, MessageInstance, collection: true +require_relative "message_instance" - xml do - root 'Instance.messageInstance3' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class InstancemessageInstance3 < Shale::Mapper + attribute :message_instance, MessageInstance, collection: true - map_element 'MessageInstance', to: :message_instance + xml do + root "Instance.messageInstance3" + namespace "omg.org/UML1.3", "UML" + + map_element "MessageInstance", to: :message_instance + end + end end end diff --git a/lib/xmi/uml13/instanceslot.rb b/lib/xmi/uml13/instanceslot.rb index b76b57f..51804ee 100644 --- a/lib/xmi/uml13/instanceslot.rb +++ b/lib/xmi/uml13/instanceslot.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'attribute_link' +require "shale" -class Instanceslot < Shale::Mapper - attribute :attribute_link, AttributeLink, collection: true +require_relative "attribute_link" - xml do - root 'Instance.slot' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Instanceslot < Shale::Mapper + attribute :attribute_link, AttributeLink, collection: true - map_element 'AttributeLink', to: :attribute_link + xml do + root "Instance.slot" + namespace "omg.org/UML1.3", "UML" + + map_element "AttributeLink", to: :attribute_link + end + end end end diff --git a/lib/xmi/uml13/interaction.rb b/lib/xmi/uml13/interaction.rb index 182a923..b50f7c7 100644 --- a/lib/xmi/uml13/interaction.rb +++ b/lib/xmi/uml13/interaction.rb @@ -1,120 +1,126 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'interactioncontext' -require_relative 'interactionmessage' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'xm_iextension' +require "shale" -class Interaction < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :context, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :interaction_context, Interactioncontext, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :interaction_message, Interactionmessage, collection: true +require_relative "interactioncontext" +require_relative "interactionmessage" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "xm_iextension" - xml do - root 'Interaction' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Interaction < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :context, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :interaction_context, Interactioncontext, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :interaction_message, Interactionmessage, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'context', to: :context - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'Interaction.context', to: :interaction_context - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Interaction.message', to: :interaction_message + xml do + root "Interaction" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "context", to: :context + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "Interaction.context", to: :interaction_context + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Interaction.message", to: :interaction_message + end + end end end diff --git a/lib/xmi/uml13/interactioncontext.rb b/lib/xmi/uml13/interactioncontext.rb index 4c307ef..84507db 100644 --- a/lib/xmi/uml13/interactioncontext.rb +++ b/lib/xmi/uml13/interactioncontext.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'collaboration' +require "shale" -class Interactioncontext < Shale::Mapper - attribute :collaboration, Collaboration, collection: true +require_relative "collaboration" - xml do - root 'Interaction.context' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Interactioncontext < Shale::Mapper + attribute :collaboration, Collaboration, collection: true - map_element 'Collaboration', to: :collaboration + xml do + root "Interaction.context" + namespace "omg.org/UML1.3", "UML" + + map_element "Collaboration", to: :collaboration + end + end end end diff --git a/lib/xmi/uml13/interactionmessage.rb b/lib/xmi/uml13/interactionmessage.rb index fdc6682..01526c5 100644 --- a/lib/xmi/uml13/interactionmessage.rb +++ b/lib/xmi/uml13/interactionmessage.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'message' +require "shale" -class Interactionmessage < Shale::Mapper - attribute :message, Message, collection: true +require_relative "message" - xml do - root 'Interaction.message' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Interactionmessage < Shale::Mapper + attribute :message, Message, collection: true - map_element 'Message', to: :message + xml do + root "Interaction.message" + namespace "omg.org/UML1.3", "UML" + + map_element "Message", to: :message + end + end end end diff --git a/lib/xmi/uml13/interface.rb b/lib/xmi/uml13/interface.rb index 96a1501..4c01432 100644 --- a/lib/xmi/uml13/interface.rb +++ b/lib/xmi/uml13/interface.rb @@ -1,192 +1,198 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'classifierassociation_end' -require_relative 'classifierclassifier_in_state' -require_relative 'classifierclassifier_role' -require_relative 'classifiercreate_action' -require_relative 'classifierfeature' -require_relative 'classifierinstance' -require_relative 'classifierparameter' -require_relative 'classifierparticipant' -require_relative 'classifierrealization' -require_relative 'classifierspecification' -require_relative 'classifierstructural_feature' -require_relative 'generalizable_elementgeneralization' -require_relative 'generalizable_elementis_abstract' -require_relative 'generalizable_elementis_leaf' -require_relative 'generalizable_elementis_root' -require_relative 'generalizable_elementspecialization' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'namespaceowned_element' -require_relative 'xm_iextension' +require "shale" -class Interface < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :is_root, Shale::Type::String - attribute :is_leaf, Shale::Type::String - attribute :is_abstract, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :model_element_collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :generalization, Shale::Type::Value - attribute :specialization, Shale::Type::Value - attribute :parameter, Shale::Type::Value - attribute :structural_feature, Shale::Type::Value - attribute :specification, Shale::Type::Value - attribute :realization, Shale::Type::Value - attribute :association_end, Shale::Type::Value - attribute :participant, Shale::Type::Value - attribute :create_action, Shale::Type::Value - attribute :instance, Shale::Type::Value - attribute :classifier_collaboration, Shale::Type::Value - attribute :classifier_role, Shale::Type::Value - attribute :classifier_in_state, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :generalizable_element_is_root, GeneralizableElementisRoot, collection: true - attribute :generalizable_element_is_leaf, GeneralizableElementisLeaf, collection: true - attribute :generalizable_element_is_abstract, GeneralizableElementisAbstract, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :generalizable_element_generalization, GeneralizableElementgeneralization, collection: true - attribute :generalizable_element_specialization, GeneralizableElementspecialization, collection: true - attribute :classifier_parameter, Classifierparameter, collection: true - attribute :classifier_structural_feature, ClassifierstructuralFeature, collection: true - attribute :classifier_specification, Classifierspecification, collection: true - attribute :classifier_realization, Classifierrealization, collection: true - attribute :classifier_association_end, ClassifierassociationEnd, collection: true - attribute :classifier_participant, Classifierparticipant, collection: true - attribute :classifier_create_action, ClassifiercreateAction, collection: true - attribute :classifier_instance, Classifierinstance, collection: true - attribute :classifier_classifier_role, ClassifierclassifierRole, collection: true - attribute :classifier_classifier_in_state, ClassifierclassifierInState, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :namespace_owned_element, NamespaceownedElement, collection: true - attribute :classifier_feature, Classifierfeature, collection: true +require_relative "classifierassociation_end" +require_relative "classifierclassifier_in_state" +require_relative "classifierclassifier_role" +require_relative "classifiercreate_action" +require_relative "classifierfeature" +require_relative "classifierinstance" +require_relative "classifierparameter" +require_relative "classifierparticipant" +require_relative "classifierrealization" +require_relative "classifierspecification" +require_relative "classifierstructural_feature" +require_relative "generalizable_elementgeneralization" +require_relative "generalizable_elementis_abstract" +require_relative "generalizable_elementis_leaf" +require_relative "generalizable_elementis_root" +require_relative "generalizable_elementspecialization" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "namespaceowned_element" +require_relative "xm_iextension" - xml do - root 'Interface' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Interface < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :is_root, Shale::Type::String + attribute :is_leaf, Shale::Type::String + attribute :is_abstract, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :model_element_collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :generalization, Shale::Type::Value + attribute :specialization, Shale::Type::Value + attribute :parameter, Shale::Type::Value + attribute :structural_feature, Shale::Type::Value + attribute :specification, Shale::Type::Value + attribute :realization, Shale::Type::Value + attribute :association_end, Shale::Type::Value + attribute :participant, Shale::Type::Value + attribute :create_action, Shale::Type::Value + attribute :instance, Shale::Type::Value + attribute :classifier_collaboration, Shale::Type::Value + attribute :classifier_role, Shale::Type::Value + attribute :classifier_in_state, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :generalizable_element_is_root, GeneralizableElementisRoot, collection: true + attribute :generalizable_element_is_leaf, GeneralizableElementisLeaf, collection: true + attribute :generalizable_element_is_abstract, GeneralizableElementisAbstract, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :generalizable_element_generalization, GeneralizableElementgeneralization, collection: true + attribute :generalizable_element_specialization, GeneralizableElementspecialization, collection: true + attribute :classifier_parameter, Classifierparameter, collection: true + attribute :classifier_structural_feature, ClassifierstructuralFeature, collection: true + attribute :classifier_specification, Classifierspecification, collection: true + attribute :classifier_realization, Classifierrealization, collection: true + attribute :classifier_association_end, ClassifierassociationEnd, collection: true + attribute :classifier_participant, Classifierparticipant, collection: true + attribute :classifier_create_action, ClassifiercreateAction, collection: true + attribute :classifier_instance, Classifierinstance, collection: true + attribute :classifier_classifier_role, ClassifierclassifierRole, collection: true + attribute :classifier_classifier_in_state, ClassifierclassifierInState, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :namespace_owned_element, NamespaceownedElement, collection: true + attribute :classifier_feature, Classifierfeature, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'isRoot', to: :is_root - map_attribute 'isLeaf', to: :is_leaf - map_attribute 'isAbstract', to: :is_abstract - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'ModelElement.collaboration', to: :model_element_collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'generalization', to: :generalization - map_attribute 'specialization', to: :specialization - map_attribute 'parameter', to: :parameter - map_attribute 'structuralFeature', to: :structural_feature - map_attribute 'specification', to: :specification - map_attribute 'realization', to: :realization - map_attribute 'associationEnd', to: :association_end - map_attribute 'participant', to: :participant - map_attribute 'createAction', to: :create_action - map_attribute 'instance', to: :instance - map_attribute 'Classifier.collaboration', to: :classifier_collaboration - map_attribute 'classifierRole', to: :classifier_role - map_attribute 'classifierInState', to: :classifier_in_state - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'GeneralizableElement.isRoot', to: :generalizable_element_is_root - map_element 'GeneralizableElement.isLeaf', to: :generalizable_element_is_leaf - map_element 'GeneralizableElement.isAbstract', to: :generalizable_element_is_abstract - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'GeneralizableElement.generalization', to: :generalizable_element_generalization - map_element 'GeneralizableElement.specialization', to: :generalizable_element_specialization - map_element 'Classifier.parameter', to: :classifier_parameter - map_element 'Classifier.structuralFeature', to: :classifier_structural_feature - map_element 'Classifier.specification', to: :classifier_specification - map_element 'Classifier.realization', to: :classifier_realization - map_element 'Classifier.associationEnd', to: :classifier_association_end - map_element 'Classifier.participant', to: :classifier_participant - map_element 'Classifier.createAction', to: :classifier_create_action - map_element 'Classifier.instance', to: :classifier_instance - map_element 'Classifier.classifierRole', to: :classifier_classifier_role - map_element 'Classifier.classifierInState', to: :classifier_classifier_in_state - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Namespace.ownedElement', to: :namespace_owned_element - map_element 'Classifier.feature', to: :classifier_feature + xml do + root "Interface" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "isRoot", to: :is_root + map_attribute "isLeaf", to: :is_leaf + map_attribute "isAbstract", to: :is_abstract + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "ModelElement.collaboration", to: :model_element_collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "generalization", to: :generalization + map_attribute "specialization", to: :specialization + map_attribute "parameter", to: :parameter + map_attribute "structuralFeature", to: :structural_feature + map_attribute "specification", to: :specification + map_attribute "realization", to: :realization + map_attribute "associationEnd", to: :association_end + map_attribute "participant", to: :participant + map_attribute "createAction", to: :create_action + map_attribute "instance", to: :instance + map_attribute "Classifier.collaboration", to: :classifier_collaboration + map_attribute "classifierRole", to: :classifier_role + map_attribute "classifierInState", to: :classifier_in_state + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "GeneralizableElement.isRoot", to: :generalizable_element_is_root + map_element "GeneralizableElement.isLeaf", to: :generalizable_element_is_leaf + map_element "GeneralizableElement.isAbstract", to: :generalizable_element_is_abstract + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "GeneralizableElement.generalization", to: :generalizable_element_generalization + map_element "GeneralizableElement.specialization", to: :generalizable_element_specialization + map_element "Classifier.parameter", to: :classifier_parameter + map_element "Classifier.structuralFeature", to: :classifier_structural_feature + map_element "Classifier.specification", to: :classifier_specification + map_element "Classifier.realization", to: :classifier_realization + map_element "Classifier.associationEnd", to: :classifier_association_end + map_element "Classifier.participant", to: :classifier_participant + map_element "Classifier.createAction", to: :classifier_create_action + map_element "Classifier.instance", to: :classifier_instance + map_element "Classifier.classifierRole", to: :classifier_classifier_role + map_element "Classifier.classifierInState", to: :classifier_classifier_in_state + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Namespace.ownedElement", to: :namespace_owned_element + map_element "Classifier.feature", to: :classifier_feature + end + end end end diff --git a/lib/xmi/uml13/link.rb b/lib/xmi/uml13/link.rb index 7e5b331..b3eaea7 100644 --- a/lib/xmi/uml13/link.rb +++ b/lib/xmi/uml13/link.rb @@ -1,120 +1,126 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'linkassociation' -require_relative 'linklink_role' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'xm_iextension' +require "shale" -class Link < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :association, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :link_association, Linkassociation, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :link_link_role, LinklinkRole, collection: true +require_relative "linkassociation" +require_relative "linklink_role" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "xm_iextension" - xml do - root 'Link' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Link < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :association, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :link_association, Linkassociation, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :link_link_role, LinklinkRole, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'association', to: :association - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'Link.association', to: :link_association - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Link.linkRole', to: :link_link_role + xml do + root "Link" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "association", to: :association + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "Link.association", to: :link_association + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Link.linkRole", to: :link_link_role + end + end end end diff --git a/lib/xmi/uml13/link_end.rb b/lib/xmi/uml13/link_end.rb index ae4f399..cfc4cf9 100644 --- a/lib/xmi/uml13/link_end.rb +++ b/lib/xmi/uml13/link_end.rb @@ -1,127 +1,133 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'link_endassociation_end' -require_relative 'link_endinstance' -require_relative 'link_endlink' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'xm_iextension' +require "shale" -class LinkEnd < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :link, Shale::Type::Value - attribute :association_end, Shale::Type::Value - attribute :instance, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :link_end_link, LinkEndlink, collection: true - attribute :link_end_association_end, LinkEndassociationEnd, collection: true - attribute :link_end_instance, LinkEndinstance, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true +require_relative "link_endassociation_end" +require_relative "link_endinstance" +require_relative "link_endlink" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "xm_iextension" - xml do - root 'LinkEnd' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class LinkEnd < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :link, Shale::Type::Value + attribute :association_end, Shale::Type::Value + attribute :instance, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :link_end_link, LinkEndlink, collection: true + attribute :link_end_association_end, LinkEndassociationEnd, collection: true + attribute :link_end_instance, LinkEndinstance, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'link', to: :link - map_attribute 'associationEnd', to: :association_end - map_attribute 'instance', to: :instance - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'LinkEnd.link', to: :link_end_link - map_element 'LinkEnd.associationEnd', to: :link_end_association_end - map_element 'LinkEnd.instance', to: :link_end_instance - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value + xml do + root "LinkEnd" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "link", to: :link + map_attribute "associationEnd", to: :association_end + map_attribute "instance", to: :instance + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "LinkEnd.link", to: :link_end_link + map_element "LinkEnd.associationEnd", to: :link_end_association_end + map_element "LinkEnd.instance", to: :link_end_instance + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + end + end end end diff --git a/lib/xmi/uml13/link_endassociation_end.rb b/lib/xmi/uml13/link_endassociation_end.rb index 8eb5b3f..da423af 100644 --- a/lib/xmi/uml13/link_endassociation_end.rb +++ b/lib/xmi/uml13/link_endassociation_end.rb @@ -1,14 +1,21 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'association_end' +require "shale" -class LinkEndassociationEnd < Shale::Mapper - attribute :association_end, AssociationEnd, collection: true +module Xmi + module Uml13 + class AssociationEnd < Shale::Mapper + end - xml do - root 'LinkEnd.associationEnd' - namespace 'omg.org/UML1.3', 'UML' + class LinkEndassociationEnd < Shale::Mapper + attribute :association_end, AssociationEnd, collection: true - map_element 'AssociationEnd', to: :association_end + xml do + root "LinkEnd.associationEnd" + namespace "omg.org/UML1.3", "UML" + + map_element "AssociationEnd", to: :association_end + end + end end end diff --git a/lib/xmi/uml13/link_endinstance.rb b/lib/xmi/uml13/link_endinstance.rb index e7086e2..2e6ac13 100644 --- a/lib/xmi/uml13/link_endinstance.rb +++ b/lib/xmi/uml13/link_endinstance.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'instance' +require "shale" -class LinkEndinstance < Shale::Mapper - attribute :instance, Instance, collection: true +require_relative "instance" - xml do - root 'LinkEnd.instance' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class LinkEndinstance < Shale::Mapper + attribute :instance, Instance, collection: true - map_element 'Instance', to: :instance + xml do + root "LinkEnd.instance" + namespace "omg.org/UML1.3", "UML" + + map_element "Instance", to: :instance + end + end end end diff --git a/lib/xmi/uml13/link_endlink.rb b/lib/xmi/uml13/link_endlink.rb index b61d9c6..ea2f179 100644 --- a/lib/xmi/uml13/link_endlink.rb +++ b/lib/xmi/uml13/link_endlink.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'link' +require "shale" -class LinkEndlink < Shale::Mapper - attribute :link, Link, collection: true +require_relative "link" - xml do - root 'LinkEnd.link' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class LinkEndlink < Shale::Mapper + attribute :link, Link, collection: true - map_element 'Link', to: :link + xml do + root "LinkEnd.link" + namespace "omg.org/UML1.3", "UML" + + map_element "Link", to: :link + end + end end end diff --git a/lib/xmi/uml13/link_object.rb b/lib/xmi/uml13/link_object.rb index 45752ec..ff97bd1 100644 --- a/lib/xmi/uml13/link_object.rb +++ b/lib/xmi/uml13/link_object.rb @@ -1,153 +1,159 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'instanceattribute_link' -require_relative 'instanceclassifier' -require_relative 'instancelink_end' -require_relative 'instancemessage_instance' -require_relative 'instancemessage_instance2' -require_relative 'instancemessage_instance3' -require_relative 'instanceslot' -require_relative 'linkassociation' -require_relative 'linklink_role' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'xm_iextension' +require "shale" -class LinkObject < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :link_end, Shale::Type::Value - attribute :message_instance3, Shale::Type::Value - attribute :message_instance2, Shale::Type::Value - attribute :message_instance, Shale::Type::Value - attribute :attribute_link, Shale::Type::Value - attribute :classifier, Shale::Type::Value - attribute :association, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :instance_link_end, InstancelinkEnd, collection: true - attribute :instance_message_instance3, InstancemessageInstance3, collection: true - attribute :instance_message_instance2, InstancemessageInstance2, collection: true - attribute :instance_message_instance, InstancemessageInstance, collection: true - attribute :instance_attribute_link, InstanceattributeLink, collection: true - attribute :instance_classifier, Instanceclassifier, collection: true - attribute :link_association, Linkassociation, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :instance_slot, Instanceslot, collection: true - attribute :link_link_role, LinklinkRole, collection: true +require_relative "instanceattribute_link" +require_relative "instanceclassifier" +require_relative "instancelink_end" +require_relative "instancemessage_instance" +require_relative "instancemessage_instance2" +require_relative "instancemessage_instance3" +require_relative "instanceslot" +require_relative "linkassociation" +require_relative "linklink_role" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "xm_iextension" - xml do - root 'LinkObject' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class LinkObject < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :link_end, Shale::Type::Value + attribute :message_instance3, Shale::Type::Value + attribute :message_instance2, Shale::Type::Value + attribute :message_instance, Shale::Type::Value + attribute :attribute_link, Shale::Type::Value + attribute :classifier, Shale::Type::Value + attribute :association, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :instance_link_end, InstancelinkEnd, collection: true + attribute :instance_message_instance3, InstancemessageInstance3, collection: true + attribute :instance_message_instance2, InstancemessageInstance2, collection: true + attribute :instance_message_instance, InstancemessageInstance, collection: true + attribute :instance_attribute_link, InstanceattributeLink, collection: true + attribute :instance_classifier, Instanceclassifier, collection: true + attribute :link_association, Linkassociation, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :instance_slot, Instanceslot, collection: true + attribute :link_link_role, LinklinkRole, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'linkEnd', to: :link_end - map_attribute 'messageInstance3', to: :message_instance3 - map_attribute 'messageInstance2', to: :message_instance2 - map_attribute 'messageInstance', to: :message_instance - map_attribute 'attributeLink', to: :attribute_link - map_attribute 'classifier', to: :classifier - map_attribute 'association', to: :association - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'Instance.linkEnd', to: :instance_link_end - map_element 'Instance.messageInstance3', to: :instance_message_instance3 - map_element 'Instance.messageInstance2', to: :instance_message_instance2 - map_element 'Instance.messageInstance', to: :instance_message_instance - map_element 'Instance.attributeLink', to: :instance_attribute_link - map_element 'Instance.classifier', to: :instance_classifier - map_element 'Link.association', to: :link_association - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Instance.slot', to: :instance_slot - map_element 'Link.linkRole', to: :link_link_role + xml do + root "LinkObject" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "linkEnd", to: :link_end + map_attribute "messageInstance3", to: :message_instance3 + map_attribute "messageInstance2", to: :message_instance2 + map_attribute "messageInstance", to: :message_instance + map_attribute "attributeLink", to: :attribute_link + map_attribute "classifier", to: :classifier + map_attribute "association", to: :association + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "Instance.linkEnd", to: :instance_link_end + map_element "Instance.messageInstance3", to: :instance_message_instance3 + map_element "Instance.messageInstance2", to: :instance_message_instance2 + map_element "Instance.messageInstance", to: :instance_message_instance + map_element "Instance.attributeLink", to: :instance_attribute_link + map_element "Instance.classifier", to: :instance_classifier + map_element "Link.association", to: :link_association + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Instance.slot", to: :instance_slot + map_element "Link.linkRole", to: :link_link_role + end + end end end diff --git a/lib/xmi/uml13/linkassociation.rb b/lib/xmi/uml13/linkassociation.rb index c9df2b6..1e87b11 100644 --- a/lib/xmi/uml13/linkassociation.rb +++ b/lib/xmi/uml13/linkassociation.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'association' +require "shale" -class Linkassociation < Shale::Mapper - attribute :association, Association, collection: true +require_relative "association" - xml do - root 'Link.association' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Linkassociation < Shale::Mapper + attribute :association, Association, collection: true - map_element 'Association', to: :association + xml do + root "Link.association" + namespace "omg.org/UML1.3", "UML" + + map_element "Association", to: :association + end + end end end diff --git a/lib/xmi/uml13/linklink_role.rb b/lib/xmi/uml13/linklink_role.rb index 48ec0d5..dfcc7c6 100644 --- a/lib/xmi/uml13/linklink_role.rb +++ b/lib/xmi/uml13/linklink_role.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'link_end' +require "shale" -class LinklinkRole < Shale::Mapper - attribute :link_end, LinkEnd, collection: true +require_relative "link_end" - xml do - root 'Link.linkRole' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class LinklinkRole < Shale::Mapper + attribute :link_end, LinkEnd, collection: true - map_element 'LinkEnd', to: :link_end + xml do + root "Link.linkRole" + namespace "omg.org/UML1.3", "UML" + + map_element "LinkEnd", to: :link_end + end + end end end diff --git a/lib/xmi/uml13/local_invocation.rb b/lib/xmi/uml13/local_invocation.rb index eccbe17..6bd3d40 100644 --- a/lib/xmi/uml13/local_invocation.rb +++ b/lib/xmi/uml13/local_invocation.rb @@ -1,146 +1,152 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'actionaction_sequence' -require_relative 'actionactual_argument' -require_relative 'actionis_asynchronous' -require_relative 'actionmessage' -require_relative 'actionrecurrence' -require_relative 'actionrequest' -require_relative 'actionscript' -require_relative 'actiontarget' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'xm_iextension' +require "shale" -class LocalInvocation < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :is_asynchronous, Shale::Type::String - attribute :script, Shale::Type::Value - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :request, Shale::Type::Value - attribute :message, Shale::Type::Value - attribute :action_sequence, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :action_recurrence, Actionrecurrence, collection: true - attribute :action_target, Actiontarget, collection: true - attribute :action_is_asynchronous, ActionisAsynchronous, collection: true - attribute :action_script, Actionscript, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :action_request, Actionrequest, collection: true - attribute :action_message, Actionmessage, collection: true - attribute :action_action_sequence, ActionactionSequence, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :action_actual_argument, ActionactualArgument, collection: true +require_relative "actionaction_sequence" +require_relative "actionactual_argument" +require_relative "actionis_asynchronous" +require_relative "actionmessage" +require_relative "actionrecurrence" +require_relative "actionrequest" +require_relative "actionscript" +require_relative "actiontarget" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "xm_iextension" - xml do - root 'LocalInvocation' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class LocalInvocation < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :is_asynchronous, Shale::Type::String + attribute :script, Shale::Type::Value + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :request, Shale::Type::Value + attribute :message, Shale::Type::Value + attribute :action_sequence, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :action_recurrence, Actionrecurrence, collection: true + attribute :action_target, Actiontarget, collection: true + attribute :action_is_asynchronous, ActionisAsynchronous, collection: true + attribute :action_script, Actionscript, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :action_request, Actionrequest, collection: true + attribute :action_message, Actionmessage, collection: true + attribute :action_action_sequence, ActionactionSequence, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :action_actual_argument, ActionactualArgument, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'isAsynchronous', to: :is_asynchronous - map_attribute 'script', to: :script - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'request', to: :request - map_attribute 'message', to: :message - map_attribute 'actionSequence', to: :action_sequence - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'Action.recurrence', to: :action_recurrence - map_element 'Action.target', to: :action_target - map_element 'Action.isAsynchronous', to: :action_is_asynchronous - map_element 'Action.script', to: :action_script - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'Action.request', to: :action_request - map_element 'Action.message', to: :action_message - map_element 'Action.actionSequence', to: :action_action_sequence - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Action.actualArgument', to: :action_actual_argument + xml do + root "LocalInvocation" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "isAsynchronous", to: :is_asynchronous + map_attribute "script", to: :script + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "request", to: :request + map_attribute "message", to: :message + map_attribute "actionSequence", to: :action_sequence + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "Action.recurrence", to: :action_recurrence + map_element "Action.target", to: :action_target + map_element "Action.isAsynchronous", to: :action_is_asynchronous + map_element "Action.script", to: :action_script + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "Action.request", to: :action_request + map_element "Action.message", to: :action_message + map_element "Action.actionSequence", to: :action_action_sequence + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Action.actualArgument", to: :action_actual_argument + end + end end end diff --git a/lib/xmi/uml13/mapping.rb b/lib/xmi/uml13/mapping.rb index 7dece66..6888ace 100644 --- a/lib/xmi/uml13/mapping.rb +++ b/lib/xmi/uml13/mapping.rb @@ -1,29 +1,35 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'mappingbody' -require_relative 'xm_iextension' +require "shale" -class Mapping < Shale::Mapper - attribute :body, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :mapping_body, Mappingbody, collection: true - attribute :xmi_extension, XMIextension, collection: true +require_relative "mappingbody" +require_relative "xm_iextension" - xml do - root 'Mapping' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Mapping < Shale::Mapper + attribute :body, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :mapping_body, Mappingbody, collection: true + attribute :xmi_extension, XMIextension, collection: true - map_attribute 'body', to: :body - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'Mapping.body', to: :mapping_body - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil + xml do + root "Mapping" + namespace "omg.org/UML1.3", "UML" + + map_attribute "body", to: :body + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "Mapping.body", to: :mapping_body + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + end + end end end diff --git a/lib/xmi/uml13/mappingbody.rb b/lib/xmi/uml13/mappingbody.rb index b2cbbe4..95701c5 100644 --- a/lib/xmi/uml13/mappingbody.rb +++ b/lib/xmi/uml13/mappingbody.rb @@ -1,16 +1,22 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'xm_ireference' +require "shale" -class Mappingbody < Shale::Mapper - attribute :content, Shale::Type::String - attribute :xmi_reference, XMIreference, collection: true +require_relative "xm_ireference" - xml do - root 'Mapping.body' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Mappingbody < Shale::Mapper + attribute :content, Shale::Type::String + attribute :xmi_reference, XMIreference, collection: true - map_content to: :content - map_element 'XMI.reference', to: :xmi_reference, prefix: nil, namespace: nil + xml do + root "Mapping.body" + namespace "omg.org/UML1.3", "UML" + + map_content to: :content + map_element "XMI.reference", to: :xmi_reference, prefix: nil, namespace: nil + end + end end end diff --git a/lib/xmi/uml13/message.rb b/lib/xmi/uml13/message.rb index 70d8b42..4a002f2 100644 --- a/lib/xmi/uml13/message.rb +++ b/lib/xmi/uml13/message.rb @@ -1,152 +1,158 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'messageaction' -require_relative 'messageactivator' -require_relative 'messageinteraction' -require_relative 'messagemessage' -require_relative 'messagemessage2' -require_relative 'messagepredecessor' -require_relative 'messagereceiver' -require_relative 'messagesender' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'xm_iextension' +require "shale" -class Message < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :interaction, Shale::Type::Value - attribute :predecessor, Shale::Type::Value - attribute :message2, Shale::Type::Value - attribute :message, Shale::Type::Value - attribute :activator, Shale::Type::Value - attribute :action, Shale::Type::Value - attribute :receiver, Shale::Type::Value - attribute :sender, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :message_interaction, Messageinteraction, collection: true - attribute :message_predecessor, Messagepredecessor, collection: true - attribute :message_message2, Messagemessage2, collection: true - attribute :message_message, Messagemessage, collection: true - attribute :message_activator, Messageactivator, collection: true - attribute :message_action, Messageaction, collection: true - attribute :message_receiver, Messagereceiver, collection: true - attribute :message_sender, Messagesender, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true +require_relative "messageaction" +require_relative "messageactivator" +require_relative "messageinteraction" +require_relative "messagemessage" +require_relative "messagemessage2" +require_relative "messagepredecessor" +require_relative "messagereceiver" +require_relative "messagesender" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "xm_iextension" - xml do - root 'Message' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Message < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :interaction, Shale::Type::Value + attribute :predecessor, Shale::Type::Value + attribute :message2, Shale::Type::Value + attribute :message, Shale::Type::Value + attribute :activator, Shale::Type::Value + attribute :action, Shale::Type::Value + attribute :receiver, Shale::Type::Value + attribute :sender, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :message_interaction, Messageinteraction, collection: true + attribute :message_predecessor, Messagepredecessor, collection: true + attribute :message_message2, Messagemessage2, collection: true + attribute :message_message, Messagemessage, collection: true + attribute :message_activator, Messageactivator, collection: true + attribute :message_action, Messageaction, collection: true + attribute :message_receiver, Messagereceiver, collection: true + attribute :message_sender, Messagesender, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'interaction', to: :interaction - map_attribute 'predecessor', to: :predecessor - map_attribute 'message2', to: :message2 - map_attribute 'message', to: :message - map_attribute 'activator', to: :activator - map_attribute 'action', to: :action - map_attribute 'receiver', to: :receiver - map_attribute 'sender', to: :sender - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'Message.interaction', to: :message_interaction - map_element 'Message.predecessor', to: :message_predecessor - map_element 'Message.message2', to: :message_message2 - map_element 'Message.message', to: :message_message - map_element 'Message.activator', to: :message_activator - map_element 'Message.action', to: :message_action - map_element 'Message.receiver', to: :message_receiver - map_element 'Message.sender', to: :message_sender - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value + xml do + root "Message" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "interaction", to: :interaction + map_attribute "predecessor", to: :predecessor + map_attribute "message2", to: :message2 + map_attribute "message", to: :message + map_attribute "activator", to: :activator + map_attribute "action", to: :action + map_attribute "receiver", to: :receiver + map_attribute "sender", to: :sender + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "Message.interaction", to: :message_interaction + map_element "Message.predecessor", to: :message_predecessor + map_element "Message.message2", to: :message_message2 + map_element "Message.message", to: :message_message + map_element "Message.activator", to: :message_activator + map_element "Message.action", to: :message_action + map_element "Message.receiver", to: :message_receiver + map_element "Message.sender", to: :message_sender + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + end + end end end diff --git a/lib/xmi/uml13/message_instance.rb b/lib/xmi/uml13/message_instance.rb index 5aec3e4..8a3713e 100644 --- a/lib/xmi/uml13/message_instance.rb +++ b/lib/xmi/uml13/message_instance.rb @@ -1,132 +1,138 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'message_instanceargument' -require_relative 'message_instancereceiver' -require_relative 'message_instancesender' -require_relative 'message_instancespecification' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'xm_iextension' +require "shale" -class MessageInstance < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :specification, Shale::Type::Value - attribute :sender, Shale::Type::Value - attribute :receiver, Shale::Type::Value - attribute :argument, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :message_instance_specification, MessageInstancespecification, collection: true - attribute :message_instance_sender, MessageInstancesender, collection: true - attribute :message_instance_receiver, MessageInstancereceiver, collection: true - attribute :message_instance_argument, MessageInstanceargument, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true +require_relative "message_instanceargument" +require_relative "message_instancereceiver" +require_relative "message_instancesender" +require_relative "message_instancespecification" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "xm_iextension" - xml do - root 'MessageInstance' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class MessageInstance < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :specification, Shale::Type::Value + attribute :sender, Shale::Type::Value + attribute :receiver, Shale::Type::Value + attribute :argument, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :message_instance_specification, MessageInstancespecification, collection: true + attribute :message_instance_sender, MessageInstancesender, collection: true + attribute :message_instance_receiver, MessageInstancereceiver, collection: true + attribute :message_instance_argument, MessageInstanceargument, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'specification', to: :specification - map_attribute 'sender', to: :sender - map_attribute 'receiver', to: :receiver - map_attribute 'argument', to: :argument - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'MessageInstance.specification', to: :message_instance_specification - map_element 'MessageInstance.sender', to: :message_instance_sender - map_element 'MessageInstance.receiver', to: :message_instance_receiver - map_element 'MessageInstance.argument', to: :message_instance_argument - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value + xml do + root "MessageInstance" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "specification", to: :specification + map_attribute "sender", to: :sender + map_attribute "receiver", to: :receiver + map_attribute "argument", to: :argument + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "MessageInstance.specification", to: :message_instance_specification + map_element "MessageInstance.sender", to: :message_instance_sender + map_element "MessageInstance.receiver", to: :message_instance_receiver + map_element "MessageInstance.argument", to: :message_instance_argument + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + end + end end end diff --git a/lib/xmi/uml13/message_instanceargument.rb b/lib/xmi/uml13/message_instanceargument.rb index fff6bc2..cae677a 100644 --- a/lib/xmi/uml13/message_instanceargument.rb +++ b/lib/xmi/uml13/message_instanceargument.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'instance' +require "shale" -class MessageInstanceargument < Shale::Mapper - attribute :instance, Instance, collection: true +require_relative "instance" - xml do - root 'MessageInstance.argument' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class MessageInstanceargument < Shale::Mapper + attribute :instance, Instance, collection: true - map_element 'Instance', to: :instance + xml do + root "MessageInstance.argument" + namespace "omg.org/UML1.3", "UML" + + map_element "Instance", to: :instance + end + end end end diff --git a/lib/xmi/uml13/message_instancereceiver.rb b/lib/xmi/uml13/message_instancereceiver.rb index 0622059..23ba02b 100644 --- a/lib/xmi/uml13/message_instancereceiver.rb +++ b/lib/xmi/uml13/message_instancereceiver.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'instance' +require "shale" -class MessageInstancereceiver < Shale::Mapper - attribute :instance, Instance, collection: true +require_relative "instance" - xml do - root 'MessageInstance.receiver' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class MessageInstancereceiver < Shale::Mapper + attribute :instance, Instance, collection: true - map_element 'Instance', to: :instance + xml do + root "MessageInstance.receiver" + namespace "omg.org/UML1.3", "UML" + + map_element "Instance", to: :instance + end + end end end diff --git a/lib/xmi/uml13/message_instancesender.rb b/lib/xmi/uml13/message_instancesender.rb index 889f443..3f6fc39 100644 --- a/lib/xmi/uml13/message_instancesender.rb +++ b/lib/xmi/uml13/message_instancesender.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'instance' +require "shale" -class MessageInstancesender < Shale::Mapper - attribute :instance, Instance, collection: true +require_relative "instance" - xml do - root 'MessageInstance.sender' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class MessageInstancesender < Shale::Mapper + attribute :instance, Instance, collection: true - map_element 'Instance', to: :instance + xml do + root "MessageInstance.sender" + namespace "omg.org/UML1.3", "UML" + + map_element "Instance", to: :instance + end + end end end diff --git a/lib/xmi/uml13/message_instancespecification.rb b/lib/xmi/uml13/message_instancespecification.rb index 57a0988..f5265aa 100644 --- a/lib/xmi/uml13/message_instancespecification.rb +++ b/lib/xmi/uml13/message_instancespecification.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'request' +require "shale" -class MessageInstancespecification < Shale::Mapper - attribute :request, Request, collection: true +require_relative "request" - xml do - root 'MessageInstance.specification' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class MessageInstancespecification < Shale::Mapper + attribute :request, Request, collection: true - map_element 'Request', to: :request + xml do + root "MessageInstance.specification" + namespace "omg.org/UML1.3", "UML" + + map_element "Request", to: :request + end + end end end diff --git a/lib/xmi/uml13/messageaction.rb b/lib/xmi/uml13/messageaction.rb index e7a3088..13fde30 100644 --- a/lib/xmi/uml13/messageaction.rb +++ b/lib/xmi/uml13/messageaction.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'action' +require "shale" -class Messageaction < Shale::Mapper - attribute :action, Action, collection: true +require_relative "action" - xml do - root 'Message.action' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Messageaction < Shale::Mapper + attribute :action, Action, collection: true - map_element 'Action', to: :action + xml do + root "Message.action" + namespace "omg.org/UML1.3", "UML" + + map_element "Action", to: :action + end + end end end diff --git a/lib/xmi/uml13/messageactivator.rb b/lib/xmi/uml13/messageactivator.rb index e19ac35..1802ba3 100644 --- a/lib/xmi/uml13/messageactivator.rb +++ b/lib/xmi/uml13/messageactivator.rb @@ -1,14 +1,21 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'message' +require "shale" -class Messageactivator < Shale::Mapper - attribute :message, Message, collection: true +module Xmi + module Uml13 + class Message < Shale::Mapper + end - xml do - root 'Message.activator' - namespace 'omg.org/UML1.3', 'UML' + class Messageactivator < Shale::Mapper + attribute :message, Message, collection: true - map_element 'Message', to: :message + xml do + root "Message.activator" + namespace "omg.org/UML1.3", "UML" + + map_element "Message", to: :message + end + end end end diff --git a/lib/xmi/uml13/messageinteraction.rb b/lib/xmi/uml13/messageinteraction.rb index 7fd68fc..5901b0f 100644 --- a/lib/xmi/uml13/messageinteraction.rb +++ b/lib/xmi/uml13/messageinteraction.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'interaction' +require "shale" -class Messageinteraction < Shale::Mapper - attribute :interaction, Interaction, collection: true +require_relative "interaction" - xml do - root 'Message.interaction' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Messageinteraction < Shale::Mapper + attribute :interaction, Interaction, collection: true - map_element 'Interaction', to: :interaction + xml do + root "Message.interaction" + namespace "omg.org/UML1.3", "UML" + + map_element "Interaction", to: :interaction + end + end end end diff --git a/lib/xmi/uml13/messagemessage.rb b/lib/xmi/uml13/messagemessage.rb index 77020b1..696bab1 100644 --- a/lib/xmi/uml13/messagemessage.rb +++ b/lib/xmi/uml13/messagemessage.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'message' +require "shale" -class Messagemessage < Shale::Mapper - attribute :message, Message, collection: true +require_relative "message" - xml do - root 'Message.message' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Messagemessage < Shale::Mapper + attribute :message, Message, collection: true - map_element 'Message', to: :message + xml do + root "Message.message" + namespace "omg.org/UML1.3", "UML" + + map_element "Message", to: :message + end + end end end diff --git a/lib/xmi/uml13/messagemessage2.rb b/lib/xmi/uml13/messagemessage2.rb index 0927c90..1d7bd1a 100644 --- a/lib/xmi/uml13/messagemessage2.rb +++ b/lib/xmi/uml13/messagemessage2.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'message' +require "shale" -class Messagemessage2 < Shale::Mapper - attribute :message, Message, collection: true +require_relative "message" - xml do - root 'Message.message2' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Messagemessage2 < Shale::Mapper + attribute :message, Message, collection: true - map_element 'Message', to: :message + xml do + root "Message.message2" + namespace "omg.org/UML1.3", "UML" + + map_element "Message", to: :message + end + end end end diff --git a/lib/xmi/uml13/messagepredecessor.rb b/lib/xmi/uml13/messagepredecessor.rb index b2c92f9..01cac0d 100644 --- a/lib/xmi/uml13/messagepredecessor.rb +++ b/lib/xmi/uml13/messagepredecessor.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'message' +require "shale" -class Messagepredecessor < Shale::Mapper - attribute :message, Message, collection: true +require_relative "message" - xml do - root 'Message.predecessor' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Messagepredecessor < Shale::Mapper + attribute :message, Message, collection: true - map_element 'Message', to: :message + xml do + root "Message.predecessor" + namespace "omg.org/UML1.3", "UML" + + map_element "Message", to: :message + end + end end end diff --git a/lib/xmi/uml13/messagereceiver.rb b/lib/xmi/uml13/messagereceiver.rb index f935f2a..6353382 100644 --- a/lib/xmi/uml13/messagereceiver.rb +++ b/lib/xmi/uml13/messagereceiver.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'classifier_role' +require "shale" -class Messagereceiver < Shale::Mapper - attribute :classifier_role, ClassifierRole, collection: true +require_relative "classifier_role" - xml do - root 'Message.receiver' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Messagereceiver < Shale::Mapper + attribute :classifier_role, ClassifierRole, collection: true - map_element 'ClassifierRole', to: :classifier_role + xml do + root "Message.receiver" + namespace "omg.org/UML1.3", "UML" + + map_element "ClassifierRole", to: :classifier_role + end + end end end diff --git a/lib/xmi/uml13/messagesender.rb b/lib/xmi/uml13/messagesender.rb index 648154c..a6d80fe 100644 --- a/lib/xmi/uml13/messagesender.rb +++ b/lib/xmi/uml13/messagesender.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'classifier_role' +require "shale" -class Messagesender < Shale::Mapper - attribute :classifier_role, ClassifierRole, collection: true +require_relative "classifier_role" - xml do - root 'Message.sender' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Messagesender < Shale::Mapper + attribute :classifier_role, ClassifierRole, collection: true - map_element 'ClassifierRole', to: :classifier_role + xml do + root "Message.sender" + namespace "omg.org/UML1.3", "UML" + + map_element "ClassifierRole", to: :classifier_role + end + end end end diff --git a/lib/xmi/uml13/method.rb b/lib/xmi/uml13/method.rb index f5d8ce3..c52beac 100644 --- a/lib/xmi/uml13/method.rb +++ b/lib/xmi/uml13/method.rb @@ -1,148 +1,154 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'behavioral_featureis_query' -require_relative 'behavioral_featureparameter' -require_relative 'behavioral_featureraised_exception' -require_relative 'featureclassifier_role' -require_relative 'featureowner' -require_relative 'featureowner_scope' -require_relative 'methodbody' -require_relative 'methodspecification' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'xm_iextension' +require "shale" -class Method < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :owner_scope, Shale::Type::String - attribute :is_query, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :owner, Shale::Type::Value - attribute :classifier_role, Shale::Type::Value - attribute :raised_exception, Shale::Type::Value - attribute :specification, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :feature_owner_scope, FeatureownerScope, collection: true - attribute :behavioral_feature_is_query, BehavioralFeatureisQuery, collection: true - attribute :method_body, Methodbody, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :feature_owner, Featureowner, collection: true - attribute :feature_classifier_role, FeatureclassifierRole, collection: true - attribute :behavioral_feature_raised_exception, BehavioralFeatureraisedException, collection: true - attribute :method_specification, Methodspecification, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :behavioral_feature_parameter, BehavioralFeatureparameter, collection: true +require_relative "behavioral_featureis_query" +require_relative "behavioral_featureparameter" +require_relative "behavioral_featureraised_exception" +require_relative "featureclassifier_role" +require_relative "featureowner" +require_relative "featureowner_scope" +require_relative "methodbody" +require_relative "methodspecification" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "xm_iextension" - xml do - root 'Method' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Method < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :owner_scope, Shale::Type::String + attribute :is_query, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :owner, Shale::Type::Value + attribute :classifier_role, Shale::Type::Value + attribute :raised_exception, Shale::Type::Value + attribute :specification, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :feature_owner_scope, FeatureownerScope, collection: true + attribute :behavioral_feature_is_query, BehavioralFeatureisQuery, collection: true + attribute :method_body, Methodbody, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :feature_owner, Featureowner, collection: true + attribute :feature_classifier_role, FeatureclassifierRole, collection: true + attribute :behavioral_feature_raised_exception, BehavioralFeatureraisedException, collection: true + attribute :method_specification, Methodspecification, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :behavioral_feature_parameter, BehavioralFeatureparameter, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'ownerScope', to: :owner_scope - map_attribute 'isQuery', to: :is_query - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'owner', to: :owner - map_attribute 'classifierRole', to: :classifier_role - map_attribute 'raisedException', to: :raised_exception - map_attribute 'specification', to: :specification - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'Feature.ownerScope', to: :feature_owner_scope - map_element 'BehavioralFeature.isQuery', to: :behavioral_feature_is_query - map_element 'Method.body', to: :method_body - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'Feature.owner', to: :feature_owner - map_element 'Feature.classifierRole', to: :feature_classifier_role - map_element 'BehavioralFeature.raisedException', to: :behavioral_feature_raised_exception - map_element 'Method.specification', to: :method_specification - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'BehavioralFeature.parameter', to: :behavioral_feature_parameter + xml do + root "Method" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "ownerScope", to: :owner_scope + map_attribute "isQuery", to: :is_query + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "owner", to: :owner + map_attribute "classifierRole", to: :classifier_role + map_attribute "raisedException", to: :raised_exception + map_attribute "specification", to: :specification + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "Feature.ownerScope", to: :feature_owner_scope + map_element "BehavioralFeature.isQuery", to: :behavioral_feature_is_query + map_element "Method.body", to: :method_body + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "Feature.owner", to: :feature_owner + map_element "Feature.classifierRole", to: :feature_classifier_role + map_element "BehavioralFeature.raisedException", to: :behavioral_feature_raised_exception + map_element "Method.specification", to: :method_specification + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "BehavioralFeature.parameter", to: :behavioral_feature_parameter + end + end end end diff --git a/lib/xmi/uml13/methodbody.rb b/lib/xmi/uml13/methodbody.rb index 38f62b8..76cac3d 100644 --- a/lib/xmi/uml13/methodbody.rb +++ b/lib/xmi/uml13/methodbody.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'procedure_expression' +require "shale" -class Methodbody < Shale::Mapper - attribute :procedure_expression, ProcedureExpression +require_relative "procedure_expression" - xml do - root 'Method.body' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Methodbody < Shale::Mapper + attribute :procedure_expression, ProcedureExpression - map_element 'ProcedureExpression', to: :procedure_expression + xml do + root "Method.body" + namespace "omg.org/UML1.3", "UML" + + map_element "ProcedureExpression", to: :procedure_expression + end + end end end diff --git a/lib/xmi/uml13/methodspecification.rb b/lib/xmi/uml13/methodspecification.rb index ce37c55..2f48f5e 100644 --- a/lib/xmi/uml13/methodspecification.rb +++ b/lib/xmi/uml13/methodspecification.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'operation' +require "shale" -class Methodspecification < Shale::Mapper - attribute :operation, Operation, collection: true +require_relative "operation" - xml do - root 'Method.specification' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Methodspecification < Shale::Mapper + attribute :operation, Operation, collection: true - map_element 'Operation', to: :operation + xml do + root "Method.specification" + namespace "omg.org/UML1.3", "UML" + + map_element "Operation", to: :operation + end + end end end diff --git a/lib/xmi/uml13/model.rb b/lib/xmi/uml13/model.rb index f6b562d..1d6a899 100644 --- a/lib/xmi/uml13/model.rb +++ b/lib/xmi/uml13/model.rb @@ -1,139 +1,145 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'generalizable_elementgeneralization' -require_relative 'generalizable_elementis_abstract' -require_relative 'generalizable_elementis_leaf' -require_relative 'generalizable_elementis_root' -require_relative 'generalizable_elementspecialization' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'namespaceowned_element' -require_relative 'xm_iextension' +require "shale" -class Model < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :is_root, Shale::Type::String - attribute :is_leaf, Shale::Type::String - attribute :is_abstract, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :model_element_element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :generalization, Shale::Type::Value - attribute :specialization, Shale::Type::Value - attribute :package_element_reference, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :generalizable_element_is_root, GeneralizableElementisRoot, collection: true - attribute :generalizable_element_is_leaf, GeneralizableElementisLeaf, collection: true - attribute :generalizable_element_is_abstract, GeneralizableElementisAbstract, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :generalizable_element_generalization, GeneralizableElementgeneralization, collection: true - attribute :generalizable_element_specialization, GeneralizableElementspecialization, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :namespace_owned_element, NamespaceownedElement, collection: true +require_relative "generalizable_elementgeneralization" +require_relative "generalizable_elementis_abstract" +require_relative "generalizable_elementis_leaf" +require_relative "generalizable_elementis_root" +require_relative "generalizable_elementspecialization" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "namespaceowned_element" +require_relative "xm_iextension" - xml do - root 'Model' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Model < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :is_root, Shale::Type::String + attribute :is_leaf, Shale::Type::String + attribute :is_abstract, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :model_element_element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :generalization, Shale::Type::Value + attribute :specialization, Shale::Type::Value + attribute :package_element_reference, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :generalizable_element_is_root, GeneralizableElementisRoot, collection: true + attribute :generalizable_element_is_leaf, GeneralizableElementisLeaf, collection: true + attribute :generalizable_element_is_abstract, GeneralizableElementisAbstract, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :generalizable_element_generalization, GeneralizableElementgeneralization, collection: true + attribute :generalizable_element_specialization, GeneralizableElementspecialization, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :namespace_owned_element, NamespaceownedElement, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'isRoot', to: :is_root - map_attribute 'isLeaf', to: :is_leaf - map_attribute 'isAbstract', to: :is_abstract - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'ModelElement.elementReference', to: :model_element_element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'generalization', to: :generalization - map_attribute 'specialization', to: :specialization - map_attribute 'Package.elementReference', to: :package_element_reference - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'GeneralizableElement.isRoot', to: :generalizable_element_is_root - map_element 'GeneralizableElement.isLeaf', to: :generalizable_element_is_leaf - map_element 'GeneralizableElement.isAbstract', to: :generalizable_element_is_abstract - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'GeneralizableElement.generalization', to: :generalizable_element_generalization - map_element 'GeneralizableElement.specialization', to: :generalizable_element_specialization - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Namespace.ownedElement', to: :namespace_owned_element + xml do + root "Model" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "isRoot", to: :is_root + map_attribute "isLeaf", to: :is_leaf + map_attribute "isAbstract", to: :is_abstract + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "ModelElement.elementReference", to: :model_element_element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "generalization", to: :generalization + map_attribute "specialization", to: :specialization + map_attribute "Package.elementReference", to: :package_element_reference + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "GeneralizableElement.isRoot", to: :generalizable_element_is_root + map_element "GeneralizableElement.isLeaf", to: :generalizable_element_is_leaf + map_element "GeneralizableElement.isAbstract", to: :generalizable_element_is_abstract + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "GeneralizableElement.generalization", to: :generalizable_element_generalization + map_element "GeneralizableElement.specialization", to: :generalizable_element_specialization + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Namespace.ownedElement", to: :namespace_owned_element + end + end end end diff --git a/lib/xmi/uml13/model_element.rb b/lib/xmi/uml13/model_element.rb index c9868e4..57feebd 100644 --- a/lib/xmi/uml13/model_element.rb +++ b/lib/xmi/uml13/model_element.rb @@ -1,112 +1,118 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'xm_iextension' +require "shale" -class ModelElement < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "xm_iextension" - xml do - root 'ModelElement' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ModelElement < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value + xml do + root "ModelElement" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + end + end end end diff --git a/lib/xmi/uml13/model_element_owns_diagramowned_diagram.rb b/lib/xmi/uml13/model_element_owns_diagramowned_diagram.rb index f035146..a576daf 100644 --- a/lib/xmi/uml13/model_element_owns_diagramowned_diagram.rb +++ b/lib/xmi/uml13/model_element_owns_diagramowned_diagram.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'diagram' +require "shale" -class ModelElementOwnsDiagramownedDiagram < Shale::Mapper - attribute :diagram, Diagram, collection: true +require_relative "diagram" - xml do - root 'ModelElementOwnsDiagram.ownedDiagram' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ModelElementOwnsDiagramownedDiagram < Shale::Mapper + attribute :diagram, Diagram, collection: true - map_element 'Diagram', to: :diagram + xml do + root "ModelElementOwnsDiagram.ownedDiagram" + namespace "omg.org/UML1.3", "UML" + + map_element "Diagram", to: :diagram + end + end end end diff --git a/lib/xmi/uml13/model_elementbehavior.rb b/lib/xmi/uml13/model_elementbehavior.rb index 1d30050..be11556 100644 --- a/lib/xmi/uml13/model_elementbehavior.rb +++ b/lib/xmi/uml13/model_elementbehavior.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'state_machine' +require "shale" -class ModelElementbehavior < Shale::Mapper - attribute :state_machine, StateMachine, collection: true +require_relative "state_machine" - xml do - root 'ModelElement.behavior' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ModelElementbehavior < Shale::Mapper + attribute :state_machine, StateMachine, collection: true - map_element 'StateMachine', to: :state_machine + xml do + root "ModelElement.behavior" + namespace "omg.org/UML1.3", "UML" + + map_element "StateMachine", to: :state_machine + end + end end end diff --git a/lib/xmi/uml13/model_elementbinding.rb b/lib/xmi/uml13/model_elementbinding.rb index c8ba21a..360748c 100644 --- a/lib/xmi/uml13/model_elementbinding.rb +++ b/lib/xmi/uml13/model_elementbinding.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'binding' +require "shale" -class ModelElementbinding < Shale::Mapper - attribute :binding, Binding, collection: true +require_relative "binding" - xml do - root 'ModelElement.binding' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ModelElementbinding < Shale::Mapper + attribute :binding, Binding, collection: true - map_element 'Binding', to: :binding + xml do + root "ModelElement.binding" + namespace "omg.org/UML1.3", "UML" + + map_element "Binding", to: :binding + end + end end end diff --git a/lib/xmi/uml13/model_elementcollaboration.rb b/lib/xmi/uml13/model_elementcollaboration.rb index 908f490..c41774d 100644 --- a/lib/xmi/uml13/model_elementcollaboration.rb +++ b/lib/xmi/uml13/model_elementcollaboration.rb @@ -1,14 +1,21 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'collaboration' +require "shale" -class ModelElementcollaboration < Shale::Mapper - attribute :collaboration, Collaboration, collection: true +module Xmi + module Uml13 + class Collaboration < Shale::Mapper + end - xml do - root 'ModelElement.collaboration' - namespace 'omg.org/UML1.3', 'UML' + class ModelElementcollaboration < Shale::Mapper + attribute :collaboration, Collaboration, collection: true - map_element 'Collaboration', to: :collaboration + xml do + root "ModelElement.collaboration" + namespace "omg.org/UML1.3", "UML" + + map_element "Collaboration", to: :collaboration + end + end end end diff --git a/lib/xmi/uml13/model_elementconstraint.rb b/lib/xmi/uml13/model_elementconstraint.rb index 7c8e865..af0e8e4 100644 --- a/lib/xmi/uml13/model_elementconstraint.rb +++ b/lib/xmi/uml13/model_elementconstraint.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'constraint' +require "shale" -class ModelElementconstraint < Shale::Mapper - attribute :constraint, Constraint, collection: true +require_relative "constraint" - xml do - root 'ModelElement.constraint' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ModelElementconstraint < Shale::Mapper + attribute :constraint, Constraint, collection: true - map_element 'Constraint', to: :constraint + xml do + root "ModelElement.constraint" + namespace "omg.org/UML1.3", "UML" + + map_element "Constraint", to: :constraint + end + end end end diff --git a/lib/xmi/uml13/model_elementelement_reference.rb b/lib/xmi/uml13/model_elementelement_reference.rb index f20e010..e829164 100644 --- a/lib/xmi/uml13/model_elementelement_reference.rb +++ b/lib/xmi/uml13/model_elementelement_reference.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'element_reference' +require "shale" -class ModelElementelementReference < Shale::Mapper - attribute :element_reference, ElementReference, collection: true +require_relative "element_reference" - xml do - root 'ModelElement.elementReference' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ModelElementelementReference < Shale::Mapper + attribute :element_reference, ElementReference, collection: true - map_element 'ElementReference', to: :element_reference + xml do + root "ModelElement.elementReference" + namespace "omg.org/UML1.3", "UML" + + map_element "ElementReference", to: :element_reference + end + end end end diff --git a/lib/xmi/uml13/model_elementimplementation.rb b/lib/xmi/uml13/model_elementimplementation.rb index 3c59d91..12ff209 100644 --- a/lib/xmi/uml13/model_elementimplementation.rb +++ b/lib/xmi/uml13/model_elementimplementation.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'component' +require "shale" -class ModelElementimplementation < Shale::Mapper - attribute :component, Component, collection: true +require_relative "component" - xml do - root 'ModelElement.implementation' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ModelElementimplementation < Shale::Mapper + attribute :component, Component, collection: true - map_element 'Component', to: :component + xml do + root "ModelElement.implementation" + namespace "omg.org/UML1.3", "UML" + + map_element "Component", to: :component + end + end end end diff --git a/lib/xmi/uml13/model_elementname.rb b/lib/xmi/uml13/model_elementname.rb index 88802e3..c3768b6 100644 --- a/lib/xmi/uml13/model_elementname.rb +++ b/lib/xmi/uml13/model_elementname.rb @@ -1,16 +1,22 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'xm_ireference' +require "shale" -class ModelElementname < Shale::Mapper - attribute :content, Shale::Type::String - attribute :xmi_reference, XMIreference, collection: true +require_relative "xm_ireference" - xml do - root 'ModelElement.name' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ModelElementname < Shale::Mapper + attribute :content, Shale::Type::String + attribute :xmi_reference, XMIreference, collection: true - map_content to: :content - map_element 'XMI.reference', to: :xmi_reference, prefix: nil, namespace: nil + xml do + root "ModelElement.name" + namespace "omg.org/UML1.3", "UML" + + map_content to: :content + map_element "XMI.reference", to: :xmi_reference, prefix: nil, namespace: nil + end + end end end diff --git a/lib/xmi/uml13/model_elementnamespace.rb b/lib/xmi/uml13/model_elementnamespace.rb index bcb7a6d..70ff013 100644 --- a/lib/xmi/uml13/model_elementnamespace.rb +++ b/lib/xmi/uml13/model_elementnamespace.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'namespace' +require "shale" -class ModelElementnamespace < Shale::Mapper - attribute :namespace, Namespace, collection: true +require_relative "namespace" - xml do - root 'ModelElement.namespace' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ModelElementnamespace < Shale::Mapper + attribute :namespace, Namespace, collection: true - map_element 'Namespace', to: :namespace + xml do + root "ModelElement.namespace" + namespace "omg.org/UML1.3", "UML" + + map_element "Namespace", to: :namespace + end + end end end diff --git a/lib/xmi/uml13/model_elementpartition.rb b/lib/xmi/uml13/model_elementpartition.rb index daedf99..c56e366 100644 --- a/lib/xmi/uml13/model_elementpartition.rb +++ b/lib/xmi/uml13/model_elementpartition.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'partition' +require "shale" -class ModelElementpartition < Shale::Mapper - attribute :partition, Partition, collection: true +require_relative "partition" - xml do - root 'ModelElement.partition' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ModelElementpartition < Shale::Mapper + attribute :partition, Partition, collection: true - map_element 'Partition', to: :partition + xml do + root "ModelElement.partition" + namespace "omg.org/UML1.3", "UML" + + map_element "Partition", to: :partition + end + end end end diff --git a/lib/xmi/uml13/model_elementpresentation.rb b/lib/xmi/uml13/model_elementpresentation.rb index 753d30c..bf1ec31 100644 --- a/lib/xmi/uml13/model_elementpresentation.rb +++ b/lib/xmi/uml13/model_elementpresentation.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'presentation' +require "shale" -class ModelElementpresentation < Shale::Mapper - attribute :presentation, Presentation, collection: true +require_relative "presentation" - xml do - root 'ModelElement.presentation' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ModelElementpresentation < Shale::Mapper + attribute :presentation, Presentation, collection: true - map_element 'Presentation', to: :presentation + xml do + root "ModelElement.presentation" + namespace "omg.org/UML1.3", "UML" + + map_element "Presentation", to: :presentation + end + end end end diff --git a/lib/xmi/uml13/model_elementprovision.rb b/lib/xmi/uml13/model_elementprovision.rb index 77f52c0..2d1f399 100644 --- a/lib/xmi/uml13/model_elementprovision.rb +++ b/lib/xmi/uml13/model_elementprovision.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'dependency' +require "shale" -class ModelElementprovision < Shale::Mapper - attribute :dependency, Dependency, collection: true +require_relative "dependency" - xml do - root 'ModelElement.provision' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ModelElementprovision < Shale::Mapper + attribute :dependency, Dependency, collection: true - map_element 'Dependency', to: :dependency + xml do + root "ModelElement.provision" + namespace "omg.org/UML1.3", "UML" + + map_element "Dependency", to: :dependency + end + end end end diff --git a/lib/xmi/uml13/model_elementrequirement.rb b/lib/xmi/uml13/model_elementrequirement.rb index c2c5cd7..6fa8d0d 100644 --- a/lib/xmi/uml13/model_elementrequirement.rb +++ b/lib/xmi/uml13/model_elementrequirement.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'dependency' +require "shale" -class ModelElementrequirement < Shale::Mapper - attribute :dependency, Dependency, collection: true +require_relative "dependency" - xml do - root 'ModelElement.requirement' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ModelElementrequirement < Shale::Mapper + attribute :dependency, Dependency, collection: true - map_element 'Dependency', to: :dependency + xml do + root "ModelElement.requirement" + namespace "omg.org/UML1.3", "UML" + + map_element "Dependency", to: :dependency + end + end end end diff --git a/lib/xmi/uml13/model_elementstereotype.rb b/lib/xmi/uml13/model_elementstereotype.rb index 5c179dd..aad0e43 100644 --- a/lib/xmi/uml13/model_elementstereotype.rb +++ b/lib/xmi/uml13/model_elementstereotype.rb @@ -1,14 +1,21 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'stereotype' +require "shale" -class ModelElementstereotype < Shale::Mapper - attribute :stereotype, Stereotype, collection: true +module Xmi + module Uml13 + class Stereotype < Shale::Mapper + end - xml do - root 'ModelElement.stereotype' - namespace 'omg.org/UML1.3', 'UML' + class ModelElementstereotype < Shale::Mapper + attribute :stereotype, Stereotype, collection: true - map_element 'Stereotype', to: :stereotype + xml do + root "ModelElement.stereotype" + namespace "omg.org/UML1.3", "UML" + + map_element "Stereotype", to: :stereotype + end + end end end diff --git a/lib/xmi/uml13/model_elementtagged_value.rb b/lib/xmi/uml13/model_elementtagged_value.rb index 8dac202..ca9d104 100644 --- a/lib/xmi/uml13/model_elementtagged_value.rb +++ b/lib/xmi/uml13/model_elementtagged_value.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'tagged_value' +require "shale" -class ModelElementtaggedValue < Shale::Mapper - attribute :tagged_value, TaggedValue, collection: true +require_relative "tagged_value" - xml do - root 'ModelElement.taggedValue' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ModelElementtaggedValue < Shale::Mapper + attribute :tagged_value, TaggedValue, collection: true - map_element 'TaggedValue', to: :tagged_value + xml do + root "ModelElement.taggedValue" + namespace "omg.org/UML1.3", "UML" + + map_element "TaggedValue", to: :tagged_value + end + end end end diff --git a/lib/xmi/uml13/model_elementtemplate.rb b/lib/xmi/uml13/model_elementtemplate.rb index 40ca1d7..0145ad0 100644 --- a/lib/xmi/uml13/model_elementtemplate.rb +++ b/lib/xmi/uml13/model_elementtemplate.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'model_element' +require "shale" -class ModelElementtemplate < Shale::Mapper - attribute :model_element, ModelElement, collection: true +require_relative "model_element" - xml do - root 'ModelElement.template' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ModelElementtemplate < Shale::Mapper + attribute :model_element, ModelElement, collection: true - map_element 'ModelElement', to: :model_element + xml do + root "ModelElement.template" + namespace "omg.org/UML1.3", "UML" + + map_element "ModelElement", to: :model_element + end + end end end diff --git a/lib/xmi/uml13/model_elementtemplate_parameter.rb b/lib/xmi/uml13/model_elementtemplate_parameter.rb index 4e195c6..5f436eb 100644 --- a/lib/xmi/uml13/model_elementtemplate_parameter.rb +++ b/lib/xmi/uml13/model_elementtemplate_parameter.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'model_element' +require "shale" -class ModelElementtemplateParameter < Shale::Mapper - attribute :model_element, ModelElement, collection: true +require_relative "model_element" - xml do - root 'ModelElement.templateParameter' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ModelElementtemplateParameter < Shale::Mapper + attribute :model_element, ModelElement, collection: true - map_element 'ModelElement', to: :model_element + xml do + root "ModelElement.templateParameter" + namespace "omg.org/UML1.3", "UML" + + map_element "ModelElement", to: :model_element + end + end end end diff --git a/lib/xmi/uml13/model_elementview.rb b/lib/xmi/uml13/model_elementview.rb index c15f951..02d2a60 100644 --- a/lib/xmi/uml13/model_elementview.rb +++ b/lib/xmi/uml13/model_elementview.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'view_element' +require "shale" -class ModelElementview < Shale::Mapper - attribute :view_element, ViewElement, collection: true +require_relative "view_element" - xml do - root 'ModelElement.view' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ModelElementview < Shale::Mapper + attribute :view_element, ViewElement, collection: true - map_element 'ViewElement', to: :view_element + xml do + root "ModelElement.view" + namespace "omg.org/UML1.3", "UML" + + map_element "ViewElement", to: :view_element + end + end end end diff --git a/lib/xmi/uml13/model_elementvisibility.rb b/lib/xmi/uml13/model_elementvisibility.rb index 03b109e..95dd29a 100644 --- a/lib/xmi/uml13/model_elementvisibility.rb +++ b/lib/xmi/uml13/model_elementvisibility.rb @@ -1,12 +1,18 @@ -require 'shale' +# frozen_string_literal: true -class ModelElementvisibility < Shale::Mapper - attribute :xmi_value, Shale::Type::String +require "shale" - xml do - root 'ModelElement.visibility' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ModelElementvisibility < Shale::Mapper + attribute :xmi_value, Shale::Type::String - map_attribute 'xmi.value', to: :xmi_value + xml do + root "ModelElement.visibility" + namespace "omg.org/UML1.3", "UML" + + map_attribute "xmi.value", to: :xmi_value + end + end end end diff --git a/lib/xmi/uml13/model_management.rb b/lib/xmi/uml13/model_management.rb index d066db6..8d7a577 100644 --- a/lib/xmi/uml13/model_management.rb +++ b/lib/xmi/uml13/model_management.rb @@ -1,33 +1,39 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'element_reference' -require_relative 'model' -require_relative 'package' -require_relative 'subsystem' +require "shale" -class ModelManagement < Shale::Mapper - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :package, Package, collection: true - attribute :subsystem, Subsystem, collection: true - attribute :model, Model, collection: true - attribute :element_reference, ElementReference, collection: true +require_relative "element_reference" +require_relative "model" +require_relative "package" +require_relative "subsystem" - xml do - root 'Model_Management' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ModelManagement < Shale::Mapper + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :package, Package, collection: true + attribute :subsystem, Subsystem, collection: true + attribute :model, Model, collection: true + attribute :element_reference, ElementReference, collection: true - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'Package', to: :package - map_element 'Subsystem', to: :subsystem - map_element 'Model', to: :model - map_element 'ElementReference', to: :element_reference + xml do + root "Model_Management" + namespace "omg.org/UML1.3", "UML" + + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "Package", to: :package + map_element "Subsystem", to: :subsystem + map_element "Model", to: :model + map_element "ElementReference", to: :element_reference + end + end end end diff --git a/lib/xmi/uml13/multiplicity_range.rb b/lib/xmi/uml13/multiplicity_range.rb index 96982c6..1349987 100644 --- a/lib/xmi/uml13/multiplicity_range.rb +++ b/lib/xmi/uml13/multiplicity_range.rb @@ -1,34 +1,40 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'multiplicity_rangelower' -require_relative 'multiplicity_rangeupper' -require_relative 'xm_iextension' +require "shale" -class MultiplicityRange < Shale::Mapper - attribute :lower, Shale::Type::Value - attribute :upper, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :multiplicity_range_lower, MultiplicityRangelower, collection: true - attribute :multiplicity_range_upper, MultiplicityRangeupper, collection: true - attribute :xmi_extension, XMIextension, collection: true +require_relative "multiplicity_rangelower" +require_relative "multiplicity_rangeupper" +require_relative "xm_iextension" - xml do - root 'MultiplicityRange' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class MultiplicityRange < Shale::Mapper + attribute :lower, Shale::Type::Value + attribute :upper, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :multiplicity_range_lower, MultiplicityRangelower, collection: true + attribute :multiplicity_range_upper, MultiplicityRangeupper, collection: true + attribute :xmi_extension, XMIextension, collection: true - map_attribute 'lower', to: :lower - map_attribute 'upper', to: :upper - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'MultiplicityRange.lower', to: :multiplicity_range_lower - map_element 'MultiplicityRange.upper', to: :multiplicity_range_upper - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil + xml do + root "MultiplicityRange" + namespace "omg.org/UML1.3", "UML" + + map_attribute "lower", to: :lower + map_attribute "upper", to: :upper + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "MultiplicityRange.lower", to: :multiplicity_range_lower + map_element "MultiplicityRange.upper", to: :multiplicity_range_upper + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + end + end end end diff --git a/lib/xmi/uml13/multiplicity_rangelower.rb b/lib/xmi/uml13/multiplicity_rangelower.rb index bfbc2fe..b823699 100644 --- a/lib/xmi/uml13/multiplicity_rangelower.rb +++ b/lib/xmi/uml13/multiplicity_rangelower.rb @@ -1,16 +1,22 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'xm_ireference' +require "shale" -class MultiplicityRangelower < Shale::Mapper - attribute :content, Shale::Type::String - attribute :xmi_reference, XMIreference, collection: true +require_relative "xm_ireference" - xml do - root 'MultiplicityRange.lower' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class MultiplicityRangelower < Shale::Mapper + attribute :content, Shale::Type::String + attribute :xmi_reference, XMIreference, collection: true - map_content to: :content - map_element 'XMI.reference', to: :xmi_reference, prefix: nil, namespace: nil + xml do + root "MultiplicityRange.lower" + namespace "omg.org/UML1.3", "UML" + + map_content to: :content + map_element "XMI.reference", to: :xmi_reference, prefix: nil, namespace: nil + end + end end end diff --git a/lib/xmi/uml13/multiplicity_rangeupper.rb b/lib/xmi/uml13/multiplicity_rangeupper.rb index 20bd3c8..9adcc0a 100644 --- a/lib/xmi/uml13/multiplicity_rangeupper.rb +++ b/lib/xmi/uml13/multiplicity_rangeupper.rb @@ -1,16 +1,22 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'xm_ireference' +require "shale" -class MultiplicityRangeupper < Shale::Mapper - attribute :content, Shale::Type::String - attribute :xmi_reference, XMIreference, collection: true +require_relative "xm_ireference" - xml do - root 'MultiplicityRange.upper' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class MultiplicityRangeupper < Shale::Mapper + attribute :content, Shale::Type::String + attribute :xmi_reference, XMIreference, collection: true - map_content to: :content - map_element 'XMI.reference', to: :xmi_reference, prefix: nil, namespace: nil + xml do + root "MultiplicityRange.upper" + namespace "omg.org/UML1.3", "UML" + + map_content to: :content + map_element "XMI.reference", to: :xmi_reference, prefix: nil, namespace: nil + end + end end end diff --git a/lib/xmi/uml13/namespace.rb b/lib/xmi/uml13/namespace.rb index 1f6bd62..4a4d31d 100644 --- a/lib/xmi/uml13/namespace.rb +++ b/lib/xmi/uml13/namespace.rb @@ -1,115 +1,121 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'namespaceowned_element' -require_relative 'xm_iextension' +require "shale" -class Namespace < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :namespace_owned_element, NamespaceownedElement, collection: true +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "namespaceowned_element" +require_relative "xm_iextension" - xml do - root 'Namespace' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Namespace < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :namespace_owned_element, NamespaceownedElement, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Namespace.ownedElement', to: :namespace_owned_element + xml do + root "Namespace" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Namespace.ownedElement", to: :namespace_owned_element + end + end end end diff --git a/lib/xmi/uml13/namespaceowned_element.rb b/lib/xmi/uml13/namespaceowned_element.rb index 2f486a7..fbcaa24 100644 --- a/lib/xmi/uml13/namespaceowned_element.rb +++ b/lib/xmi/uml13/namespaceowned_element.rb @@ -1,266 +1,272 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'action' -require_relative 'action_sequence' -require_relative 'action_state' -require_relative 'activity_model' -require_relative 'activity_state' -require_relative 'actor' -require_relative 'association' -require_relative 'association_class' -require_relative 'association_end' -require_relative 'association_end_role' -require_relative 'association_role' -require_relative 'attribute' -require_relative 'attribute_link' -require_relative 'behavioral_feature' -require_relative 'binding' -require_relative 'call_action' -require_relative 'call_event' -require_relative 'change_event' -require_relative 'class' -require_relative 'classifier' -require_relative 'classifier_in_state' -require_relative 'classifier_role' -require_relative 'collaboration' -require_relative 'comment' -require_relative 'component' -require_relative 'composite_state' -require_relative 'constraint' -require_relative 'create_action' -require_relative 'data_type' -require_relative 'data_value' -require_relative 'dependency' -require_relative 'destroy_action' -require_relative 'enumeration' -require_relative 'event' -require_relative 'exception' -require_relative 'feature' -require_relative 'generalizable_element' -require_relative 'generalization' -require_relative 'guard' -require_relative 'instance' -require_relative 'interaction' -require_relative 'interface' -require_relative 'link' -require_relative 'link_end' -require_relative 'link_object' -require_relative 'local_invocation' -require_relative 'message' -require_relative 'message_instance' -require_relative 'method' -require_relative 'model' -require_relative 'model_element' -require_relative 'namespace' -require_relative 'node' -require_relative 'object' -require_relative 'object_flow_state' -require_relative 'operation' -require_relative 'package' -require_relative 'parameter' -require_relative 'partition' -require_relative 'primitive' -require_relative 'pseudo_state' -require_relative 'reception' -require_relative 'refinement' -require_relative 'request' -require_relative 'return_action' -require_relative 'send_action' -require_relative 'signal' -require_relative 'signal_event' -require_relative 'simple_state' -require_relative 'state' -require_relative 'state_machine' -require_relative 'state_vertex' -require_relative 'stereotype' -require_relative 'structural_feature' -require_relative 'structure' -require_relative 'submachine_state' -require_relative 'subsystem' -require_relative 'terminate_action' -require_relative 'time_event' -require_relative 'trace' -require_relative 'transition' -require_relative 'uninterpreted_action' -require_relative 'usage' -require_relative 'use_case' -require_relative 'use_case_instance' +require "shale" -class NamespaceownedElement < Shale::Mapper - attribute :model_element, ModelElement, collection: true - attribute :comment, Comment, collection: true - attribute :namespace, Namespace, collection: true - attribute :generalizable_element, GeneralizableElement, collection: true - attribute :feature, Feature, collection: true - attribute :parameter, Parameter, collection: true - attribute :constraint, Constraint, collection: true - attribute :dependency, Dependency, collection: true - attribute :generalization, Generalization, collection: true - attribute :association_end, AssociationEnd, collection: true - attribute :request, Request, collection: true - attribute :action_sequence, ActionSequence, collection: true - attribute :action, Action, collection: true - attribute :link, Link, collection: true - attribute :link_end, LinkEnd, collection: true - attribute :instance, Instance, collection: true - attribute :attribute_link, AttributeLink, collection: true - attribute :message_instance, MessageInstance, collection: true - attribute :interaction, Interaction, collection: true - attribute :message, Message, collection: true - attribute :state_machine, StateMachine, collection: true - attribute :guard, Guard, collection: true - attribute :state_vertex, StateVertex, collection: true - attribute :transition, Transition, collection: true - attribute :event, Event, collection: true - attribute :partition, Partition, collection: true - attribute :collaboration, Collaboration, collection: true - attribute :classifier, Classifier, collection: true - attribute :association, Association, collection: true - attribute :stereotype, Stereotype, collection: true - attribute :package, Package, collection: true - attribute :signal, Signal, collection: true - attribute :node, Node, collection: true - attribute :component, Component, collection: true - attribute :interface, Interface, collection: true - attribute :class, Class, collection: true - attribute :data_type, DataType, collection: true - attribute :subsystem, Subsystem, collection: true - attribute :classifier_role, ClassifierRole, collection: true - attribute :actor, Actor, collection: true - attribute :use_case, UseCase, collection: true - attribute :classifier_in_state, ClassifierInState, collection: true - attribute :association_class, AssociationClass, collection: true - attribute :enumeration, Enumeration, collection: true - attribute :primitive, Primitive, collection: true - attribute :structure, Structure, collection: true - attribute :association_role, AssociationRole, collection: true - attribute :model, Model, collection: true - attribute :exception, Exception, collection: true - attribute :structural_feature, StructuralFeature, collection: true - attribute :behavioral_feature, BehavioralFeature, collection: true - attribute :attribute, Attribute, collection: true - attribute :operation, Operation, collection: true - attribute :method, Method, collection: true - attribute :reception, Reception, collection: true - attribute :refinement, Refinement, collection: true - attribute :usage, Usage, collection: true - attribute :trace, Trace, collection: true - attribute :binding, Binding, collection: true - attribute :association_end_role, AssociationEndRole, collection: true - attribute :create_action, CreateAction, collection: true - attribute :call_action, CallAction, collection: true - attribute :local_invocation, LocalInvocation, collection: true - attribute :return_action, ReturnAction, collection: true - attribute :send_action, SendAction, collection: true - attribute :uninterpreted_action, UninterpretedAction, collection: true - attribute :terminate_action, TerminateAction, collection: true - attribute :destroy_action, DestroyAction, collection: true - attribute :link_object, LinkObject, collection: true - attribute :object, Object, collection: true - attribute :data_value, DataValue, collection: true - attribute :use_case_instance, UseCaseInstance, collection: true - attribute :activity_model, ActivityModel, collection: true - attribute :pseudo_state, PseudoState, collection: true - attribute :state, State, collection: true - attribute :composite_state, CompositeState, collection: true - attribute :simple_state, SimpleState, collection: true - attribute :submachine_state, SubmachineState, collection: true - attribute :action_state, ActionState, collection: true - attribute :object_flow_state, ObjectFlowState, collection: true - attribute :activity_state, ActivityState, collection: true - attribute :signal_event, SignalEvent, collection: true - attribute :call_event, CallEvent, collection: true - attribute :time_event, TimeEvent, collection: true - attribute :change_event, ChangeEvent, collection: true +require_relative "action" +require_relative "action_sequence" +require_relative "action_state" +require_relative "activity_model" +require_relative "activity_state" +require_relative "actor" +require_relative "association" +require_relative "association_class" +require_relative "association_end" +require_relative "association_end_role" +require_relative "association_role" +require_relative "attribute" +require_relative "attribute_link" +require_relative "behavioral_feature" +require_relative "binding" +require_relative "call_action" +require_relative "call_event" +require_relative "change_event" +require_relative "class" +require_relative "classifier" +require_relative "classifier_in_state" +require_relative "classifier_role" +require_relative "collaboration" +require_relative "comment" +require_relative "component" +require_relative "composite_state" +require_relative "constraint" +require_relative "create_action" +require_relative "data_type" +require_relative "data_value" +require_relative "dependency" +require_relative "destroy_action" +require_relative "enumeration" +require_relative "event" +require_relative "exception" +require_relative "feature" +require_relative "generalizable_element" +require_relative "generalization" +require_relative "guard" +require_relative "instance" +require_relative "interaction" +require_relative "interface" +require_relative "link" +require_relative "link_end" +require_relative "link_object" +require_relative "local_invocation" +require_relative "message" +require_relative "message_instance" +require_relative "method" +require_relative "model" +require_relative "model_element" +require_relative "namespace" +require_relative "node" +require_relative "object" +require_relative "object_flow_state" +require_relative "operation" +require_relative "package" +require_relative "parameter" +require_relative "partition" +require_relative "primitive" +require_relative "pseudo_state" +require_relative "reception" +require_relative "refinement" +require_relative "request" +require_relative "return_action" +require_relative "send_action" +require_relative "signal" +require_relative "signal_event" +require_relative "simple_state" +require_relative "state" +require_relative "state_machine" +require_relative "state_vertex" +require_relative "stereotype" +require_relative "structural_feature" +require_relative "structure" +require_relative "submachine_state" +require_relative "subsystem" +require_relative "terminate_action" +require_relative "time_event" +require_relative "trace" +require_relative "transition" +require_relative "uninterpreted_action" +require_relative "usage" +require_relative "use_case" +require_relative "use_case_instance" - xml do - root 'Namespace.ownedElement' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class NamespaceownedElement < Shale::Mapper + attribute :model_element, ModelElement, collection: true + attribute :comment, Comment, collection: true + attribute :namespace, Namespace, collection: true + attribute :generalizable_element, GeneralizableElement, collection: true + attribute :feature, Feature, collection: true + attribute :parameter, Parameter, collection: true + attribute :constraint, Constraint, collection: true + attribute :dependency, Dependency, collection: true + attribute :generalization, Generalization, collection: true + attribute :association_end, AssociationEnd, collection: true + attribute :request, Request, collection: true + attribute :action_sequence, ActionSequence, collection: true + attribute :action, Action, collection: true + attribute :link, Link, collection: true + attribute :link_end, LinkEnd, collection: true + attribute :instance, Instance, collection: true + attribute :attribute_link, AttributeLink, collection: true + attribute :message_instance, MessageInstance, collection: true + attribute :interaction, Interaction, collection: true + attribute :message, Message, collection: true + attribute :state_machine, StateMachine, collection: true + attribute :guard, Guard, collection: true + attribute :state_vertex, StateVertex, collection: true + attribute :transition, Transition, collection: true + attribute :event, Event, collection: true + attribute :partition, Partition, collection: true + attribute :collaboration, Collaboration, collection: true + attribute :classifier, Classifier, collection: true + attribute :association, Association, collection: true + attribute :stereotype, Stereotype, collection: true + attribute :package, Package, collection: true + attribute :signal, Signal, collection: true + attribute :node, Node, collection: true + attribute :component, Component, collection: true + attribute :interface, Interface, collection: true + attribute :class, Class, collection: true + attribute :data_type, DataType, collection: true + attribute :subsystem, Subsystem, collection: true + attribute :classifier_role, ClassifierRole, collection: true + attribute :actor, Actor, collection: true + attribute :use_case, UseCase, collection: true + attribute :classifier_in_state, ClassifierInState, collection: true + attribute :association_class, AssociationClass, collection: true + attribute :enumeration, Enumeration, collection: true + attribute :primitive, Primitive, collection: true + attribute :structure, Structure, collection: true + attribute :association_role, AssociationRole, collection: true + attribute :model, Model, collection: true + attribute :exception, Exception, collection: true + attribute :structural_feature, StructuralFeature, collection: true + attribute :behavioral_feature, BehavioralFeature, collection: true + attribute :attribute, Attribute, collection: true + attribute :operation, Operation, collection: true + attribute :method, Method, collection: true + attribute :reception, Reception, collection: true + attribute :refinement, Refinement, collection: true + attribute :usage, Usage, collection: true + attribute :trace, Trace, collection: true + attribute :binding, Binding, collection: true + attribute :association_end_role, AssociationEndRole, collection: true + attribute :create_action, CreateAction, collection: true + attribute :call_action, CallAction, collection: true + attribute :local_invocation, LocalInvocation, collection: true + attribute :return_action, ReturnAction, collection: true + attribute :send_action, SendAction, collection: true + attribute :uninterpreted_action, UninterpretedAction, collection: true + attribute :terminate_action, TerminateAction, collection: true + attribute :destroy_action, DestroyAction, collection: true + attribute :link_object, LinkObject, collection: true + attribute :object, Object, collection: true + attribute :data_value, DataValue, collection: true + attribute :use_case_instance, UseCaseInstance, collection: true + attribute :activity_model, ActivityModel, collection: true + attribute :pseudo_state, PseudoState, collection: true + attribute :state, State, collection: true + attribute :composite_state, CompositeState, collection: true + attribute :simple_state, SimpleState, collection: true + attribute :submachine_state, SubmachineState, collection: true + attribute :action_state, ActionState, collection: true + attribute :object_flow_state, ObjectFlowState, collection: true + attribute :activity_state, ActivityState, collection: true + attribute :signal_event, SignalEvent, collection: true + attribute :call_event, CallEvent, collection: true + attribute :time_event, TimeEvent, collection: true + attribute :change_event, ChangeEvent, collection: true - map_element 'ModelElement', to: :model_element - map_element 'Comment', to: :comment - map_element 'Namespace', to: :namespace - map_element 'GeneralizableElement', to: :generalizable_element - map_element 'Feature', to: :feature - map_element 'Parameter', to: :parameter - map_element 'Constraint', to: :constraint - map_element 'Dependency', to: :dependency - map_element 'Generalization', to: :generalization - map_element 'AssociationEnd', to: :association_end - map_element 'Request', to: :request - map_element 'ActionSequence', to: :action_sequence - map_element 'Action', to: :action - map_element 'Link', to: :link - map_element 'LinkEnd', to: :link_end - map_element 'Instance', to: :instance - map_element 'AttributeLink', to: :attribute_link - map_element 'MessageInstance', to: :message_instance - map_element 'Interaction', to: :interaction - map_element 'Message', to: :message - map_element 'StateMachine', to: :state_machine - map_element 'Guard', to: :guard - map_element 'StateVertex', to: :state_vertex - map_element 'Transition', to: :transition - map_element 'Event', to: :event - map_element 'Partition', to: :partition - map_element 'Collaboration', to: :collaboration - map_element 'Classifier', to: :classifier - map_element 'Association', to: :association - map_element 'Stereotype', to: :stereotype - map_element 'Package', to: :package - map_element 'Signal', to: :signal - map_element 'Node', to: :node - map_element 'Component', to: :component - map_element 'Interface', to: :interface - map_element 'Class', to: :class - map_element 'DataType', to: :data_type - map_element 'Subsystem', to: :subsystem - map_element 'ClassifierRole', to: :classifier_role - map_element 'Actor', to: :actor - map_element 'UseCase', to: :use_case - map_element 'ClassifierInState', to: :classifier_in_state - map_element 'AssociationClass', to: :association_class - map_element 'Enumeration', to: :enumeration - map_element 'Primitive', to: :primitive - map_element 'Structure', to: :structure - map_element 'AssociationRole', to: :association_role - map_element 'Model', to: :model - map_element 'Exception', to: :exception - map_element 'StructuralFeature', to: :structural_feature - map_element 'BehavioralFeature', to: :behavioral_feature - map_element 'Attribute', to: :attribute - map_element 'Operation', to: :operation - map_element 'Method', to: :method - map_element 'Reception', to: :reception - map_element 'Refinement', to: :refinement - map_element 'Usage', to: :usage - map_element 'Trace', to: :trace - map_element 'Binding', to: :binding - map_element 'AssociationEndRole', to: :association_end_role - map_element 'CreateAction', to: :create_action - map_element 'CallAction', to: :call_action - map_element 'LocalInvocation', to: :local_invocation - map_element 'ReturnAction', to: :return_action - map_element 'SendAction', to: :send_action - map_element 'UninterpretedAction', to: :uninterpreted_action - map_element 'TerminateAction', to: :terminate_action - map_element 'DestroyAction', to: :destroy_action - map_element 'LinkObject', to: :link_object - map_element 'Object', to: :object - map_element 'DataValue', to: :data_value - map_element 'UseCaseInstance', to: :use_case_instance - map_element 'ActivityModel', to: :activity_model - map_element 'PseudoState', to: :pseudo_state - map_element 'State', to: :state - map_element 'CompositeState', to: :composite_state - map_element 'SimpleState', to: :simple_state - map_element 'SubmachineState', to: :submachine_state - map_element 'ActionState', to: :action_state - map_element 'ObjectFlowState', to: :object_flow_state - map_element 'ActivityState', to: :activity_state - map_element 'SignalEvent', to: :signal_event - map_element 'CallEvent', to: :call_event - map_element 'TimeEvent', to: :time_event - map_element 'ChangeEvent', to: :change_event + xml do + root "Namespace.ownedElement" + namespace "omg.org/UML1.3", "UML" + + map_element "ModelElement", to: :model_element + map_element "Comment", to: :comment + map_element "Namespace", to: :namespace + map_element "GeneralizableElement", to: :generalizable_element + map_element "Feature", to: :feature + map_element "Parameter", to: :parameter + map_element "Constraint", to: :constraint + map_element "Dependency", to: :dependency + map_element "Generalization", to: :generalization + map_element "AssociationEnd", to: :association_end + map_element "Request", to: :request + map_element "ActionSequence", to: :action_sequence + map_element "Action", to: :action + map_element "Link", to: :link + map_element "LinkEnd", to: :link_end + map_element "Instance", to: :instance + map_element "AttributeLink", to: :attribute_link + map_element "MessageInstance", to: :message_instance + map_element "Interaction", to: :interaction + map_element "Message", to: :message + map_element "StateMachine", to: :state_machine + map_element "Guard", to: :guard + map_element "StateVertex", to: :state_vertex + map_element "Transition", to: :transition + map_element "Event", to: :event + map_element "Partition", to: :partition + map_element "Collaboration", to: :collaboration + map_element "Classifier", to: :classifier + map_element "Association", to: :association + map_element "Stereotype", to: :stereotype + map_element "Package", to: :package + map_element "Signal", to: :signal + map_element "Node", to: :node + map_element "Component", to: :component + map_element "Interface", to: :interface + map_element "Class", to: :class + map_element "DataType", to: :data_type + map_element "Subsystem", to: :subsystem + map_element "ClassifierRole", to: :classifier_role + map_element "Actor", to: :actor + map_element "UseCase", to: :use_case + map_element "ClassifierInState", to: :classifier_in_state + map_element "AssociationClass", to: :association_class + map_element "Enumeration", to: :enumeration + map_element "Primitive", to: :primitive + map_element "Structure", to: :structure + map_element "AssociationRole", to: :association_role + map_element "Model", to: :model + map_element "Exception", to: :exception + map_element "StructuralFeature", to: :structural_feature + map_element "BehavioralFeature", to: :behavioral_feature + map_element "Attribute", to: :attribute + map_element "Operation", to: :operation + map_element "Method", to: :method + map_element "Reception", to: :reception + map_element "Refinement", to: :refinement + map_element "Usage", to: :usage + map_element "Trace", to: :trace + map_element "Binding", to: :binding + map_element "AssociationEndRole", to: :association_end_role + map_element "CreateAction", to: :create_action + map_element "CallAction", to: :call_action + map_element "LocalInvocation", to: :local_invocation + map_element "ReturnAction", to: :return_action + map_element "SendAction", to: :send_action + map_element "UninterpretedAction", to: :uninterpreted_action + map_element "TerminateAction", to: :terminate_action + map_element "DestroyAction", to: :destroy_action + map_element "LinkObject", to: :link_object + map_element "Object", to: :object + map_element "DataValue", to: :data_value + map_element "UseCaseInstance", to: :use_case_instance + map_element "ActivityModel", to: :activity_model + map_element "PseudoState", to: :pseudo_state + map_element "State", to: :state + map_element "CompositeState", to: :composite_state + map_element "SimpleState", to: :simple_state + map_element "SubmachineState", to: :submachine_state + map_element "ActionState", to: :action_state + map_element "ObjectFlowState", to: :object_flow_state + map_element "ActivityState", to: :activity_state + map_element "SignalEvent", to: :signal_event + map_element "CallEvent", to: :call_event + map_element "TimeEvent", to: :time_event + map_element "ChangeEvent", to: :change_event + end + end end end diff --git a/lib/xmi/uml13/node.rb b/lib/xmi/uml13/node.rb index 2c32c9e..3309d16 100644 --- a/lib/xmi/uml13/node.rb +++ b/lib/xmi/uml13/node.rb @@ -1,197 +1,203 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'classifierassociation_end' -require_relative 'classifierclassifier_in_state' -require_relative 'classifierclassifier_role' -require_relative 'classifiercreate_action' -require_relative 'classifierfeature' -require_relative 'classifierinstance' -require_relative 'classifierparameter' -require_relative 'classifierparticipant' -require_relative 'classifierrealization' -require_relative 'classifierspecification' -require_relative 'classifierstructural_feature' -require_relative 'generalizable_elementgeneralization' -require_relative 'generalizable_elementis_abstract' -require_relative 'generalizable_elementis_leaf' -require_relative 'generalizable_elementis_root' -require_relative 'generalizable_elementspecialization' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'namespaceowned_element' -require_relative 'nodecomponent' -require_relative 'xm_iextension' +require "shale" -class Node < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :is_root, Shale::Type::String - attribute :is_leaf, Shale::Type::String - attribute :is_abstract, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :model_element_collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :generalization, Shale::Type::Value - attribute :specialization, Shale::Type::Value - attribute :parameter, Shale::Type::Value - attribute :structural_feature, Shale::Type::Value - attribute :specification, Shale::Type::Value - attribute :realization, Shale::Type::Value - attribute :association_end, Shale::Type::Value - attribute :participant, Shale::Type::Value - attribute :create_action, Shale::Type::Value - attribute :instance, Shale::Type::Value - attribute :classifier_collaboration, Shale::Type::Value - attribute :classifier_role, Shale::Type::Value - attribute :classifier_in_state, Shale::Type::Value - attribute :component, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :generalizable_element_is_root, GeneralizableElementisRoot, collection: true - attribute :generalizable_element_is_leaf, GeneralizableElementisLeaf, collection: true - attribute :generalizable_element_is_abstract, GeneralizableElementisAbstract, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :generalizable_element_generalization, GeneralizableElementgeneralization, collection: true - attribute :generalizable_element_specialization, GeneralizableElementspecialization, collection: true - attribute :classifier_parameter, Classifierparameter, collection: true - attribute :classifier_structural_feature, ClassifierstructuralFeature, collection: true - attribute :classifier_specification, Classifierspecification, collection: true - attribute :classifier_realization, Classifierrealization, collection: true - attribute :classifier_association_end, ClassifierassociationEnd, collection: true - attribute :classifier_participant, Classifierparticipant, collection: true - attribute :classifier_create_action, ClassifiercreateAction, collection: true - attribute :classifier_instance, Classifierinstance, collection: true - attribute :classifier_classifier_role, ClassifierclassifierRole, collection: true - attribute :classifier_classifier_in_state, ClassifierclassifierInState, collection: true - attribute :node_component, Nodecomponent, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :namespace_owned_element, NamespaceownedElement, collection: true - attribute :classifier_feature, Classifierfeature, collection: true +require_relative "classifierassociation_end" +require_relative "classifierclassifier_in_state" +require_relative "classifierclassifier_role" +require_relative "classifiercreate_action" +require_relative "classifierfeature" +require_relative "classifierinstance" +require_relative "classifierparameter" +require_relative "classifierparticipant" +require_relative "classifierrealization" +require_relative "classifierspecification" +require_relative "classifierstructural_feature" +require_relative "generalizable_elementgeneralization" +require_relative "generalizable_elementis_abstract" +require_relative "generalizable_elementis_leaf" +require_relative "generalizable_elementis_root" +require_relative "generalizable_elementspecialization" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "namespaceowned_element" +require_relative "nodecomponent" +require_relative "xm_iextension" - xml do - root 'Node' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Node < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :is_root, Shale::Type::String + attribute :is_leaf, Shale::Type::String + attribute :is_abstract, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :model_element_collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :generalization, Shale::Type::Value + attribute :specialization, Shale::Type::Value + attribute :parameter, Shale::Type::Value + attribute :structural_feature, Shale::Type::Value + attribute :specification, Shale::Type::Value + attribute :realization, Shale::Type::Value + attribute :association_end, Shale::Type::Value + attribute :participant, Shale::Type::Value + attribute :create_action, Shale::Type::Value + attribute :instance, Shale::Type::Value + attribute :classifier_collaboration, Shale::Type::Value + attribute :classifier_role, Shale::Type::Value + attribute :classifier_in_state, Shale::Type::Value + attribute :component, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :generalizable_element_is_root, GeneralizableElementisRoot, collection: true + attribute :generalizable_element_is_leaf, GeneralizableElementisLeaf, collection: true + attribute :generalizable_element_is_abstract, GeneralizableElementisAbstract, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :generalizable_element_generalization, GeneralizableElementgeneralization, collection: true + attribute :generalizable_element_specialization, GeneralizableElementspecialization, collection: true + attribute :classifier_parameter, Classifierparameter, collection: true + attribute :classifier_structural_feature, ClassifierstructuralFeature, collection: true + attribute :classifier_specification, Classifierspecification, collection: true + attribute :classifier_realization, Classifierrealization, collection: true + attribute :classifier_association_end, ClassifierassociationEnd, collection: true + attribute :classifier_participant, Classifierparticipant, collection: true + attribute :classifier_create_action, ClassifiercreateAction, collection: true + attribute :classifier_instance, Classifierinstance, collection: true + attribute :classifier_classifier_role, ClassifierclassifierRole, collection: true + attribute :classifier_classifier_in_state, ClassifierclassifierInState, collection: true + attribute :node_component, Nodecomponent, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :namespace_owned_element, NamespaceownedElement, collection: true + attribute :classifier_feature, Classifierfeature, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'isRoot', to: :is_root - map_attribute 'isLeaf', to: :is_leaf - map_attribute 'isAbstract', to: :is_abstract - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'ModelElement.collaboration', to: :model_element_collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'generalization', to: :generalization - map_attribute 'specialization', to: :specialization - map_attribute 'parameter', to: :parameter - map_attribute 'structuralFeature', to: :structural_feature - map_attribute 'specification', to: :specification - map_attribute 'realization', to: :realization - map_attribute 'associationEnd', to: :association_end - map_attribute 'participant', to: :participant - map_attribute 'createAction', to: :create_action - map_attribute 'instance', to: :instance - map_attribute 'Classifier.collaboration', to: :classifier_collaboration - map_attribute 'classifierRole', to: :classifier_role - map_attribute 'classifierInState', to: :classifier_in_state - map_attribute 'component', to: :component - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'GeneralizableElement.isRoot', to: :generalizable_element_is_root - map_element 'GeneralizableElement.isLeaf', to: :generalizable_element_is_leaf - map_element 'GeneralizableElement.isAbstract', to: :generalizable_element_is_abstract - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'GeneralizableElement.generalization', to: :generalizable_element_generalization - map_element 'GeneralizableElement.specialization', to: :generalizable_element_specialization - map_element 'Classifier.parameter', to: :classifier_parameter - map_element 'Classifier.structuralFeature', to: :classifier_structural_feature - map_element 'Classifier.specification', to: :classifier_specification - map_element 'Classifier.realization', to: :classifier_realization - map_element 'Classifier.associationEnd', to: :classifier_association_end - map_element 'Classifier.participant', to: :classifier_participant - map_element 'Classifier.createAction', to: :classifier_create_action - map_element 'Classifier.instance', to: :classifier_instance - map_element 'Classifier.classifierRole', to: :classifier_classifier_role - map_element 'Classifier.classifierInState', to: :classifier_classifier_in_state - map_element 'Node.component', to: :node_component - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Namespace.ownedElement', to: :namespace_owned_element - map_element 'Classifier.feature', to: :classifier_feature + xml do + root "Node" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "isRoot", to: :is_root + map_attribute "isLeaf", to: :is_leaf + map_attribute "isAbstract", to: :is_abstract + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "ModelElement.collaboration", to: :model_element_collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "generalization", to: :generalization + map_attribute "specialization", to: :specialization + map_attribute "parameter", to: :parameter + map_attribute "structuralFeature", to: :structural_feature + map_attribute "specification", to: :specification + map_attribute "realization", to: :realization + map_attribute "associationEnd", to: :association_end + map_attribute "participant", to: :participant + map_attribute "createAction", to: :create_action + map_attribute "instance", to: :instance + map_attribute "Classifier.collaboration", to: :classifier_collaboration + map_attribute "classifierRole", to: :classifier_role + map_attribute "classifierInState", to: :classifier_in_state + map_attribute "component", to: :component + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "GeneralizableElement.isRoot", to: :generalizable_element_is_root + map_element "GeneralizableElement.isLeaf", to: :generalizable_element_is_leaf + map_element "GeneralizableElement.isAbstract", to: :generalizable_element_is_abstract + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "GeneralizableElement.generalization", to: :generalizable_element_generalization + map_element "GeneralizableElement.specialization", to: :generalizable_element_specialization + map_element "Classifier.parameter", to: :classifier_parameter + map_element "Classifier.structuralFeature", to: :classifier_structural_feature + map_element "Classifier.specification", to: :classifier_specification + map_element "Classifier.realization", to: :classifier_realization + map_element "Classifier.associationEnd", to: :classifier_association_end + map_element "Classifier.participant", to: :classifier_participant + map_element "Classifier.createAction", to: :classifier_create_action + map_element "Classifier.instance", to: :classifier_instance + map_element "Classifier.classifierRole", to: :classifier_classifier_role + map_element "Classifier.classifierInState", to: :classifier_classifier_in_state + map_element "Node.component", to: :node_component + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Namespace.ownedElement", to: :namespace_owned_element + map_element "Classifier.feature", to: :classifier_feature + end + end end end diff --git a/lib/xmi/uml13/nodecomponent.rb b/lib/xmi/uml13/nodecomponent.rb index c57dd10..8e9d415 100644 --- a/lib/xmi/uml13/nodecomponent.rb +++ b/lib/xmi/uml13/nodecomponent.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'component' +require "shale" -class Nodecomponent < Shale::Mapper - attribute :component, Component, collection: true +require_relative "component" - xml do - root 'Node.component' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Nodecomponent < Shale::Mapper + attribute :component, Component, collection: true - map_element 'Component', to: :component + xml do + root "Node.component" + namespace "omg.org/UML1.3", "UML" + + map_element "Component", to: :component + end + end end end diff --git a/lib/xmi/uml13/object.rb b/lib/xmi/uml13/object.rb index 0b1ddda..ecd6af3 100644 --- a/lib/xmi/uml13/object.rb +++ b/lib/xmi/uml13/object.rb @@ -1,145 +1,151 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'instanceattribute_link' -require_relative 'instanceclassifier' -require_relative 'instancelink_end' -require_relative 'instancemessage_instance' -require_relative 'instancemessage_instance2' -require_relative 'instancemessage_instance3' -require_relative 'instanceslot' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'xm_iextension' +require "shale" -class Object < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :link_end, Shale::Type::Value - attribute :message_instance3, Shale::Type::Value - attribute :message_instance2, Shale::Type::Value - attribute :message_instance, Shale::Type::Value - attribute :attribute_link, Shale::Type::Value - attribute :classifier, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :instance_link_end, InstancelinkEnd, collection: true - attribute :instance_message_instance3, InstancemessageInstance3, collection: true - attribute :instance_message_instance2, InstancemessageInstance2, collection: true - attribute :instance_message_instance, InstancemessageInstance, collection: true - attribute :instance_attribute_link, InstanceattributeLink, collection: true - attribute :instance_classifier, Instanceclassifier, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :instance_slot, Instanceslot, collection: true +require_relative "instanceattribute_link" +require_relative "instanceclassifier" +require_relative "instancelink_end" +require_relative "instancemessage_instance" +require_relative "instancemessage_instance2" +require_relative "instancemessage_instance3" +require_relative "instanceslot" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "xm_iextension" - xml do - root 'Object' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Object < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :link_end, Shale::Type::Value + attribute :message_instance3, Shale::Type::Value + attribute :message_instance2, Shale::Type::Value + attribute :message_instance, Shale::Type::Value + attribute :attribute_link, Shale::Type::Value + attribute :classifier, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :instance_link_end, InstancelinkEnd, collection: true + attribute :instance_message_instance3, InstancemessageInstance3, collection: true + attribute :instance_message_instance2, InstancemessageInstance2, collection: true + attribute :instance_message_instance, InstancemessageInstance, collection: true + attribute :instance_attribute_link, InstanceattributeLink, collection: true + attribute :instance_classifier, Instanceclassifier, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :instance_slot, Instanceslot, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'linkEnd', to: :link_end - map_attribute 'messageInstance3', to: :message_instance3 - map_attribute 'messageInstance2', to: :message_instance2 - map_attribute 'messageInstance', to: :message_instance - map_attribute 'attributeLink', to: :attribute_link - map_attribute 'classifier', to: :classifier - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'Instance.linkEnd', to: :instance_link_end - map_element 'Instance.messageInstance3', to: :instance_message_instance3 - map_element 'Instance.messageInstance2', to: :instance_message_instance2 - map_element 'Instance.messageInstance', to: :instance_message_instance - map_element 'Instance.attributeLink', to: :instance_attribute_link - map_element 'Instance.classifier', to: :instance_classifier - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Instance.slot', to: :instance_slot + xml do + root "Object" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "linkEnd", to: :link_end + map_attribute "messageInstance3", to: :message_instance3 + map_attribute "messageInstance2", to: :message_instance2 + map_attribute "messageInstance", to: :message_instance + map_attribute "attributeLink", to: :attribute_link + map_attribute "classifier", to: :classifier + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "Instance.linkEnd", to: :instance_link_end + map_element "Instance.messageInstance3", to: :instance_message_instance3 + map_element "Instance.messageInstance2", to: :instance_message_instance2 + map_element "Instance.messageInstance", to: :instance_message_instance + map_element "Instance.attributeLink", to: :instance_attribute_link + map_element "Instance.classifier", to: :instance_classifier + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Instance.slot", to: :instance_slot + end + end end end diff --git a/lib/xmi/uml13/object_flow_state.rb b/lib/xmi/uml13/object_flow_state.rb index 50844f1..5c3bd9c 100644 --- a/lib/xmi/uml13/object_flow_state.rb +++ b/lib/xmi/uml13/object_flow_state.rb @@ -1,156 +1,162 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'object_flow_statetype_state' -require_relative 'state_vertexincoming' -require_relative 'state_vertexoutgoing' -require_relative 'state_vertexparent' -require_relative 'stateclassifier_in_state' -require_relative 'statedeferred_event' -require_relative 'stateentry' -require_relative 'stateexit' -require_relative 'stateinternal_transition' -require_relative 'statestate_machine' -require_relative 'xm_iextension' +require "shale" -class ObjectFlowState < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :outgoing, Shale::Type::Value - attribute :incoming, Shale::Type::Value - attribute :parent, Shale::Type::Value - attribute :state_machine, Shale::Type::Value - attribute :deferred_event, Shale::Type::Value - attribute :classifier_in_state, Shale::Type::Value - attribute :type_state, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :state_vertex_outgoing, StateVertexoutgoing, collection: true - attribute :state_vertex_incoming, StateVertexincoming, collection: true - attribute :state_vertex_parent, StateVertexparent, collection: true - attribute :state_state_machine, StatestateMachine, collection: true - attribute :state_deferred_event, StatedeferredEvent, collection: true - attribute :state_classifier_in_state, StateclassifierInState, collection: true - attribute :object_flow_state_type_state, ObjectFlowStatetypeState, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :state_internal_transition, StateinternalTransition, collection: true - attribute :state_entry, Stateentry, collection: true - attribute :state_exit, Stateexit, collection: true +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "object_flow_statetype_state" +require_relative "state_vertexincoming" +require_relative "state_vertexoutgoing" +require_relative "state_vertexparent" +require_relative "stateclassifier_in_state" +require_relative "statedeferred_event" +require_relative "stateentry" +require_relative "stateexit" +require_relative "stateinternal_transition" +require_relative "statestate_machine" +require_relative "xm_iextension" - xml do - root 'ObjectFlowState' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ObjectFlowState < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :outgoing, Shale::Type::Value + attribute :incoming, Shale::Type::Value + attribute :parent, Shale::Type::Value + attribute :state_machine, Shale::Type::Value + attribute :deferred_event, Shale::Type::Value + attribute :classifier_in_state, Shale::Type::Value + attribute :type_state, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :state_vertex_outgoing, StateVertexoutgoing, collection: true + attribute :state_vertex_incoming, StateVertexincoming, collection: true + attribute :state_vertex_parent, StateVertexparent, collection: true + attribute :state_state_machine, StatestateMachine, collection: true + attribute :state_deferred_event, StatedeferredEvent, collection: true + attribute :state_classifier_in_state, StateclassifierInState, collection: true + attribute :object_flow_state_type_state, ObjectFlowStatetypeState, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :state_internal_transition, StateinternalTransition, collection: true + attribute :state_entry, Stateentry, collection: true + attribute :state_exit, Stateexit, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'outgoing', to: :outgoing - map_attribute 'incoming', to: :incoming - map_attribute 'parent', to: :parent - map_attribute 'stateMachine', to: :state_machine - map_attribute 'deferredEvent', to: :deferred_event - map_attribute 'classifierInState', to: :classifier_in_state - map_attribute 'typeState', to: :type_state - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'StateVertex.outgoing', to: :state_vertex_outgoing - map_element 'StateVertex.incoming', to: :state_vertex_incoming - map_element 'StateVertex.parent', to: :state_vertex_parent - map_element 'State.stateMachine', to: :state_state_machine - map_element 'State.deferredEvent', to: :state_deferred_event - map_element 'State.classifierInState', to: :state_classifier_in_state - map_element 'ObjectFlowState.typeState', to: :object_flow_state_type_state - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'State.internalTransition', to: :state_internal_transition - map_element 'State.entry', to: :state_entry - map_element 'State.exit', to: :state_exit + xml do + root "ObjectFlowState" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "outgoing", to: :outgoing + map_attribute "incoming", to: :incoming + map_attribute "parent", to: :parent + map_attribute "stateMachine", to: :state_machine + map_attribute "deferredEvent", to: :deferred_event + map_attribute "classifierInState", to: :classifier_in_state + map_attribute "typeState", to: :type_state + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "StateVertex.outgoing", to: :state_vertex_outgoing + map_element "StateVertex.incoming", to: :state_vertex_incoming + map_element "StateVertex.parent", to: :state_vertex_parent + map_element "State.stateMachine", to: :state_state_machine + map_element "State.deferredEvent", to: :state_deferred_event + map_element "State.classifierInState", to: :state_classifier_in_state + map_element "ObjectFlowState.typeState", to: :object_flow_state_type_state + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "State.internalTransition", to: :state_internal_transition + map_element "State.entry", to: :state_entry + map_element "State.exit", to: :state_exit + end + end end end diff --git a/lib/xmi/uml13/object_flow_statetype_state.rb b/lib/xmi/uml13/object_flow_statetype_state.rb index 05cfc69..d914892 100644 --- a/lib/xmi/uml13/object_flow_statetype_state.rb +++ b/lib/xmi/uml13/object_flow_statetype_state.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'classifier_in_state' +require "shale" -class ObjectFlowStatetypeState < Shale::Mapper - attribute :classifier_in_state, ClassifierInState, collection: true +require_relative "classifier_in_state" - xml do - root 'ObjectFlowState.typeState' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ObjectFlowStatetypeState < Shale::Mapper + attribute :classifier_in_state, ClassifierInState, collection: true - map_element 'ClassifierInState', to: :classifier_in_state + xml do + root "ObjectFlowState.typeState" + namespace "omg.org/UML1.3", "UML" + + map_element "ClassifierInState", to: :classifier_in_state + end + end end end diff --git a/lib/xmi/uml13/object_set_expression.rb b/lib/xmi/uml13/object_set_expression.rb index da996fb..3b28f11 100644 --- a/lib/xmi/uml13/object_set_expression.rb +++ b/lib/xmi/uml13/object_set_expression.rb @@ -1,34 +1,40 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'expressionbody' -require_relative 'expressionlanguage' -require_relative 'xm_iextension' +require "shale" -class ObjectSetExpression < Shale::Mapper - attribute :language, Shale::Type::Value - attribute :body, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :expression_language, Expressionlanguage, collection: true - attribute :expression_body, Expressionbody, collection: true - attribute :xmi_extension, XMIextension, collection: true +require_relative "expressionbody" +require_relative "expressionlanguage" +require_relative "xm_iextension" - xml do - root 'ObjectSetExpression' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ObjectSetExpression < Shale::Mapper + attribute :language, Shale::Type::Value + attribute :body, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :expression_language, Expressionlanguage, collection: true + attribute :expression_body, Expressionbody, collection: true + attribute :xmi_extension, XMIextension, collection: true - map_attribute 'language', to: :language - map_attribute 'body', to: :body - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'Expression.language', to: :expression_language - map_element 'Expression.body', to: :expression_body - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil + xml do + root "ObjectSetExpression" + namespace "omg.org/UML1.3", "UML" + + map_attribute "language", to: :language + map_attribute "body", to: :body + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "Expression.language", to: :expression_language + map_element "Expression.body", to: :expression_body + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + end + end end end diff --git a/lib/xmi/uml13/operation.rb b/lib/xmi/uml13/operation.rb index 46c5e4f..cccfe48 100644 --- a/lib/xmi/uml13/operation.rb +++ b/lib/xmi/uml13/operation.rb @@ -1,174 +1,180 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'behavioral_featureis_query' -require_relative 'behavioral_featureparameter' -require_relative 'behavioral_featureraised_exception' -require_relative 'featureclassifier_role' -require_relative 'featureowner' -require_relative 'featureowner_scope' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'operationconcurrency' -require_relative 'operationis_polymorphic' -require_relative 'operationmethod' -require_relative 'operationoccurrence' -require_relative 'operationspecification' -require_relative 'requestaction' -require_relative 'requestmessage_instance' -require_relative 'xm_iextension' +require "shale" -class Operation < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :owner_scope, Shale::Type::String - attribute :is_query, Shale::Type::String - attribute :specification, Shale::Type::Value - attribute :is_polymorphic, Shale::Type::String - attribute :concurrency, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :model_element_collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :owner, Shale::Type::Value - attribute :classifier_role, Shale::Type::Value - attribute :raised_exception, Shale::Type::Value - attribute :action, Shale::Type::Value - attribute :message_instance, Shale::Type::Value - attribute :method, Shale::Type::Value - attribute :operation_collaboration, Shale::Type::Value - attribute :occurrence, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :feature_owner_scope, FeatureownerScope, collection: true - attribute :behavioral_feature_is_query, BehavioralFeatureisQuery, collection: true - attribute :operation_specification, Operationspecification, collection: true - attribute :operation_is_polymorphic, OperationisPolymorphic, collection: true - attribute :operation_concurrency, Operationconcurrency, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :feature_owner, Featureowner, collection: true - attribute :feature_classifier_role, FeatureclassifierRole, collection: true - attribute :behavioral_feature_raised_exception, BehavioralFeatureraisedException, collection: true - attribute :request_action, Requestaction, collection: true - attribute :request_message_instance, RequestmessageInstance, collection: true - attribute :operation_method, Operationmethod, collection: true - attribute :operation_occurrence, Operationoccurrence, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :behavioral_feature_parameter, BehavioralFeatureparameter, collection: true +require_relative "behavioral_featureis_query" +require_relative "behavioral_featureparameter" +require_relative "behavioral_featureraised_exception" +require_relative "featureclassifier_role" +require_relative "featureowner" +require_relative "featureowner_scope" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "operationconcurrency" +require_relative "operationis_polymorphic" +require_relative "operationmethod" +require_relative "operationoccurrence" +require_relative "operationspecification" +require_relative "requestaction" +require_relative "requestmessage_instance" +require_relative "xm_iextension" - xml do - root 'Operation' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Operation < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :owner_scope, Shale::Type::String + attribute :is_query, Shale::Type::String + attribute :specification, Shale::Type::Value + attribute :is_polymorphic, Shale::Type::String + attribute :concurrency, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :model_element_collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :owner, Shale::Type::Value + attribute :classifier_role, Shale::Type::Value + attribute :raised_exception, Shale::Type::Value + attribute :action, Shale::Type::Value + attribute :message_instance, Shale::Type::Value + attribute :method, Shale::Type::Value + attribute :operation_collaboration, Shale::Type::Value + attribute :occurrence, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :feature_owner_scope, FeatureownerScope, collection: true + attribute :behavioral_feature_is_query, BehavioralFeatureisQuery, collection: true + attribute :operation_specification, Operationspecification, collection: true + attribute :operation_is_polymorphic, OperationisPolymorphic, collection: true + attribute :operation_concurrency, Operationconcurrency, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :feature_owner, Featureowner, collection: true + attribute :feature_classifier_role, FeatureclassifierRole, collection: true + attribute :behavioral_feature_raised_exception, BehavioralFeatureraisedException, collection: true + attribute :request_action, Requestaction, collection: true + attribute :request_message_instance, RequestmessageInstance, collection: true + attribute :operation_method, Operationmethod, collection: true + attribute :operation_occurrence, Operationoccurrence, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :behavioral_feature_parameter, BehavioralFeatureparameter, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'ownerScope', to: :owner_scope - map_attribute 'isQuery', to: :is_query - map_attribute 'specification', to: :specification - map_attribute 'isPolymorphic', to: :is_polymorphic - map_attribute 'concurrency', to: :concurrency - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'ModelElement.collaboration', to: :model_element_collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'owner', to: :owner - map_attribute 'classifierRole', to: :classifier_role - map_attribute 'raisedException', to: :raised_exception - map_attribute 'action', to: :action - map_attribute 'messageInstance', to: :message_instance - map_attribute 'method', to: :method - map_attribute 'Operation.collaboration', to: :operation_collaboration - map_attribute 'occurrence', to: :occurrence - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'Feature.ownerScope', to: :feature_owner_scope - map_element 'BehavioralFeature.isQuery', to: :behavioral_feature_is_query - map_element 'Operation.specification', to: :operation_specification - map_element 'Operation.isPolymorphic', to: :operation_is_polymorphic - map_element 'Operation.concurrency', to: :operation_concurrency - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'Feature.owner', to: :feature_owner - map_element 'Feature.classifierRole', to: :feature_classifier_role - map_element 'BehavioralFeature.raisedException', to: :behavioral_feature_raised_exception - map_element 'Request.action', to: :request_action - map_element 'Request.messageInstance', to: :request_message_instance - map_element 'Operation.method', to: :operation_method - map_element 'Operation.occurrence', to: :operation_occurrence - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'BehavioralFeature.parameter', to: :behavioral_feature_parameter + xml do + root "Operation" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "ownerScope", to: :owner_scope + map_attribute "isQuery", to: :is_query + map_attribute "specification", to: :specification + map_attribute "isPolymorphic", to: :is_polymorphic + map_attribute "concurrency", to: :concurrency + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "ModelElement.collaboration", to: :model_element_collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "owner", to: :owner + map_attribute "classifierRole", to: :classifier_role + map_attribute "raisedException", to: :raised_exception + map_attribute "action", to: :action + map_attribute "messageInstance", to: :message_instance + map_attribute "method", to: :method + map_attribute "Operation.collaboration", to: :operation_collaboration + map_attribute "occurrence", to: :occurrence + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "Feature.ownerScope", to: :feature_owner_scope + map_element "BehavioralFeature.isQuery", to: :behavioral_feature_is_query + map_element "Operation.specification", to: :operation_specification + map_element "Operation.isPolymorphic", to: :operation_is_polymorphic + map_element "Operation.concurrency", to: :operation_concurrency + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "Feature.owner", to: :feature_owner + map_element "Feature.classifierRole", to: :feature_classifier_role + map_element "BehavioralFeature.raisedException", to: :behavioral_feature_raised_exception + map_element "Request.action", to: :request_action + map_element "Request.messageInstance", to: :request_message_instance + map_element "Operation.method", to: :operation_method + map_element "Operation.occurrence", to: :operation_occurrence + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "BehavioralFeature.parameter", to: :behavioral_feature_parameter + end + end end end diff --git a/lib/xmi/uml13/operationcollaboration.rb b/lib/xmi/uml13/operationcollaboration.rb index 708fdf2..abb0872 100644 --- a/lib/xmi/uml13/operationcollaboration.rb +++ b/lib/xmi/uml13/operationcollaboration.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'collaboration' +require "shale" -class Operationcollaboration < Shale::Mapper - attribute :collaboration, Collaboration, collection: true +require_relative "collaboration" - xml do - root 'Operation.collaboration' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Operationcollaboration < Shale::Mapper + attribute :collaboration, Collaboration, collection: true - map_element 'Collaboration', to: :collaboration + xml do + root "Operation.collaboration" + namespace "omg.org/UML1.3", "UML" + + map_element "Collaboration", to: :collaboration + end + end end end diff --git a/lib/xmi/uml13/operationconcurrency.rb b/lib/xmi/uml13/operationconcurrency.rb index d0d2e2f..6359911 100644 --- a/lib/xmi/uml13/operationconcurrency.rb +++ b/lib/xmi/uml13/operationconcurrency.rb @@ -1,12 +1,18 @@ -require 'shale' +# frozen_string_literal: true -class Operationconcurrency < Shale::Mapper - attribute :xmi_value, Shale::Type::String +require "shale" - xml do - root 'Operation.concurrency' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Operationconcurrency < Shale::Mapper + attribute :xmi_value, Shale::Type::String - map_attribute 'xmi.value', to: :xmi_value + xml do + root "Operation.concurrency" + namespace "omg.org/UML1.3", "UML" + + map_attribute "xmi.value", to: :xmi_value + end + end end end diff --git a/lib/xmi/uml13/operationis_polymorphic.rb b/lib/xmi/uml13/operationis_polymorphic.rb index 1e53492..2a93066 100644 --- a/lib/xmi/uml13/operationis_polymorphic.rb +++ b/lib/xmi/uml13/operationis_polymorphic.rb @@ -1,12 +1,18 @@ -require 'shale' +# frozen_string_literal: true -class OperationisPolymorphic < Shale::Mapper - attribute :xmi_value, Shale::Type::String +require "shale" - xml do - root 'Operation.isPolymorphic' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class OperationisPolymorphic < Shale::Mapper + attribute :xmi_value, Shale::Type::String - map_attribute 'xmi.value', to: :xmi_value + xml do + root "Operation.isPolymorphic" + namespace "omg.org/UML1.3", "UML" + + map_attribute "xmi.value", to: :xmi_value + end + end end end diff --git a/lib/xmi/uml13/operationmethod.rb b/lib/xmi/uml13/operationmethod.rb index 7cacf62..1444a17 100644 --- a/lib/xmi/uml13/operationmethod.rb +++ b/lib/xmi/uml13/operationmethod.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'method' +require "shale" -class Operationmethod < Shale::Mapper - attribute :method, Method, collection: true +require_relative "method" - xml do - root 'Operation.method' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Operationmethod < Shale::Mapper + attribute :method, Method, collection: true - map_element 'Method', to: :method + xml do + root "Operation.method" + namespace "omg.org/UML1.3", "UML" + + map_element "Method", to: :method + end + end end end diff --git a/lib/xmi/uml13/operationoccurrence.rb b/lib/xmi/uml13/operationoccurrence.rb index 25c9431..827fabf 100644 --- a/lib/xmi/uml13/operationoccurrence.rb +++ b/lib/xmi/uml13/operationoccurrence.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'call_event' +require "shale" -class Operationoccurrence < Shale::Mapper - attribute :call_event, CallEvent, collection: true +require_relative "call_event" - xml do - root 'Operation.occurrence' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Operationoccurrence < Shale::Mapper + attribute :call_event, CallEvent, collection: true - map_element 'CallEvent', to: :call_event + xml do + root "Operation.occurrence" + namespace "omg.org/UML1.3", "UML" + + map_element "CallEvent", to: :call_event + end + end end end diff --git a/lib/xmi/uml13/operationspecification.rb b/lib/xmi/uml13/operationspecification.rb index afd0e36..229e65c 100644 --- a/lib/xmi/uml13/operationspecification.rb +++ b/lib/xmi/uml13/operationspecification.rb @@ -1,16 +1,22 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'xm_ireference' +require "shale" -class Operationspecification < Shale::Mapper - attribute :content, Shale::Type::String - attribute :xmi_reference, XMIreference, collection: true +require_relative "xm_ireference" - xml do - root 'Operation.specification' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Operationspecification < Shale::Mapper + attribute :content, Shale::Type::String + attribute :xmi_reference, XMIreference, collection: true - map_content to: :content - map_element 'XMI.reference', to: :xmi_reference, prefix: nil, namespace: nil + xml do + root "Operation.specification" + namespace "omg.org/UML1.3", "UML" + + map_content to: :content + map_element "XMI.reference", to: :xmi_reference, prefix: nil, namespace: nil + end + end end end diff --git a/lib/xmi/uml13/package.rb b/lib/xmi/uml13/package.rb index 606d4ca..f849b77 100644 --- a/lib/xmi/uml13/package.rb +++ b/lib/xmi/uml13/package.rb @@ -1,139 +1,145 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'generalizable_elementgeneralization' -require_relative 'generalizable_elementis_abstract' -require_relative 'generalizable_elementis_leaf' -require_relative 'generalizable_elementis_root' -require_relative 'generalizable_elementspecialization' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'namespaceowned_element' -require_relative 'xm_iextension' +require "shale" -class Package < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :is_root, Shale::Type::String - attribute :is_leaf, Shale::Type::String - attribute :is_abstract, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :model_element_element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :generalization, Shale::Type::Value - attribute :specialization, Shale::Type::Value - attribute :package_element_reference, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :generalizable_element_is_root, GeneralizableElementisRoot, collection: true - attribute :generalizable_element_is_leaf, GeneralizableElementisLeaf, collection: true - attribute :generalizable_element_is_abstract, GeneralizableElementisAbstract, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :generalizable_element_generalization, GeneralizableElementgeneralization, collection: true - attribute :generalizable_element_specialization, GeneralizableElementspecialization, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :namespace_owned_element, NamespaceownedElement, collection: true +require_relative "generalizable_elementgeneralization" +require_relative "generalizable_elementis_abstract" +require_relative "generalizable_elementis_leaf" +require_relative "generalizable_elementis_root" +require_relative "generalizable_elementspecialization" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "namespaceowned_element" +require_relative "xm_iextension" - xml do - root 'Package' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Package < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :is_root, Shale::Type::String + attribute :is_leaf, Shale::Type::String + attribute :is_abstract, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :model_element_element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :generalization, Shale::Type::Value + attribute :specialization, Shale::Type::Value + attribute :package_element_reference, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :generalizable_element_is_root, GeneralizableElementisRoot, collection: true + attribute :generalizable_element_is_leaf, GeneralizableElementisLeaf, collection: true + attribute :generalizable_element_is_abstract, GeneralizableElementisAbstract, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :generalizable_element_generalization, GeneralizableElementgeneralization, collection: true + attribute :generalizable_element_specialization, GeneralizableElementspecialization, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :namespace_owned_element, NamespaceownedElement, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'isRoot', to: :is_root - map_attribute 'isLeaf', to: :is_leaf - map_attribute 'isAbstract', to: :is_abstract - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'ModelElement.elementReference', to: :model_element_element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'generalization', to: :generalization - map_attribute 'specialization', to: :specialization - map_attribute 'Package.elementReference', to: :package_element_reference - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'GeneralizableElement.isRoot', to: :generalizable_element_is_root - map_element 'GeneralizableElement.isLeaf', to: :generalizable_element_is_leaf - map_element 'GeneralizableElement.isAbstract', to: :generalizable_element_is_abstract - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'GeneralizableElement.generalization', to: :generalizable_element_generalization - map_element 'GeneralizableElement.specialization', to: :generalizable_element_specialization - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Namespace.ownedElement', to: :namespace_owned_element + xml do + root "Package" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "isRoot", to: :is_root + map_attribute "isLeaf", to: :is_leaf + map_attribute "isAbstract", to: :is_abstract + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "ModelElement.elementReference", to: :model_element_element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "generalization", to: :generalization + map_attribute "specialization", to: :specialization + map_attribute "Package.elementReference", to: :package_element_reference + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "GeneralizableElement.isRoot", to: :generalizable_element_is_root + map_element "GeneralizableElement.isLeaf", to: :generalizable_element_is_leaf + map_element "GeneralizableElement.isAbstract", to: :generalizable_element_is_abstract + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "GeneralizableElement.generalization", to: :generalizable_element_generalization + map_element "GeneralizableElement.specialization", to: :generalizable_element_specialization + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Namespace.ownedElement", to: :namespace_owned_element + end + end end end diff --git a/lib/xmi/uml13/packageelement_reference.rb b/lib/xmi/uml13/packageelement_reference.rb index 646b461..3db4c8a 100644 --- a/lib/xmi/uml13/packageelement_reference.rb +++ b/lib/xmi/uml13/packageelement_reference.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'element_reference' +require "shale" -class PackageelementReference < Shale::Mapper - attribute :element_reference, ElementReference, collection: true +require_relative "element_reference" - xml do - root 'Package.elementReference' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class PackageelementReference < Shale::Mapper + attribute :element_reference, ElementReference, collection: true - map_element 'ElementReference', to: :element_reference + xml do + root "Package.elementReference" + namespace "omg.org/UML1.3", "UML" + + map_element "ElementReference", to: :element_reference + end + end end end diff --git a/lib/xmi/uml13/parameter.rb b/lib/xmi/uml13/parameter.rb index f6d2f47..5ee1248 100644 --- a/lib/xmi/uml13/parameter.rb +++ b/lib/xmi/uml13/parameter.rb @@ -1,135 +1,141 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'parameterbehavioral_feature' -require_relative 'parameterdefault_value' -require_relative 'parameterkind' -require_relative 'parametersignal' -require_relative 'parametertype' -require_relative 'xm_iextension' +require "shale" -class Parameter < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :kind, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :behavioral_feature, Shale::Type::Value - attribute :type, Shale::Type::Value - attribute :signal, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :parameter_default_value, ParameterdefaultValue, collection: true - attribute :parameter_kind, Parameterkind, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :parameter_behavioral_feature, ParameterbehavioralFeature, collection: true - attribute :parameter_type, Parametertype, collection: true - attribute :parameter_signal, Parametersignal, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "parameterbehavioral_feature" +require_relative "parameterdefault_value" +require_relative "parameterkind" +require_relative "parametersignal" +require_relative "parametertype" +require_relative "xm_iextension" - xml do - root 'Parameter' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Parameter < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :kind, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :behavioral_feature, Shale::Type::Value + attribute :type, Shale::Type::Value + attribute :signal, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :parameter_default_value, ParameterdefaultValue, collection: true + attribute :parameter_kind, Parameterkind, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :parameter_behavioral_feature, ParameterbehavioralFeature, collection: true + attribute :parameter_type, Parametertype, collection: true + attribute :parameter_signal, Parametersignal, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'kind', to: :kind - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'behavioralFeature', to: :behavioral_feature - map_attribute 'type', to: :type - map_attribute 'signal', to: :signal - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'Parameter.defaultValue', to: :parameter_default_value - map_element 'Parameter.kind', to: :parameter_kind - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'Parameter.behavioralFeature', to: :parameter_behavioral_feature - map_element 'Parameter.type', to: :parameter_type - map_element 'Parameter.signal', to: :parameter_signal - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value + xml do + root "Parameter" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "kind", to: :kind + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "behavioralFeature", to: :behavioral_feature + map_attribute "type", to: :type + map_attribute "signal", to: :signal + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "Parameter.defaultValue", to: :parameter_default_value + map_element "Parameter.kind", to: :parameter_kind + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "Parameter.behavioralFeature", to: :parameter_behavioral_feature + map_element "Parameter.type", to: :parameter_type + map_element "Parameter.signal", to: :parameter_signal + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + end + end end end diff --git a/lib/xmi/uml13/parameterbehavioral_feature.rb b/lib/xmi/uml13/parameterbehavioral_feature.rb index 3751340..3e7f29b 100644 --- a/lib/xmi/uml13/parameterbehavioral_feature.rb +++ b/lib/xmi/uml13/parameterbehavioral_feature.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'behavioral_feature' +require "shale" -class ParameterbehavioralFeature < Shale::Mapper - attribute :behavioral_feature, BehavioralFeature, collection: true +require_relative "behavioral_feature" - xml do - root 'Parameter.behavioralFeature' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ParameterbehavioralFeature < Shale::Mapper + attribute :behavioral_feature, BehavioralFeature, collection: true - map_element 'BehavioralFeature', to: :behavioral_feature + xml do + root "Parameter.behavioralFeature" + namespace "omg.org/UML1.3", "UML" + + map_element "BehavioralFeature", to: :behavioral_feature + end + end end end diff --git a/lib/xmi/uml13/parameterdefault_value.rb b/lib/xmi/uml13/parameterdefault_value.rb index bc2841d..7a6ebe9 100644 --- a/lib/xmi/uml13/parameterdefault_value.rb +++ b/lib/xmi/uml13/parameterdefault_value.rb @@ -1,26 +1,32 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'boolean_expression' -require_relative 'expression' -require_relative 'object_set_expression' -require_relative 'procedure_expression' -require_relative 'time_expression' +require "shale" -class ParameterdefaultValue < Shale::Mapper - attribute :expression, Expression - attribute :procedure_expression, ProcedureExpression - attribute :object_set_expression, ObjectSetExpression - attribute :time_expression, TimeExpression - attribute :boolean_expression, BooleanExpression +require_relative "boolean_expression" +require_relative "expression" +require_relative "object_set_expression" +require_relative "procedure_expression" +require_relative "time_expression" - xml do - root 'Parameter.defaultValue' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ParameterdefaultValue < Shale::Mapper + attribute :expression, Expression + attribute :procedure_expression, ProcedureExpression + attribute :object_set_expression, ObjectSetExpression + attribute :time_expression, TimeExpression + attribute :boolean_expression, BooleanExpression - map_element 'Expression', to: :expression - map_element 'ProcedureExpression', to: :procedure_expression - map_element 'ObjectSetExpression', to: :object_set_expression - map_element 'TimeExpression', to: :time_expression - map_element 'BooleanExpression', to: :boolean_expression + xml do + root "Parameter.defaultValue" + namespace "omg.org/UML1.3", "UML" + + map_element "Expression", to: :expression + map_element "ProcedureExpression", to: :procedure_expression + map_element "ObjectSetExpression", to: :object_set_expression + map_element "TimeExpression", to: :time_expression + map_element "BooleanExpression", to: :boolean_expression + end + end end end diff --git a/lib/xmi/uml13/parameterkind.rb b/lib/xmi/uml13/parameterkind.rb index 077910c..5239806 100644 --- a/lib/xmi/uml13/parameterkind.rb +++ b/lib/xmi/uml13/parameterkind.rb @@ -1,12 +1,18 @@ -require 'shale' +# frozen_string_literal: true -class Parameterkind < Shale::Mapper - attribute :xmi_value, Shale::Type::String +require "shale" - xml do - root 'Parameter.kind' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Parameterkind < Shale::Mapper + attribute :xmi_value, Shale::Type::String - map_attribute 'xmi.value', to: :xmi_value + xml do + root "Parameter.kind" + namespace "omg.org/UML1.3", "UML" + + map_attribute "xmi.value", to: :xmi_value + end + end end end diff --git a/lib/xmi/uml13/parametersignal.rb b/lib/xmi/uml13/parametersignal.rb index 4e0ae88..e0565f5 100644 --- a/lib/xmi/uml13/parametersignal.rb +++ b/lib/xmi/uml13/parametersignal.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'signal' +require "shale" -class Parametersignal < Shale::Mapper - attribute :signal, Signal, collection: true +require_relative "signal" - xml do - root 'Parameter.signal' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Parametersignal < Shale::Mapper + attribute :signal, Signal, collection: true - map_element 'Signal', to: :signal + xml do + root "Parameter.signal" + namespace "omg.org/UML1.3", "UML" + + map_element "Signal", to: :signal + end + end end end diff --git a/lib/xmi/uml13/parametertype.rb b/lib/xmi/uml13/parametertype.rb index b4d47df..b6bc887 100644 --- a/lib/xmi/uml13/parametertype.rb +++ b/lib/xmi/uml13/parametertype.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'classifier' +require "shale" -class Parametertype < Shale::Mapper - attribute :classifier, Classifier, collection: true +require_relative "classifier" - xml do - root 'Parameter.type' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Parametertype < Shale::Mapper + attribute :classifier, Classifier, collection: true - map_element 'Classifier', to: :classifier + xml do + root "Parameter.type" + namespace "omg.org/UML1.3", "UML" + + map_element "Classifier", to: :classifier + end + end end end diff --git a/lib/xmi/uml13/partition.rb b/lib/xmi/uml13/partition.rb index 758f3f4..58e3e77 100644 --- a/lib/xmi/uml13/partition.rb +++ b/lib/xmi/uml13/partition.rb @@ -1,122 +1,128 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'partitionactivity_model' -require_relative 'partitioncontents' -require_relative 'xm_iextension' +require "shale" -class Partition < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :contents, Shale::Type::Value - attribute :activity_model, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :partition_contents, Partitioncontents, collection: true - attribute :partition_activity_model, PartitionactivityModel, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "partitionactivity_model" +require_relative "partitioncontents" +require_relative "xm_iextension" - xml do - root 'Partition' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Partition < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :contents, Shale::Type::Value + attribute :activity_model, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :partition_contents, Partitioncontents, collection: true + attribute :partition_activity_model, PartitionactivityModel, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'contents', to: :contents - map_attribute 'activityModel', to: :activity_model - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'Partition.contents', to: :partition_contents - map_element 'Partition.activityModel', to: :partition_activity_model - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value + xml do + root "Partition" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "contents", to: :contents + map_attribute "activityModel", to: :activity_model + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "Partition.contents", to: :partition_contents + map_element "Partition.activityModel", to: :partition_activity_model + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + end + end end end diff --git a/lib/xmi/uml13/partitionactivity_model.rb b/lib/xmi/uml13/partitionactivity_model.rb index ff688b5..bdd3b80 100644 --- a/lib/xmi/uml13/partitionactivity_model.rb +++ b/lib/xmi/uml13/partitionactivity_model.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'activity_model' +require "shale" -class PartitionactivityModel < Shale::Mapper - attribute :activity_model, ActivityModel, collection: true +require_relative "activity_model" - xml do - root 'Partition.activityModel' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class PartitionactivityModel < Shale::Mapper + attribute :activity_model, ActivityModel, collection: true - map_element 'ActivityModel', to: :activity_model + xml do + root "Partition.activityModel" + namespace "omg.org/UML1.3", "UML" + + map_element "ActivityModel", to: :activity_model + end + end end end diff --git a/lib/xmi/uml13/partitioncontents.rb b/lib/xmi/uml13/partitioncontents.rb index 98f597a..6adc8cf 100644 --- a/lib/xmi/uml13/partitioncontents.rb +++ b/lib/xmi/uml13/partitioncontents.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'model_element' +require "shale" -class Partitioncontents < Shale::Mapper - attribute :model_element, ModelElement, collection: true +require_relative "model_element" - xml do - root 'Partition.contents' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Partitioncontents < Shale::Mapper + attribute :model_element, ModelElement, collection: true - map_element 'ModelElement', to: :model_element + xml do + root "Partition.contents" + namespace "omg.org/UML1.3", "UML" + + map_element "ModelElement", to: :model_element + end + end end end diff --git a/lib/xmi/uml13/presentation.rb b/lib/xmi/uml13/presentation.rb index 80e122c..8ce4951 100644 --- a/lib/xmi/uml13/presentation.rb +++ b/lib/xmi/uml13/presentation.rb @@ -1,40 +1,46 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'presentationgeometry' -require_relative 'presentationmodel' -require_relative 'presentationstyle' -require_relative 'presentationview_element' -require_relative 'xm_iextension' +require "shale" -class Presentation < Shale::Mapper - attribute :model, Shale::Type::Value - attribute :view_element, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :presentation_geometry, Presentationgeometry, collection: true - attribute :presentation_style, Presentationstyle, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :presentation_model, Presentationmodel, collection: true - attribute :presentation_view_element, PresentationviewElement, collection: true +require_relative "presentationgeometry" +require_relative "presentationmodel" +require_relative "presentationstyle" +require_relative "presentationview_element" +require_relative "xm_iextension" - xml do - root 'Presentation' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Presentation < Shale::Mapper + attribute :model, Shale::Type::Value + attribute :view_element, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :presentation_geometry, Presentationgeometry, collection: true + attribute :presentation_style, Presentationstyle, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :presentation_model, Presentationmodel, collection: true + attribute :presentation_view_element, PresentationviewElement, collection: true - map_attribute 'model', to: :model - map_attribute 'viewElement', to: :view_element - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'Presentation.geometry', to: :presentation_geometry - map_element 'Presentation.style', to: :presentation_style - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'Presentation.model', to: :presentation_model - map_element 'Presentation.viewElement', to: :presentation_view_element + xml do + root "Presentation" + namespace "omg.org/UML1.3", "UML" + + map_attribute "model", to: :model + map_attribute "viewElement", to: :view_element + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "Presentation.geometry", to: :presentation_geometry + map_element "Presentation.style", to: :presentation_style + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "Presentation.model", to: :presentation_model + map_element "Presentation.viewElement", to: :presentation_view_element + end + end end end diff --git a/lib/xmi/uml13/presentationgeometry.rb b/lib/xmi/uml13/presentationgeometry.rb index e04a353..f8c74b1 100644 --- a/lib/xmi/uml13/presentationgeometry.rb +++ b/lib/xmi/uml13/presentationgeometry.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'geometry' +require "shale" -class Presentationgeometry < Shale::Mapper - attribute :geometry, Geometry +require_relative "geometry" - xml do - root 'Presentation.geometry' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Presentationgeometry < Shale::Mapper + attribute :geometry, Geometry - map_element 'Geometry', to: :geometry + xml do + root "Presentation.geometry" + namespace "omg.org/UML1.3", "UML" + + map_element "Geometry", to: :geometry + end + end end end diff --git a/lib/xmi/uml13/presentationmodel.rb b/lib/xmi/uml13/presentationmodel.rb index a045006..099dd45 100644 --- a/lib/xmi/uml13/presentationmodel.rb +++ b/lib/xmi/uml13/presentationmodel.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'model_element' +require "shale" -class Presentationmodel < Shale::Mapper - attribute :model_element, ModelElement, collection: true +require_relative "model_element" - xml do - root 'Presentation.model' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Presentationmodel < Shale::Mapper + attribute :model_element, ModelElement, collection: true - map_element 'ModelElement', to: :model_element + xml do + root "Presentation.model" + namespace "omg.org/UML1.3", "UML" + + map_element "ModelElement", to: :model_element + end + end end end diff --git a/lib/xmi/uml13/presentationstyle.rb b/lib/xmi/uml13/presentationstyle.rb index b889cea..b1b0ea1 100644 --- a/lib/xmi/uml13/presentationstyle.rb +++ b/lib/xmi/uml13/presentationstyle.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'graphic_marker' +require "shale" -class Presentationstyle < Shale::Mapper - attribute :graphic_marker, GraphicMarker +require_relative "graphic_marker" - xml do - root 'Presentation.style' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Presentationstyle < Shale::Mapper + attribute :graphic_marker, GraphicMarker - map_element 'GraphicMarker', to: :graphic_marker + xml do + root "Presentation.style" + namespace "omg.org/UML1.3", "UML" + + map_element "GraphicMarker", to: :graphic_marker + end + end end end diff --git a/lib/xmi/uml13/presentationview_element.rb b/lib/xmi/uml13/presentationview_element.rb index 51b488c..b1d62aa 100644 --- a/lib/xmi/uml13/presentationview_element.rb +++ b/lib/xmi/uml13/presentationview_element.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'view_element' +require "shale" -class PresentationviewElement < Shale::Mapper - attribute :view_element, ViewElement, collection: true +require_relative "view_element" - xml do - root 'Presentation.viewElement' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class PresentationviewElement < Shale::Mapper + attribute :view_element, ViewElement, collection: true - map_element 'ViewElement', to: :view_element + xml do + root "Presentation.viewElement" + namespace "omg.org/UML1.3", "UML" + + map_element "ViewElement", to: :view_element + end + end end end diff --git a/lib/xmi/uml13/primitive.rb b/lib/xmi/uml13/primitive.rb index 0ca7562..ec2aa71 100644 --- a/lib/xmi/uml13/primitive.rb +++ b/lib/xmi/uml13/primitive.rb @@ -1,192 +1,198 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'classifierassociation_end' -require_relative 'classifierclassifier_in_state' -require_relative 'classifierclassifier_role' -require_relative 'classifiercreate_action' -require_relative 'classifierfeature' -require_relative 'classifierinstance' -require_relative 'classifierparameter' -require_relative 'classifierparticipant' -require_relative 'classifierrealization' -require_relative 'classifierspecification' -require_relative 'classifierstructural_feature' -require_relative 'generalizable_elementgeneralization' -require_relative 'generalizable_elementis_abstract' -require_relative 'generalizable_elementis_leaf' -require_relative 'generalizable_elementis_root' -require_relative 'generalizable_elementspecialization' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'namespaceowned_element' -require_relative 'xm_iextension' +require "shale" -class Primitive < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :is_root, Shale::Type::String - attribute :is_leaf, Shale::Type::String - attribute :is_abstract, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :model_element_collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :generalization, Shale::Type::Value - attribute :specialization, Shale::Type::Value - attribute :parameter, Shale::Type::Value - attribute :structural_feature, Shale::Type::Value - attribute :specification, Shale::Type::Value - attribute :realization, Shale::Type::Value - attribute :association_end, Shale::Type::Value - attribute :participant, Shale::Type::Value - attribute :create_action, Shale::Type::Value - attribute :instance, Shale::Type::Value - attribute :classifier_collaboration, Shale::Type::Value - attribute :classifier_role, Shale::Type::Value - attribute :classifier_in_state, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :generalizable_element_is_root, GeneralizableElementisRoot, collection: true - attribute :generalizable_element_is_leaf, GeneralizableElementisLeaf, collection: true - attribute :generalizable_element_is_abstract, GeneralizableElementisAbstract, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :generalizable_element_generalization, GeneralizableElementgeneralization, collection: true - attribute :generalizable_element_specialization, GeneralizableElementspecialization, collection: true - attribute :classifier_parameter, Classifierparameter, collection: true - attribute :classifier_structural_feature, ClassifierstructuralFeature, collection: true - attribute :classifier_specification, Classifierspecification, collection: true - attribute :classifier_realization, Classifierrealization, collection: true - attribute :classifier_association_end, ClassifierassociationEnd, collection: true - attribute :classifier_participant, Classifierparticipant, collection: true - attribute :classifier_create_action, ClassifiercreateAction, collection: true - attribute :classifier_instance, Classifierinstance, collection: true - attribute :classifier_classifier_role, ClassifierclassifierRole, collection: true - attribute :classifier_classifier_in_state, ClassifierclassifierInState, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :namespace_owned_element, NamespaceownedElement, collection: true - attribute :classifier_feature, Classifierfeature, collection: true +require_relative "classifierassociation_end" +require_relative "classifierclassifier_in_state" +require_relative "classifierclassifier_role" +require_relative "classifiercreate_action" +require_relative "classifierfeature" +require_relative "classifierinstance" +require_relative "classifierparameter" +require_relative "classifierparticipant" +require_relative "classifierrealization" +require_relative "classifierspecification" +require_relative "classifierstructural_feature" +require_relative "generalizable_elementgeneralization" +require_relative "generalizable_elementis_abstract" +require_relative "generalizable_elementis_leaf" +require_relative "generalizable_elementis_root" +require_relative "generalizable_elementspecialization" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "namespaceowned_element" +require_relative "xm_iextension" - xml do - root 'Primitive' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Primitive < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :is_root, Shale::Type::String + attribute :is_leaf, Shale::Type::String + attribute :is_abstract, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :model_element_collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :generalization, Shale::Type::Value + attribute :specialization, Shale::Type::Value + attribute :parameter, Shale::Type::Value + attribute :structural_feature, Shale::Type::Value + attribute :specification, Shale::Type::Value + attribute :realization, Shale::Type::Value + attribute :association_end, Shale::Type::Value + attribute :participant, Shale::Type::Value + attribute :create_action, Shale::Type::Value + attribute :instance, Shale::Type::Value + attribute :classifier_collaboration, Shale::Type::Value + attribute :classifier_role, Shale::Type::Value + attribute :classifier_in_state, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :generalizable_element_is_root, GeneralizableElementisRoot, collection: true + attribute :generalizable_element_is_leaf, GeneralizableElementisLeaf, collection: true + attribute :generalizable_element_is_abstract, GeneralizableElementisAbstract, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :generalizable_element_generalization, GeneralizableElementgeneralization, collection: true + attribute :generalizable_element_specialization, GeneralizableElementspecialization, collection: true + attribute :classifier_parameter, Classifierparameter, collection: true + attribute :classifier_structural_feature, ClassifierstructuralFeature, collection: true + attribute :classifier_specification, Classifierspecification, collection: true + attribute :classifier_realization, Classifierrealization, collection: true + attribute :classifier_association_end, ClassifierassociationEnd, collection: true + attribute :classifier_participant, Classifierparticipant, collection: true + attribute :classifier_create_action, ClassifiercreateAction, collection: true + attribute :classifier_instance, Classifierinstance, collection: true + attribute :classifier_classifier_role, ClassifierclassifierRole, collection: true + attribute :classifier_classifier_in_state, ClassifierclassifierInState, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :namespace_owned_element, NamespaceownedElement, collection: true + attribute :classifier_feature, Classifierfeature, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'isRoot', to: :is_root - map_attribute 'isLeaf', to: :is_leaf - map_attribute 'isAbstract', to: :is_abstract - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'ModelElement.collaboration', to: :model_element_collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'generalization', to: :generalization - map_attribute 'specialization', to: :specialization - map_attribute 'parameter', to: :parameter - map_attribute 'structuralFeature', to: :structural_feature - map_attribute 'specification', to: :specification - map_attribute 'realization', to: :realization - map_attribute 'associationEnd', to: :association_end - map_attribute 'participant', to: :participant - map_attribute 'createAction', to: :create_action - map_attribute 'instance', to: :instance - map_attribute 'Classifier.collaboration', to: :classifier_collaboration - map_attribute 'classifierRole', to: :classifier_role - map_attribute 'classifierInState', to: :classifier_in_state - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'GeneralizableElement.isRoot', to: :generalizable_element_is_root - map_element 'GeneralizableElement.isLeaf', to: :generalizable_element_is_leaf - map_element 'GeneralizableElement.isAbstract', to: :generalizable_element_is_abstract - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'GeneralizableElement.generalization', to: :generalizable_element_generalization - map_element 'GeneralizableElement.specialization', to: :generalizable_element_specialization - map_element 'Classifier.parameter', to: :classifier_parameter - map_element 'Classifier.structuralFeature', to: :classifier_structural_feature - map_element 'Classifier.specification', to: :classifier_specification - map_element 'Classifier.realization', to: :classifier_realization - map_element 'Classifier.associationEnd', to: :classifier_association_end - map_element 'Classifier.participant', to: :classifier_participant - map_element 'Classifier.createAction', to: :classifier_create_action - map_element 'Classifier.instance', to: :classifier_instance - map_element 'Classifier.classifierRole', to: :classifier_classifier_role - map_element 'Classifier.classifierInState', to: :classifier_classifier_in_state - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Namespace.ownedElement', to: :namespace_owned_element - map_element 'Classifier.feature', to: :classifier_feature + xml do + root "Primitive" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "isRoot", to: :is_root + map_attribute "isLeaf", to: :is_leaf + map_attribute "isAbstract", to: :is_abstract + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "ModelElement.collaboration", to: :model_element_collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "generalization", to: :generalization + map_attribute "specialization", to: :specialization + map_attribute "parameter", to: :parameter + map_attribute "structuralFeature", to: :structural_feature + map_attribute "specification", to: :specification + map_attribute "realization", to: :realization + map_attribute "associationEnd", to: :association_end + map_attribute "participant", to: :participant + map_attribute "createAction", to: :create_action + map_attribute "instance", to: :instance + map_attribute "Classifier.collaboration", to: :classifier_collaboration + map_attribute "classifierRole", to: :classifier_role + map_attribute "classifierInState", to: :classifier_in_state + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "GeneralizableElement.isRoot", to: :generalizable_element_is_root + map_element "GeneralizableElement.isLeaf", to: :generalizable_element_is_leaf + map_element "GeneralizableElement.isAbstract", to: :generalizable_element_is_abstract + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "GeneralizableElement.generalization", to: :generalizable_element_generalization + map_element "GeneralizableElement.specialization", to: :generalizable_element_specialization + map_element "Classifier.parameter", to: :classifier_parameter + map_element "Classifier.structuralFeature", to: :classifier_structural_feature + map_element "Classifier.specification", to: :classifier_specification + map_element "Classifier.realization", to: :classifier_realization + map_element "Classifier.associationEnd", to: :classifier_association_end + map_element "Classifier.participant", to: :classifier_participant + map_element "Classifier.createAction", to: :classifier_create_action + map_element "Classifier.instance", to: :classifier_instance + map_element "Classifier.classifierRole", to: :classifier_classifier_role + map_element "Classifier.classifierInState", to: :classifier_classifier_in_state + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Namespace.ownedElement", to: :namespace_owned_element + map_element "Classifier.feature", to: :classifier_feature + end + end end end diff --git a/lib/xmi/uml13/procedure_expression.rb b/lib/xmi/uml13/procedure_expression.rb index 393d3fc..27ba923 100644 --- a/lib/xmi/uml13/procedure_expression.rb +++ b/lib/xmi/uml13/procedure_expression.rb @@ -1,34 +1,40 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'expressionbody' -require_relative 'expressionlanguage' -require_relative 'xm_iextension' +require "shale" -class ProcedureExpression < Shale::Mapper - attribute :language, Shale::Type::Value - attribute :body, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :expression_language, Expressionlanguage, collection: true - attribute :expression_body, Expressionbody, collection: true - attribute :xmi_extension, XMIextension, collection: true +require_relative "expressionbody" +require_relative "expressionlanguage" +require_relative "xm_iextension" - xml do - root 'ProcedureExpression' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ProcedureExpression < Shale::Mapper + attribute :language, Shale::Type::Value + attribute :body, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :expression_language, Expressionlanguage, collection: true + attribute :expression_body, Expressionbody, collection: true + attribute :xmi_extension, XMIextension, collection: true - map_attribute 'language', to: :language - map_attribute 'body', to: :body - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'Expression.language', to: :expression_language - map_element 'Expression.body', to: :expression_body - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil + xml do + root "ProcedureExpression" + namespace "omg.org/UML1.3", "UML" + + map_attribute "language", to: :language + map_attribute "body", to: :body + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "Expression.language", to: :expression_language + map_element "Expression.body", to: :expression_body + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + end + end end end diff --git a/lib/xmi/uml13/pseudo_state.rb b/lib/xmi/uml13/pseudo_state.rb index da31ed0..d520020 100644 --- a/lib/xmi/uml13/pseudo_state.rb +++ b/lib/xmi/uml13/pseudo_state.rb @@ -1,132 +1,138 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'pseudo_statekind' -require_relative 'state_vertexincoming' -require_relative 'state_vertexoutgoing' -require_relative 'state_vertexparent' -require_relative 'xm_iextension' +require "shale" -class PseudoState < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :kind, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :outgoing, Shale::Type::Value - attribute :incoming, Shale::Type::Value - attribute :parent, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :pseudo_state_kind, PseudoStatekind, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :state_vertex_outgoing, StateVertexoutgoing, collection: true - attribute :state_vertex_incoming, StateVertexincoming, collection: true - attribute :state_vertex_parent, StateVertexparent, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "pseudo_statekind" +require_relative "state_vertexincoming" +require_relative "state_vertexoutgoing" +require_relative "state_vertexparent" +require_relative "xm_iextension" - xml do - root 'PseudoState' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class PseudoState < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :kind, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :outgoing, Shale::Type::Value + attribute :incoming, Shale::Type::Value + attribute :parent, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :pseudo_state_kind, PseudoStatekind, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :state_vertex_outgoing, StateVertexoutgoing, collection: true + attribute :state_vertex_incoming, StateVertexincoming, collection: true + attribute :state_vertex_parent, StateVertexparent, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'kind', to: :kind - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'outgoing', to: :outgoing - map_attribute 'incoming', to: :incoming - map_attribute 'parent', to: :parent - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'PseudoState.kind', to: :pseudo_state_kind - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'StateVertex.outgoing', to: :state_vertex_outgoing - map_element 'StateVertex.incoming', to: :state_vertex_incoming - map_element 'StateVertex.parent', to: :state_vertex_parent - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value + xml do + root "PseudoState" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "kind", to: :kind + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "outgoing", to: :outgoing + map_attribute "incoming", to: :incoming + map_attribute "parent", to: :parent + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "PseudoState.kind", to: :pseudo_state_kind + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "StateVertex.outgoing", to: :state_vertex_outgoing + map_element "StateVertex.incoming", to: :state_vertex_incoming + map_element "StateVertex.parent", to: :state_vertex_parent + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + end + end end end diff --git a/lib/xmi/uml13/pseudo_statekind.rb b/lib/xmi/uml13/pseudo_statekind.rb index a4b6b20..061f543 100644 --- a/lib/xmi/uml13/pseudo_statekind.rb +++ b/lib/xmi/uml13/pseudo_statekind.rb @@ -1,12 +1,18 @@ -require 'shale' +# frozen_string_literal: true -class PseudoStatekind < Shale::Mapper - attribute :xmi_value, Shale::Type::String +require "shale" - xml do - root 'PseudoState.kind' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class PseudoStatekind < Shale::Mapper + attribute :xmi_value, Shale::Type::String - map_attribute 'xmi.value', to: :xmi_value + xml do + root "PseudoState.kind" + namespace "omg.org/UML1.3", "UML" + + map_attribute "xmi.value", to: :xmi_value + end + end end end diff --git a/lib/xmi/uml13/reception.rb b/lib/xmi/uml13/reception.rb index 7277252..972562f 100644 --- a/lib/xmi/uml13/reception.rb +++ b/lib/xmi/uml13/reception.rb @@ -1,155 +1,161 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'behavioral_featureis_query' -require_relative 'behavioral_featureparameter' -require_relative 'behavioral_featureraised_exception' -require_relative 'featureclassifier_role' -require_relative 'featureowner' -require_relative 'featureowner_scope' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'receptionis_polymorphic' -require_relative 'receptionsignal' -require_relative 'receptionspecification' -require_relative 'xm_iextension' +require "shale" -class Reception < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :owner_scope, Shale::Type::String - attribute :is_query, Shale::Type::String - attribute :is_polymorphic, Shale::Type::String - attribute :specification, Shale::Type::Value - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :owner, Shale::Type::Value - attribute :classifier_role, Shale::Type::Value - attribute :raised_exception, Shale::Type::Value - attribute :signal, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :feature_owner_scope, FeatureownerScope, collection: true - attribute :behavioral_feature_is_query, BehavioralFeatureisQuery, collection: true - attribute :reception_is_polymorphic, ReceptionisPolymorphic, collection: true - attribute :reception_specification, Receptionspecification, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :feature_owner, Featureowner, collection: true - attribute :feature_classifier_role, FeatureclassifierRole, collection: true - attribute :behavioral_feature_raised_exception, BehavioralFeatureraisedException, collection: true - attribute :reception_signal, Receptionsignal, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :behavioral_feature_parameter, BehavioralFeatureparameter, collection: true +require_relative "behavioral_featureis_query" +require_relative "behavioral_featureparameter" +require_relative "behavioral_featureraised_exception" +require_relative "featureclassifier_role" +require_relative "featureowner" +require_relative "featureowner_scope" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "receptionis_polymorphic" +require_relative "receptionsignal" +require_relative "receptionspecification" +require_relative "xm_iextension" - xml do - root 'Reception' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Reception < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :owner_scope, Shale::Type::String + attribute :is_query, Shale::Type::String + attribute :is_polymorphic, Shale::Type::String + attribute :specification, Shale::Type::Value + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :owner, Shale::Type::Value + attribute :classifier_role, Shale::Type::Value + attribute :raised_exception, Shale::Type::Value + attribute :signal, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :feature_owner_scope, FeatureownerScope, collection: true + attribute :behavioral_feature_is_query, BehavioralFeatureisQuery, collection: true + attribute :reception_is_polymorphic, ReceptionisPolymorphic, collection: true + attribute :reception_specification, Receptionspecification, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :feature_owner, Featureowner, collection: true + attribute :feature_classifier_role, FeatureclassifierRole, collection: true + attribute :behavioral_feature_raised_exception, BehavioralFeatureraisedException, collection: true + attribute :reception_signal, Receptionsignal, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :behavioral_feature_parameter, BehavioralFeatureparameter, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'ownerScope', to: :owner_scope - map_attribute 'isQuery', to: :is_query - map_attribute 'isPolymorphic', to: :is_polymorphic - map_attribute 'specification', to: :specification - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'owner', to: :owner - map_attribute 'classifierRole', to: :classifier_role - map_attribute 'raisedException', to: :raised_exception - map_attribute 'signal', to: :signal - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'Feature.ownerScope', to: :feature_owner_scope - map_element 'BehavioralFeature.isQuery', to: :behavioral_feature_is_query - map_element 'Reception.isPolymorphic', to: :reception_is_polymorphic - map_element 'Reception.specification', to: :reception_specification - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'Feature.owner', to: :feature_owner - map_element 'Feature.classifierRole', to: :feature_classifier_role - map_element 'BehavioralFeature.raisedException', to: :behavioral_feature_raised_exception - map_element 'Reception.signal', to: :reception_signal - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'BehavioralFeature.parameter', to: :behavioral_feature_parameter + xml do + root "Reception" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "ownerScope", to: :owner_scope + map_attribute "isQuery", to: :is_query + map_attribute "isPolymorphic", to: :is_polymorphic + map_attribute "specification", to: :specification + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "owner", to: :owner + map_attribute "classifierRole", to: :classifier_role + map_attribute "raisedException", to: :raised_exception + map_attribute "signal", to: :signal + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "Feature.ownerScope", to: :feature_owner_scope + map_element "BehavioralFeature.isQuery", to: :behavioral_feature_is_query + map_element "Reception.isPolymorphic", to: :reception_is_polymorphic + map_element "Reception.specification", to: :reception_specification + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "Feature.owner", to: :feature_owner + map_element "Feature.classifierRole", to: :feature_classifier_role + map_element "BehavioralFeature.raisedException", to: :behavioral_feature_raised_exception + map_element "Reception.signal", to: :reception_signal + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "BehavioralFeature.parameter", to: :behavioral_feature_parameter + end + end end end diff --git a/lib/xmi/uml13/receptionis_polymorphic.rb b/lib/xmi/uml13/receptionis_polymorphic.rb index e48c37c..508a656 100644 --- a/lib/xmi/uml13/receptionis_polymorphic.rb +++ b/lib/xmi/uml13/receptionis_polymorphic.rb @@ -1,12 +1,18 @@ -require 'shale' +# frozen_string_literal: true -class ReceptionisPolymorphic < Shale::Mapper - attribute :xmi_value, Shale::Type::String +require "shale" - xml do - root 'Reception.isPolymorphic' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ReceptionisPolymorphic < Shale::Mapper + attribute :xmi_value, Shale::Type::String - map_attribute 'xmi.value', to: :xmi_value + xml do + root "Reception.isPolymorphic" + namespace "omg.org/UML1.3", "UML" + + map_attribute "xmi.value", to: :xmi_value + end + end end end diff --git a/lib/xmi/uml13/receptionsignal.rb b/lib/xmi/uml13/receptionsignal.rb index 528f6a6..8725696 100644 --- a/lib/xmi/uml13/receptionsignal.rb +++ b/lib/xmi/uml13/receptionsignal.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'signal' +require "shale" -class Receptionsignal < Shale::Mapper - attribute :signal, Signal, collection: true +require_relative "signal" - xml do - root 'Reception.signal' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Receptionsignal < Shale::Mapper + attribute :signal, Signal, collection: true - map_element 'Signal', to: :signal + xml do + root "Reception.signal" + namespace "omg.org/UML1.3", "UML" + + map_element "Signal", to: :signal + end + end end end diff --git a/lib/xmi/uml13/receptionspecification.rb b/lib/xmi/uml13/receptionspecification.rb index 3ddb19e..b9638db 100644 --- a/lib/xmi/uml13/receptionspecification.rb +++ b/lib/xmi/uml13/receptionspecification.rb @@ -1,16 +1,22 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'xm_ireference' +require "shale" -class Receptionspecification < Shale::Mapper - attribute :content, Shale::Type::String - attribute :xmi_reference, XMIreference, collection: true +require_relative "xm_ireference" - xml do - root 'Reception.specification' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Receptionspecification < Shale::Mapper + attribute :content, Shale::Type::String + attribute :xmi_reference, XMIreference, collection: true - map_content to: :content - map_element 'XMI.reference', to: :xmi_reference, prefix: nil, namespace: nil + xml do + root "Reception.specification" + namespace "omg.org/UML1.3", "UML" + + map_content to: :content + map_element "XMI.reference", to: :xmi_reference, prefix: nil, namespace: nil + end + end end end diff --git a/lib/xmi/uml13/refinement.rb b/lib/xmi/uml13/refinement.rb index 5a3170c..975abf8 100644 --- a/lib/xmi/uml13/refinement.rb +++ b/lib/xmi/uml13/refinement.rb @@ -1,138 +1,156 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'dependencyclient' -require_relative 'dependencydescription' -require_relative 'dependencyowning_dependency' -require_relative 'dependencysub_dependencies' -require_relative 'dependencysupplier' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'refinementmapping' -require_relative 'xm_iextension' +require "shale" -class Refinement < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :description, Shale::Type::Value - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :owning_dependency, Shale::Type::Value - attribute :client, Shale::Type::Value - attribute :supplier, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :dependency_description, Dependencydescription, collection: true - attribute :refinement_mapping, Refinementmapping, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :dependency_owning_dependency, DependencyowningDependency, collection: true - attribute :dependency_client, Dependencyclient, collection: true - attribute :dependency_supplier, Dependencysupplier, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :dependency_sub_dependencies, DependencysubDependencies, collection: true +require_relative "dependencyclient" +require_relative "dependencydescription" +require_relative "dependencyowning_dependency" +require_relative "dependencysub_dependencies" +require_relative "dependencysupplier" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "refinementmapping" +require_relative "xm_iextension" - xml do - root 'Refinement' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ModelElementbinding < Shale::Mapper + end - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'description', to: :description - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'owningDependency', to: :owning_dependency - map_attribute 'client', to: :client - map_attribute 'supplier', to: :supplier - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'Dependency.description', to: :dependency_description - map_element 'Refinement.mapping', to: :refinement_mapping - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'Dependency.owningDependency', to: :dependency_owning_dependency - map_element 'Dependency.client', to: :dependency_client - map_element 'Dependency.supplier', to: :dependency_supplier - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Dependency.subDependencies', to: :dependency_sub_dependencies + class ModelElementimplementation < Shale::Mapper + end + + class ModelElementnamespace < Shale::Mapper + end + + class ModelElementconstraint < Shale::Mapper + end + + class Refinement < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :description, Shale::Type::Value + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :owning_dependency, Shale::Type::Value + attribute :client, Shale::Type::Value + attribute :supplier, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :dependency_description, Dependencydescription, collection: true + attribute :refinement_mapping, Refinementmapping, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :dependency_owning_dependency, DependencyowningDependency, collection: true + attribute :dependency_client, Dependencyclient, collection: true + attribute :dependency_supplier, Dependencysupplier, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :dependency_sub_dependencies, DependencysubDependencies, collection: true + + xml do + root "Refinement" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "description", to: :description + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "owningDependency", to: :owning_dependency + map_attribute "client", to: :client + map_attribute "supplier", to: :supplier + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "Dependency.description", to: :dependency_description + map_element "Refinement.mapping", to: :refinement_mapping + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "Dependency.owningDependency", to: :dependency_owning_dependency + map_element "Dependency.client", to: :dependency_client + map_element "Dependency.supplier", to: :dependency_supplier + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Dependency.subDependencies", to: :dependency_sub_dependencies + end + end end end diff --git a/lib/xmi/uml13/refinementmapping.rb b/lib/xmi/uml13/refinementmapping.rb index 59208c5..f68cd97 100644 --- a/lib/xmi/uml13/refinementmapping.rb +++ b/lib/xmi/uml13/refinementmapping.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'mapping' +require "shale" -class Refinementmapping < Shale::Mapper - attribute :mapping, Mapping +require_relative "mapping" - xml do - root 'Refinement.mapping' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Refinementmapping < Shale::Mapper + attribute :mapping, Mapping - map_element 'Mapping', to: :mapping + xml do + root "Refinement.mapping" + namespace "omg.org/UML1.3", "UML" + + map_element "Mapping", to: :mapping + end + end end end diff --git a/lib/xmi/uml13/request.rb b/lib/xmi/uml13/request.rb index d9c406d..2715d15 100644 --- a/lib/xmi/uml13/request.rb +++ b/lib/xmi/uml13/request.rb @@ -1,122 +1,128 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'requestaction' -require_relative 'requestmessage_instance' -require_relative 'xm_iextension' +require "shale" -class Request < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :action, Shale::Type::Value - attribute :message_instance, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :request_action, Requestaction, collection: true - attribute :request_message_instance, RequestmessageInstance, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "requestaction" +require_relative "requestmessage_instance" +require_relative "xm_iextension" - xml do - root 'Request' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Request < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :action, Shale::Type::Value + attribute :message_instance, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :request_action, Requestaction, collection: true + attribute :request_message_instance, RequestmessageInstance, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'action', to: :action - map_attribute 'messageInstance', to: :message_instance - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'Request.action', to: :request_action - map_element 'Request.messageInstance', to: :request_message_instance - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value + xml do + root "Request" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "action", to: :action + map_attribute "messageInstance", to: :message_instance + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "Request.action", to: :request_action + map_element "Request.messageInstance", to: :request_message_instance + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + end + end end end diff --git a/lib/xmi/uml13/requestaction.rb b/lib/xmi/uml13/requestaction.rb index c48da5f..2cbbbe0 100644 --- a/lib/xmi/uml13/requestaction.rb +++ b/lib/xmi/uml13/requestaction.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'action' +require "shale" -class Requestaction < Shale::Mapper - attribute :action, Action, collection: true +require_relative "action" - xml do - root 'Request.action' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Requestaction < Shale::Mapper + attribute :action, Action, collection: true - map_element 'Action', to: :action + xml do + root "Request.action" + namespace "omg.org/UML1.3", "UML" + + map_element "Action", to: :action + end + end end end diff --git a/lib/xmi/uml13/requestmessage_instance.rb b/lib/xmi/uml13/requestmessage_instance.rb index 954d52b..98170b4 100644 --- a/lib/xmi/uml13/requestmessage_instance.rb +++ b/lib/xmi/uml13/requestmessage_instance.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'message_instance' +require "shale" -class RequestmessageInstance < Shale::Mapper - attribute :message_instance, MessageInstance, collection: true +require_relative "message_instance" - xml do - root 'Request.messageInstance' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class RequestmessageInstance < Shale::Mapper + attribute :message_instance, MessageInstance, collection: true - map_element 'MessageInstance', to: :message_instance + xml do + root "Request.messageInstance" + namespace "omg.org/UML1.3", "UML" + + map_element "MessageInstance", to: :message_instance + end + end end end diff --git a/lib/xmi/uml13/return_action.rb b/lib/xmi/uml13/return_action.rb index d989c96..1e9b3a0 100644 --- a/lib/xmi/uml13/return_action.rb +++ b/lib/xmi/uml13/return_action.rb @@ -1,146 +1,152 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'actionaction_sequence' -require_relative 'actionactual_argument' -require_relative 'actionis_asynchronous' -require_relative 'actionmessage' -require_relative 'actionrecurrence' -require_relative 'actionrequest' -require_relative 'actionscript' -require_relative 'actiontarget' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'xm_iextension' +require "shale" -class ReturnAction < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :is_asynchronous, Shale::Type::String - attribute :script, Shale::Type::Value - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :request, Shale::Type::Value - attribute :message, Shale::Type::Value - attribute :action_sequence, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :action_recurrence, Actionrecurrence, collection: true - attribute :action_target, Actiontarget, collection: true - attribute :action_is_asynchronous, ActionisAsynchronous, collection: true - attribute :action_script, Actionscript, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :action_request, Actionrequest, collection: true - attribute :action_message, Actionmessage, collection: true - attribute :action_action_sequence, ActionactionSequence, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :action_actual_argument, ActionactualArgument, collection: true +require_relative "actionaction_sequence" +require_relative "actionactual_argument" +require_relative "actionis_asynchronous" +require_relative "actionmessage" +require_relative "actionrecurrence" +require_relative "actionrequest" +require_relative "actionscript" +require_relative "actiontarget" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "xm_iextension" - xml do - root 'ReturnAction' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ReturnAction < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :is_asynchronous, Shale::Type::String + attribute :script, Shale::Type::Value + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :request, Shale::Type::Value + attribute :message, Shale::Type::Value + attribute :action_sequence, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :action_recurrence, Actionrecurrence, collection: true + attribute :action_target, Actiontarget, collection: true + attribute :action_is_asynchronous, ActionisAsynchronous, collection: true + attribute :action_script, Actionscript, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :action_request, Actionrequest, collection: true + attribute :action_message, Actionmessage, collection: true + attribute :action_action_sequence, ActionactionSequence, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :action_actual_argument, ActionactualArgument, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'isAsynchronous', to: :is_asynchronous - map_attribute 'script', to: :script - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'request', to: :request - map_attribute 'message', to: :message - map_attribute 'actionSequence', to: :action_sequence - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'Action.recurrence', to: :action_recurrence - map_element 'Action.target', to: :action_target - map_element 'Action.isAsynchronous', to: :action_is_asynchronous - map_element 'Action.script', to: :action_script - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'Action.request', to: :action_request - map_element 'Action.message', to: :action_message - map_element 'Action.actionSequence', to: :action_action_sequence - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Action.actualArgument', to: :action_actual_argument + xml do + root "ReturnAction" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "isAsynchronous", to: :is_asynchronous + map_attribute "script", to: :script + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "request", to: :request + map_attribute "message", to: :message + map_attribute "actionSequence", to: :action_sequence + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "Action.recurrence", to: :action_recurrence + map_element "Action.target", to: :action_target + map_element "Action.isAsynchronous", to: :action_is_asynchronous + map_element "Action.script", to: :action_script + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "Action.request", to: :action_request + map_element "Action.message", to: :action_message + map_element "Action.actionSequence", to: :action_action_sequence + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Action.actualArgument", to: :action_actual_argument + end + end end end diff --git a/lib/xmi/uml13/send_action.rb b/lib/xmi/uml13/send_action.rb index 31a31d6..65c7bb7 100644 --- a/lib/xmi/uml13/send_action.rb +++ b/lib/xmi/uml13/send_action.rb @@ -1,146 +1,152 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'actionaction_sequence' -require_relative 'actionactual_argument' -require_relative 'actionis_asynchronous' -require_relative 'actionmessage' -require_relative 'actionrecurrence' -require_relative 'actionrequest' -require_relative 'actionscript' -require_relative 'actiontarget' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'xm_iextension' +require "shale" -class SendAction < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :is_asynchronous, Shale::Type::String - attribute :script, Shale::Type::Value - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :request, Shale::Type::Value - attribute :message, Shale::Type::Value - attribute :action_sequence, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :action_recurrence, Actionrecurrence, collection: true - attribute :action_target, Actiontarget, collection: true - attribute :action_is_asynchronous, ActionisAsynchronous, collection: true - attribute :action_script, Actionscript, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :action_request, Actionrequest, collection: true - attribute :action_message, Actionmessage, collection: true - attribute :action_action_sequence, ActionactionSequence, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :action_actual_argument, ActionactualArgument, collection: true +require_relative "actionaction_sequence" +require_relative "actionactual_argument" +require_relative "actionis_asynchronous" +require_relative "actionmessage" +require_relative "actionrecurrence" +require_relative "actionrequest" +require_relative "actionscript" +require_relative "actiontarget" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "xm_iextension" - xml do - root 'SendAction' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class SendAction < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :is_asynchronous, Shale::Type::String + attribute :script, Shale::Type::Value + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :request, Shale::Type::Value + attribute :message, Shale::Type::Value + attribute :action_sequence, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :action_recurrence, Actionrecurrence, collection: true + attribute :action_target, Actiontarget, collection: true + attribute :action_is_asynchronous, ActionisAsynchronous, collection: true + attribute :action_script, Actionscript, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :action_request, Actionrequest, collection: true + attribute :action_message, Actionmessage, collection: true + attribute :action_action_sequence, ActionactionSequence, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :action_actual_argument, ActionactualArgument, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'isAsynchronous', to: :is_asynchronous - map_attribute 'script', to: :script - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'request', to: :request - map_attribute 'message', to: :message - map_attribute 'actionSequence', to: :action_sequence - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'Action.recurrence', to: :action_recurrence - map_element 'Action.target', to: :action_target - map_element 'Action.isAsynchronous', to: :action_is_asynchronous - map_element 'Action.script', to: :action_script - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'Action.request', to: :action_request - map_element 'Action.message', to: :action_message - map_element 'Action.actionSequence', to: :action_action_sequence - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Action.actualArgument', to: :action_actual_argument + xml do + root "SendAction" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "isAsynchronous", to: :is_asynchronous + map_attribute "script", to: :script + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "request", to: :request + map_attribute "message", to: :message + map_attribute "actionSequence", to: :action_sequence + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "Action.recurrence", to: :action_recurrence + map_element "Action.target", to: :action_target + map_element "Action.isAsynchronous", to: :action_is_asynchronous + map_element "Action.script", to: :action_script + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "Action.request", to: :action_request + map_element "Action.message", to: :action_message + map_element "Action.actionSequence", to: :action_action_sequence + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Action.actualArgument", to: :action_actual_argument + end + end end end diff --git a/lib/xmi/uml13/signal.rb b/lib/xmi/uml13/signal.rb index 9226fd9..1a11f85 100644 --- a/lib/xmi/uml13/signal.rb +++ b/lib/xmi/uml13/signal.rb @@ -1,163 +1,169 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'generalizable_elementgeneralization' -require_relative 'generalizable_elementis_abstract' -require_relative 'generalizable_elementis_leaf' -require_relative 'generalizable_elementis_root' -require_relative 'generalizable_elementspecialization' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'namespaceowned_element' -require_relative 'requestaction' -require_relative 'requestmessage_instance' -require_relative 'signaloccurrence' -require_relative 'signalparameter' -require_relative 'signalreception' -require_relative 'xm_iextension' +require "shale" -class Signal < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :is_root, Shale::Type::String - attribute :is_leaf, Shale::Type::String - attribute :is_abstract, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :generalization, Shale::Type::Value - attribute :specialization, Shale::Type::Value - attribute :action, Shale::Type::Value - attribute :message_instance, Shale::Type::Value - attribute :reception, Shale::Type::Value - attribute :occurrence, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :generalizable_element_is_root, GeneralizableElementisRoot, collection: true - attribute :generalizable_element_is_leaf, GeneralizableElementisLeaf, collection: true - attribute :generalizable_element_is_abstract, GeneralizableElementisAbstract, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :generalizable_element_generalization, GeneralizableElementgeneralization, collection: true - attribute :generalizable_element_specialization, GeneralizableElementspecialization, collection: true - attribute :request_action, Requestaction, collection: true - attribute :request_message_instance, RequestmessageInstance, collection: true - attribute :signal_reception, Signalreception, collection: true - attribute :signal_occurrence, Signaloccurrence, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :namespace_owned_element, NamespaceownedElement, collection: true - attribute :signal_parameter, Signalparameter, collection: true +require_relative "generalizable_elementgeneralization" +require_relative "generalizable_elementis_abstract" +require_relative "generalizable_elementis_leaf" +require_relative "generalizable_elementis_root" +require_relative "generalizable_elementspecialization" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "namespaceowned_element" +require_relative "requestaction" +require_relative "requestmessage_instance" +require_relative "signaloccurrence" +require_relative "signalparameter" +require_relative "signalreception" +require_relative "xm_iextension" - xml do - root 'Signal' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Signal < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :is_root, Shale::Type::String + attribute :is_leaf, Shale::Type::String + attribute :is_abstract, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :generalization, Shale::Type::Value + attribute :specialization, Shale::Type::Value + attribute :action, Shale::Type::Value + attribute :message_instance, Shale::Type::Value + attribute :reception, Shale::Type::Value + attribute :occurrence, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :generalizable_element_is_root, GeneralizableElementisRoot, collection: true + attribute :generalizable_element_is_leaf, GeneralizableElementisLeaf, collection: true + attribute :generalizable_element_is_abstract, GeneralizableElementisAbstract, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :generalizable_element_generalization, GeneralizableElementgeneralization, collection: true + attribute :generalizable_element_specialization, GeneralizableElementspecialization, collection: true + attribute :request_action, Requestaction, collection: true + attribute :request_message_instance, RequestmessageInstance, collection: true + attribute :signal_reception, Signalreception, collection: true + attribute :signal_occurrence, Signaloccurrence, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :namespace_owned_element, NamespaceownedElement, collection: true + attribute :signal_parameter, Signalparameter, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'isRoot', to: :is_root - map_attribute 'isLeaf', to: :is_leaf - map_attribute 'isAbstract', to: :is_abstract - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'generalization', to: :generalization - map_attribute 'specialization', to: :specialization - map_attribute 'action', to: :action - map_attribute 'messageInstance', to: :message_instance - map_attribute 'reception', to: :reception - map_attribute 'occurrence', to: :occurrence - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'GeneralizableElement.isRoot', to: :generalizable_element_is_root - map_element 'GeneralizableElement.isLeaf', to: :generalizable_element_is_leaf - map_element 'GeneralizableElement.isAbstract', to: :generalizable_element_is_abstract - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'GeneralizableElement.generalization', to: :generalizable_element_generalization - map_element 'GeneralizableElement.specialization', to: :generalizable_element_specialization - map_element 'Request.action', to: :request_action - map_element 'Request.messageInstance', to: :request_message_instance - map_element 'Signal.reception', to: :signal_reception - map_element 'Signal.occurrence', to: :signal_occurrence - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Namespace.ownedElement', to: :namespace_owned_element - map_element 'Signal.parameter', to: :signal_parameter + xml do + root "Signal" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "isRoot", to: :is_root + map_attribute "isLeaf", to: :is_leaf + map_attribute "isAbstract", to: :is_abstract + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "generalization", to: :generalization + map_attribute "specialization", to: :specialization + map_attribute "action", to: :action + map_attribute "messageInstance", to: :message_instance + map_attribute "reception", to: :reception + map_attribute "occurrence", to: :occurrence + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "GeneralizableElement.isRoot", to: :generalizable_element_is_root + map_element "GeneralizableElement.isLeaf", to: :generalizable_element_is_leaf + map_element "GeneralizableElement.isAbstract", to: :generalizable_element_is_abstract + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "GeneralizableElement.generalization", to: :generalizable_element_generalization + map_element "GeneralizableElement.specialization", to: :generalizable_element_specialization + map_element "Request.action", to: :request_action + map_element "Request.messageInstance", to: :request_message_instance + map_element "Signal.reception", to: :signal_reception + map_element "Signal.occurrence", to: :signal_occurrence + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Namespace.ownedElement", to: :namespace_owned_element + map_element "Signal.parameter", to: :signal_parameter + end + end end end diff --git a/lib/xmi/uml13/signal_event.rb b/lib/xmi/uml13/signal_event.rb index f0c6736..f172250 100644 --- a/lib/xmi/uml13/signal_event.rb +++ b/lib/xmi/uml13/signal_event.rb @@ -1,127 +1,133 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'eventstate' -require_relative 'eventtransition' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'signal_eventsignal' -require_relative 'xm_iextension' +require "shale" -class SignalEvent < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :state, Shale::Type::Value - attribute :transition, Shale::Type::Value - attribute :signal, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :event_state, Eventstate, collection: true - attribute :event_transition, Eventtransition, collection: true - attribute :signal_event_signal, SignalEventsignal, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true +require_relative "eventstate" +require_relative "eventtransition" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "signal_eventsignal" +require_relative "xm_iextension" - xml do - root 'SignalEvent' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class SignalEvent < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :state, Shale::Type::Value + attribute :transition, Shale::Type::Value + attribute :signal, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :event_state, Eventstate, collection: true + attribute :event_transition, Eventtransition, collection: true + attribute :signal_event_signal, SignalEventsignal, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'state', to: :state - map_attribute 'transition', to: :transition - map_attribute 'signal', to: :signal - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'Event.state', to: :event_state - map_element 'Event.transition', to: :event_transition - map_element 'SignalEvent.signal', to: :signal_event_signal - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value + xml do + root "SignalEvent" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "state", to: :state + map_attribute "transition", to: :transition + map_attribute "signal", to: :signal + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "Event.state", to: :event_state + map_element "Event.transition", to: :event_transition + map_element "SignalEvent.signal", to: :signal_event_signal + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + end + end end end diff --git a/lib/xmi/uml13/signal_eventsignal.rb b/lib/xmi/uml13/signal_eventsignal.rb index 855f8bf..52ef938 100644 --- a/lib/xmi/uml13/signal_eventsignal.rb +++ b/lib/xmi/uml13/signal_eventsignal.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'signal' +require "shale" -class SignalEventsignal < Shale::Mapper - attribute :signal, Signal, collection: true +require_relative "signal" - xml do - root 'SignalEvent.signal' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class SignalEventsignal < Shale::Mapper + attribute :signal, Signal, collection: true - map_element 'Signal', to: :signal + xml do + root "SignalEvent.signal" + namespace "omg.org/UML1.3", "UML" + + map_element "Signal", to: :signal + end + end end end diff --git a/lib/xmi/uml13/signaloccurrence.rb b/lib/xmi/uml13/signaloccurrence.rb index e22629b..b8b223c 100644 --- a/lib/xmi/uml13/signaloccurrence.rb +++ b/lib/xmi/uml13/signaloccurrence.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'signal_event' +require "shale" -class Signaloccurrence < Shale::Mapper - attribute :signal_event, SignalEvent, collection: true +require_relative "signal_event" - xml do - root 'Signal.occurrence' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Signaloccurrence < Shale::Mapper + attribute :signal_event, SignalEvent, collection: true - map_element 'SignalEvent', to: :signal_event + xml do + root "Signal.occurrence" + namespace "omg.org/UML1.3", "UML" + + map_element "SignalEvent", to: :signal_event + end + end end end diff --git a/lib/xmi/uml13/signalparameter.rb b/lib/xmi/uml13/signalparameter.rb index 04d3937..cfb85e8 100644 --- a/lib/xmi/uml13/signalparameter.rb +++ b/lib/xmi/uml13/signalparameter.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'parameter' +require "shale" -class Signalparameter < Shale::Mapper - attribute :parameter, Parameter, collection: true +require_relative "parameter" - xml do - root 'Signal.parameter' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Signalparameter < Shale::Mapper + attribute :parameter, Parameter, collection: true - map_element 'Parameter', to: :parameter + xml do + root "Signal.parameter" + namespace "omg.org/UML1.3", "UML" + + map_element "Parameter", to: :parameter + end + end end end diff --git a/lib/xmi/uml13/signalreception.rb b/lib/xmi/uml13/signalreception.rb index 38970f7..bb2025d 100644 --- a/lib/xmi/uml13/signalreception.rb +++ b/lib/xmi/uml13/signalreception.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'reception' +require "shale" -class Signalreception < Shale::Mapper - attribute :reception, Reception, collection: true +require_relative "reception" - xml do - root 'Signal.reception' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Signalreception < Shale::Mapper + attribute :reception, Reception, collection: true - map_element 'Reception', to: :reception + xml do + root "Signal.reception" + namespace "omg.org/UML1.3", "UML" + + map_element "Reception", to: :reception + end + end end end diff --git a/lib/xmi/uml13/simple_state.rb b/lib/xmi/uml13/simple_state.rb index 2193fc7..5e7f794 100644 --- a/lib/xmi/uml13/simple_state.rb +++ b/lib/xmi/uml13/simple_state.rb @@ -1,151 +1,157 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'state_vertexincoming' -require_relative 'state_vertexoutgoing' -require_relative 'state_vertexparent' -require_relative 'stateclassifier_in_state' -require_relative 'statedeferred_event' -require_relative 'stateentry' -require_relative 'stateexit' -require_relative 'stateinternal_transition' -require_relative 'statestate_machine' -require_relative 'xm_iextension' +require "shale" -class SimpleState < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :outgoing, Shale::Type::Value - attribute :incoming, Shale::Type::Value - attribute :parent, Shale::Type::Value - attribute :state_machine, Shale::Type::Value - attribute :deferred_event, Shale::Type::Value - attribute :classifier_in_state, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :state_vertex_outgoing, StateVertexoutgoing, collection: true - attribute :state_vertex_incoming, StateVertexincoming, collection: true - attribute :state_vertex_parent, StateVertexparent, collection: true - attribute :state_state_machine, StatestateMachine, collection: true - attribute :state_deferred_event, StatedeferredEvent, collection: true - attribute :state_classifier_in_state, StateclassifierInState, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :state_internal_transition, StateinternalTransition, collection: true - attribute :state_entry, Stateentry, collection: true - attribute :state_exit, Stateexit, collection: true +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "state_vertexincoming" +require_relative "state_vertexoutgoing" +require_relative "state_vertexparent" +require_relative "stateclassifier_in_state" +require_relative "statedeferred_event" +require_relative "stateentry" +require_relative "stateexit" +require_relative "stateinternal_transition" +require_relative "statestate_machine" +require_relative "xm_iextension" - xml do - root 'SimpleState' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class SimpleState < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :outgoing, Shale::Type::Value + attribute :incoming, Shale::Type::Value + attribute :parent, Shale::Type::Value + attribute :state_machine, Shale::Type::Value + attribute :deferred_event, Shale::Type::Value + attribute :classifier_in_state, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :state_vertex_outgoing, StateVertexoutgoing, collection: true + attribute :state_vertex_incoming, StateVertexincoming, collection: true + attribute :state_vertex_parent, StateVertexparent, collection: true + attribute :state_state_machine, StatestateMachine, collection: true + attribute :state_deferred_event, StatedeferredEvent, collection: true + attribute :state_classifier_in_state, StateclassifierInState, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :state_internal_transition, StateinternalTransition, collection: true + attribute :state_entry, Stateentry, collection: true + attribute :state_exit, Stateexit, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'outgoing', to: :outgoing - map_attribute 'incoming', to: :incoming - map_attribute 'parent', to: :parent - map_attribute 'stateMachine', to: :state_machine - map_attribute 'deferredEvent', to: :deferred_event - map_attribute 'classifierInState', to: :classifier_in_state - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'StateVertex.outgoing', to: :state_vertex_outgoing - map_element 'StateVertex.incoming', to: :state_vertex_incoming - map_element 'StateVertex.parent', to: :state_vertex_parent - map_element 'State.stateMachine', to: :state_state_machine - map_element 'State.deferredEvent', to: :state_deferred_event - map_element 'State.classifierInState', to: :state_classifier_in_state - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'State.internalTransition', to: :state_internal_transition - map_element 'State.entry', to: :state_entry - map_element 'State.exit', to: :state_exit + xml do + root "SimpleState" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "outgoing", to: :outgoing + map_attribute "incoming", to: :incoming + map_attribute "parent", to: :parent + map_attribute "stateMachine", to: :state_machine + map_attribute "deferredEvent", to: :deferred_event + map_attribute "classifierInState", to: :classifier_in_state + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "StateVertex.outgoing", to: :state_vertex_outgoing + map_element "StateVertex.incoming", to: :state_vertex_incoming + map_element "StateVertex.parent", to: :state_vertex_parent + map_element "State.stateMachine", to: :state_state_machine + map_element "State.deferredEvent", to: :state_deferred_event + map_element "State.classifierInState", to: :state_classifier_in_state + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "State.internalTransition", to: :state_internal_transition + map_element "State.entry", to: :state_entry + map_element "State.exit", to: :state_exit + end + end end end diff --git a/lib/xmi/uml13/state.rb b/lib/xmi/uml13/state.rb index 128c8a1..aca5da8 100644 --- a/lib/xmi/uml13/state.rb +++ b/lib/xmi/uml13/state.rb @@ -1,151 +1,157 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'state_vertexincoming' -require_relative 'state_vertexoutgoing' -require_relative 'state_vertexparent' -require_relative 'stateclassifier_in_state' -require_relative 'statedeferred_event' -require_relative 'stateentry' -require_relative 'stateexit' -require_relative 'stateinternal_transition' -require_relative 'statestate_machine' -require_relative 'xm_iextension' +require "shale" -class State < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :outgoing, Shale::Type::Value - attribute :incoming, Shale::Type::Value - attribute :parent, Shale::Type::Value - attribute :state_machine, Shale::Type::Value - attribute :deferred_event, Shale::Type::Value - attribute :classifier_in_state, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :state_vertex_outgoing, StateVertexoutgoing, collection: true - attribute :state_vertex_incoming, StateVertexincoming, collection: true - attribute :state_vertex_parent, StateVertexparent, collection: true - attribute :state_state_machine, StatestateMachine, collection: true - attribute :state_deferred_event, StatedeferredEvent, collection: true - attribute :state_classifier_in_state, StateclassifierInState, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :state_internal_transition, StateinternalTransition, collection: true - attribute :state_entry, Stateentry, collection: true - attribute :state_exit, Stateexit, collection: true +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "state_vertexincoming" +require_relative "state_vertexoutgoing" +require_relative "state_vertexparent" +require_relative "stateclassifier_in_state" +require_relative "statedeferred_event" +require_relative "stateentry" +require_relative "stateexit" +require_relative "stateinternal_transition" +require_relative "statestate_machine" +require_relative "xm_iextension" - xml do - root 'State' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class State < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :outgoing, Shale::Type::Value + attribute :incoming, Shale::Type::Value + attribute :parent, Shale::Type::Value + attribute :state_machine, Shale::Type::Value + attribute :deferred_event, Shale::Type::Value + attribute :classifier_in_state, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :state_vertex_outgoing, StateVertexoutgoing, collection: true + attribute :state_vertex_incoming, StateVertexincoming, collection: true + attribute :state_vertex_parent, StateVertexparent, collection: true + attribute :state_state_machine, StatestateMachine, collection: true + attribute :state_deferred_event, StatedeferredEvent, collection: true + attribute :state_classifier_in_state, StateclassifierInState, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :state_internal_transition, StateinternalTransition, collection: true + attribute :state_entry, Stateentry, collection: true + attribute :state_exit, Stateexit, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'outgoing', to: :outgoing - map_attribute 'incoming', to: :incoming - map_attribute 'parent', to: :parent - map_attribute 'stateMachine', to: :state_machine - map_attribute 'deferredEvent', to: :deferred_event - map_attribute 'classifierInState', to: :classifier_in_state - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'StateVertex.outgoing', to: :state_vertex_outgoing - map_element 'StateVertex.incoming', to: :state_vertex_incoming - map_element 'StateVertex.parent', to: :state_vertex_parent - map_element 'State.stateMachine', to: :state_state_machine - map_element 'State.deferredEvent', to: :state_deferred_event - map_element 'State.classifierInState', to: :state_classifier_in_state - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'State.internalTransition', to: :state_internal_transition - map_element 'State.entry', to: :state_entry - map_element 'State.exit', to: :state_exit + xml do + root "State" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "outgoing", to: :outgoing + map_attribute "incoming", to: :incoming + map_attribute "parent", to: :parent + map_attribute "stateMachine", to: :state_machine + map_attribute "deferredEvent", to: :deferred_event + map_attribute "classifierInState", to: :classifier_in_state + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "StateVertex.outgoing", to: :state_vertex_outgoing + map_element "StateVertex.incoming", to: :state_vertex_incoming + map_element "StateVertex.parent", to: :state_vertex_parent + map_element "State.stateMachine", to: :state_state_machine + map_element "State.deferredEvent", to: :state_deferred_event + map_element "State.classifierInState", to: :state_classifier_in_state + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "State.internalTransition", to: :state_internal_transition + map_element "State.entry", to: :state_entry + map_element "State.exit", to: :state_exit + end + end end end diff --git a/lib/xmi/uml13/state_machine.rb b/lib/xmi/uml13/state_machine.rb index 7ca100c..bd40b90 100644 --- a/lib/xmi/uml13/state_machine.rb +++ b/lib/xmi/uml13/state_machine.rb @@ -1,128 +1,134 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'state_machinecontext' -require_relative 'state_machinesubmachine_state' -require_relative 'state_machinetop' -require_relative 'state_machinetransitions' -require_relative 'xm_iextension' +require "shale" -class StateMachine < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :context, Shale::Type::Value - attribute :submachine_state, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :state_machine_context, StateMachinecontext, collection: true - attribute :state_machine_submachine_state, StateMachinesubmachineState, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :state_machine_top, StateMachinetop, collection: true - attribute :state_machine_transitions, StateMachinetransitions, collection: true +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "state_machinecontext" +require_relative "state_machinesubmachine_state" +require_relative "state_machinetop" +require_relative "state_machinetransitions" +require_relative "xm_iextension" - xml do - root 'StateMachine' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class StateMachine < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :context, Shale::Type::Value + attribute :submachine_state, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :state_machine_context, StateMachinecontext, collection: true + attribute :state_machine_submachine_state, StateMachinesubmachineState, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :state_machine_top, StateMachinetop, collection: true + attribute :state_machine_transitions, StateMachinetransitions, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'context', to: :context - map_attribute 'submachineState', to: :submachine_state - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'StateMachine.context', to: :state_machine_context - map_element 'StateMachine.submachineState', to: :state_machine_submachine_state - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'StateMachine.top', to: :state_machine_top - map_element 'StateMachine.transitions', to: :state_machine_transitions + xml do + root "StateMachine" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "context", to: :context + map_attribute "submachineState", to: :submachine_state + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "StateMachine.context", to: :state_machine_context + map_element "StateMachine.submachineState", to: :state_machine_submachine_state + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "StateMachine.top", to: :state_machine_top + map_element "StateMachine.transitions", to: :state_machine_transitions + end + end end end diff --git a/lib/xmi/uml13/state_machinecontext.rb b/lib/xmi/uml13/state_machinecontext.rb index ea2e6f9..ba3766b 100644 --- a/lib/xmi/uml13/state_machinecontext.rb +++ b/lib/xmi/uml13/state_machinecontext.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'model_element' +require "shale" -class StateMachinecontext < Shale::Mapper - attribute :model_element, ModelElement, collection: true +require_relative "model_element" - xml do - root 'StateMachine.context' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class StateMachinecontext < Shale::Mapper + attribute :model_element, ModelElement, collection: true - map_element 'ModelElement', to: :model_element + xml do + root "StateMachine.context" + namespace "omg.org/UML1.3", "UML" + + map_element "ModelElement", to: :model_element + end + end end end diff --git a/lib/xmi/uml13/state_machines.rb b/lib/xmi/uml13/state_machines.rb index 2a21dc1..a4c959c 100644 --- a/lib/xmi/uml13/state_machines.rb +++ b/lib/xmi/uml13/state_machines.rb @@ -1,81 +1,87 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'action_state' -require_relative 'activity_model' -require_relative 'activity_state' -require_relative 'call_event' -require_relative 'change_event' -require_relative 'classifier_in_state' -require_relative 'composite_state' -require_relative 'event' -require_relative 'guard' -require_relative 'object_flow_state' -require_relative 'partition' -require_relative 'pseudo_state' -require_relative 'signal_event' -require_relative 'simple_state' -require_relative 'state' -require_relative 'state_machine' -require_relative 'state_vertex' -require_relative 'submachine_state' -require_relative 'time_event' -require_relative 'transition' +require "shale" -class StateMachines < Shale::Mapper - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :state_machine, StateMachine, collection: true - attribute :guard, Guard, collection: true - attribute :state_vertex, StateVertex, collection: true - attribute :transition, Transition, collection: true - attribute :pseudo_state, PseudoState, collection: true - attribute :state, State, collection: true - attribute :composite_state, CompositeState, collection: true - attribute :simple_state, SimpleState, collection: true - attribute :submachine_state, SubmachineState, collection: true - attribute :event, Event, collection: true - attribute :signal_event, SignalEvent, collection: true - attribute :call_event, CallEvent, collection: true - attribute :time_event, TimeEvent, collection: true - attribute :change_event, ChangeEvent, collection: true - attribute :activity_model, ActivityModel, collection: true - attribute :partition, Partition, collection: true - attribute :action_state, ActionState, collection: true - attribute :object_flow_state, ObjectFlowState, collection: true - attribute :classifier_in_state, ClassifierInState, collection: true - attribute :activity_state, ActivityState, collection: true +require_relative "action_state" +require_relative "activity_model" +require_relative "activity_state" +require_relative "call_event" +require_relative "change_event" +require_relative "classifier_in_state" +require_relative "composite_state" +require_relative "event" +require_relative "guard" +require_relative "object_flow_state" +require_relative "partition" +require_relative "pseudo_state" +require_relative "signal_event" +require_relative "simple_state" +require_relative "state" +require_relative "state_machine" +require_relative "state_vertex" +require_relative "submachine_state" +require_relative "time_event" +require_relative "transition" - xml do - root 'State_Machines' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class StateMachines < Shale::Mapper + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :state_machine, StateMachine, collection: true + attribute :guard, Guard, collection: true + attribute :state_vertex, StateVertex, collection: true + attribute :transition, Transition, collection: true + attribute :pseudo_state, PseudoState, collection: true + attribute :state, State, collection: true + attribute :composite_state, CompositeState, collection: true + attribute :simple_state, SimpleState, collection: true + attribute :submachine_state, SubmachineState, collection: true + attribute :event, Event, collection: true + attribute :signal_event, SignalEvent, collection: true + attribute :call_event, CallEvent, collection: true + attribute :time_event, TimeEvent, collection: true + attribute :change_event, ChangeEvent, collection: true + attribute :activity_model, ActivityModel, collection: true + attribute :partition, Partition, collection: true + attribute :action_state, ActionState, collection: true + attribute :object_flow_state, ObjectFlowState, collection: true + attribute :classifier_in_state, ClassifierInState, collection: true + attribute :activity_state, ActivityState, collection: true - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'StateMachine', to: :state_machine - map_element 'Guard', to: :guard - map_element 'StateVertex', to: :state_vertex - map_element 'Transition', to: :transition - map_element 'PseudoState', to: :pseudo_state - map_element 'State', to: :state - map_element 'CompositeState', to: :composite_state - map_element 'SimpleState', to: :simple_state - map_element 'SubmachineState', to: :submachine_state - map_element 'Event', to: :event - map_element 'SignalEvent', to: :signal_event - map_element 'CallEvent', to: :call_event - map_element 'TimeEvent', to: :time_event - map_element 'ChangeEvent', to: :change_event - map_element 'ActivityModel', to: :activity_model - map_element 'Partition', to: :partition - map_element 'ActionState', to: :action_state - map_element 'ObjectFlowState', to: :object_flow_state - map_element 'ClassifierInState', to: :classifier_in_state - map_element 'ActivityState', to: :activity_state + xml do + root "State_Machines" + namespace "omg.org/UML1.3", "UML" + + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "StateMachine", to: :state_machine + map_element "Guard", to: :guard + map_element "StateVertex", to: :state_vertex + map_element "Transition", to: :transition + map_element "PseudoState", to: :pseudo_state + map_element "State", to: :state + map_element "CompositeState", to: :composite_state + map_element "SimpleState", to: :simple_state + map_element "SubmachineState", to: :submachine_state + map_element "Event", to: :event + map_element "SignalEvent", to: :signal_event + map_element "CallEvent", to: :call_event + map_element "TimeEvent", to: :time_event + map_element "ChangeEvent", to: :change_event + map_element "ActivityModel", to: :activity_model + map_element "Partition", to: :partition + map_element "ActionState", to: :action_state + map_element "ObjectFlowState", to: :object_flow_state + map_element "ClassifierInState", to: :classifier_in_state + map_element "ActivityState", to: :activity_state + end + end end end diff --git a/lib/xmi/uml13/state_machinesubmachine_state.rb b/lib/xmi/uml13/state_machinesubmachine_state.rb index 097475e..1a8a579 100644 --- a/lib/xmi/uml13/state_machinesubmachine_state.rb +++ b/lib/xmi/uml13/state_machinesubmachine_state.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'submachine_state' +require "shale" -class StateMachinesubmachineState < Shale::Mapper - attribute :submachine_state, SubmachineState, collection: true +require_relative "submachine_state" - xml do - root 'StateMachine.submachineState' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class StateMachinesubmachineState < Shale::Mapper + attribute :submachine_state, SubmachineState, collection: true - map_element 'SubmachineState', to: :submachine_state + xml do + root "StateMachine.submachineState" + namespace "omg.org/UML1.3", "UML" + + map_element "SubmachineState", to: :submachine_state + end + end end end diff --git a/lib/xmi/uml13/state_machinetop.rb b/lib/xmi/uml13/state_machinetop.rb index 6ec11a2..f3347eb 100644 --- a/lib/xmi/uml13/state_machinetop.rb +++ b/lib/xmi/uml13/state_machinetop.rb @@ -1,32 +1,38 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'action_state' -require_relative 'activity_state' -require_relative 'composite_state' -require_relative 'object_flow_state' -require_relative 'simple_state' -require_relative 'state' -require_relative 'submachine_state' +require "shale" -class StateMachinetop < Shale::Mapper - attribute :state, State, collection: true - attribute :composite_state, CompositeState, collection: true - attribute :simple_state, SimpleState, collection: true - attribute :submachine_state, SubmachineState, collection: true - attribute :action_state, ActionState, collection: true - attribute :object_flow_state, ObjectFlowState, collection: true - attribute :activity_state, ActivityState, collection: true +require_relative "action_state" +require_relative "activity_state" +require_relative "composite_state" +require_relative "object_flow_state" +require_relative "simple_state" +require_relative "state" +require_relative "submachine_state" - xml do - root 'StateMachine.top' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class StateMachinetop < Shale::Mapper + attribute :state, State, collection: true + attribute :composite_state, CompositeState, collection: true + attribute :simple_state, SimpleState, collection: true + attribute :submachine_state, SubmachineState, collection: true + attribute :action_state, ActionState, collection: true + attribute :object_flow_state, ObjectFlowState, collection: true + attribute :activity_state, ActivityState, collection: true - map_element 'State', to: :state - map_element 'CompositeState', to: :composite_state - map_element 'SimpleState', to: :simple_state - map_element 'SubmachineState', to: :submachine_state - map_element 'ActionState', to: :action_state - map_element 'ObjectFlowState', to: :object_flow_state - map_element 'ActivityState', to: :activity_state + xml do + root "StateMachine.top" + namespace "omg.org/UML1.3", "UML" + + map_element "State", to: :state + map_element "CompositeState", to: :composite_state + map_element "SimpleState", to: :simple_state + map_element "SubmachineState", to: :submachine_state + map_element "ActionState", to: :action_state + map_element "ObjectFlowState", to: :object_flow_state + map_element "ActivityState", to: :activity_state + end + end end end diff --git a/lib/xmi/uml13/state_machinetransitions.rb b/lib/xmi/uml13/state_machinetransitions.rb index 05154d4..7fc3076 100644 --- a/lib/xmi/uml13/state_machinetransitions.rb +++ b/lib/xmi/uml13/state_machinetransitions.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'transition' +require "shale" -class StateMachinetransitions < Shale::Mapper - attribute :transition, Transition, collection: true +require_relative "transition" - xml do - root 'StateMachine.transitions' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class StateMachinetransitions < Shale::Mapper + attribute :transition, Transition, collection: true - map_element 'Transition', to: :transition + xml do + root "StateMachine.transitions" + namespace "omg.org/UML1.3", "UML" + + map_element "Transition", to: :transition + end + end end end diff --git a/lib/xmi/uml13/state_vertex.rb b/lib/xmi/uml13/state_vertex.rb index 9052d3c..2fbed2a 100644 --- a/lib/xmi/uml13/state_vertex.rb +++ b/lib/xmi/uml13/state_vertex.rb @@ -1,127 +1,133 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'state_vertexincoming' -require_relative 'state_vertexoutgoing' -require_relative 'state_vertexparent' -require_relative 'xm_iextension' +require "shale" -class StateVertex < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :outgoing, Shale::Type::Value - attribute :incoming, Shale::Type::Value - attribute :parent, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :state_vertex_outgoing, StateVertexoutgoing, collection: true - attribute :state_vertex_incoming, StateVertexincoming, collection: true - attribute :state_vertex_parent, StateVertexparent, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "state_vertexincoming" +require_relative "state_vertexoutgoing" +require_relative "state_vertexparent" +require_relative "xm_iextension" - xml do - root 'StateVertex' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class StateVertex < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :outgoing, Shale::Type::Value + attribute :incoming, Shale::Type::Value + attribute :parent, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :state_vertex_outgoing, StateVertexoutgoing, collection: true + attribute :state_vertex_incoming, StateVertexincoming, collection: true + attribute :state_vertex_parent, StateVertexparent, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'outgoing', to: :outgoing - map_attribute 'incoming', to: :incoming - map_attribute 'parent', to: :parent - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'StateVertex.outgoing', to: :state_vertex_outgoing - map_element 'StateVertex.incoming', to: :state_vertex_incoming - map_element 'StateVertex.parent', to: :state_vertex_parent - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value + xml do + root "StateVertex" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "outgoing", to: :outgoing + map_attribute "incoming", to: :incoming + map_attribute "parent", to: :parent + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "StateVertex.outgoing", to: :state_vertex_outgoing + map_element "StateVertex.incoming", to: :state_vertex_incoming + map_element "StateVertex.parent", to: :state_vertex_parent + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + end + end end end diff --git a/lib/xmi/uml13/state_vertexincoming.rb b/lib/xmi/uml13/state_vertexincoming.rb index 423193f..e926b30 100644 --- a/lib/xmi/uml13/state_vertexincoming.rb +++ b/lib/xmi/uml13/state_vertexincoming.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'transition' +require "shale" -class StateVertexincoming < Shale::Mapper - attribute :transition, Transition, collection: true +require_relative "transition" - xml do - root 'StateVertex.incoming' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class StateVertexincoming < Shale::Mapper + attribute :transition, Transition, collection: true - map_element 'Transition', to: :transition + xml do + root "StateVertex.incoming" + namespace "omg.org/UML1.3", "UML" + + map_element "Transition", to: :transition + end + end end end diff --git a/lib/xmi/uml13/state_vertexoutgoing.rb b/lib/xmi/uml13/state_vertexoutgoing.rb index 318bb63..7c8f9a0 100644 --- a/lib/xmi/uml13/state_vertexoutgoing.rb +++ b/lib/xmi/uml13/state_vertexoutgoing.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'transition' +require "shale" -class StateVertexoutgoing < Shale::Mapper - attribute :transition, Transition, collection: true +require_relative "transition" - xml do - root 'StateVertex.outgoing' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class StateVertexoutgoing < Shale::Mapper + attribute :transition, Transition, collection: true - map_element 'Transition', to: :transition + xml do + root "StateVertex.outgoing" + namespace "omg.org/UML1.3", "UML" + + map_element "Transition", to: :transition + end + end end end diff --git a/lib/xmi/uml13/state_vertexparent.rb b/lib/xmi/uml13/state_vertexparent.rb index 78c2a90..a638d72 100644 --- a/lib/xmi/uml13/state_vertexparent.rb +++ b/lib/xmi/uml13/state_vertexparent.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'composite_state' +require "shale" -class StateVertexparent < Shale::Mapper - attribute :composite_state, CompositeState, collection: true +require_relative "composite_state" - xml do - root 'StateVertex.parent' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class StateVertexparent < Shale::Mapper + attribute :composite_state, CompositeState, collection: true - map_element 'CompositeState', to: :composite_state + xml do + root "StateVertex.parent" + namespace "omg.org/UML1.3", "UML" + + map_element "CompositeState", to: :composite_state + end + end end end diff --git a/lib/xmi/uml13/stateclassifier_in_state.rb b/lib/xmi/uml13/stateclassifier_in_state.rb index 536afe3..4761e34 100644 --- a/lib/xmi/uml13/stateclassifier_in_state.rb +++ b/lib/xmi/uml13/stateclassifier_in_state.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'classifier_in_state' +require "shale" -class StateclassifierInState < Shale::Mapper - attribute :classifier_in_state, ClassifierInState, collection: true +require_relative "classifier_in_state" - xml do - root 'State.classifierInState' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class StateclassifierInState < Shale::Mapper + attribute :classifier_in_state, ClassifierInState, collection: true - map_element 'ClassifierInState', to: :classifier_in_state + xml do + root "State.classifierInState" + namespace "omg.org/UML1.3", "UML" + + map_element "ClassifierInState", to: :classifier_in_state + end + end end end diff --git a/lib/xmi/uml13/statedeferred_event.rb b/lib/xmi/uml13/statedeferred_event.rb index 7775087..4ab75f9 100644 --- a/lib/xmi/uml13/statedeferred_event.rb +++ b/lib/xmi/uml13/statedeferred_event.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'event' +require "shale" -class StatedeferredEvent < Shale::Mapper - attribute :event, Event, collection: true +require_relative "event" - xml do - root 'State.deferredEvent' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class StatedeferredEvent < Shale::Mapper + attribute :event, Event, collection: true - map_element 'Event', to: :event + xml do + root "State.deferredEvent" + namespace "omg.org/UML1.3", "UML" + + map_element "Event", to: :event + end + end end end diff --git a/lib/xmi/uml13/stateentry.rb b/lib/xmi/uml13/stateentry.rb index 2df6c09..7e6fd2f 100644 --- a/lib/xmi/uml13/stateentry.rb +++ b/lib/xmi/uml13/stateentry.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'action_sequence' +require "shale" -class Stateentry < Shale::Mapper - attribute :action_sequence, ActionSequence, collection: true +require_relative "action_sequence" - xml do - root 'State.entry' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Stateentry < Shale::Mapper + attribute :action_sequence, ActionSequence, collection: true - map_element 'ActionSequence', to: :action_sequence + xml do + root "State.entry" + namespace "omg.org/UML1.3", "UML" + + map_element "ActionSequence", to: :action_sequence + end + end end end diff --git a/lib/xmi/uml13/stateexit.rb b/lib/xmi/uml13/stateexit.rb index ffeab1e..bf37eca 100644 --- a/lib/xmi/uml13/stateexit.rb +++ b/lib/xmi/uml13/stateexit.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'action_sequence' +require "shale" -class Stateexit < Shale::Mapper - attribute :action_sequence, ActionSequence, collection: true +require_relative "action_sequence" - xml do - root 'State.exit' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Stateexit < Shale::Mapper + attribute :action_sequence, ActionSequence, collection: true - map_element 'ActionSequence', to: :action_sequence + xml do + root "State.exit" + namespace "omg.org/UML1.3", "UML" + + map_element "ActionSequence", to: :action_sequence + end + end end end diff --git a/lib/xmi/uml13/stateinternal_transition.rb b/lib/xmi/uml13/stateinternal_transition.rb index 7777049..bbed65e 100644 --- a/lib/xmi/uml13/stateinternal_transition.rb +++ b/lib/xmi/uml13/stateinternal_transition.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'transition' +require "shale" -class StateinternalTransition < Shale::Mapper - attribute :transition, Transition, collection: true +require_relative "transition" - xml do - root 'State.internalTransition' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class StateinternalTransition < Shale::Mapper + attribute :transition, Transition, collection: true - map_element 'Transition', to: :transition + xml do + root "State.internalTransition" + namespace "omg.org/UML1.3", "UML" + + map_element "Transition", to: :transition + end + end end end diff --git a/lib/xmi/uml13/statestate_machine.rb b/lib/xmi/uml13/statestate_machine.rb index f3d42e5..2b1484e 100644 --- a/lib/xmi/uml13/statestate_machine.rb +++ b/lib/xmi/uml13/statestate_machine.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'state_machine' +require "shale" -class StatestateMachine < Shale::Mapper - attribute :state_machine, StateMachine, collection: true +require_relative "state_machine" - xml do - root 'State.stateMachine' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class StatestateMachine < Shale::Mapper + attribute :state_machine, StateMachine, collection: true - map_element 'StateMachine', to: :state_machine + xml do + root "State.stateMachine" + namespace "omg.org/UML1.3", "UML" + + map_element "StateMachine", to: :state_machine + end + end end end diff --git a/lib/xmi/uml13/stereotype.rb b/lib/xmi/uml13/stereotype.rb index 71be4e2..7bf3188 100644 --- a/lib/xmi/uml13/stereotype.rb +++ b/lib/xmi/uml13/stereotype.rb @@ -1,161 +1,167 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'generalizable_elementgeneralization' -require_relative 'generalizable_elementis_abstract' -require_relative 'generalizable_elementis_leaf' -require_relative 'generalizable_elementis_root' -require_relative 'generalizable_elementspecialization' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'namespaceowned_element' -require_relative 'stereotypebase_class' -require_relative 'stereotypeextended_element' -require_relative 'stereotypeicon' -require_relative 'stereotyperequired_tag' -require_relative 'stereotypestereotype_constraint' -require_relative 'xm_iextension' +require "shale" -class Stereotype < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :is_root, Shale::Type::String - attribute :is_leaf, Shale::Type::String - attribute :is_abstract, Shale::Type::String - attribute :base_class, Shale::Type::Value - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :generalization, Shale::Type::Value - attribute :specialization, Shale::Type::Value - attribute :extended_element, Shale::Type::Value - attribute :stereotype_constraint, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :generalizable_element_is_root, GeneralizableElementisRoot, collection: true - attribute :generalizable_element_is_leaf, GeneralizableElementisLeaf, collection: true - attribute :generalizable_element_is_abstract, GeneralizableElementisAbstract, collection: true - attribute :stereotype_icon, Stereotypeicon, collection: true - attribute :stereotype_base_class, StereotypebaseClass, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :generalizable_element_generalization, GeneralizableElementgeneralization, collection: true - attribute :generalizable_element_specialization, GeneralizableElementspecialization, collection: true - attribute :stereotype_extended_element, StereotypeextendedElement, collection: true - attribute :stereotype_stereotype_constraint, StereotypestereotypeConstraint, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :namespace_owned_element, NamespaceownedElement, collection: true - attribute :stereotype_required_tag, StereotyperequiredTag, collection: true +require_relative "generalizable_elementgeneralization" +require_relative "generalizable_elementis_abstract" +require_relative "generalizable_elementis_leaf" +require_relative "generalizable_elementis_root" +require_relative "generalizable_elementspecialization" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "namespaceowned_element" +require_relative "stereotypebase_class" +require_relative "stereotypeextended_element" +require_relative "stereotypeicon" +require_relative "stereotyperequired_tag" +require_relative "stereotypestereotype_constraint" +require_relative "xm_iextension" - xml do - root 'Stereotype' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Stereotype < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :is_root, Shale::Type::String + attribute :is_leaf, Shale::Type::String + attribute :is_abstract, Shale::Type::String + attribute :base_class, Shale::Type::Value + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :generalization, Shale::Type::Value + attribute :specialization, Shale::Type::Value + attribute :extended_element, Shale::Type::Value + attribute :stereotype_constraint, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :generalizable_element_is_root, GeneralizableElementisRoot, collection: true + attribute :generalizable_element_is_leaf, GeneralizableElementisLeaf, collection: true + attribute :generalizable_element_is_abstract, GeneralizableElementisAbstract, collection: true + attribute :stereotype_icon, Stereotypeicon, collection: true + attribute :stereotype_base_class, StereotypebaseClass, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :generalizable_element_generalization, GeneralizableElementgeneralization, collection: true + attribute :generalizable_element_specialization, GeneralizableElementspecialization, collection: true + attribute :stereotype_extended_element, StereotypeextendedElement, collection: true + attribute :stereotype_stereotype_constraint, StereotypestereotypeConstraint, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :namespace_owned_element, NamespaceownedElement, collection: true + attribute :stereotype_required_tag, StereotyperequiredTag, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'isRoot', to: :is_root - map_attribute 'isLeaf', to: :is_leaf - map_attribute 'isAbstract', to: :is_abstract - map_attribute 'baseClass', to: :base_class - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'generalization', to: :generalization - map_attribute 'specialization', to: :specialization - map_attribute 'extendedElement', to: :extended_element - map_attribute 'stereotypeConstraint', to: :stereotype_constraint - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'GeneralizableElement.isRoot', to: :generalizable_element_is_root - map_element 'GeneralizableElement.isLeaf', to: :generalizable_element_is_leaf - map_element 'GeneralizableElement.isAbstract', to: :generalizable_element_is_abstract - map_element 'Stereotype.icon', to: :stereotype_icon - map_element 'Stereotype.baseClass', to: :stereotype_base_class - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'GeneralizableElement.generalization', to: :generalizable_element_generalization - map_element 'GeneralizableElement.specialization', to: :generalizable_element_specialization - map_element 'Stereotype.extendedElement', to: :stereotype_extended_element - map_element 'Stereotype.stereotypeConstraint', to: :stereotype_stereotype_constraint - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Namespace.ownedElement', to: :namespace_owned_element - map_element 'Stereotype.requiredTag', to: :stereotype_required_tag + xml do + root "Stereotype" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "isRoot", to: :is_root + map_attribute "isLeaf", to: :is_leaf + map_attribute "isAbstract", to: :is_abstract + map_attribute "baseClass", to: :base_class + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "generalization", to: :generalization + map_attribute "specialization", to: :specialization + map_attribute "extendedElement", to: :extended_element + map_attribute "stereotypeConstraint", to: :stereotype_constraint + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "GeneralizableElement.isRoot", to: :generalizable_element_is_root + map_element "GeneralizableElement.isLeaf", to: :generalizable_element_is_leaf + map_element "GeneralizableElement.isAbstract", to: :generalizable_element_is_abstract + map_element "Stereotype.icon", to: :stereotype_icon + map_element "Stereotype.baseClass", to: :stereotype_base_class + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "GeneralizableElement.generalization", to: :generalizable_element_generalization + map_element "GeneralizableElement.specialization", to: :generalizable_element_specialization + map_element "Stereotype.extendedElement", to: :stereotype_extended_element + map_element "Stereotype.stereotypeConstraint", to: :stereotype_stereotype_constraint + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Namespace.ownedElement", to: :namespace_owned_element + map_element "Stereotype.requiredTag", to: :stereotype_required_tag + end + end end end diff --git a/lib/xmi/uml13/stereotypebase_class.rb b/lib/xmi/uml13/stereotypebase_class.rb index b703332..a88d5db 100644 --- a/lib/xmi/uml13/stereotypebase_class.rb +++ b/lib/xmi/uml13/stereotypebase_class.rb @@ -1,16 +1,22 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'xm_ireference' +require "shale" -class StereotypebaseClass < Shale::Mapper - attribute :content, Shale::Type::String - attribute :xmi_reference, XMIreference, collection: true +require_relative "xm_ireference" - xml do - root 'Stereotype.baseClass' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class StereotypebaseClass < Shale::Mapper + attribute :content, Shale::Type::String + attribute :xmi_reference, XMIreference, collection: true - map_content to: :content - map_element 'XMI.reference', to: :xmi_reference, prefix: nil, namespace: nil + xml do + root "Stereotype.baseClass" + namespace "omg.org/UML1.3", "UML" + + map_content to: :content + map_element "XMI.reference", to: :xmi_reference, prefix: nil, namespace: nil + end + end end end diff --git a/lib/xmi/uml13/stereotypeextended_element.rb b/lib/xmi/uml13/stereotypeextended_element.rb index dfceef7..1f1909f 100644 --- a/lib/xmi/uml13/stereotypeextended_element.rb +++ b/lib/xmi/uml13/stereotypeextended_element.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'model_element' +require "shale" -class StereotypeextendedElement < Shale::Mapper - attribute :model_element, ModelElement, collection: true +require_relative "model_element" - xml do - root 'Stereotype.extendedElement' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class StereotypeextendedElement < Shale::Mapper + attribute :model_element, ModelElement, collection: true - map_element 'ModelElement', to: :model_element + xml do + root "Stereotype.extendedElement" + namespace "omg.org/UML1.3", "UML" + + map_element "ModelElement", to: :model_element + end + end end end diff --git a/lib/xmi/uml13/stereotypeicon.rb b/lib/xmi/uml13/stereotypeicon.rb index a8a781d..d9d8e55 100644 --- a/lib/xmi/uml13/stereotypeicon.rb +++ b/lib/xmi/uml13/stereotypeicon.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'geometry' +require "shale" -class Stereotypeicon < Shale::Mapper - attribute :geometry, Geometry +require_relative "geometry" - xml do - root 'Stereotype.icon' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Stereotypeicon < Shale::Mapper + attribute :geometry, Geometry - map_element 'Geometry', to: :geometry + xml do + root "Stereotype.icon" + namespace "omg.org/UML1.3", "UML" + + map_element "Geometry", to: :geometry + end + end end end diff --git a/lib/xmi/uml13/stereotyperequired_tag.rb b/lib/xmi/uml13/stereotyperequired_tag.rb index 622c358..49a8302 100644 --- a/lib/xmi/uml13/stereotyperequired_tag.rb +++ b/lib/xmi/uml13/stereotyperequired_tag.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'tagged_value' +require "shale" -class StereotyperequiredTag < Shale::Mapper - attribute :tagged_value, TaggedValue, collection: true +require_relative "tagged_value" - xml do - root 'Stereotype.requiredTag' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class StereotyperequiredTag < Shale::Mapper + attribute :tagged_value, TaggedValue, collection: true - map_element 'TaggedValue', to: :tagged_value + xml do + root "Stereotype.requiredTag" + namespace "omg.org/UML1.3", "UML" + + map_element "TaggedValue", to: :tagged_value + end + end end end diff --git a/lib/xmi/uml13/stereotypestereotype_constraint.rb b/lib/xmi/uml13/stereotypestereotype_constraint.rb index b9a1b7b..a551acc 100644 --- a/lib/xmi/uml13/stereotypestereotype_constraint.rb +++ b/lib/xmi/uml13/stereotypestereotype_constraint.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'constraint' +require "shale" -class StereotypestereotypeConstraint < Shale::Mapper - attribute :constraint, Constraint, collection: true +require_relative "constraint" - xml do - root 'Stereotype.stereotypeConstraint' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class StereotypestereotypeConstraint < Shale::Mapper + attribute :constraint, Constraint, collection: true - map_element 'Constraint', to: :constraint + xml do + root "Stereotype.stereotypeConstraint" + namespace "omg.org/UML1.3", "UML" + + map_element "Constraint", to: :constraint + end + end end end diff --git a/lib/xmi/uml13/structural_feature.rb b/lib/xmi/uml13/structural_feature.rb index 4376971..a3577a1 100644 --- a/lib/xmi/uml13/structural_feature.rb +++ b/lib/xmi/uml13/structural_feature.rb @@ -1,147 +1,153 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'featureclassifier_role' -require_relative 'featureowner' -require_relative 'featureowner_scope' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'structural_featurechangeable' -require_relative 'structural_featuremultiplicity' -require_relative 'structural_featuretarget_scope' -require_relative 'structural_featuretype' -require_relative 'xm_iextension' +require "shale" -class StructuralFeature < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :owner_scope, Shale::Type::String - attribute :multiplicity, Shale::Type::Value - attribute :changeable, Shale::Type::String - attribute :target_scope, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :owner, Shale::Type::Value - attribute :classifier_role, Shale::Type::Value - attribute :type, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :feature_owner_scope, FeatureownerScope, collection: true - attribute :structural_feature_multiplicity, StructuralFeaturemultiplicity, collection: true - attribute :structural_feature_changeable, StructuralFeaturechangeable, collection: true - attribute :structural_feature_target_scope, StructuralFeaturetargetScope, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :feature_owner, Featureowner, collection: true - attribute :feature_classifier_role, FeatureclassifierRole, collection: true - attribute :structural_feature_type, StructuralFeaturetype, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true +require_relative "featureclassifier_role" +require_relative "featureowner" +require_relative "featureowner_scope" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "structural_featurechangeable" +require_relative "structural_featuremultiplicity" +require_relative "structural_featuretarget_scope" +require_relative "structural_featuretype" +require_relative "xm_iextension" - xml do - root 'StructuralFeature' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class StructuralFeature < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :owner_scope, Shale::Type::String + attribute :multiplicity, Shale::Type::Value + attribute :changeable, Shale::Type::String + attribute :target_scope, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :owner, Shale::Type::Value + attribute :classifier_role, Shale::Type::Value + attribute :type, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :feature_owner_scope, FeatureownerScope, collection: true + attribute :structural_feature_multiplicity, StructuralFeaturemultiplicity, collection: true + attribute :structural_feature_changeable, StructuralFeaturechangeable, collection: true + attribute :structural_feature_target_scope, StructuralFeaturetargetScope, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :feature_owner, Featureowner, collection: true + attribute :feature_classifier_role, FeatureclassifierRole, collection: true + attribute :structural_feature_type, StructuralFeaturetype, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'ownerScope', to: :owner_scope - map_attribute 'multiplicity', to: :multiplicity - map_attribute 'changeable', to: :changeable - map_attribute 'targetScope', to: :target_scope - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'owner', to: :owner - map_attribute 'classifierRole', to: :classifier_role - map_attribute 'type', to: :type - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'Feature.ownerScope', to: :feature_owner_scope - map_element 'StructuralFeature.multiplicity', to: :structural_feature_multiplicity - map_element 'StructuralFeature.changeable', to: :structural_feature_changeable - map_element 'StructuralFeature.targetScope', to: :structural_feature_target_scope - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'Feature.owner', to: :feature_owner - map_element 'Feature.classifierRole', to: :feature_classifier_role - map_element 'StructuralFeature.type', to: :structural_feature_type - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value + xml do + root "StructuralFeature" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "ownerScope", to: :owner_scope + map_attribute "multiplicity", to: :multiplicity + map_attribute "changeable", to: :changeable + map_attribute "targetScope", to: :target_scope + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "owner", to: :owner + map_attribute "classifierRole", to: :classifier_role + map_attribute "type", to: :type + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "Feature.ownerScope", to: :feature_owner_scope + map_element "StructuralFeature.multiplicity", to: :structural_feature_multiplicity + map_element "StructuralFeature.changeable", to: :structural_feature_changeable + map_element "StructuralFeature.targetScope", to: :structural_feature_target_scope + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "Feature.owner", to: :feature_owner + map_element "Feature.classifierRole", to: :feature_classifier_role + map_element "StructuralFeature.type", to: :structural_feature_type + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + end + end end end diff --git a/lib/xmi/uml13/structural_featurechangeable.rb b/lib/xmi/uml13/structural_featurechangeable.rb index 00c4967..483837a 100644 --- a/lib/xmi/uml13/structural_featurechangeable.rb +++ b/lib/xmi/uml13/structural_featurechangeable.rb @@ -1,12 +1,18 @@ -require 'shale' +# frozen_string_literal: true -class StructuralFeaturechangeable < Shale::Mapper - attribute :xmi_value, Shale::Type::String +require "shale" - xml do - root 'StructuralFeature.changeable' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class StructuralFeaturechangeable < Shale::Mapper + attribute :xmi_value, Shale::Type::String - map_attribute 'xmi.value', to: :xmi_value + xml do + root "StructuralFeature.changeable" + namespace "omg.org/UML1.3", "UML" + + map_attribute "xmi.value", to: :xmi_value + end + end end end diff --git a/lib/xmi/uml13/structural_featuremultiplicity.rb b/lib/xmi/uml13/structural_featuremultiplicity.rb index 44f5e03..7bfd6f3 100644 --- a/lib/xmi/uml13/structural_featuremultiplicity.rb +++ b/lib/xmi/uml13/structural_featuremultiplicity.rb @@ -1,16 +1,22 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'xm_ireference' +require "shale" -class StructuralFeaturemultiplicity < Shale::Mapper - attribute :content, Shale::Type::String - attribute :xmi_reference, XMIreference, collection: true +require_relative "xm_ireference" - xml do - root 'StructuralFeature.multiplicity' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class StructuralFeaturemultiplicity < Shale::Mapper + attribute :content, Shale::Type::String + attribute :xmi_reference, XMIreference, collection: true - map_content to: :content - map_element 'XMI.reference', to: :xmi_reference, prefix: nil, namespace: nil + xml do + root "StructuralFeature.multiplicity" + namespace "omg.org/UML1.3", "UML" + + map_content to: :content + map_element "XMI.reference", to: :xmi_reference, prefix: nil, namespace: nil + end + end end end diff --git a/lib/xmi/uml13/structural_featuretarget_scope.rb b/lib/xmi/uml13/structural_featuretarget_scope.rb index fd7cd24..4bec183 100644 --- a/lib/xmi/uml13/structural_featuretarget_scope.rb +++ b/lib/xmi/uml13/structural_featuretarget_scope.rb @@ -1,12 +1,18 @@ -require 'shale' +# frozen_string_literal: true -class StructuralFeaturetargetScope < Shale::Mapper - attribute :xmi_value, Shale::Type::String +require "shale" - xml do - root 'StructuralFeature.targetScope' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class StructuralFeaturetargetScope < Shale::Mapper + attribute :xmi_value, Shale::Type::String - map_attribute 'xmi.value', to: :xmi_value + xml do + root "StructuralFeature.targetScope" + namespace "omg.org/UML1.3", "UML" + + map_attribute "xmi.value", to: :xmi_value + end + end end end diff --git a/lib/xmi/uml13/structural_featuretype.rb b/lib/xmi/uml13/structural_featuretype.rb index e678fed..57f70ae 100644 --- a/lib/xmi/uml13/structural_featuretype.rb +++ b/lib/xmi/uml13/structural_featuretype.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'classifier' +require "shale" -class StructuralFeaturetype < Shale::Mapper - attribute :classifier, Classifier, collection: true +require_relative "classifier" - xml do - root 'StructuralFeature.type' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class StructuralFeaturetype < Shale::Mapper + attribute :classifier, Classifier, collection: true - map_element 'Classifier', to: :classifier + xml do + root "StructuralFeature.type" + namespace "omg.org/UML1.3", "UML" + + map_element "Classifier", to: :classifier + end + end end end diff --git a/lib/xmi/uml13/structure.rb b/lib/xmi/uml13/structure.rb index d60ea88..975f6c4 100644 --- a/lib/xmi/uml13/structure.rb +++ b/lib/xmi/uml13/structure.rb @@ -1,192 +1,198 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'classifierassociation_end' -require_relative 'classifierclassifier_in_state' -require_relative 'classifierclassifier_role' -require_relative 'classifiercreate_action' -require_relative 'classifierfeature' -require_relative 'classifierinstance' -require_relative 'classifierparameter' -require_relative 'classifierparticipant' -require_relative 'classifierrealization' -require_relative 'classifierspecification' -require_relative 'classifierstructural_feature' -require_relative 'generalizable_elementgeneralization' -require_relative 'generalizable_elementis_abstract' -require_relative 'generalizable_elementis_leaf' -require_relative 'generalizable_elementis_root' -require_relative 'generalizable_elementspecialization' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'namespaceowned_element' -require_relative 'xm_iextension' +require "shale" -class Structure < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :is_root, Shale::Type::String - attribute :is_leaf, Shale::Type::String - attribute :is_abstract, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :model_element_collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :generalization, Shale::Type::Value - attribute :specialization, Shale::Type::Value - attribute :parameter, Shale::Type::Value - attribute :structural_feature, Shale::Type::Value - attribute :specification, Shale::Type::Value - attribute :realization, Shale::Type::Value - attribute :association_end, Shale::Type::Value - attribute :participant, Shale::Type::Value - attribute :create_action, Shale::Type::Value - attribute :instance, Shale::Type::Value - attribute :classifier_collaboration, Shale::Type::Value - attribute :classifier_role, Shale::Type::Value - attribute :classifier_in_state, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :generalizable_element_is_root, GeneralizableElementisRoot, collection: true - attribute :generalizable_element_is_leaf, GeneralizableElementisLeaf, collection: true - attribute :generalizable_element_is_abstract, GeneralizableElementisAbstract, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :generalizable_element_generalization, GeneralizableElementgeneralization, collection: true - attribute :generalizable_element_specialization, GeneralizableElementspecialization, collection: true - attribute :classifier_parameter, Classifierparameter, collection: true - attribute :classifier_structural_feature, ClassifierstructuralFeature, collection: true - attribute :classifier_specification, Classifierspecification, collection: true - attribute :classifier_realization, Classifierrealization, collection: true - attribute :classifier_association_end, ClassifierassociationEnd, collection: true - attribute :classifier_participant, Classifierparticipant, collection: true - attribute :classifier_create_action, ClassifiercreateAction, collection: true - attribute :classifier_instance, Classifierinstance, collection: true - attribute :classifier_classifier_role, ClassifierclassifierRole, collection: true - attribute :classifier_classifier_in_state, ClassifierclassifierInState, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :namespace_owned_element, NamespaceownedElement, collection: true - attribute :classifier_feature, Classifierfeature, collection: true +require_relative "classifierassociation_end" +require_relative "classifierclassifier_in_state" +require_relative "classifierclassifier_role" +require_relative "classifiercreate_action" +require_relative "classifierfeature" +require_relative "classifierinstance" +require_relative "classifierparameter" +require_relative "classifierparticipant" +require_relative "classifierrealization" +require_relative "classifierspecification" +require_relative "classifierstructural_feature" +require_relative "generalizable_elementgeneralization" +require_relative "generalizable_elementis_abstract" +require_relative "generalizable_elementis_leaf" +require_relative "generalizable_elementis_root" +require_relative "generalizable_elementspecialization" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "namespaceowned_element" +require_relative "xm_iextension" - xml do - root 'Structure' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Structure < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :is_root, Shale::Type::String + attribute :is_leaf, Shale::Type::String + attribute :is_abstract, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :model_element_collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :generalization, Shale::Type::Value + attribute :specialization, Shale::Type::Value + attribute :parameter, Shale::Type::Value + attribute :structural_feature, Shale::Type::Value + attribute :specification, Shale::Type::Value + attribute :realization, Shale::Type::Value + attribute :association_end, Shale::Type::Value + attribute :participant, Shale::Type::Value + attribute :create_action, Shale::Type::Value + attribute :instance, Shale::Type::Value + attribute :classifier_collaboration, Shale::Type::Value + attribute :classifier_role, Shale::Type::Value + attribute :classifier_in_state, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :generalizable_element_is_root, GeneralizableElementisRoot, collection: true + attribute :generalizable_element_is_leaf, GeneralizableElementisLeaf, collection: true + attribute :generalizable_element_is_abstract, GeneralizableElementisAbstract, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :generalizable_element_generalization, GeneralizableElementgeneralization, collection: true + attribute :generalizable_element_specialization, GeneralizableElementspecialization, collection: true + attribute :classifier_parameter, Classifierparameter, collection: true + attribute :classifier_structural_feature, ClassifierstructuralFeature, collection: true + attribute :classifier_specification, Classifierspecification, collection: true + attribute :classifier_realization, Classifierrealization, collection: true + attribute :classifier_association_end, ClassifierassociationEnd, collection: true + attribute :classifier_participant, Classifierparticipant, collection: true + attribute :classifier_create_action, ClassifiercreateAction, collection: true + attribute :classifier_instance, Classifierinstance, collection: true + attribute :classifier_classifier_role, ClassifierclassifierRole, collection: true + attribute :classifier_classifier_in_state, ClassifierclassifierInState, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :namespace_owned_element, NamespaceownedElement, collection: true + attribute :classifier_feature, Classifierfeature, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'isRoot', to: :is_root - map_attribute 'isLeaf', to: :is_leaf - map_attribute 'isAbstract', to: :is_abstract - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'ModelElement.collaboration', to: :model_element_collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'generalization', to: :generalization - map_attribute 'specialization', to: :specialization - map_attribute 'parameter', to: :parameter - map_attribute 'structuralFeature', to: :structural_feature - map_attribute 'specification', to: :specification - map_attribute 'realization', to: :realization - map_attribute 'associationEnd', to: :association_end - map_attribute 'participant', to: :participant - map_attribute 'createAction', to: :create_action - map_attribute 'instance', to: :instance - map_attribute 'Classifier.collaboration', to: :classifier_collaboration - map_attribute 'classifierRole', to: :classifier_role - map_attribute 'classifierInState', to: :classifier_in_state - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'GeneralizableElement.isRoot', to: :generalizable_element_is_root - map_element 'GeneralizableElement.isLeaf', to: :generalizable_element_is_leaf - map_element 'GeneralizableElement.isAbstract', to: :generalizable_element_is_abstract - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'GeneralizableElement.generalization', to: :generalizable_element_generalization - map_element 'GeneralizableElement.specialization', to: :generalizable_element_specialization - map_element 'Classifier.parameter', to: :classifier_parameter - map_element 'Classifier.structuralFeature', to: :classifier_structural_feature - map_element 'Classifier.specification', to: :classifier_specification - map_element 'Classifier.realization', to: :classifier_realization - map_element 'Classifier.associationEnd', to: :classifier_association_end - map_element 'Classifier.participant', to: :classifier_participant - map_element 'Classifier.createAction', to: :classifier_create_action - map_element 'Classifier.instance', to: :classifier_instance - map_element 'Classifier.classifierRole', to: :classifier_classifier_role - map_element 'Classifier.classifierInState', to: :classifier_classifier_in_state - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Namespace.ownedElement', to: :namespace_owned_element - map_element 'Classifier.feature', to: :classifier_feature + xml do + root "Structure" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "isRoot", to: :is_root + map_attribute "isLeaf", to: :is_leaf + map_attribute "isAbstract", to: :is_abstract + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "ModelElement.collaboration", to: :model_element_collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "generalization", to: :generalization + map_attribute "specialization", to: :specialization + map_attribute "parameter", to: :parameter + map_attribute "structuralFeature", to: :structural_feature + map_attribute "specification", to: :specification + map_attribute "realization", to: :realization + map_attribute "associationEnd", to: :association_end + map_attribute "participant", to: :participant + map_attribute "createAction", to: :create_action + map_attribute "instance", to: :instance + map_attribute "Classifier.collaboration", to: :classifier_collaboration + map_attribute "classifierRole", to: :classifier_role + map_attribute "classifierInState", to: :classifier_in_state + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "GeneralizableElement.isRoot", to: :generalizable_element_is_root + map_element "GeneralizableElement.isLeaf", to: :generalizable_element_is_leaf + map_element "GeneralizableElement.isAbstract", to: :generalizable_element_is_abstract + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "GeneralizableElement.generalization", to: :generalizable_element_generalization + map_element "GeneralizableElement.specialization", to: :generalizable_element_specialization + map_element "Classifier.parameter", to: :classifier_parameter + map_element "Classifier.structuralFeature", to: :classifier_structural_feature + map_element "Classifier.specification", to: :classifier_specification + map_element "Classifier.realization", to: :classifier_realization + map_element "Classifier.associationEnd", to: :classifier_association_end + map_element "Classifier.participant", to: :classifier_participant + map_element "Classifier.createAction", to: :classifier_create_action + map_element "Classifier.instance", to: :classifier_instance + map_element "Classifier.classifierRole", to: :classifier_classifier_role + map_element "Classifier.classifierInState", to: :classifier_classifier_in_state + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Namespace.ownedElement", to: :namespace_owned_element + map_element "Classifier.feature", to: :classifier_feature + end + end end end diff --git a/lib/xmi/uml13/submachine_state.rb b/lib/xmi/uml13/submachine_state.rb index bfdd9b9..b1b9877 100644 --- a/lib/xmi/uml13/submachine_state.rb +++ b/lib/xmi/uml13/submachine_state.rb @@ -1,150 +1,156 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'state_vertexincoming' -require_relative 'state_vertexoutgoing' -require_relative 'state_vertexparent' -require_relative 'stateclassifier_in_state' -require_relative 'statedeferred_event' -require_relative 'stateentry' -require_relative 'stateexit' -require_relative 'stateinternal_transition' -require_relative 'xm_iextension' +require "shale" -class SubmachineState < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :outgoing, Shale::Type::Value - attribute :incoming, Shale::Type::Value - attribute :parent, Shale::Type::Value - attribute :state_state_machine, Shale::Type::Value - attribute :deferred_event, Shale::Type::Value - attribute :classifier_in_state, Shale::Type::Value - attribute :submachine_state_state_machine, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :state_vertex_outgoing, StateVertexoutgoing, collection: true - attribute :state_vertex_incoming, StateVertexincoming, collection: true - attribute :state_vertex_parent, StateVertexparent, collection: true - attribute :state_deferred_event, StatedeferredEvent, collection: true - attribute :state_classifier_in_state, StateclassifierInState, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :state_internal_transition, StateinternalTransition, collection: true - attribute :state_entry, Stateentry, collection: true - attribute :state_exit, Stateexit, collection: true +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "state_vertexincoming" +require_relative "state_vertexoutgoing" +require_relative "state_vertexparent" +require_relative "stateclassifier_in_state" +require_relative "statedeferred_event" +require_relative "stateentry" +require_relative "stateexit" +require_relative "stateinternal_transition" +require_relative "xm_iextension" - xml do - root 'SubmachineState' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class SubmachineState < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :outgoing, Shale::Type::Value + attribute :incoming, Shale::Type::Value + attribute :parent, Shale::Type::Value + attribute :state_state_machine, Shale::Type::Value + attribute :deferred_event, Shale::Type::Value + attribute :classifier_in_state, Shale::Type::Value + attribute :submachine_state_state_machine, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :state_vertex_outgoing, StateVertexoutgoing, collection: true + attribute :state_vertex_incoming, StateVertexincoming, collection: true + attribute :state_vertex_parent, StateVertexparent, collection: true + attribute :state_deferred_event, StatedeferredEvent, collection: true + attribute :state_classifier_in_state, StateclassifierInState, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :state_internal_transition, StateinternalTransition, collection: true + attribute :state_entry, Stateentry, collection: true + attribute :state_exit, Stateexit, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'outgoing', to: :outgoing - map_attribute 'incoming', to: :incoming - map_attribute 'parent', to: :parent - map_attribute 'State.stateMachine', to: :state_state_machine - map_attribute 'deferredEvent', to: :deferred_event - map_attribute 'classifierInState', to: :classifier_in_state - map_attribute 'SubmachineState.stateMachine', to: :submachine_state_state_machine - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'StateVertex.outgoing', to: :state_vertex_outgoing - map_element 'StateVertex.incoming', to: :state_vertex_incoming - map_element 'StateVertex.parent', to: :state_vertex_parent - map_element 'State.deferredEvent', to: :state_deferred_event - map_element 'State.classifierInState', to: :state_classifier_in_state - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'State.internalTransition', to: :state_internal_transition - map_element 'State.entry', to: :state_entry - map_element 'State.exit', to: :state_exit + xml do + root "SubmachineState" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "outgoing", to: :outgoing + map_attribute "incoming", to: :incoming + map_attribute "parent", to: :parent + map_attribute "State.stateMachine", to: :state_state_machine + map_attribute "deferredEvent", to: :deferred_event + map_attribute "classifierInState", to: :classifier_in_state + map_attribute "SubmachineState.stateMachine", to: :submachine_state_state_machine + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "StateVertex.outgoing", to: :state_vertex_outgoing + map_element "StateVertex.incoming", to: :state_vertex_incoming + map_element "StateVertex.parent", to: :state_vertex_parent + map_element "State.deferredEvent", to: :state_deferred_event + map_element "State.classifierInState", to: :state_classifier_in_state + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "State.internalTransition", to: :state_internal_transition + map_element "State.entry", to: :state_entry + map_element "State.exit", to: :state_exit + end + end end end diff --git a/lib/xmi/uml13/submachine_statestate_machine.rb b/lib/xmi/uml13/submachine_statestate_machine.rb index 9386990..82c9e9b 100644 --- a/lib/xmi/uml13/submachine_statestate_machine.rb +++ b/lib/xmi/uml13/submachine_statestate_machine.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'state_machine' +require "shale" -class SubmachineStatestateMachine < Shale::Mapper - attribute :state_machine, StateMachine, collection: true +require_relative "state_machine" - xml do - root 'SubmachineState.stateMachine' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class SubmachineStatestateMachine < Shale::Mapper + attribute :state_machine, StateMachine, collection: true - map_element 'StateMachine', to: :state_machine + xml do + root "SubmachineState.stateMachine" + namespace "omg.org/UML1.3", "UML" + + map_element "StateMachine", to: :state_machine + end + end end end diff --git a/lib/xmi/uml13/subsystem.rb b/lib/xmi/uml13/subsystem.rb index c1a7efd..a28c1a9 100644 --- a/lib/xmi/uml13/subsystem.rb +++ b/lib/xmi/uml13/subsystem.rb @@ -1,196 +1,202 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'classifierassociation_end' -require_relative 'classifierclassifier_in_state' -require_relative 'classifierclassifier_role' -require_relative 'classifiercreate_action' -require_relative 'classifierfeature' -require_relative 'classifierinstance' -require_relative 'classifierparameter' -require_relative 'classifierparticipant' -require_relative 'classifierrealization' -require_relative 'classifierspecification' -require_relative 'classifierstructural_feature' -require_relative 'generalizable_elementgeneralization' -require_relative 'generalizable_elementis_abstract' -require_relative 'generalizable_elementis_leaf' -require_relative 'generalizable_elementis_root' -require_relative 'generalizable_elementspecialization' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementconstraint' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'namespaceowned_element' -require_relative 'subsystemis_instantiable' -require_relative 'xm_iextension' +require "shale" -class Subsystem < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :is_root, Shale::Type::String - attribute :is_leaf, Shale::Type::String - attribute :is_abstract, Shale::Type::String - attribute :is_instantiable, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :model_element_element_reference, Shale::Type::Value - attribute :model_element_collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :generalization, Shale::Type::Value - attribute :specialization, Shale::Type::Value - attribute :parameter, Shale::Type::Value - attribute :structural_feature, Shale::Type::Value - attribute :specification, Shale::Type::Value - attribute :realization, Shale::Type::Value - attribute :association_end, Shale::Type::Value - attribute :participant, Shale::Type::Value - attribute :create_action, Shale::Type::Value - attribute :instance, Shale::Type::Value - attribute :classifier_collaboration, Shale::Type::Value - attribute :classifier_role, Shale::Type::Value - attribute :classifier_in_state, Shale::Type::Value - attribute :package_element_reference, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :generalizable_element_is_root, GeneralizableElementisRoot, collection: true - attribute :generalizable_element_is_leaf, GeneralizableElementisLeaf, collection: true - attribute :generalizable_element_is_abstract, GeneralizableElementisAbstract, collection: true - attribute :subsystem_is_instantiable, SubsystemisInstantiable, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :generalizable_element_generalization, GeneralizableElementgeneralization, collection: true - attribute :generalizable_element_specialization, GeneralizableElementspecialization, collection: true - attribute :classifier_parameter, Classifierparameter, collection: true - attribute :classifier_structural_feature, ClassifierstructuralFeature, collection: true - attribute :classifier_specification, Classifierspecification, collection: true - attribute :classifier_realization, Classifierrealization, collection: true - attribute :classifier_association_end, ClassifierassociationEnd, collection: true - attribute :classifier_participant, Classifierparticipant, collection: true - attribute :classifier_create_action, ClassifiercreateAction, collection: true - attribute :classifier_instance, Classifierinstance, collection: true - attribute :classifier_classifier_role, ClassifierclassifierRole, collection: true - attribute :classifier_classifier_in_state, ClassifierclassifierInState, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :namespace_owned_element, NamespaceownedElement, collection: true - attribute :classifier_feature, Classifierfeature, collection: true +require_relative "classifierassociation_end" +require_relative "classifierclassifier_in_state" +require_relative "classifierclassifier_role" +require_relative "classifiercreate_action" +require_relative "classifierfeature" +require_relative "classifierinstance" +require_relative "classifierparameter" +require_relative "classifierparticipant" +require_relative "classifierrealization" +require_relative "classifierspecification" +require_relative "classifierstructural_feature" +require_relative "generalizable_elementgeneralization" +require_relative "generalizable_elementis_abstract" +require_relative "generalizable_elementis_leaf" +require_relative "generalizable_elementis_root" +require_relative "generalizable_elementspecialization" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementconstraint" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "namespaceowned_element" +require_relative "subsystemis_instantiable" +require_relative "xm_iextension" - xml do - root 'Subsystem' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Subsystem < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :is_root, Shale::Type::String + attribute :is_leaf, Shale::Type::String + attribute :is_abstract, Shale::Type::String + attribute :is_instantiable, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :model_element_element_reference, Shale::Type::Value + attribute :model_element_collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :generalization, Shale::Type::Value + attribute :specialization, Shale::Type::Value + attribute :parameter, Shale::Type::Value + attribute :structural_feature, Shale::Type::Value + attribute :specification, Shale::Type::Value + attribute :realization, Shale::Type::Value + attribute :association_end, Shale::Type::Value + attribute :participant, Shale::Type::Value + attribute :create_action, Shale::Type::Value + attribute :instance, Shale::Type::Value + attribute :classifier_collaboration, Shale::Type::Value + attribute :classifier_role, Shale::Type::Value + attribute :classifier_in_state, Shale::Type::Value + attribute :package_element_reference, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :generalizable_element_is_root, GeneralizableElementisRoot, collection: true + attribute :generalizable_element_is_leaf, GeneralizableElementisLeaf, collection: true + attribute :generalizable_element_is_abstract, GeneralizableElementisAbstract, collection: true + attribute :subsystem_is_instantiable, SubsystemisInstantiable, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :generalizable_element_generalization, GeneralizableElementgeneralization, collection: true + attribute :generalizable_element_specialization, GeneralizableElementspecialization, collection: true + attribute :classifier_parameter, Classifierparameter, collection: true + attribute :classifier_structural_feature, ClassifierstructuralFeature, collection: true + attribute :classifier_specification, Classifierspecification, collection: true + attribute :classifier_realization, Classifierrealization, collection: true + attribute :classifier_association_end, ClassifierassociationEnd, collection: true + attribute :classifier_participant, Classifierparticipant, collection: true + attribute :classifier_create_action, ClassifiercreateAction, collection: true + attribute :classifier_instance, Classifierinstance, collection: true + attribute :classifier_classifier_role, ClassifierclassifierRole, collection: true + attribute :classifier_classifier_in_state, ClassifierclassifierInState, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :namespace_owned_element, NamespaceownedElement, collection: true + attribute :classifier_feature, Classifierfeature, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'isRoot', to: :is_root - map_attribute 'isLeaf', to: :is_leaf - map_attribute 'isAbstract', to: :is_abstract - map_attribute 'isInstantiable', to: :is_instantiable - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'ModelElement.elementReference', to: :model_element_element_reference - map_attribute 'ModelElement.collaboration', to: :model_element_collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'generalization', to: :generalization - map_attribute 'specialization', to: :specialization - map_attribute 'parameter', to: :parameter - map_attribute 'structuralFeature', to: :structural_feature - map_attribute 'specification', to: :specification - map_attribute 'realization', to: :realization - map_attribute 'associationEnd', to: :association_end - map_attribute 'participant', to: :participant - map_attribute 'createAction', to: :create_action - map_attribute 'instance', to: :instance - map_attribute 'Classifier.collaboration', to: :classifier_collaboration - map_attribute 'classifierRole', to: :classifier_role - map_attribute 'classifierInState', to: :classifier_in_state - map_attribute 'Package.elementReference', to: :package_element_reference - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'GeneralizableElement.isRoot', to: :generalizable_element_is_root - map_element 'GeneralizableElement.isLeaf', to: :generalizable_element_is_leaf - map_element 'GeneralizableElement.isAbstract', to: :generalizable_element_is_abstract - map_element 'Subsystem.isInstantiable', to: :subsystem_is_instantiable - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'GeneralizableElement.generalization', to: :generalizable_element_generalization - map_element 'GeneralizableElement.specialization', to: :generalizable_element_specialization - map_element 'Classifier.parameter', to: :classifier_parameter - map_element 'Classifier.structuralFeature', to: :classifier_structural_feature - map_element 'Classifier.specification', to: :classifier_specification - map_element 'Classifier.realization', to: :classifier_realization - map_element 'Classifier.associationEnd', to: :classifier_association_end - map_element 'Classifier.participant', to: :classifier_participant - map_element 'Classifier.createAction', to: :classifier_create_action - map_element 'Classifier.instance', to: :classifier_instance - map_element 'Classifier.classifierRole', to: :classifier_classifier_role - map_element 'Classifier.classifierInState', to: :classifier_classifier_in_state - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Namespace.ownedElement', to: :namespace_owned_element - map_element 'Classifier.feature', to: :classifier_feature + xml do + root "Subsystem" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "isRoot", to: :is_root + map_attribute "isLeaf", to: :is_leaf + map_attribute "isAbstract", to: :is_abstract + map_attribute "isInstantiable", to: :is_instantiable + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "ModelElement.elementReference", to: :model_element_element_reference + map_attribute "ModelElement.collaboration", to: :model_element_collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "generalization", to: :generalization + map_attribute "specialization", to: :specialization + map_attribute "parameter", to: :parameter + map_attribute "structuralFeature", to: :structural_feature + map_attribute "specification", to: :specification + map_attribute "realization", to: :realization + map_attribute "associationEnd", to: :association_end + map_attribute "participant", to: :participant + map_attribute "createAction", to: :create_action + map_attribute "instance", to: :instance + map_attribute "Classifier.collaboration", to: :classifier_collaboration + map_attribute "classifierRole", to: :classifier_role + map_attribute "classifierInState", to: :classifier_in_state + map_attribute "Package.elementReference", to: :package_element_reference + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "GeneralizableElement.isRoot", to: :generalizable_element_is_root + map_element "GeneralizableElement.isLeaf", to: :generalizable_element_is_leaf + map_element "GeneralizableElement.isAbstract", to: :generalizable_element_is_abstract + map_element "Subsystem.isInstantiable", to: :subsystem_is_instantiable + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "GeneralizableElement.generalization", to: :generalizable_element_generalization + map_element "GeneralizableElement.specialization", to: :generalizable_element_specialization + map_element "Classifier.parameter", to: :classifier_parameter + map_element "Classifier.structuralFeature", to: :classifier_structural_feature + map_element "Classifier.specification", to: :classifier_specification + map_element "Classifier.realization", to: :classifier_realization + map_element "Classifier.associationEnd", to: :classifier_association_end + map_element "Classifier.participant", to: :classifier_participant + map_element "Classifier.createAction", to: :classifier_create_action + map_element "Classifier.instance", to: :classifier_instance + map_element "Classifier.classifierRole", to: :classifier_classifier_role + map_element "Classifier.classifierInState", to: :classifier_classifier_in_state + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Namespace.ownedElement", to: :namespace_owned_element + map_element "Classifier.feature", to: :classifier_feature + end + end end end diff --git a/lib/xmi/uml13/subsystemis_instantiable.rb b/lib/xmi/uml13/subsystemis_instantiable.rb index 98f56bb..d920c2a 100644 --- a/lib/xmi/uml13/subsystemis_instantiable.rb +++ b/lib/xmi/uml13/subsystemis_instantiable.rb @@ -1,12 +1,18 @@ -require 'shale' +# frozen_string_literal: true -class SubsystemisInstantiable < Shale::Mapper - attribute :xmi_value, Shale::Type::String +require "shale" - xml do - root 'Subsystem.isInstantiable' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class SubsystemisInstantiable < Shale::Mapper + attribute :xmi_value, Shale::Type::String - map_attribute 'xmi.value', to: :xmi_value + xml do + root "Subsystem.isInstantiable" + namespace "omg.org/UML1.3", "UML" + + map_attribute "xmi.value", to: :xmi_value + end + end end end diff --git a/lib/xmi/uml13/tagged_value.rb b/lib/xmi/uml13/tagged_value.rb index c41d291..e12c067 100644 --- a/lib/xmi/uml13/tagged_value.rb +++ b/lib/xmi/uml13/tagged_value.rb @@ -1,46 +1,52 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'tagged_valuemodel_element' -require_relative 'tagged_valuestereotype' -require_relative 'tagged_valuetag' -require_relative 'tagged_valuevalue' -require_relative 'xm_iextension' +require "shale" -class TaggedValue < Shale::Mapper - attribute :content, Shale::Type::String - attribute :tag, Shale::Type::Value - attribute :value, Shale::Type::Value - attribute :model_element, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :tagged_value_tag, TaggedValuetag, collection: true - attribute :tagged_value_value, TaggedValuevalue, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :tagged_value_model_element, TaggedValuemodelElement, collection: true - attribute :tagged_value_stereotype, TaggedValuestereotype, collection: true +require_relative "tagged_valuemodel_element" +require_relative "tagged_valuestereotype" +require_relative "tagged_valuetag" +require_relative "tagged_valuevalue" +require_relative "xm_iextension" - xml do - root 'TaggedValue' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class TaggedValue < Shale::Mapper + attribute :content, Shale::Type::String + attribute :tag, Shale::Type::Value + attribute :value, Shale::Type::Value + attribute :model_element, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :tagged_value_tag, TaggedValuetag, collection: true + attribute :tagged_value_value, TaggedValuevalue, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :tagged_value_model_element, TaggedValuemodelElement, collection: true + attribute :tagged_value_stereotype, TaggedValuestereotype, collection: true - map_content to: :content - map_attribute 'tag', to: :tag - map_attribute 'value', to: :value - map_attribute 'modelElement', to: :model_element - map_attribute 'stereotype', to: :stereotype - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'TaggedValue.tag', to: :tagged_value_tag - map_element 'TaggedValue.value', to: :tagged_value_value - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'TaggedValue.modelElement', to: :tagged_value_model_element - map_element 'TaggedValue.stereotype', to: :tagged_value_stereotype + xml do + root "TaggedValue" + namespace "omg.org/UML1.3", "UML" + + map_content to: :content + map_attribute "tag", to: :tag + map_attribute "value", to: :value + map_attribute "modelElement", to: :model_element + map_attribute "stereotype", to: :stereotype + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "TaggedValue.tag", to: :tagged_value_tag + map_element "TaggedValue.value", to: :tagged_value_value + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "TaggedValue.modelElement", to: :tagged_value_model_element + map_element "TaggedValue.stereotype", to: :tagged_value_stereotype + end + end end end diff --git a/lib/xmi/uml13/tagged_valuemodel_element.rb b/lib/xmi/uml13/tagged_valuemodel_element.rb index 9481369..7e48fcb 100644 --- a/lib/xmi/uml13/tagged_valuemodel_element.rb +++ b/lib/xmi/uml13/tagged_valuemodel_element.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'model_element' +require "shale" -class TaggedValuemodelElement < Shale::Mapper - attribute :model_element, ModelElement, collection: true +require_relative "model_element" - xml do - root 'TaggedValue.modelElement' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class TaggedValuemodelElement < Shale::Mapper + attribute :model_element, ModelElement, collection: true - map_element 'ModelElement', to: :model_element + xml do + root "TaggedValue.modelElement" + namespace "omg.org/UML1.3", "UML" + + map_element "ModelElement", to: :model_element + end + end end end diff --git a/lib/xmi/uml13/tagged_valuestereotype.rb b/lib/xmi/uml13/tagged_valuestereotype.rb index ee8f666..deeac37 100644 --- a/lib/xmi/uml13/tagged_valuestereotype.rb +++ b/lib/xmi/uml13/tagged_valuestereotype.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'stereotype' +require "shale" -class TaggedValuestereotype < Shale::Mapper - attribute :stereotype, Stereotype, collection: true +require_relative "stereotype" - xml do - root 'TaggedValue.stereotype' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class TaggedValuestereotype < Shale::Mapper + attribute :stereotype, Stereotype, collection: true - map_element 'Stereotype', to: :stereotype + xml do + root "TaggedValue.stereotype" + namespace "omg.org/UML1.3", "UML" + + map_element "Stereotype", to: :stereotype + end + end end end diff --git a/lib/xmi/uml13/tagged_valuetag.rb b/lib/xmi/uml13/tagged_valuetag.rb index e5d9122..8c089ca 100644 --- a/lib/xmi/uml13/tagged_valuetag.rb +++ b/lib/xmi/uml13/tagged_valuetag.rb @@ -1,16 +1,22 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'xm_ireference' +require "shale" -class TaggedValuetag < Shale::Mapper - attribute :content, Shale::Type::String - attribute :xmi_reference, XMIreference, collection: true +require_relative "xm_ireference" - xml do - root 'TaggedValue.tag' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class TaggedValuetag < Shale::Mapper + attribute :content, Shale::Type::String + attribute :xmi_reference, XMIreference, collection: true - map_content to: :content - map_element 'XMI.reference', to: :xmi_reference, prefix: nil, namespace: nil + xml do + root "TaggedValue.tag" + namespace "omg.org/UML1.3", "UML" + + map_content to: :content + map_element "XMI.reference", to: :xmi_reference, prefix: nil, namespace: nil + end + end end end diff --git a/lib/xmi/uml13/tagged_valuevalue.rb b/lib/xmi/uml13/tagged_valuevalue.rb index bac6d27..d3ea625 100644 --- a/lib/xmi/uml13/tagged_valuevalue.rb +++ b/lib/xmi/uml13/tagged_valuevalue.rb @@ -1,16 +1,22 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'xm_ireference' +require "shale" -class TaggedValuevalue < Shale::Mapper - attribute :content, Shale::Type::String - attribute :xmi_reference, XMIreference, collection: true +require_relative "xm_ireference" - xml do - root 'TaggedValue.value' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class TaggedValuevalue < Shale::Mapper + attribute :content, Shale::Type::String + attribute :xmi_reference, XMIreference, collection: true - map_content to: :content - map_element 'XMI.reference', to: :xmi_reference, prefix: nil, namespace: nil + xml do + root "TaggedValue.value" + namespace "omg.org/UML1.3", "UML" + + map_content to: :content + map_element "XMI.reference", to: :xmi_reference, prefix: nil, namespace: nil + end + end end end diff --git a/lib/xmi/uml13/terminate_action.rb b/lib/xmi/uml13/terminate_action.rb index 609504f..34d479a 100644 --- a/lib/xmi/uml13/terminate_action.rb +++ b/lib/xmi/uml13/terminate_action.rb @@ -1,146 +1,152 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'actionaction_sequence' -require_relative 'actionactual_argument' -require_relative 'actionis_asynchronous' -require_relative 'actionmessage' -require_relative 'actionrecurrence' -require_relative 'actionrequest' -require_relative 'actionscript' -require_relative 'actiontarget' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'xm_iextension' +require "shale" -class TerminateAction < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :is_asynchronous, Shale::Type::String - attribute :script, Shale::Type::Value - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :request, Shale::Type::Value - attribute :message, Shale::Type::Value - attribute :action_sequence, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :action_recurrence, Actionrecurrence, collection: true - attribute :action_target, Actiontarget, collection: true - attribute :action_is_asynchronous, ActionisAsynchronous, collection: true - attribute :action_script, Actionscript, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :action_request, Actionrequest, collection: true - attribute :action_message, Actionmessage, collection: true - attribute :action_action_sequence, ActionactionSequence, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :action_actual_argument, ActionactualArgument, collection: true +require_relative "actionaction_sequence" +require_relative "actionactual_argument" +require_relative "actionis_asynchronous" +require_relative "actionmessage" +require_relative "actionrecurrence" +require_relative "actionrequest" +require_relative "actionscript" +require_relative "actiontarget" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "xm_iextension" - xml do - root 'TerminateAction' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class TerminateAction < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :is_asynchronous, Shale::Type::String + attribute :script, Shale::Type::Value + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :request, Shale::Type::Value + attribute :message, Shale::Type::Value + attribute :action_sequence, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :action_recurrence, Actionrecurrence, collection: true + attribute :action_target, Actiontarget, collection: true + attribute :action_is_asynchronous, ActionisAsynchronous, collection: true + attribute :action_script, Actionscript, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :action_request, Actionrequest, collection: true + attribute :action_message, Actionmessage, collection: true + attribute :action_action_sequence, ActionactionSequence, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :action_actual_argument, ActionactualArgument, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'isAsynchronous', to: :is_asynchronous - map_attribute 'script', to: :script - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'request', to: :request - map_attribute 'message', to: :message - map_attribute 'actionSequence', to: :action_sequence - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'Action.recurrence', to: :action_recurrence - map_element 'Action.target', to: :action_target - map_element 'Action.isAsynchronous', to: :action_is_asynchronous - map_element 'Action.script', to: :action_script - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'Action.request', to: :action_request - map_element 'Action.message', to: :action_message - map_element 'Action.actionSequence', to: :action_action_sequence - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Action.actualArgument', to: :action_actual_argument + xml do + root "TerminateAction" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "isAsynchronous", to: :is_asynchronous + map_attribute "script", to: :script + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "request", to: :request + map_attribute "message", to: :message + map_attribute "actionSequence", to: :action_sequence + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "Action.recurrence", to: :action_recurrence + map_element "Action.target", to: :action_target + map_element "Action.isAsynchronous", to: :action_is_asynchronous + map_element "Action.script", to: :action_script + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "Action.request", to: :action_request + map_element "Action.message", to: :action_message + map_element "Action.actionSequence", to: :action_action_sequence + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Action.actualArgument", to: :action_actual_argument + end + end end end diff --git a/lib/xmi/uml13/time_event.rb b/lib/xmi/uml13/time_event.rb index 3d94236..5bebf1e 100644 --- a/lib/xmi/uml13/time_event.rb +++ b/lib/xmi/uml13/time_event.rb @@ -1,125 +1,131 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'eventstate' -require_relative 'eventtransition' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'time_eventduration' -require_relative 'xm_iextension' +require "shale" -class TimeEvent < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :state, Shale::Type::Value - attribute :transition, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :time_event_duration, TimeEventduration, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :event_state, Eventstate, collection: true - attribute :event_transition, Eventtransition, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true +require_relative "eventstate" +require_relative "eventtransition" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "time_eventduration" +require_relative "xm_iextension" - xml do - root 'TimeEvent' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class TimeEvent < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :state, Shale::Type::Value + attribute :transition, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :time_event_duration, TimeEventduration, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :event_state, Eventstate, collection: true + attribute :event_transition, Eventtransition, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'state', to: :state - map_attribute 'transition', to: :transition - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'TimeEvent.duration', to: :time_event_duration - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'Event.state', to: :event_state - map_element 'Event.transition', to: :event_transition - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value + xml do + root "TimeEvent" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "state", to: :state + map_attribute "transition", to: :transition + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "TimeEvent.duration", to: :time_event_duration + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "Event.state", to: :event_state + map_element "Event.transition", to: :event_transition + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + end + end end end diff --git a/lib/xmi/uml13/time_eventduration.rb b/lib/xmi/uml13/time_eventduration.rb index cabe5b5..e84b1de 100644 --- a/lib/xmi/uml13/time_eventduration.rb +++ b/lib/xmi/uml13/time_eventduration.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'time_expression' +require "shale" -class TimeEventduration < Shale::Mapper - attribute :time_expression, TimeExpression +require_relative "time_expression" - xml do - root 'TimeEvent.duration' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class TimeEventduration < Shale::Mapper + attribute :time_expression, TimeExpression - map_element 'TimeExpression', to: :time_expression + xml do + root "TimeEvent.duration" + namespace "omg.org/UML1.3", "UML" + + map_element "TimeExpression", to: :time_expression + end + end end end diff --git a/lib/xmi/uml13/time_expression.rb b/lib/xmi/uml13/time_expression.rb index 6b5d476..174986f 100644 --- a/lib/xmi/uml13/time_expression.rb +++ b/lib/xmi/uml13/time_expression.rb @@ -1,34 +1,40 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'expressionbody' -require_relative 'expressionlanguage' -require_relative 'xm_iextension' +require "shale" -class TimeExpression < Shale::Mapper - attribute :language, Shale::Type::Value - attribute :body, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :expression_language, Expressionlanguage, collection: true - attribute :expression_body, Expressionbody, collection: true - attribute :xmi_extension, XMIextension, collection: true +require_relative "expressionbody" +require_relative "expressionlanguage" +require_relative "xm_iextension" - xml do - root 'TimeExpression' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class TimeExpression < Shale::Mapper + attribute :language, Shale::Type::Value + attribute :body, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :expression_language, Expressionlanguage, collection: true + attribute :expression_body, Expressionbody, collection: true + attribute :xmi_extension, XMIextension, collection: true - map_attribute 'language', to: :language - map_attribute 'body', to: :body - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'Expression.language', to: :expression_language - map_element 'Expression.body', to: :expression_body - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil + xml do + root "TimeExpression" + namespace "omg.org/UML1.3", "UML" + + map_attribute "language", to: :language + map_attribute "body", to: :body + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "Expression.language", to: :expression_language + map_element "Expression.body", to: :expression_body + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + end + end end end diff --git a/lib/xmi/uml13/trace.rb b/lib/xmi/uml13/trace.rb index efc9fb0..1e88ee8 100644 --- a/lib/xmi/uml13/trace.rb +++ b/lib/xmi/uml13/trace.rb @@ -1,135 +1,141 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'dependencyclient' -require_relative 'dependencydescription' -require_relative 'dependencyowning_dependency' -require_relative 'dependencysub_dependencies' -require_relative 'dependencysupplier' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'xm_iextension' +require "shale" -class Trace < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :description, Shale::Type::Value - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :owning_dependency, Shale::Type::Value - attribute :client, Shale::Type::Value - attribute :supplier, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :dependency_description, Dependencydescription, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :dependency_owning_dependency, DependencyowningDependency, collection: true - attribute :dependency_client, Dependencyclient, collection: true - attribute :dependency_supplier, Dependencysupplier, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :dependency_sub_dependencies, DependencysubDependencies, collection: true +require_relative "dependencyclient" +require_relative "dependencydescription" +require_relative "dependencyowning_dependency" +require_relative "dependencysub_dependencies" +require_relative "dependencysupplier" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "xm_iextension" - xml do - root 'Trace' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Trace < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :description, Shale::Type::Value + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :owning_dependency, Shale::Type::Value + attribute :client, Shale::Type::Value + attribute :supplier, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :dependency_description, Dependencydescription, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :dependency_owning_dependency, DependencyowningDependency, collection: true + attribute :dependency_client, Dependencyclient, collection: true + attribute :dependency_supplier, Dependencysupplier, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :dependency_sub_dependencies, DependencysubDependencies, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'description', to: :description - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'owningDependency', to: :owning_dependency - map_attribute 'client', to: :client - map_attribute 'supplier', to: :supplier - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'Dependency.description', to: :dependency_description - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'Dependency.owningDependency', to: :dependency_owning_dependency - map_element 'Dependency.client', to: :dependency_client - map_element 'Dependency.supplier', to: :dependency_supplier - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Dependency.subDependencies', to: :dependency_sub_dependencies + xml do + root "Trace" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "description", to: :description + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "owningDependency", to: :owning_dependency + map_attribute "client", to: :client + map_attribute "supplier", to: :supplier + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "Dependency.description", to: :dependency_description + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "Dependency.owningDependency", to: :dependency_owning_dependency + map_element "Dependency.client", to: :dependency_client + map_element "Dependency.supplier", to: :dependency_supplier + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Dependency.subDependencies", to: :dependency_sub_dependencies + end + end end end diff --git a/lib/xmi/uml13/transition.rb b/lib/xmi/uml13/transition.rb index f22e128..5d52041 100644 --- a/lib/xmi/uml13/transition.rb +++ b/lib/xmi/uml13/transition.rb @@ -1,143 +1,149 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'transitioneffect' -require_relative 'transitionguard' -require_relative 'transitionsource' -require_relative 'transitionstate' -require_relative 'transitionstatemachine' -require_relative 'transitiontarget' -require_relative 'transitiontrigger' -require_relative 'xm_iextension' +require "shale" -class Transition < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :source, Shale::Type::Value - attribute :target, Shale::Type::Value - attribute :statemachine, Shale::Type::Value - attribute :state, Shale::Type::Value - attribute :trigger, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :transition_source, Transitionsource, collection: true - attribute :transition_target, Transitiontarget, collection: true - attribute :transition_statemachine, Transitionstatemachine, collection: true - attribute :transition_state, Transitionstate, collection: true - attribute :transition_trigger, Transitiontrigger, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :transition_guard, Transitionguard, collection: true - attribute :transition_effect, Transitioneffect, collection: true +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "transitioneffect" +require_relative "transitionguard" +require_relative "transitionsource" +require_relative "transitionstate" +require_relative "transitionstatemachine" +require_relative "transitiontarget" +require_relative "transitiontrigger" +require_relative "xm_iextension" - xml do - root 'Transition' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Transition < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :source, Shale::Type::Value + attribute :target, Shale::Type::Value + attribute :statemachine, Shale::Type::Value + attribute :state, Shale::Type::Value + attribute :trigger, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :transition_source, Transitionsource, collection: true + attribute :transition_target, Transitiontarget, collection: true + attribute :transition_statemachine, Transitionstatemachine, collection: true + attribute :transition_state, Transitionstate, collection: true + attribute :transition_trigger, Transitiontrigger, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :transition_guard, Transitionguard, collection: true + attribute :transition_effect, Transitioneffect, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'source', to: :source - map_attribute 'target', to: :target - map_attribute 'statemachine', to: :statemachine - map_attribute 'state', to: :state - map_attribute 'trigger', to: :trigger - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'Transition.source', to: :transition_source - map_element 'Transition.target', to: :transition_target - map_element 'Transition.statemachine', to: :transition_statemachine - map_element 'Transition.state', to: :transition_state - map_element 'Transition.trigger', to: :transition_trigger - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Transition.guard', to: :transition_guard - map_element 'Transition.effect', to: :transition_effect + xml do + root "Transition" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "source", to: :source + map_attribute "target", to: :target + map_attribute "statemachine", to: :statemachine + map_attribute "state", to: :state + map_attribute "trigger", to: :trigger + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "Transition.source", to: :transition_source + map_element "Transition.target", to: :transition_target + map_element "Transition.statemachine", to: :transition_statemachine + map_element "Transition.state", to: :transition_state + map_element "Transition.trigger", to: :transition_trigger + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Transition.guard", to: :transition_guard + map_element "Transition.effect", to: :transition_effect + end + end end end diff --git a/lib/xmi/uml13/transitioneffect.rb b/lib/xmi/uml13/transitioneffect.rb index 683dc80..05b0edb 100644 --- a/lib/xmi/uml13/transitioneffect.rb +++ b/lib/xmi/uml13/transitioneffect.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'action_sequence' +require "shale" -class Transitioneffect < Shale::Mapper - attribute :action_sequence, ActionSequence, collection: true +require_relative "action_sequence" - xml do - root 'Transition.effect' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Transitioneffect < Shale::Mapper + attribute :action_sequence, ActionSequence, collection: true - map_element 'ActionSequence', to: :action_sequence + xml do + root "Transition.effect" + namespace "omg.org/UML1.3", "UML" + + map_element "ActionSequence", to: :action_sequence + end + end end end diff --git a/lib/xmi/uml13/transitionguard.rb b/lib/xmi/uml13/transitionguard.rb index d0ed1d5..cd0fbb7 100644 --- a/lib/xmi/uml13/transitionguard.rb +++ b/lib/xmi/uml13/transitionguard.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'guard' +require "shale" -class Transitionguard < Shale::Mapper - attribute :guard, Guard, collection: true +require_relative "guard" - xml do - root 'Transition.guard' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Transitionguard < Shale::Mapper + attribute :guard, Guard, collection: true - map_element 'Guard', to: :guard + xml do + root "Transition.guard" + namespace "omg.org/UML1.3", "UML" + + map_element "Guard", to: :guard + end + end end end diff --git a/lib/xmi/uml13/transitionsource.rb b/lib/xmi/uml13/transitionsource.rb index 8e3b99f..a2370bc 100644 --- a/lib/xmi/uml13/transitionsource.rb +++ b/lib/xmi/uml13/transitionsource.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'state_vertex' +require "shale" -class Transitionsource < Shale::Mapper - attribute :state_vertex, StateVertex, collection: true +require_relative "state_vertex" - xml do - root 'Transition.source' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Transitionsource < Shale::Mapper + attribute :state_vertex, StateVertex, collection: true - map_element 'StateVertex', to: :state_vertex + xml do + root "Transition.source" + namespace "omg.org/UML1.3", "UML" + + map_element "StateVertex", to: :state_vertex + end + end end end diff --git a/lib/xmi/uml13/transitionstate.rb b/lib/xmi/uml13/transitionstate.rb index 7df2b53..27f9f64 100644 --- a/lib/xmi/uml13/transitionstate.rb +++ b/lib/xmi/uml13/transitionstate.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'state' +require "shale" -class Transitionstate < Shale::Mapper - attribute :state, State, collection: true +require_relative "state" - xml do - root 'Transition.state' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Transitionstate < Shale::Mapper + attribute :state, State, collection: true - map_element 'State', to: :state + xml do + root "Transition.state" + namespace "omg.org/UML1.3", "UML" + + map_element "State", to: :state + end + end end end diff --git a/lib/xmi/uml13/transitionstatemachine.rb b/lib/xmi/uml13/transitionstatemachine.rb index f1482e5..58e8299 100644 --- a/lib/xmi/uml13/transitionstatemachine.rb +++ b/lib/xmi/uml13/transitionstatemachine.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'state_machine' +require "shale" -class Transitionstatemachine < Shale::Mapper - attribute :state_machine, StateMachine, collection: true +require_relative "state_machine" - xml do - root 'Transition.statemachine' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Transitionstatemachine < Shale::Mapper + attribute :state_machine, StateMachine, collection: true - map_element 'StateMachine', to: :state_machine + xml do + root "Transition.statemachine" + namespace "omg.org/UML1.3", "UML" + + map_element "StateMachine", to: :state_machine + end + end end end diff --git a/lib/xmi/uml13/transitiontarget.rb b/lib/xmi/uml13/transitiontarget.rb index 7c9fe5b..e11b1a9 100644 --- a/lib/xmi/uml13/transitiontarget.rb +++ b/lib/xmi/uml13/transitiontarget.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'state_vertex' +require "shale" -class Transitiontarget < Shale::Mapper - attribute :state_vertex, StateVertex, collection: true +require_relative "state_vertex" - xml do - root 'Transition.target' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Transitiontarget < Shale::Mapper + attribute :state_vertex, StateVertex, collection: true - map_element 'StateVertex', to: :state_vertex + xml do + root "Transition.target" + namespace "omg.org/UML1.3", "UML" + + map_element "StateVertex", to: :state_vertex + end + end end end diff --git a/lib/xmi/uml13/transitiontrigger.rb b/lib/xmi/uml13/transitiontrigger.rb index e3307ee..d26bdf4 100644 --- a/lib/xmi/uml13/transitiontrigger.rb +++ b/lib/xmi/uml13/transitiontrigger.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'event' +require "shale" -class Transitiontrigger < Shale::Mapper - attribute :event, Event, collection: true +require_relative "event" - xml do - root 'Transition.trigger' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Transitiontrigger < Shale::Mapper + attribute :event, Event, collection: true - map_element 'Event', to: :event + xml do + root "Transition.trigger" + namespace "omg.org/UML1.3", "UML" + + map_element "Event", to: :event + end + end end end diff --git a/lib/xmi/uml13/uninterpreted_action.rb b/lib/xmi/uml13/uninterpreted_action.rb index 604f4f1..ec2fb38 100644 --- a/lib/xmi/uml13/uninterpreted_action.rb +++ b/lib/xmi/uml13/uninterpreted_action.rb @@ -1,151 +1,157 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'actionaction_sequence' -require_relative 'actionactual_argument' -require_relative 'actionis_asynchronous' -require_relative 'actionmessage' -require_relative 'actionrecurrence' -require_relative 'actionrequest' -require_relative 'actionscript' -require_relative 'actiontarget' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'uninterpreted_actionbody' -require_relative 'xm_iextension' +require "shale" -class UninterpretedAction < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :is_asynchronous, Shale::Type::String - attribute :script, Shale::Type::Value - attribute :body, Shale::Type::Value - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :request, Shale::Type::Value - attribute :message, Shale::Type::Value - attribute :action_sequence, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :action_recurrence, Actionrecurrence, collection: true - attribute :action_target, Actiontarget, collection: true - attribute :action_is_asynchronous, ActionisAsynchronous, collection: true - attribute :action_script, Actionscript, collection: true - attribute :uninterpreted_action_body, UninterpretedActionbody, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :action_request, Actionrequest, collection: true - attribute :action_message, Actionmessage, collection: true - attribute :action_action_sequence, ActionactionSequence, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :action_actual_argument, ActionactualArgument, collection: true +require_relative "actionaction_sequence" +require_relative "actionactual_argument" +require_relative "actionis_asynchronous" +require_relative "actionmessage" +require_relative "actionrecurrence" +require_relative "actionrequest" +require_relative "actionscript" +require_relative "actiontarget" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "uninterpreted_actionbody" +require_relative "xm_iextension" - xml do - root 'UninterpretedAction' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class UninterpretedAction < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :is_asynchronous, Shale::Type::String + attribute :script, Shale::Type::Value + attribute :body, Shale::Type::Value + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :request, Shale::Type::Value + attribute :message, Shale::Type::Value + attribute :action_sequence, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :action_recurrence, Actionrecurrence, collection: true + attribute :action_target, Actiontarget, collection: true + attribute :action_is_asynchronous, ActionisAsynchronous, collection: true + attribute :action_script, Actionscript, collection: true + attribute :uninterpreted_action_body, UninterpretedActionbody, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :action_request, Actionrequest, collection: true + attribute :action_message, Actionmessage, collection: true + attribute :action_action_sequence, ActionactionSequence, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :action_actual_argument, ActionactualArgument, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'isAsynchronous', to: :is_asynchronous - map_attribute 'script', to: :script - map_attribute 'body', to: :body - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'request', to: :request - map_attribute 'message', to: :message - map_attribute 'actionSequence', to: :action_sequence - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'Action.recurrence', to: :action_recurrence - map_element 'Action.target', to: :action_target - map_element 'Action.isAsynchronous', to: :action_is_asynchronous - map_element 'Action.script', to: :action_script - map_element 'UninterpretedAction.body', to: :uninterpreted_action_body - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'Action.request', to: :action_request - map_element 'Action.message', to: :action_message - map_element 'Action.actionSequence', to: :action_action_sequence - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Action.actualArgument', to: :action_actual_argument + xml do + root "UninterpretedAction" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "isAsynchronous", to: :is_asynchronous + map_attribute "script", to: :script + map_attribute "body", to: :body + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "request", to: :request + map_attribute "message", to: :message + map_attribute "actionSequence", to: :action_sequence + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "Action.recurrence", to: :action_recurrence + map_element "Action.target", to: :action_target + map_element "Action.isAsynchronous", to: :action_is_asynchronous + map_element "Action.script", to: :action_script + map_element "UninterpretedAction.body", to: :uninterpreted_action_body + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "Action.request", to: :action_request + map_element "Action.message", to: :action_message + map_element "Action.actionSequence", to: :action_action_sequence + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Action.actualArgument", to: :action_actual_argument + end + end end end diff --git a/lib/xmi/uml13/uninterpreted_actionbody.rb b/lib/xmi/uml13/uninterpreted_actionbody.rb index c87eaf2..be4e6cc 100644 --- a/lib/xmi/uml13/uninterpreted_actionbody.rb +++ b/lib/xmi/uml13/uninterpreted_actionbody.rb @@ -1,16 +1,22 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'xm_ireference' +require "shale" -class UninterpretedActionbody < Shale::Mapper - attribute :content, Shale::Type::String - attribute :xmi_reference, XMIreference, collection: true +require_relative "xm_ireference" - xml do - root 'UninterpretedAction.body' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class UninterpretedActionbody < Shale::Mapper + attribute :content, Shale::Type::String + attribute :xmi_reference, XMIreference, collection: true - map_content to: :content - map_element 'XMI.reference', to: :xmi_reference, prefix: nil, namespace: nil + xml do + root "UninterpretedAction.body" + namespace "omg.org/UML1.3", "UML" + + map_content to: :content + map_element "XMI.reference", to: :xmi_reference, prefix: nil, namespace: nil + end + end end end diff --git a/lib/xmi/uml13/usage.rb b/lib/xmi/uml13/usage.rb index 87b9d4a..74bd4ba 100644 --- a/lib/xmi/uml13/usage.rb +++ b/lib/xmi/uml13/usage.rb @@ -1,135 +1,141 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'dependencyclient' -require_relative 'dependencydescription' -require_relative 'dependencyowning_dependency' -require_relative 'dependencysub_dependencies' -require_relative 'dependencysupplier' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'xm_iextension' +require "shale" -class Usage < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :description, Shale::Type::Value - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :owning_dependency, Shale::Type::Value - attribute :client, Shale::Type::Value - attribute :supplier, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :dependency_description, Dependencydescription, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :dependency_owning_dependency, DependencyowningDependency, collection: true - attribute :dependency_client, Dependencyclient, collection: true - attribute :dependency_supplier, Dependencysupplier, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :dependency_sub_dependencies, DependencysubDependencies, collection: true +require_relative "dependencyclient" +require_relative "dependencydescription" +require_relative "dependencyowning_dependency" +require_relative "dependencysub_dependencies" +require_relative "dependencysupplier" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "xm_iextension" - xml do - root 'Usage' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class Usage < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :description, Shale::Type::Value + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :owning_dependency, Shale::Type::Value + attribute :client, Shale::Type::Value + attribute :supplier, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :dependency_description, Dependencydescription, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :dependency_owning_dependency, DependencyowningDependency, collection: true + attribute :dependency_client, Dependencyclient, collection: true + attribute :dependency_supplier, Dependencysupplier, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :dependency_sub_dependencies, DependencysubDependencies, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'description', to: :description - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'owningDependency', to: :owning_dependency - map_attribute 'client', to: :client - map_attribute 'supplier', to: :supplier - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'Dependency.description', to: :dependency_description - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'Dependency.owningDependency', to: :dependency_owning_dependency - map_element 'Dependency.client', to: :dependency_client - map_element 'Dependency.supplier', to: :dependency_supplier - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Dependency.subDependencies', to: :dependency_sub_dependencies + xml do + root "Usage" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "description", to: :description + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "owningDependency", to: :owning_dependency + map_attribute "client", to: :client + map_attribute "supplier", to: :supplier + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "Dependency.description", to: :dependency_description + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "Dependency.owningDependency", to: :dependency_owning_dependency + map_element "Dependency.client", to: :dependency_client + map_element "Dependency.supplier", to: :dependency_supplier + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Dependency.subDependencies", to: :dependency_sub_dependencies + end + end end end diff --git a/lib/xmi/uml13/use_case.rb b/lib/xmi/uml13/use_case.rb index 4a9d337..36c4c47 100644 --- a/lib/xmi/uml13/use_case.rb +++ b/lib/xmi/uml13/use_case.rb @@ -1,197 +1,203 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'classifierassociation_end' -require_relative 'classifierclassifier_in_state' -require_relative 'classifierclassifier_role' -require_relative 'classifiercreate_action' -require_relative 'classifierfeature' -require_relative 'classifierinstance' -require_relative 'classifierparameter' -require_relative 'classifierparticipant' -require_relative 'classifierrealization' -require_relative 'classifierspecification' -require_relative 'classifierstructural_feature' -require_relative 'generalizable_elementgeneralization' -require_relative 'generalizable_elementis_abstract' -require_relative 'generalizable_elementis_leaf' -require_relative 'generalizable_elementis_root' -require_relative 'generalizable_elementspecialization' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'namespaceowned_element' -require_relative 'use_caseextension_point' -require_relative 'xm_iextension' +require "shale" -class UseCase < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :is_root, Shale::Type::String - attribute :is_leaf, Shale::Type::String - attribute :is_abstract, Shale::Type::String - attribute :extension_point, Shale::Type::Value - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :model_element_collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :generalization, Shale::Type::Value - attribute :specialization, Shale::Type::Value - attribute :parameter, Shale::Type::Value - attribute :structural_feature, Shale::Type::Value - attribute :specification, Shale::Type::Value - attribute :realization, Shale::Type::Value - attribute :association_end, Shale::Type::Value - attribute :participant, Shale::Type::Value - attribute :create_action, Shale::Type::Value - attribute :instance, Shale::Type::Value - attribute :classifier_collaboration, Shale::Type::Value - attribute :classifier_role, Shale::Type::Value - attribute :classifier_in_state, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :generalizable_element_is_root, GeneralizableElementisRoot, collection: true - attribute :generalizable_element_is_leaf, GeneralizableElementisLeaf, collection: true - attribute :generalizable_element_is_abstract, GeneralizableElementisAbstract, collection: true - attribute :use_case_extension_point, UseCaseextensionPoint, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :generalizable_element_generalization, GeneralizableElementgeneralization, collection: true - attribute :generalizable_element_specialization, GeneralizableElementspecialization, collection: true - attribute :classifier_parameter, Classifierparameter, collection: true - attribute :classifier_structural_feature, ClassifierstructuralFeature, collection: true - attribute :classifier_specification, Classifierspecification, collection: true - attribute :classifier_realization, Classifierrealization, collection: true - attribute :classifier_association_end, ClassifierassociationEnd, collection: true - attribute :classifier_participant, Classifierparticipant, collection: true - attribute :classifier_create_action, ClassifiercreateAction, collection: true - attribute :classifier_instance, Classifierinstance, collection: true - attribute :classifier_classifier_role, ClassifierclassifierRole, collection: true - attribute :classifier_classifier_in_state, ClassifierclassifierInState, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :namespace_owned_element, NamespaceownedElement, collection: true - attribute :classifier_feature, Classifierfeature, collection: true +require_relative "classifierassociation_end" +require_relative "classifierclassifier_in_state" +require_relative "classifierclassifier_role" +require_relative "classifiercreate_action" +require_relative "classifierfeature" +require_relative "classifierinstance" +require_relative "classifierparameter" +require_relative "classifierparticipant" +require_relative "classifierrealization" +require_relative "classifierspecification" +require_relative "classifierstructural_feature" +require_relative "generalizable_elementgeneralization" +require_relative "generalizable_elementis_abstract" +require_relative "generalizable_elementis_leaf" +require_relative "generalizable_elementis_root" +require_relative "generalizable_elementspecialization" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "namespaceowned_element" +require_relative "use_caseextension_point" +require_relative "xm_iextension" - xml do - root 'UseCase' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class UseCase < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :is_root, Shale::Type::String + attribute :is_leaf, Shale::Type::String + attribute :is_abstract, Shale::Type::String + attribute :extension_point, Shale::Type::Value + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :model_element_collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :generalization, Shale::Type::Value + attribute :specialization, Shale::Type::Value + attribute :parameter, Shale::Type::Value + attribute :structural_feature, Shale::Type::Value + attribute :specification, Shale::Type::Value + attribute :realization, Shale::Type::Value + attribute :association_end, Shale::Type::Value + attribute :participant, Shale::Type::Value + attribute :create_action, Shale::Type::Value + attribute :instance, Shale::Type::Value + attribute :classifier_collaboration, Shale::Type::Value + attribute :classifier_role, Shale::Type::Value + attribute :classifier_in_state, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :generalizable_element_is_root, GeneralizableElementisRoot, collection: true + attribute :generalizable_element_is_leaf, GeneralizableElementisLeaf, collection: true + attribute :generalizable_element_is_abstract, GeneralizableElementisAbstract, collection: true + attribute :use_case_extension_point, UseCaseextensionPoint, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :generalizable_element_generalization, GeneralizableElementgeneralization, collection: true + attribute :generalizable_element_specialization, GeneralizableElementspecialization, collection: true + attribute :classifier_parameter, Classifierparameter, collection: true + attribute :classifier_structural_feature, ClassifierstructuralFeature, collection: true + attribute :classifier_specification, Classifierspecification, collection: true + attribute :classifier_realization, Classifierrealization, collection: true + attribute :classifier_association_end, ClassifierassociationEnd, collection: true + attribute :classifier_participant, Classifierparticipant, collection: true + attribute :classifier_create_action, ClassifiercreateAction, collection: true + attribute :classifier_instance, Classifierinstance, collection: true + attribute :classifier_classifier_role, ClassifierclassifierRole, collection: true + attribute :classifier_classifier_in_state, ClassifierclassifierInState, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :namespace_owned_element, NamespaceownedElement, collection: true + attribute :classifier_feature, Classifierfeature, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'isRoot', to: :is_root - map_attribute 'isLeaf', to: :is_leaf - map_attribute 'isAbstract', to: :is_abstract - map_attribute 'extensionPoint', to: :extension_point - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'ModelElement.collaboration', to: :model_element_collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'generalization', to: :generalization - map_attribute 'specialization', to: :specialization - map_attribute 'parameter', to: :parameter - map_attribute 'structuralFeature', to: :structural_feature - map_attribute 'specification', to: :specification - map_attribute 'realization', to: :realization - map_attribute 'associationEnd', to: :association_end - map_attribute 'participant', to: :participant - map_attribute 'createAction', to: :create_action - map_attribute 'instance', to: :instance - map_attribute 'Classifier.collaboration', to: :classifier_collaboration - map_attribute 'classifierRole', to: :classifier_role - map_attribute 'classifierInState', to: :classifier_in_state - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'GeneralizableElement.isRoot', to: :generalizable_element_is_root - map_element 'GeneralizableElement.isLeaf', to: :generalizable_element_is_leaf - map_element 'GeneralizableElement.isAbstract', to: :generalizable_element_is_abstract - map_element 'UseCase.extensionPoint', to: :use_case_extension_point - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'GeneralizableElement.generalization', to: :generalizable_element_generalization - map_element 'GeneralizableElement.specialization', to: :generalizable_element_specialization - map_element 'Classifier.parameter', to: :classifier_parameter - map_element 'Classifier.structuralFeature', to: :classifier_structural_feature - map_element 'Classifier.specification', to: :classifier_specification - map_element 'Classifier.realization', to: :classifier_realization - map_element 'Classifier.associationEnd', to: :classifier_association_end - map_element 'Classifier.participant', to: :classifier_participant - map_element 'Classifier.createAction', to: :classifier_create_action - map_element 'Classifier.instance', to: :classifier_instance - map_element 'Classifier.classifierRole', to: :classifier_classifier_role - map_element 'Classifier.classifierInState', to: :classifier_classifier_in_state - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Namespace.ownedElement', to: :namespace_owned_element - map_element 'Classifier.feature', to: :classifier_feature + xml do + root "UseCase" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "isRoot", to: :is_root + map_attribute "isLeaf", to: :is_leaf + map_attribute "isAbstract", to: :is_abstract + map_attribute "extensionPoint", to: :extension_point + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "ModelElement.collaboration", to: :model_element_collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "generalization", to: :generalization + map_attribute "specialization", to: :specialization + map_attribute "parameter", to: :parameter + map_attribute "structuralFeature", to: :structural_feature + map_attribute "specification", to: :specification + map_attribute "realization", to: :realization + map_attribute "associationEnd", to: :association_end + map_attribute "participant", to: :participant + map_attribute "createAction", to: :create_action + map_attribute "instance", to: :instance + map_attribute "Classifier.collaboration", to: :classifier_collaboration + map_attribute "classifierRole", to: :classifier_role + map_attribute "classifierInState", to: :classifier_in_state + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "GeneralizableElement.isRoot", to: :generalizable_element_is_root + map_element "GeneralizableElement.isLeaf", to: :generalizable_element_is_leaf + map_element "GeneralizableElement.isAbstract", to: :generalizable_element_is_abstract + map_element "UseCase.extensionPoint", to: :use_case_extension_point + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "GeneralizableElement.generalization", to: :generalizable_element_generalization + map_element "GeneralizableElement.specialization", to: :generalizable_element_specialization + map_element "Classifier.parameter", to: :classifier_parameter + map_element "Classifier.structuralFeature", to: :classifier_structural_feature + map_element "Classifier.specification", to: :classifier_specification + map_element "Classifier.realization", to: :classifier_realization + map_element "Classifier.associationEnd", to: :classifier_association_end + map_element "Classifier.participant", to: :classifier_participant + map_element "Classifier.createAction", to: :classifier_create_action + map_element "Classifier.instance", to: :classifier_instance + map_element "Classifier.classifierRole", to: :classifier_classifier_role + map_element "Classifier.classifierInState", to: :classifier_classifier_in_state + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Namespace.ownedElement", to: :namespace_owned_element + map_element "Classifier.feature", to: :classifier_feature + end + end end end diff --git a/lib/xmi/uml13/use_case_instance.rb b/lib/xmi/uml13/use_case_instance.rb index 170d63d..7131c0b 100644 --- a/lib/xmi/uml13/use_case_instance.rb +++ b/lib/xmi/uml13/use_case_instance.rb @@ -1,145 +1,151 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'instanceattribute_link' -require_relative 'instanceclassifier' -require_relative 'instancelink_end' -require_relative 'instancemessage_instance' -require_relative 'instancemessage_instance2' -require_relative 'instancemessage_instance3' -require_relative 'instanceslot' -require_relative 'model_elementbehavior' -require_relative 'model_elementbinding' -require_relative 'model_elementcollaboration' -require_relative 'model_elementconstraint' -require_relative 'model_elementelement_reference' -require_relative 'model_elementimplementation' -require_relative 'model_elementname' -require_relative 'model_elementnamespace' -require_relative 'model_elementpartition' -require_relative 'model_elementpresentation' -require_relative 'model_elementprovision' -require_relative 'model_elementrequirement' -require_relative 'model_elementstereotype' -require_relative 'model_elementtagged_value' -require_relative 'model_elementtemplate' -require_relative 'model_elementtemplate_parameter' -require_relative 'model_elementview' -require_relative 'model_elementvisibility' -require_relative 'xm_iextension' +require "shale" -class UseCaseInstance < Shale::Mapper - attribute :name, Shale::Type::Value - attribute :visibility, Shale::Type::String - attribute :binding, Shale::Type::Value - attribute :template, Shale::Type::Value - attribute :template_parameter, Shale::Type::Value - attribute :implementation, Shale::Type::Value - attribute :view, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :namespace, Shale::Type::Value - attribute :constraint, Shale::Type::Value - attribute :requirement, Shale::Type::Value - attribute :provision, Shale::Type::Value - attribute :stereotype, Shale::Type::Value - attribute :element_reference, Shale::Type::Value - attribute :collaboration, Shale::Type::Value - attribute :behavior, Shale::Type::Value - attribute :partition, Shale::Type::Value - attribute :link_end, Shale::Type::Value - attribute :message_instance3, Shale::Type::Value - attribute :message_instance2, Shale::Type::Value - attribute :message_instance, Shale::Type::Value - attribute :attribute_link, Shale::Type::Value - attribute :classifier, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :model_element_name, ModelElementname, collection: true - attribute :model_element_visibility, ModelElementvisibility, collection: true - attribute :xmi_extension, XMIextension, collection: true - attribute :model_element_binding, ModelElementbinding, collection: true - attribute :model_element_template, ModelElementtemplate, collection: true - attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true - attribute :model_element_implementation, ModelElementimplementation, collection: true - attribute :model_element_view, ModelElementview, collection: true - attribute :model_element_presentation, ModelElementpresentation, collection: true - attribute :model_element_namespace, ModelElementnamespace, collection: true - attribute :model_element_constraint, ModelElementconstraint, collection: true - attribute :model_element_requirement, ModelElementrequirement, collection: true - attribute :model_element_provision, ModelElementprovision, collection: true - attribute :model_element_stereotype, ModelElementstereotype, collection: true - attribute :model_element_element_reference, ModelElementelementReference, collection: true - attribute :model_element_collaboration, ModelElementcollaboration, collection: true - attribute :model_element_behavior, ModelElementbehavior, collection: true - attribute :model_element_partition, ModelElementpartition, collection: true - attribute :instance_link_end, InstancelinkEnd, collection: true - attribute :instance_message_instance3, InstancemessageInstance3, collection: true - attribute :instance_message_instance2, InstancemessageInstance2, collection: true - attribute :instance_message_instance, InstancemessageInstance, collection: true - attribute :instance_attribute_link, InstanceattributeLink, collection: true - attribute :instance_classifier, Instanceclassifier, collection: true - attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true - attribute :instance_slot, Instanceslot, collection: true +require_relative "instanceattribute_link" +require_relative "instanceclassifier" +require_relative "instancelink_end" +require_relative "instancemessage_instance" +require_relative "instancemessage_instance2" +require_relative "instancemessage_instance3" +require_relative "instanceslot" +require_relative "model_elementbehavior" +require_relative "model_elementbinding" +require_relative "model_elementcollaboration" +require_relative "model_elementconstraint" +require_relative "model_elementelement_reference" +require_relative "model_elementimplementation" +require_relative "model_elementname" +require_relative "model_elementnamespace" +require_relative "model_elementpartition" +require_relative "model_elementpresentation" +require_relative "model_elementprovision" +require_relative "model_elementrequirement" +require_relative "model_elementstereotype" +require_relative "model_elementtagged_value" +require_relative "model_elementtemplate" +require_relative "model_elementtemplate_parameter" +require_relative "model_elementview" +require_relative "model_elementvisibility" +require_relative "xm_iextension" - xml do - root 'UseCaseInstance' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class UseCaseInstance < Shale::Mapper + attribute :name, Shale::Type::Value + attribute :visibility, Shale::Type::String + attribute :binding, Shale::Type::Value + attribute :template, Shale::Type::Value + attribute :template_parameter, Shale::Type::Value + attribute :implementation, Shale::Type::Value + attribute :view, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :namespace, Shale::Type::Value + attribute :constraint, Shale::Type::Value + attribute :requirement, Shale::Type::Value + attribute :provision, Shale::Type::Value + attribute :stereotype, Shale::Type::Value + attribute :element_reference, Shale::Type::Value + attribute :collaboration, Shale::Type::Value + attribute :behavior, Shale::Type::Value + attribute :partition, Shale::Type::Value + attribute :link_end, Shale::Type::Value + attribute :message_instance3, Shale::Type::Value + attribute :message_instance2, Shale::Type::Value + attribute :message_instance, Shale::Type::Value + attribute :attribute_link, Shale::Type::Value + attribute :classifier, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :model_element_name, ModelElementname, collection: true + attribute :model_element_visibility, ModelElementvisibility, collection: true + attribute :xmi_extension, XMIextension, collection: true + attribute :model_element_binding, ModelElementbinding, collection: true + attribute :model_element_template, ModelElementtemplate, collection: true + attribute :model_element_template_parameter, ModelElementtemplateParameter, collection: true + attribute :model_element_implementation, ModelElementimplementation, collection: true + attribute :model_element_view, ModelElementview, collection: true + attribute :model_element_presentation, ModelElementpresentation, collection: true + attribute :model_element_namespace, ModelElementnamespace, collection: true + attribute :model_element_constraint, ModelElementconstraint, collection: true + attribute :model_element_requirement, ModelElementrequirement, collection: true + attribute :model_element_provision, ModelElementprovision, collection: true + attribute :model_element_stereotype, ModelElementstereotype, collection: true + attribute :model_element_element_reference, ModelElementelementReference, collection: true + attribute :model_element_collaboration, ModelElementcollaboration, collection: true + attribute :model_element_behavior, ModelElementbehavior, collection: true + attribute :model_element_partition, ModelElementpartition, collection: true + attribute :instance_link_end, InstancelinkEnd, collection: true + attribute :instance_message_instance3, InstancemessageInstance3, collection: true + attribute :instance_message_instance2, InstancemessageInstance2, collection: true + attribute :instance_message_instance, InstancemessageInstance, collection: true + attribute :instance_attribute_link, InstanceattributeLink, collection: true + attribute :instance_classifier, Instanceclassifier, collection: true + attribute :model_element_tagged_value, ModelElementtaggedValue, collection: true + attribute :instance_slot, Instanceslot, collection: true - map_attribute 'name', to: :name - map_attribute 'visibility', to: :visibility - map_attribute 'binding', to: :binding - map_attribute 'template', to: :template - map_attribute 'templateParameter', to: :template_parameter - map_attribute 'implementation', to: :implementation - map_attribute 'view', to: :view - map_attribute 'presentation', to: :presentation - map_attribute 'namespace', to: :namespace - map_attribute 'constraint', to: :constraint - map_attribute 'requirement', to: :requirement - map_attribute 'provision', to: :provision - map_attribute 'stereotype', to: :stereotype - map_attribute 'elementReference', to: :element_reference - map_attribute 'collaboration', to: :collaboration - map_attribute 'behavior', to: :behavior - map_attribute 'partition', to: :partition - map_attribute 'linkEnd', to: :link_end - map_attribute 'messageInstance3', to: :message_instance3 - map_attribute 'messageInstance2', to: :message_instance2 - map_attribute 'messageInstance', to: :message_instance - map_attribute 'attributeLink', to: :attribute_link - map_attribute 'classifier', to: :classifier - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'ModelElement.name', to: :model_element_name - map_element 'ModelElement.visibility', to: :model_element_visibility - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ModelElement.binding', to: :model_element_binding - map_element 'ModelElement.template', to: :model_element_template - map_element 'ModelElement.templateParameter', to: :model_element_template_parameter - map_element 'ModelElement.implementation', to: :model_element_implementation - map_element 'ModelElement.view', to: :model_element_view - map_element 'ModelElement.presentation', to: :model_element_presentation - map_element 'ModelElement.namespace', to: :model_element_namespace - map_element 'ModelElement.constraint', to: :model_element_constraint - map_element 'ModelElement.requirement', to: :model_element_requirement - map_element 'ModelElement.provision', to: :model_element_provision - map_element 'ModelElement.stereotype', to: :model_element_stereotype - map_element 'ModelElement.elementReference', to: :model_element_element_reference - map_element 'ModelElement.collaboration', to: :model_element_collaboration - map_element 'ModelElement.behavior', to: :model_element_behavior - map_element 'ModelElement.partition', to: :model_element_partition - map_element 'Instance.linkEnd', to: :instance_link_end - map_element 'Instance.messageInstance3', to: :instance_message_instance3 - map_element 'Instance.messageInstance2', to: :instance_message_instance2 - map_element 'Instance.messageInstance', to: :instance_message_instance - map_element 'Instance.attributeLink', to: :instance_attribute_link - map_element 'Instance.classifier', to: :instance_classifier - map_element 'ModelElement.taggedValue', to: :model_element_tagged_value - map_element 'Instance.slot', to: :instance_slot + xml do + root "UseCaseInstance" + namespace "omg.org/UML1.3", "UML" + + map_attribute "name", to: :name + map_attribute "visibility", to: :visibility + map_attribute "binding", to: :binding + map_attribute "template", to: :template + map_attribute "templateParameter", to: :template_parameter + map_attribute "implementation", to: :implementation + map_attribute "view", to: :view + map_attribute "presentation", to: :presentation + map_attribute "namespace", to: :namespace + map_attribute "constraint", to: :constraint + map_attribute "requirement", to: :requirement + map_attribute "provision", to: :provision + map_attribute "stereotype", to: :stereotype + map_attribute "elementReference", to: :element_reference + map_attribute "collaboration", to: :collaboration + map_attribute "behavior", to: :behavior + map_attribute "partition", to: :partition + map_attribute "linkEnd", to: :link_end + map_attribute "messageInstance3", to: :message_instance3 + map_attribute "messageInstance2", to: :message_instance2 + map_attribute "messageInstance", to: :message_instance + map_attribute "attributeLink", to: :attribute_link + map_attribute "classifier", to: :classifier + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "ModelElement.name", to: :model_element_name + map_element "ModelElement.visibility", to: :model_element_visibility + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ModelElement.binding", to: :model_element_binding + map_element "ModelElement.template", to: :model_element_template + map_element "ModelElement.templateParameter", to: :model_element_template_parameter + map_element "ModelElement.implementation", to: :model_element_implementation + map_element "ModelElement.view", to: :model_element_view + map_element "ModelElement.presentation", to: :model_element_presentation + map_element "ModelElement.namespace", to: :model_element_namespace + map_element "ModelElement.constraint", to: :model_element_constraint + map_element "ModelElement.requirement", to: :model_element_requirement + map_element "ModelElement.provision", to: :model_element_provision + map_element "ModelElement.stereotype", to: :model_element_stereotype + map_element "ModelElement.elementReference", to: :model_element_element_reference + map_element "ModelElement.collaboration", to: :model_element_collaboration + map_element "ModelElement.behavior", to: :model_element_behavior + map_element "ModelElement.partition", to: :model_element_partition + map_element "Instance.linkEnd", to: :instance_link_end + map_element "Instance.messageInstance3", to: :instance_message_instance3 + map_element "Instance.messageInstance2", to: :instance_message_instance2 + map_element "Instance.messageInstance", to: :instance_message_instance + map_element "Instance.attributeLink", to: :instance_attribute_link + map_element "Instance.classifier", to: :instance_classifier + map_element "ModelElement.taggedValue", to: :model_element_tagged_value + map_element "Instance.slot", to: :instance_slot + end + end end end diff --git a/lib/xmi/uml13/use_caseextension_point.rb b/lib/xmi/uml13/use_caseextension_point.rb index 0523609..0f2d24a 100644 --- a/lib/xmi/uml13/use_caseextension_point.rb +++ b/lib/xmi/uml13/use_caseextension_point.rb @@ -1,16 +1,22 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'xm_ireference' +require "shale" -class UseCaseextensionPoint < Shale::Mapper - attribute :content, Shale::Type::String - attribute :xmi_reference, XMIreference, collection: true +require_relative "xm_ireference" - xml do - root 'UseCase.extensionPoint' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class UseCaseextensionPoint < Shale::Mapper + attribute :content, Shale::Type::String + attribute :xmi_reference, XMIreference, collection: true - map_content to: :content - map_element 'XMI.reference', to: :xmi_reference, prefix: nil, namespace: nil + xml do + root "UseCase.extensionPoint" + namespace "omg.org/UML1.3", "UML" + + map_content to: :content + map_element "XMI.reference", to: :xmi_reference, prefix: nil, namespace: nil + end + end end end diff --git a/lib/xmi/uml13/use_cases.rb b/lib/xmi/uml13/use_cases.rb index c78f0ed..f741a68 100644 --- a/lib/xmi/uml13/use_cases.rb +++ b/lib/xmi/uml13/use_cases.rb @@ -1,30 +1,36 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'actor' -require_relative 'use_case' -require_relative 'use_case_instance' +require "shale" -class UseCases < Shale::Mapper - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :actor, Actor, collection: true - attribute :use_case, UseCase, collection: true - attribute :use_case_instance, UseCaseInstance, collection: true +require_relative "actor" +require_relative "use_case" +require_relative "use_case_instance" - xml do - root 'Use_Cases' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class UseCases < Shale::Mapper + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :actor, Actor, collection: true + attribute :use_case, UseCase, collection: true + attribute :use_case_instance, UseCaseInstance, collection: true - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'Actor', to: :actor - map_element 'UseCase', to: :use_case - map_element 'UseCaseInstance', to: :use_case_instance + xml do + root "Use_Cases" + namespace "omg.org/UML1.3", "UML" + + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "Actor", to: :actor + map_element "UseCase", to: :use_case + map_element "UseCaseInstance", to: :use_case_instance + end + end end end diff --git a/lib/xmi/uml13/view_element.rb b/lib/xmi/uml13/view_element.rb index 1e34059..0e11516 100644 --- a/lib/xmi/uml13/view_element.rb +++ b/lib/xmi/uml13/view_element.rb @@ -1,34 +1,40 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'view_elementmodel' -require_relative 'view_elementpresentation' -require_relative 'xm_iextension' +require "shale" -class ViewElement < Shale::Mapper - attribute :model, Shale::Type::Value - attribute :presentation, Shale::Type::Value - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :xmi_extension, XMIextension, collection: true - attribute :view_element_model, ViewElementmodel, collection: true - attribute :view_element_presentation, ViewElementpresentation, collection: true +require_relative "view_elementmodel" +require_relative "view_elementpresentation" +require_relative "xm_iextension" - xml do - root 'ViewElement' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ViewElement < Shale::Mapper + attribute :model, Shale::Type::Value + attribute :presentation, Shale::Type::Value + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :xmi_extension, XMIextension, collection: true + attribute :view_element_model, ViewElementmodel, collection: true + attribute :view_element_presentation, ViewElementpresentation, collection: true - map_attribute 'model', to: :model - map_attribute 'presentation', to: :presentation - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_element 'XMI.extension', to: :xmi_extension, prefix: nil, namespace: nil - map_element 'ViewElement.model', to: :view_element_model - map_element 'ViewElement.presentation', to: :view_element_presentation + xml do + root "ViewElement" + namespace "omg.org/UML1.3", "UML" + + map_attribute "model", to: :model + map_attribute "presentation", to: :presentation + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_element "XMI.extension", to: :xmi_extension, prefix: nil, namespace: nil + map_element "ViewElement.model", to: :view_element_model + map_element "ViewElement.presentation", to: :view_element_presentation + end + end end end diff --git a/lib/xmi/uml13/view_elementmodel.rb b/lib/xmi/uml13/view_elementmodel.rb index 8765c3b..fd8c741 100644 --- a/lib/xmi/uml13/view_elementmodel.rb +++ b/lib/xmi/uml13/view_elementmodel.rb @@ -1,14 +1,20 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'model_element' +require "shale" -class ViewElementmodel < Shale::Mapper - attribute :model_element, ModelElement, collection: true +require_relative "model_element" - xml do - root 'ViewElement.model' - namespace 'omg.org/UML1.3', 'UML' +module Xmi + module Uml13 + class ViewElementmodel < Shale::Mapper + attribute :model_element, ModelElement, collection: true - map_element 'ModelElement', to: :model_element + xml do + root "ViewElement.model" + namespace "omg.org/UML1.3", "UML" + + map_element "ModelElement", to: :model_element + end + end end end diff --git a/lib/xmi/uml13/view_elementpresentation.rb b/lib/xmi/uml13/view_elementpresentation.rb index eb1f3b4..baad63d 100644 --- a/lib/xmi/uml13/view_elementpresentation.rb +++ b/lib/xmi/uml13/view_elementpresentation.rb @@ -1,14 +1,21 @@ -require 'shale' +# frozen_string_literal: true -require_relative 'presentation' +require "shale" -class ViewElementpresentation < Shale::Mapper - attribute :presentation, Presentation, collection: true +module Xmi + module Uml13 + class Presentation < Shale::Mapper + end - xml do - root 'ViewElement.presentation' - namespace 'omg.org/UML1.3', 'UML' + class ViewElementpresentation < Shale::Mapper + attribute :presentation, Presentation, collection: true - map_element 'Presentation', to: :presentation + xml do + root "ViewElement.presentation" + namespace "omg.org/UML1.3", "UML" + + map_element "Presentation", to: :presentation + end + end end end diff --git a/lib/xmi/uml13/xm_iextension.rb b/lib/xmi/uml13/xm_iextension.rb index f245c1c..5e495a1 100644 --- a/lib/xmi/uml13/xm_iextension.rb +++ b/lib/xmi/uml13/xm_iextension.rb @@ -1,25 +1,31 @@ -require 'shale' +# frozen_string_literal: true -class XMIextension < Shale::Mapper - attribute :content, Shale::Type::String - attribute :xmi_id, Shale::Type::Value - attribute :xmi_label, Shale::Type::Value - attribute :xmi_uuid, Shale::Type::Value - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value - attribute :xmi_extender, Shale::Type::Value - attribute :xmi_extender_id, Shale::Type::Value +require "shale" - xml do - root 'XMI.extension' +module Xmi + module Uml13 + class XMIextension < Shale::Mapper + attribute :content, Shale::Type::String + attribute :xmi_id, Shale::Type::Value + attribute :xmi_label, Shale::Type::Value + attribute :xmi_uuid, Shale::Type::Value + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value + attribute :xmi_extender, Shale::Type::Value + attribute :xmi_extender_id, Shale::Type::Value - map_content to: :content - map_attribute 'xmi.id', to: :xmi_id - map_attribute 'xmi.label', to: :xmi_label - map_attribute 'xmi.uuid', to: :xmi_uuid - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref - map_attribute 'xmi.extender', to: :xmi_extender - map_attribute 'xmi.extenderID', to: :xmi_extender_id + xml do + root "XMI.extension" + + map_content to: :content + map_attribute "xmi.id", to: :xmi_id + map_attribute "xmi.label", to: :xmi_label + map_attribute "xmi.uuid", to: :xmi_uuid + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + map_attribute "xmi.extender", to: :xmi_extender + map_attribute "xmi.extenderID", to: :xmi_extender_id + end + end end end diff --git a/lib/xmi/uml13/xm_ireference.rb b/lib/xmi/uml13/xm_ireference.rb index bed32a3..0233ab1 100644 --- a/lib/xmi/uml13/xm_ireference.rb +++ b/lib/xmi/uml13/xm_ireference.rb @@ -1,15 +1,21 @@ -require 'shale' +# frozen_string_literal: true -class XMIreference < Shale::Mapper - attribute :content, Shale::Type::String - attribute :href, Shale::Type::Value - attribute :xmi_idref, Shale::Type::Value +require "shale" - xml do - root 'XMI.reference' +module Xmi + module Uml13 + class XMIreference < Shale::Mapper + attribute :content, Shale::Type::String + attribute :href, Shale::Type::Value + attribute :xmi_idref, Shale::Type::Value - map_content to: :content - map_attribute 'href', to: :href - map_attribute 'xmi.idref', to: :xmi_idref + xml do + root "XMI.reference" + + map_content to: :content + map_attribute "href", to: :href + map_attribute "xmi.idref", to: :xmi_idref + end + end end end