mirror of
https://github.com/octoleo/plantuml.git
synced 2024-12-22 10:59:01 +00:00
Remove version from UML:model
This commit is contained in:
parent
d586be399b
commit
775d2e16c9
@ -92,15 +92,11 @@ public class XmiDescriptionDiagram implements XmlDiagramTransformer {
|
|||||||
final Element content = document.createElement("XMI.content");
|
final Element content = document.createElement("XMI.content");
|
||||||
xmi.appendChild(content);
|
xmi.appendChild(content);
|
||||||
|
|
||||||
// <UML:Model xmi.id="UMLModel.4" name="Design Model"
|
|
||||||
// visibility="public" isSpecification="false" isRoot="false"
|
|
||||||
// isLeaf="false" isAbstract="false">
|
|
||||||
final Element model = document.createElement("UML:Model");
|
final Element model = document.createElement("UML:Model");
|
||||||
model.setAttribute("xmi.id", CucaDiagramXmiMaker.getModel(diagram));
|
model.setAttribute("xmi.id", CucaDiagramXmiMaker.getModel(diagram));
|
||||||
model.setAttribute("name", "PlantUML " + Version.versionString());
|
model.setAttribute("name", "PlantUML");
|
||||||
content.appendChild(model);
|
content.appendChild(model);
|
||||||
|
|
||||||
// <UML:Namespace.ownedElement>
|
|
||||||
this.ownedElement = document.createElement("UML:Namespace.ownedElement");
|
this.ownedElement = document.createElement("UML:Namespace.ownedElement");
|
||||||
model.appendChild(ownedElement);
|
model.appendChild(ownedElement);
|
||||||
|
|
||||||
|
@ -8,7 +8,6 @@ import net.sourceforge.plantuml.sequencediagram.Event;
|
|||||||
import net.sourceforge.plantuml.sequencediagram.Message;
|
import net.sourceforge.plantuml.sequencediagram.Message;
|
||||||
import net.sourceforge.plantuml.sequencediagram.Participant;
|
import net.sourceforge.plantuml.sequencediagram.Participant;
|
||||||
import net.sourceforge.plantuml.sequencediagram.SequenceDiagram;
|
import net.sourceforge.plantuml.sequencediagram.SequenceDiagram;
|
||||||
import net.sourceforge.plantuml.version.Version;
|
|
||||||
|
|
||||||
public class XmiSequenceDiagramArgo extends XmiSequenceDiagram {
|
public class XmiSequenceDiagramArgo extends XmiSequenceDiagram {
|
||||||
public XmiSequenceDiagramArgo(SequenceDiagram diagram, Document document) {
|
public XmiSequenceDiagramArgo(SequenceDiagram diagram, Document document) {
|
||||||
@ -33,11 +32,8 @@ public class XmiSequenceDiagramArgo extends XmiSequenceDiagram {
|
|||||||
final Element content = document.createElement("XMI.content");
|
final Element content = document.createElement("XMI.content");
|
||||||
xmi.appendChild(content);
|
xmi.appendChild(content);
|
||||||
|
|
||||||
// <UML:Model xmi.id="UMLModel.4" name="Design Model"
|
|
||||||
// visibility="public" isSpecification="false" isRoot="false"
|
|
||||||
// isLeaf="false" isAbstract="false">
|
|
||||||
final Element model = createElement(diagram, "UML:Model");
|
final Element model = createElement(diagram, "UML:Model");
|
||||||
model.setAttribute("name", "PlantUML " + Version.versionString());
|
model.setAttribute("name", "PlantUML");
|
||||||
content.appendChild(model);
|
content.appendChild(model);
|
||||||
|
|
||||||
Element ownedElement = document.createElement("UML:Namespace.ownedElement");
|
Element ownedElement = document.createElement("UML:Namespace.ownedElement");
|
||||||
@ -84,17 +80,15 @@ public class XmiSequenceDiagramArgo extends XmiSequenceDiagram {
|
|||||||
|
|
||||||
private Node createSendAction(Message message) {
|
private Node createSendAction(Message message) {
|
||||||
Element sendAction = createElement(message, "UML:SendAction");
|
Element sendAction = createElement(message, "UML:SendAction");
|
||||||
sendAction.appendChild(document.createElement("UML:Action.script")).appendChild(createElement(
|
sendAction.appendChild(document.createElement("UML:Action.script"))
|
||||||
"UML:ActionExpression", new String[][] {
|
.appendChild(createElement("UML:ActionExpression",
|
||||||
{"xmi.id", getXmiId("UML:ActionExpression", message)},
|
new String[][] { { "xmi.id", getXmiId("UML:ActionExpression", message) },
|
||||||
{"body", getDisplayString(message.getLabel()) }
|
{ "body", getDisplayString(message.getLabel()) } }));
|
||||||
}));
|
|
||||||
return sendAction;
|
return sendAction;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Element createElement(Object object, String tag) {
|
private Element createElement(Object object, String tag) {
|
||||||
return createElement(tag,
|
return createElement(tag, new String[][] { { "xmi.id", getXmiId("UML:ActionExpression", object) } });
|
||||||
new String[][] { {"xmi.id", getXmiId("UML:ActionExpression", object)}});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private Node createRef(String tag, Object target) {
|
private Node createRef(String tag, Object target) {
|
||||||
|
@ -92,12 +92,9 @@ public class XmiStateDiagram implements XmlDiagramTransformer {
|
|||||||
final Element content = document.createElement("XMI.content");
|
final Element content = document.createElement("XMI.content");
|
||||||
xmi.appendChild(content);
|
xmi.appendChild(content);
|
||||||
|
|
||||||
// <UML:Model xmi.id="UMLModel.4" name="Design Model"
|
|
||||||
// visibility="public" isSpecification="false" isRoot="false"
|
|
||||||
// isLeaf="false" isAbstract="false">
|
|
||||||
final Element model = document.createElement("UML:Model");
|
final Element model = document.createElement("UML:Model");
|
||||||
model.setAttribute("xmi.id", CucaDiagramXmiMaker.getModel(diagram));
|
model.setAttribute("xmi.id", CucaDiagramXmiMaker.getModel(diagram));
|
||||||
model.setAttribute("name", "PlantUML "+Version.versionString());
|
model.setAttribute("name", "PlantUML");
|
||||||
content.appendChild(model);
|
content.appendChild(model);
|
||||||
|
|
||||||
// <UML:Namespace.ownedElement>
|
// <UML:Namespace.ownedElement>
|
||||||
|
@ -33,7 +33,7 @@ Expected result MUST be put between triple brackets
|
|||||||
<XMI.metamodel xmi.name="UML" xmi.version="1.3"/>
|
<XMI.metamodel xmi.name="UML" xmi.version="1.3"/>
|
||||||
</XMI.header>
|
</XMI.header>
|
||||||
<XMI.content>
|
<XMI.content>
|
||||||
<UML:Model name="PlantUML 1.2022.8beta2" xmi.id="model1">
|
<UML:Model name="PlantUML" xmi.id="model1">
|
||||||
<UML:Namespace.ownedElement>
|
<UML:Namespace.ownedElement>
|
||||||
<UML:Component name="test" namespace="model1" xmi.id="cl0002">
|
<UML:Component name="test" namespace="model1" xmi.id="cl0002">
|
||||||
<UML:Classifier.feature/>
|
<UML:Classifier.feature/>
|
||||||
@ -76,7 +76,7 @@ Expected result MUST be put between triple brackets
|
|||||||
<XMI.metamodel xmi.name="UML" xmi.version="1.3"/>
|
<XMI.metamodel xmi.name="UML" xmi.version="1.3"/>
|
||||||
</XMI.header>
|
</XMI.header>
|
||||||
<XMI.content>
|
<XMI.content>
|
||||||
<UML:Model name="PlantUML 1.2022.8beta2" xmi.id="model1">
|
<UML:Model name="PlantUML" xmi.id="model1">
|
||||||
<UML:Namespace.ownedElement>
|
<UML:Namespace.ownedElement>
|
||||||
<UML:Component name="test" namespace="model1" xmi.id="cl0002">
|
<UML:Component name="test" namespace="model1" xmi.id="cl0002">
|
||||||
<UML:Classifier.feature/>
|
<UML:Classifier.feature/>
|
||||||
|
Loading…
Reference in New Issue
Block a user