當前位置: 首頁>>代碼示例>>Java>>正文


Java Link.getQualifier2方法代碼示例

本文整理匯總了Java中net.sourceforge.plantuml.cucadiagram.Link.getQualifier2方法的典型用法代碼示例。如果您正苦於以下問題:Java Link.getQualifier2方法的具體用法?Java Link.getQualifier2怎麽用?Java Link.getQualifier2使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在net.sourceforge.plantuml.cucadiagram.Link的用法示例。


在下文中一共展示了Link.getQualifier2方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: insertBetween

import net.sourceforge.plantuml.cucadiagram.Link; //導入方法依賴的package包/類
final public boolean insertBetween(IEntity entity1, IEntity entity2, IEntity node) {
	final Link link = foundLink(entity1, entity2);
	if (link == null) {
		return false;
	}
	final Link l1 = new Link(entity1, node, link.getType(), link.getLabel(), link.getLength(),
			link.getQualifier1(), null, link.getLabeldistance(), link.getLabelangle());
	final Link l2 = new Link(node, entity2, link.getType(), link.getLabel(), link.getLength(), null,
			link.getQualifier2(), link.getLabeldistance(), link.getLabelangle());
	addLink(l1);
	addLink(l2);
	removeLink(link);
	return true;
}
 
開發者ID:Banno,項目名稱:sbt-plantuml-plugin,代碼行數:15,代碼來源:AbstractClassOrObjectDiagram.java

示例2: addLink

import net.sourceforge.plantuml.cucadiagram.Link; //導入方法依賴的package包/類
private void addLink(Link link) {
	final String assId = "ass" + UniqueSequence.getValue();
	// if ((link.getType().getDecor1() == LinkDecor.EXTENDS || link.getType().getDecor2() == LinkDecor.EXTENDS)
	// && fileFormat == FileFormat.XMI_STAR) {
	// addExtension(link, assId);
	// return;
	// }
	final Element association = document.createElement("UML:Association");
	association.setAttribute("xmi.id", assId);
	association.setAttribute("namespace", "model1");
	if (link.getLabel() != null) {
		association.setAttribute("name", forXMI(link.getLabel()));
	}

	final Element connection = document.createElement("UML:Association.connection");
	final Element end1 = document.createElement("UML:AssociationEnd");
	end1.setAttribute("xmi.id", "end" + UniqueSequence.getValue());
	end1.setAttribute("association", assId);
	end1.setAttribute("type", link.getEntity1().getUid());
	if (link.getQualifier1() != null) {
		end1.setAttribute("name", forXMI(link.getQualifier1()));
	}
	final Element endparticipant1 = document.createElement("UML:AssociationEnd.participant");
	// if (fileFormat == FileFormat.XMI_ARGO) {
	// if (done.contains(link.getEntity1())) {
	// endparticipant1.appendChild(createEntityNodeRef(link.getEntity1()));
	// } else {
	// endparticipant1.appendChild(createEntityNode(link.getEntity1()));
	// done.add(link.getEntity1());
	// }
	// } else if (fileFormat == FileFormat.XMI_STAR) {
	// if (link.getType().getDecor2() == LinkDecor.COMPOSITION) {
	// end1.setAttribute("aggregation", "composite");
	// }
	// if (link.getType().getDecor2() == LinkDecor.AGREGATION) {
	// end1.setAttribute("aggregation", "aggregate");
	// }
	// }
	end1.appendChild(endparticipant1);
	connection.appendChild(end1);

	final Element end2 = document.createElement("UML:AssociationEnd");
	end2.setAttribute("xmi.id", "end" + UniqueSequence.getValue());
	end2.setAttribute("association", assId);
	end2.setAttribute("type", link.getEntity2().getUid());
	if (link.getQualifier2() != null) {
		end2.setAttribute("name", forXMI(link.getQualifier2()));
	}
	final Element endparticipant2 = document.createElement("UML:AssociationEnd.participant");
	// if (fileFormat == FileFormat.XMI_ARGO) {
	// if (done.contains(link.getEntity2())) {
	// endparticipant2.appendChild(createEntityNodeRef(link.getEntity2()));
	// } else {
	// endparticipant2.appendChild(createEntityNode(link.getEntity2()));
	// done.add(link.getEntity2());
	// }
	// } else if (fileFormat == FileFormat.XMI_STAR) {
	// if (link.getType().getDecor1() == LinkDecor.COMPOSITION) {
	// end2.setAttribute("aggregation", "composite");
	// }
	// if (link.getType().getDecor1() == LinkDecor.AGREGATION) {
	// end2.setAttribute("aggregation", "aggregate");
	// }
	// }
	end2.appendChild(endparticipant2);
	connection.appendChild(end2);

	association.appendChild(connection);

	ownedElement.appendChild(association);

}
 
