<!ELEMENT connectors (modelReader | modelWriter)*>
<!ELEMENT modelReader (property* , fileExtension*)>
<!ATTLIST modelReader
metamodel CDATA #REQUIRED
name CDATA #REQUIRED
class CDATA #REQUIRED
uriType (file | directory | noURI | unspecified) #REQUIRED>
"uml21"
) of the metamodel.
This identifier is required if the connector is external (defined in a connectors.xml
file).
It can be omitted if the connector is embedded in a metamodel declaration (defined in a metamodels.xml
file),
as the metamodel will be the parent XML element of the connector.com.sodius.mdw.core.model.io.ModelReader
<!ELEMENT modelWriter (property* , fileExtension*)>
<!ATTLIST modelWriter
metamodel CDATA #REQUIRED
name CDATA #REQUIRED
class CDATA #REQUIRED
uriType (file | directory | noURI | unspecified) #REQUIRED>
"uml21"
) of the metamodelcom.sodius.mdw.core.model.io.ModelWriter
<!ELEMENT property EMPTY>
<!ATTLIST property
name CDATA #REQUIRED
value CDATA #REQUIRED>
Here are the property names interpreted by MDWorkbench:
<!ELEMENT fileExtension EMPTY>
<!ATTLIST fileExtension
extension CDATA #REQUIRED
description CDATA #REQUIRED
default (true | false) "false">
File extensions are used by MDWorkbench when the user opens a dialog box to select a file to read/write.
They are used to restrict the type of files that shows up in this dialog.
Extensions "All files" and "All suppported files" are automatically added by MDWorkbench in this dialog.
File extension elements should only be defined for file connectors.
"xmi"
)"myDescription (*.myExtension)"
).Here are the available URI types:
fileExtension
element.
An external connector (connectors.xml
file) that defines a model reader and writer for the UML 2.1 metamodel:
<?xml version=
"1.0"
?>
<connectors> <modelReader metamodel=
"uml21"
name=
"My File Reader"
uriType=
"file"
class=
"com.mycompany.model.io.MyFileReader"
> <property name=
"onDemand"
value=
"true"
/> <property name=
"details"
value=
"full"
/> <fileExtension description=
"XML files"
extension=
"xml"
/> </modelReader> <modelWriter metamodel=
"uml21"
name=
"My COM Writer"
uriType=
"noURI"
class=
"com.mycompany.model.io.MyCOMWRiter"
/> </connectors>
A connector embedded in a metamodel declaration (metamodels.xml
file):
<?xml version=
"1.0"
?>
<metamodels>
<metamodel> TODO <modelReader metamodel=
"uml21"
name=
"My File Reader"
uriType=
"file"
class=
"com.mycompany.model.io.MyFileReader"
> <property name=
"onDemand"
value=
"true"
/> <property name=
"details"
value=
"full"
/> <fileExtension description=
"XML files"
extension=
"xml"
/> </modelReader> <modelWriter metamodel=
"uml21"
name=
"My COM Writer"
uriType=
"noURI"
class=
"com.mycompany.model.io.MyCOMWRiter"
/> </connectors>