Import a model
Importing turns an existing model file into a new model in ModelDesk. You choose the standard the file follows, point ModelDesk at the file, and give the result a name. The model then opens, ready to view and edit.
Prerequisites
Section titled “Prerequisites”- An active seat for a standard that supports importing: MIM, UML, XSD, JSON Schema, NL-SBB, Application Profile (imported from DSV documents), RDF (legacy), or a metamodel in the RDF tower (RDFS + Ontology, OWL, SHACL, or OWL + SHACL).
- The model file itself, or a public URL where it is hosted. For JSON Schema, this can also be a zip archive of related files.
- Membership of the organization that will own the new model.
If the standard you need does not appear when you start an import, ask your organization administrator to assign you a seat for it. See Supported standards & formats for what can be imported and the file formats each standard reads.
-
In the left navigation, open Model imports and select New import. The Create model import wizard opens.
-
On the Metamodel step, select the standard your file follows (for example, UML), then select Next. Only standards that can be imported are shown. If just one standard is available to you, the wizard skips this step.
For a standard in a metamodel tower, such as RDF, select the tower card. Under the question What does the file contain?, select the row that matches your file, then select Next. ModelDesk reads the file into the metamodel you choose. The rows are the same as when you create a model, limited to the metamodels you can import; see Choose a metamodel in a tower.
-
On the Source step, make three choices, then select Next:
- Version: the field is labeled with the standard’s name (for example, UML version). ModelDesk selects the most recent version. Change it only if your file targets an older one.
- Loader: the reader for your file. When only one loader applies, ModelDesk selects it for you. MIM has
two,
mim-ldandmim-xml, and you choose one; see Import a MIM model. - Source: select Load from URL and paste the address, or select Upload file and choose the file from your computer.