開發者ID:Banno,項目名稱:sbt-plantuml-plugin,代碼行數:73,代碼來源:XmiClassDiagramStandard.java

示例3: addLink

import net.sourceforge.plantuml.cucadiagram.Link; //導入方法依賴的package包/類
private void addLink(Link link) {
	final String assId = "ass" + UniqueSequence.getValue();
	if (link.getType().getDecor1() == LinkDecor.EXTENDS || link.getType().getDecor2() == LinkDecor.EXTENDS) {
		addExtension(link, assId);
		return;
	}
	final Element association = document.createElement("UML:Association");
	association.setAttribute("xmi.id", assId);
	association.setAttribute("namespace", "model1");
	if (Display.isNull(link.getLabel()) == false) {
		association.setAttribute("name", forXMI(link.getLabel()));
	}

	final Element connection = document.createElement("UML:Association.connection");
	final Element end1 = document.createElement("UML:AssociationEnd");
	end1.setAttribute("xmi.id", "end" + UniqueSequence.getValue());
	end1.setAttribute("association", assId);
	end1.setAttribute("type", link.getEntity1().getUid());
	if (link.getQualifier1() != null) {
		end1.setAttribute("name", forXMI(link.getQualifier1()));
	}
	final Element endparticipant1 = document.createElement("UML:AssociationEnd.participant");
	// if (fileFormat == FileFormat.XMI_ARGO) {
	// if (done.contains(link.getEntity1())) {
	// endparticipant1.appendChild(createEntityNodeRef(link.getEntity1()));
	// } else {
	// endparticipant1.appendChild(createEntityNode(link.getEntity1()));
	// done.add(link.getEntity1());
	// }
	// } else if (fileFormat == FileFormat.XMI_STAR) {
	if (link.getType().getDecor2() == LinkDecor.COMPOSITION) {
		end1.setAttribute("aggregation", "composite");
	}
	if (link.getType().getDecor2() == LinkDecor.AGREGATION) {
		end1.setAttribute("aggregation", "aggregate");
	}
	// }
	end1.appendChild(endparticipant1);
	connection.appendChild(end1);

	final Element end2 = document.createElement("UML:AssociationEnd");
	end2.setAttribute("xmi.id", "end" + UniqueSequence.getValue());
	end2.setAttribute("association", assId);
	end2.setAttribute("type", link.getEntity2().getUid());
	if (link.getQualifier2() != null) {
		end2.setAttribute("name", forXMI(link.getQualifier2()));
	}
	final Element endparticipant2 = document.createElement("UML:AssociationEnd.participant");
	// if (fileFormat == FileFormat.XMI_ARGO) {
	// if (done.contains(link.getEntity2())) {
	// endparticipant2.appendChild(createEntityNodeRef(link.getEntity2()));
	// } else {
	// endparticipant2.appendChild(createEntityNode(link.getEntity2()));
	// done.add(link.getEntity2());
	// }
	// } else if (fileFormat == FileFormat.XMI_STAR) {
	if (link.getType().getDecor1() == LinkDecor.COMPOSITION) {
		end2.setAttribute("aggregation", "composite");
	}
	if (link.getType().getDecor1() == LinkDecor.AGREGATION) {
		end2.setAttribute("aggregation", "aggregate");
	}
	// }
	end2.appendChild(endparticipant2);
	connection.appendChild(end2);

	association.appendChild(connection);

	ownedElement.appendChild(association);

}
 
開發者ID:Banno,項目名稱:sbt-plantuml-plugin,代碼行數:72,代碼來源:XmiClassDiagramStar.java

示例4: addLink

