Documentation
¶
Overview ¶
Package migrate writes a SysML v1 model, read from XMI, as SysML v2 textual notation, and reports what each v1 element became.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entry ¶
type Entry struct {
// ID is the element's xmi:id, the handle a v1 tool addresses it by.
ID string `json:"id"`
// Kind is the v1 element as modeled: its stereotype when one classifies it
// («Block», «Requirement»), else its UML metaclass.
Kind string `json:"kind"`
// Name is the element's qualified name in the v1 model.
Name string `json:"name"`
// Target is the v2 declaration written for it (a qualified name with its
// keyword), or "" when nothing was.
Target string `json:"target,omitempty"`
Verdict Verdict `json:"verdict"`
// Note explains an approximation or an omission.
Note string `json:"note,omitempty"`
}
Entry records the verdict on one v1 element.
type Report ¶
type Report struct {
// Source names the v1 document migrated.
Source string `json:"source"`
// Exporter is the tool the document says wrote it, when it says.
Exporter string `json:"exporter,omitempty"`
Entries []Entry `json:"entries"`
}
Report is the per-element account of a migration.
type Result ¶
Result is a migration's output: the v2 notation and the report over it.
type Verdict ¶
type Verdict int
Verdict is what the migration did with one SysML v1 element.
const ( // Mapped: the element has a SysML v2 counterpart that states the same thing. Mapped Verdict = iota // Approximated: the element was written, but the v2 form loses or // restates part of what v1 said; the note says what. Approximated // Unmapped: the element has no v2 counterpart in this migration and is // recorded as a comment where it stood. Unmapped // Skipped: the element is not the user's model — a profile, a library the // tool bundled, a diagram — and is left out without a comment. Skipped )
func (Verdict) MarshalText ¶
MarshalText writes the verdict by name, so the JSON report reads as the text one.
func (*Verdict) UnmarshalText ¶
UnmarshalText reads a verdict written by MarshalText.