-
On the Configure step, set the details of the new model, then select Import:
- Owner: the organization you work in, which will own the model. To import into another of your organizations, switch to it first.
- Any base configuration or extension the standard offers, such as Relatierol leidend or Relatiesoort leidend for MIM, or the profile family for an Application Profile import. When a choice is required, pick one before continuing. See Supported standards & formats for what each choice means.
- Access mode: Shared (available to everyone in the organization) or Individual (only you).
-
ModelDesk reads the file and opens the import’s Model import page. The Status updates while the import runs, and a log lists what was read.
-
When the Status shows READY, select Complete model import, enter a Model name, and select OK.
Result
Section titled “Result”The new model is created and opens on its Overview page, showing its name, owner, and the standard and version it uses. Open the Model editor from the left navigation to start working with its elements.
The import stays listed on the Model imports page so you have a record of where the model came from and what was read.
When the import produced a MIM model with Extern packages that hold copies of another model’s elements, the Model import page lists them under Packages for other models, each with Connect to a model, and suggests a model on ModelDesk where one has the package’s name or location. A package that only points at elements the file names, without copies, is not listed. The import itself connects nothing; see Connect an imported package.
Import a MIM model
Section titled “Import a MIM model”MIM has two loaders. On the Source step, choose the one that reads your file:
mim-ldreads MIM as linked data: an RDF document in Turtle, RDF/XML, JSON-LD, N-Triples, or another RDF syntax.mim-xmlreads MIM-XML 1.2, the XML format that Imvertor writes and that ModelDesk exports.
Both read an uploaded file or a URL. A MIM-XML file and an RDF/XML file can both end in .xml. A MIM-XML file has
Informatiemodel as its first element.
Choose the relatiemodelleringstype
Section titled “Choose the relatiemodelleringstype”On the Configure step you choose Relatiesoort leidend or Relatierol leidend. For a MIM-XML file, choose
the one its relatiemodelleringstype states. If the file states the other one, the import ends in ERROR with a
message that names both. Start a new import and choose the one the file states. A file that states none, or a value
MIM does not define, is read as the one you chose, and the log says so.
What a MIM-XML import reads
Section titled “What a MIM-XML import reads”The new model holds the packages and elements of the file (domeinen, views, externe packages, objecttypen, attribuutsoorten, relatiesoorten, datatypen, enumeraties, codelijsten, keuzes, and the rest), with their values and the references between them.
- References. ModelDesk resolves references within the file. A reference to an element the file does not hold becomes an external element named after the reference, and the log counts these. Nothing the file refers to is fetched.
- Kenmerken. A kenmerk named after a MIM property its element has, such as
identificatie,basisUrioreenheid, fills that property. Any other kenmerk is kept as a preserved property (see below). - Constructies. A constructie becomes the element type its
constructietypenames. One that names no element type becomes a Primitief datatype, and the log counts these. - Formatted text. Definities, toelichtingen and kenmerk values become Markdown: paragraphs, lists, bold, italic,
line breaks, and web and email links. Subscript, superscript and tables stay as HTML tags. Other markup keeps only
its text, and the log counts it. The model’s
tekstopmaakis set tomarkdown.
Content MIM has no place for
Section titled “Content MIM has no place for”Content the file holds that MIM has no property for, such as Imvertor’s kenmerk positie or an element in another
namespace, is kept on its element as a preserved property. The editor shows it read-only under Preserved
properties. A MIM-XML export writes it back where the file had it; a MIM-LD export leaves it out. The import log
counts the preserved properties, and lists any content an element could not keep as left out.
What a MIM-XML import refuses
Section titled “What a MIM-XML import refuses”The import ends in ERROR, with a message that says why, when the file:
- declares a DOCTYPE;
- is an older version of MIM-XML (such as MIM-XML 1.1). Only MIM-XML 1.2 is read;
- has another root than a MIM-XML 1.2
Informatiemodel, such as an XMI or an RDF/XML file; - is larger than 100 MB, holds more than 1,000,000 elements, or nests elements more than 100 levels deep;
- is not well-formed XML.
Import a JSON Schema
Section titled “Import a JSON Schema”JSON Schema has one loader, json-schema-file. It reads JSON Schema documents written in JSON or in YAML, in any
draft from draft-04 to 2020-12. ModelDesk converts an older draft to 2020-12 as it reads, for example definitions
to $defs. ModelDesk tells JSON from YAML by the file name, by the content type of a URL, or by the start of the
file.
The loader reads three kinds of source:
- One file, uploaded or loaded from a URL. The model holds the schema of that file.
- A zip archive of related files, uploaded or loaded from a URL. The model holds every schema file in the archive. See Import files from a zip archive.
- The URL of a file that references other files. The model holds that file and every file its references name on the same host. See Import files from a URL.
An empty JSON Schema model also offers Import in its outline. It opens the import wizard with JSON Schema chosen.
Import files from a zip archive
Section titled “Import files from a zip archive”On the Source step, select Upload file and choose the .zip file, or select Load from URL and paste the
address of the archive. ModelDesk reads every entry of the archive:
- Schema files become Documents. An entry ending in
.json,.yamlor.ymlis read when it is a JSON Schema. It counts as one when its$schemanames a JSON Schema draft, when it declares a root$id, when another file of the archive references it, or when its top level holds a keyword that only a schema uses, such astype,properties,$defsorallOf. - Directories become Folders. The directories that every schema file shares are left out. So the single wrapper folder of an archive that GitHub’s Download ZIP makes does not become a Folder.
- Other entries are skipped. Skipped are, for example, a
README.mdor an image (only.json,.yamland.ymlentries are read), apackage.json, example instances, a configuration file whose$schemanames its own format instead of a JSON Schema draft, OpenAPI and Swagger descriptions, files that are not valid JSON or YAML, entries that cannot be read out of the archive (such as encrypted ones), symbolic links, and archives inside the archive. The import log names the first 100 skipped entries one by one, with the reason, and then counts the rest. The__MACOSXfolder that the macOS archiver adds is left out without a log entry.
With the CLI, add --loader json-schema-file to modeldesk model import. The CLI picks the SHACL loader for a
.zip file by default, so without the option it stops with a message that names the loader JSON Schema imports with.
Limits of an archive
Section titled “Limits of an archive”An uploaded zip can be at most about 70 MB. An upload travels encoded, which makes it about a third larger, and an upload is limited to 100 MB. A zip loaded from a URL can be up to 100 MB. Either way, the schema files in the zip can hold at most 10 MB together once unpacked. Other entries, such as images or documentation, are not unpacked and do not count.
ModelDesk refuses an archive, with a message that names the limit, when:
- it has more than 10,000 entries of any kind, folders included, or more than 2,000 schema files;
- its
.json,.yamland.ymlentries unpack to more than 10 MB together; - one of those entries unpacks to more than 1 MB and to more than 100 times its packed size;
- its
.json,.yamland.ymlentries expand into more than 500,000 values together (a YAML alias counts each time it repeats its anchor); - an entry’s path is absolute, starts with a drive letter, or holds
..; - an entry’s name is longer than 1,024 bytes, or holds a control character or a mark that changes the direction of text;
- it holds no JSON Schema file at all.
Import files from a URL
Section titled “Import files from a URL”When you load a file from a URL, ModelDesk also imports every file that its $refs name on the same origin: the same
scheme, host and port as the URL you entered. It then follows the references of those files in turn, and reads each
file once.
- Other hosts are not fetched. A reference to a file on another host stays a reference, kept as written. So the json-schema.org meta-schemas are never imported.
- Redirects are followed, up to 10 for each file. Which references are followed is decided by the URL you entered, never by where a redirect leads.
- Addresses with a user name or password are not followed. ModelDesk never sends them, and the import log names the references it left.
- A failing file does not stop the import. When a referenced file cannot be read, for example because the server does not serve it, it is not a JSON Schema, or it is a zip archive, the import log names its address and the reason. References to it stay as written, and the import continues. Only the file you entered fails the import.
- A zip at a URL is read as the same zip uploaded. Nothing further is fetched.
- A file that names no other file on the same origin imports on its own, as a single file.
Files that reference each other only by an absolute $id on another host are not fetched from a URL. Put them in a
zip archive and import that instead.
Limits of a URL import
Section titled “Limits of a URL import”- Files: at most 500, the file you entered included.
- Size: at most 10 MB together, the file you entered included. That file can alone be up to 100 MB, as any imported file can, but then no referenced file fits.
- Time: at most 10 minutes for the file you entered, then at most 30 seconds for each referenced file and 10 minutes for all of them.
- Values: the referenced files can expand into at most 500,000 values together (a YAML alias counts each time it repeats its anchor).
When the file, size or time limit is reached, ModelDesk imports what it has read, and the import log names the references it did not follow. Going over the value limit ends the import in ERROR, with a message that names the limit.
How the files become Documents
Section titled “How the files become Documents”- One Document per file. A Document is named after its file, with
.jsonas extension, because an export writes JSON. A fileaddress.yamlbecomes the Documentaddress.json. - Folders keep the layout. A Document sits in the Folders of its file’s directories, so a file that sits above
the others, such as
../common/types.json, keeps its place relative to them. - Names are unique in a Folder. Two files of one folder that would get the same name, compared without regard to
case, are numbered:
address.jsonandaddress-2.json. The import log names each renamed file. - Order. After the import, Folders and Documents are in name order. After a URL import, the file you entered comes first.
What a JSON Schema import reads
Section titled “What a JSON Schema import reads”- References. A
$refto the root schema of another file of the import, or to one of its$defsentries, becomes a link to that Document’s schema or definition. A$refwithin a file links the same way. A$defsentry that only refers to another file’s root schema or definition, as in an index file, links to that schema. - References kept as written. Any other
$refinto a file of the import is kept as text, with the file name changed to the Document’s name:common.yaml#/properties/streetbecomescommon.json#/properties/street. The import log lists each change. A$refto a file that is not part of the import is kept exactly as written. - One
$idin two files. When two files declare the same root$id, a reference by that$idreaches the first of the two in path order. The second is reached by its location only, and the import log warns about it. - Best effort. The import completes with what it could read. A construct ModelDesk cannot hold is skipped, and
the import log says which one and why. This covers a keyword whose value has the wrong type, such as a
minLengththat is not a whole number. Adefaultorconstwhose value isnullis kept and exported asnull. - Other keywords. A keyword that is not part of JSON Schema, such as one starting with
x-, is kept on its schema and written back on export. The log lists these as information.
What a JSON Schema import refuses
Section titled “What a JSON Schema import refuses”The import ends in ERROR, with a message that says why, when:
- the file is empty, or is not valid JSON or YAML;
- the top level of the file is not an object or a boolean;
- the file is an OpenAPI or Swagger description, or a Postman file, rather than a JSON Schema;
- the file is larger than 100 MB, or nests more than the depth a file may have;
- the URL does not serve the file without signing in;
- the URL redirects more than 10 times, or does not deliver the whole file within 10 minutes;
- a zip archive goes over one of its limits, or holds no JSON Schema file; see Limits of an archive;
- the files a URL references expand into more than 500,000 values together; see Limits of a URL import.
A file inside a zip, or a file that a reference names, that is not valid JSON or YAML or is not a JSON Schema does not end the import. It is skipped, and the import log names it.
If this goes wrong
Section titled “If this goes wrong”- No standards to choose from. If the Metamodel step is empty, you do not have a seat for a standard that supports importing. Ask your organization administrator to assign one.
- A metamodel is missing from a tower. A tower lists only the metamodels you hold a seat for that can be imported. Ask your organization administrator for a missing seat.
- No loader for the version. If the Loader list is empty, no reader is available for that combination. Choose another version, or a different standard.
- An import from a URL fails on redirects. ModelDesk follows at most 10 redirects for an address. Import the address the redirects end at.
- The status shows ERROR. Open the import to read the error message. Check that the file matches the standard, version, and loader you chose, correct the file or your choices, and start a new import.
- A MIM import ends in ERROR with a message that names both relatiemodelleringstypen. The file is modeled in the other one than you chose. Start a new import and choose the one the message names for the file. See Choose the relatiemodelleringstype.
- A JSON Schema import skipped keywords. Open the import and read the log. Each skipped keyword names where it was and why. Correct the file and start a new import if you need them.
- A file of a zip archive is missing from the model. Open the import and read the log: it names each skipped
entry. A schema file is skipped when nothing marks it as a schema. Add a
$schemathat names a JSON Schema draft, and import the archive again. - A JSON file that is not a schema became a Document. Its top level holds a keyword that schemas use, such as
properties. Delete the Document in the outline, or remove the file from the archive and import it again. - Referenced files are missing after a URL import. Open the import and read the log: it names each reference that was not followed and why, for example a file on another host or a limit that was reached. Put the files in a zip archive and import that instead.
- A zip archive is refused for its size. The schema files can hold at most 10 MB together, and can expand into at most 500,000 values. Split the schemas over several archives, or remove YAML aliases that repeat large parts of a file.
- The CLI refuses a
.zipfile for JSON Schema. Add--loader json-schema-file. - The
mim-xmlloader refuses the file. See What a MIM-XML import refuses. An RDF file of a MIM model needs themim-ldloader. - The import succeeded, but the editor shows “Model too large”. RDF (legacy) models with more than 2,500 elements cannot be opened in the editor view.
Import a newer version into a model
Section titled “Import a newer version into a model”When the file a model came from changes, you can import the new version into the same model instead of creating another one. You review what the file changes and merge the changes you want. Edits made in ModelDesk stay, unless the file changed the same thing; then you choose which version to keep.
This works for models that were themselves created by importing an XMI file. You need to be able to edit the model.
Start the import
Section titled “Start the import”-
Open the model and switch to the branch the import should go into. The import goes into the branch you have open.
-
On the model’s Overview, open the More actions menu (…) and select Import. The entry is shown only for a model that accepts an import, and only to people who can edit it.
-
The dialog, titled Import into and the model’s name, shows the model’s Metamodel, how the file is read (Read as) and, under Last import, the file and date of the previous import. You cannot change these.
-
Select File and choose the new version, or select Address and paste where it is hosted. Select Import.
The import’s page opens. Into names the model and the branch. While the file is read, Status shows PROCESSING. When it is read, Status shows Waiting for review, and Changes sums up what a merge would do, for example “3 added, 1 changed, 2 removed”.
The import waits until someone merges or discards it. Until then the model is unchanged, and the bar at the top of the model shows Import waiting on that branch. Select it to see the file, who imported it and when, and what it would change. If you can edit the model, Review changes and Discard are there too.
One import waits at a time. A newer import replaces the waiting one, whose Status then shows Replaced by a newer import.
Review and merge the changes
Section titled “Review and merge the changes”-
Select Review changes, on the import’s page or under Import waiting. The review opens with a title such as “customers.xmi into Customers · main”.
-
Every change is ticked at first, removals included. Untick a change to leave it out. To leave out one property of a changed element, untick that property. All changes ticks or unticks everything, and the line beside it counts what is selected, for example “3 of 5 selected”.
-
If the file and the branch changed the same element, a panel above the changes lists the conflicts. For each property it shows the value at the Last import, on the branch (the column named after it), and in the File. Choose which version to keep, for the whole element or property by property.
-
Select Merge into main, or Merge selected into main when you left changes out. After resolving conflicts, select Merge with these choices.
A message confirms, for example, “Imported customers.xmi”, and the model opens. The import’s Status shows Merged, and the model’s history lists the merge as “Imported customers.xmi”.
A change you leave out is not offered again when you import the same file once more. It comes back only when the file changes that element again, and then as a conflict. If you import a file that has not changed since the last import, the review says there is nothing to merge, for example “Nothing to merge: main already has everything in customers.xmi”.
Discard an import
Section titled “Discard an import”To drop a waiting import, select Discard on its page, under Import waiting, or on the review. The Discard import dialog says, for example, “customers.xmi is not merged. Customers stays as it is.” Select Discard. The model and its branches stay as they were.
If importing into a model goes wrong
Section titled “If importing into a model goes wrong”- Import is not in the menu. The model was not created by an import, its file type cannot be imported into an existing model, or you cannot edit the model.
- The dialog says “Only a person can import from an address. Upload the file.” Select File and upload the new version instead.
- The review says “A newer import replaced this one.” Someone imported a newer file meanwhile. Open the waiting import from Import waiting.
Related pages
Section titled “Related pages”- Create or import your first model: the fastest path to your first result.
- Supported standards & formats: which standards import, and from which file formats.
- Transform a model to another standard: convert a model to a different standard on export.
- Create an application profile: what an imported DSV profile looks like once it is in ModelDesk.