import net.sourceforge.plantuml.cucadiagram.Link; //導入方法依賴的package包/類
private void addLink(Link link) {
	final String assId = "ass" + UniqueSequence.getValue();

	final Element association = document.createElement("UML:Association");
	association.setAttribute("xmi.id", assId);
	association.setAttribute("namespace", "model1");
	if (Display.isNull(link.getLabel()) == false) {
		association.setAttribute("name", forXMI(link.getLabel()));
	}

	final Element connection = document.createElement("UML:Association.connection");
	final Element end1 = document.createElement("UML:AssociationEnd");
	end1.setAttribute("xmi.id", "end" + UniqueSequence.getValue());
	end1.setAttribute("association", assId);
	end1.setAttribute("type", link.getEntity1().getUid());
	if (link.getQualifier1() != null) {
		end1.setAttribute("name", forXMI(link.getQualifier1()));
	}
	final Element endparticipant1 = document.createElement("UML:AssociationEnd.participant");

	if (link.getType().getDecor2() == LinkDecor.COMPOSITION) {
		end1.setAttribute("aggregation", "composite");
	}
	if (link.getType().getDecor2() == LinkDecor.AGREGATION) {
		end1.setAttribute("aggregation", "aggregate");
	}
	// }
	end1.appendChild(endparticipant1);
	connection.appendChild(end1);

	final Element end2 = document.createElement("UML:AssociationEnd");
	end2.setAttribute("xmi.id", "end" + UniqueSequence.getValue());
	end2.setAttribute("association", assId);
	end2.setAttribute("type", link.getEntity2().getUid());
	if (link.getQualifier2() != null) {
		end2.setAttribute("name", forXMI(link.getQualifier2()));
	}
	final Element endparticipant2 = document.createElement("UML:AssociationEnd.participant");
	if (link.getType().getDecor1() == LinkDecor.COMPOSITION) {
		end2.setAttribute("aggregation", "composite");
	}
	if (link.getType().getDecor1() == LinkDecor.AGREGATION) {
		end2.setAttribute("aggregation", "aggregate");
	}
	// }
	end2.appendChild(endparticipant2);
	connection.appendChild(end2);

	association.appendChild(connection);

	ownedElement.appendChild(association);

}
 
開發者ID:Banno,項目名稱:sbt-plantuml-plugin,代碼行數:54,代碼來源:XmiStateDiagram.java

示例5: addLink

import net.sourceforge.plantuml.cucadiagram.Link; //導入方法依賴的package包/類
private void addLink(Link link) {
		final String assId = "ass" + UniqueSequence.getValue();
//		if ((link.getType().getDecor1() == LinkDecor.EXTENDS || link.getType().getDecor2() == LinkDecor.EXTENDS)
//				&& fileFormat == FileFormat.XMI_STAR) {
//			addExtension(link, assId);
//			return;
//		}
		final Element association = document.createElement("UML:Association");
		association.setAttribute("xmi.id", assId);
		association.setAttribute("namespace", "model1");
		if (link.getLabel() != null) {
			association.setAttribute("name", forXMI(link.getLabel()));
		}

		final Element connection = document.createElement("UML:Association.connection");
		final Element end1 = document.createElement("UML:AssociationEnd");
		end1.setAttribute("xmi.id", "end" + UniqueSequence.getValue());
		end1.setAttribute("association", assId);
		end1.setAttribute("type", link.getEntity1().getUid());
		if (link.getQualifier1() != null) {
			end1.setAttribute("name", forXMI(link.getQualifier1()));
		}
		final Element endparticipant1 = document.createElement("UML:AssociationEnd.participant");
		// if (fileFormat == FileFormat.XMI_ARGO) {
			if (done.contains(link.getEntity1())) {
				endparticipant1.appendChild(createEntityNodeRef(link.getEntity1()));
			} else {
				endparticipant1.appendChild(createEntityNode(link.getEntity1()));
				done.add(link.getEntity1());
			}
//		} else if (fileFormat == FileFormat.XMI_STAR) {
//			if (link.getType().getDecor2() == LinkDecor.COMPOSITION) {
//				end1.setAttribute("aggregation", "composite");
//			}
//			if (link.getType().getDecor2() == LinkDecor.AGREGATION) {
//				end1.setAttribute("aggregation", "aggregate");
//			}
//		}
		end1.appendChild(endparticipant1);
		connection.appendChild(end1);

		final Element end2 = document.createElement("UML:AssociationEnd");
		end2.setAttribute("xmi.id", "end" + UniqueSequence.getValue());
		end2.setAttribute("association", assId);
		end2.setAttribute("type", link.getEntity2().getUid());
		if (link.getQualifier2() != null) {
			end2.setAttribute("name", forXMI(link.getQualifier2()));
		}
		final Element endparticipant2 = document.createElement("UML:AssociationEnd.participant");
		// if (fileFormat == FileFormat.XMI_ARGO) {
			if (done.contains(link.getEntity2())) {
				endparticipant2.appendChild(createEntityNodeRef(link.getEntity2()));
			} else {
				endparticipant2.appendChild(createEntityNode(link.getEntity2()));
				done.add(link.getEntity2());
			}
		// } else if (fileFormat == FileFormat.XMI_STAR) {
		// if (link.getType().getDecor1() == LinkDecor.COMPOSITION) {
		// end2.setAttribute("aggregation", "composite");
		// }
		// if (link.getType().getDecor1() == LinkDecor.AGREGATION) {
		// end2.setAttribute("aggregation", "aggregate");
		// }
		// }
		end2.appendChild(endparticipant2);
		connection.appendChild(end2);

		association.appendChild(connection);

		ownedElement.appendChild(association);

	}
 
