Skip to content

OpenPonk/uml-xmi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UML ↔ XMI Reader / Writer

Build Status Coverage Status

Library for reading XMI files into UML models and vice versa.

For mapping from XML files to XMI graphs see OpenPonk/xmi.

For details on the used UML metamodel, see OpenPonk/uml-metamodel.

Installation

Metacello new
	baseline: 'OPUMLXMI';
	repository: 'github://OpenPonk/uml-xmi/repository';
	load.

Basic Usage

Reading

Reading a XML string/stream without any references.

model := OPUMLXMIReader readFrom: aXmlStringStream.

Reading a XML string with a pathmap.

pathmap := OPUMLXMIPathmap new.
pathmap add: 'http://www.omg.org/spec/UML/20131001/PrimitiveTypes.xmi'.
pathmap add: 'http://www.omg.org/spec/UML/20131001/UML.xmi' retrieveUsing: [ '/home/user/UML.xmi' asFileReference contents ].
model := OPUMLXMIReader readXmi: aXmlStringStream pathmap: pathmap.

Writing

Writing a UML model into a XML string.

OPUMLXMIWriter toString: aUmlModel.