開發者ID:Banno,項目名稱:sbt-plantuml-plugin,代碼行數:73,代碼來源:XmiClassDiagramArgo.java

示例6: addLink

import net.sourceforge.plantuml.cucadiagram.Link; //導入方法依賴的package包/類
private void addLink(Link link) {
	final String assId = "ass" + UniqueSequence.getValue();
	if (link.getType().getDecor1() == LinkDecor.EXTENDS || link.getType().getDecor2() == LinkDecor.EXTENDS) {
		addExtension(link, assId);
		return;
	}
	final Element association = document.createElement("UML:Association");
	association.setAttribute("xmi.id", assId);
	association.setAttribute("namespace", "model1");
	if (link.getLabel() != null) {
		association.setAttribute("name", forXMI(link.getLabel()));
	}

	final Element connection = document.createElement("UML:Association.connection");
	final Element end1 = document.createElement("UML:AssociationEnd");
	end1.setAttribute("xmi.id", "end" + UniqueSequence.getValue());
	end1.setAttribute("association", assId);
	end1.setAttribute("type", link.getEntity1().getUid());
	if (link.getQualifier1() != null) {
		end1.setAttribute("name", forXMI(link.getQualifier1()));
	}
	final Element endparticipant1 = document.createElement("UML:AssociationEnd.participant");
	// if (fileFormat == FileFormat.XMI_ARGO) {
	// if (done.contains(link.getEntity1())) {
	// endparticipant1.appendChild(createEntityNodeRef(link.getEntity1()));
	// } else {
	// endparticipant1.appendChild(createEntityNode(link.getEntity1()));
	// done.add(link.getEntity1());
	// }
	// } else if (fileFormat == FileFormat.XMI_STAR) {
	if (link.getType().getDecor2() == LinkDecor.COMPOSITION) {
		end1.setAttribute("aggregation", "composite");
	}
	if (link.getType().getDecor2() == LinkDecor.AGREGATION) {
		end1.setAttribute("aggregation", "aggregate");
	}
	// }
	end1.appendChild(endparticipant1);
	connection.appendChild(end1);

	final Element end2 = document.createElement("UML:AssociationEnd");
	end2.setAttribute("xmi.id", "end" + UniqueSequence.getValue());
	end2.setAttribute("association", assId);
	end2.setAttribute("type", link.getEntity2().getUid());
	if (link.getQualifier2() != null) {
		end2.setAttribute("name", forXMI(link.getQualifier2()));
	}
	final Element endparticipant2 = document.createElement("UML:AssociationEnd.participant");
	// if (fileFormat == FileFormat.XMI_ARGO) {
	// if (done.contains(link.getEntity2())) {
	// endparticipant2.appendChild(createEntityNodeRef(link.getEntity2()));
	// } else {
	// endparticipant2.appendChild(createEntityNode(link.getEntity2()));
	// done.add(link.getEntity2());
	// }
	// } else if (fileFormat == FileFormat.XMI_STAR) {
	if (link.getType().getDecor1() == LinkDecor.COMPOSITION) {
		end2.setAttribute("aggregation", "composite");
	}
	if (link.getType().getDecor1() == LinkDecor.AGREGATION) {
		end2.setAttribute("aggregation", "aggregate");
	}
	// }
	end2.appendChild(endparticipant2);
	connection.appendChild(end2);

	association.appendChild(connection);

	ownedElement.appendChild(association);

}
 
開發者ID:mar9000,項目名稱:plantuml,代碼行數:72,代碼來源:XmiClassDiagramStar.java


注:本文中的net.sourceforge.plantuml.cucadiagram.Link.getQualifier2方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。