本文整理汇总了Java中org.eclipse.emf.ecore.util.ExtendedMetaData.INSTANCE属性的典型用法代码示例。如果您正苦于以下问题:Java ExtendedMetaData.INSTANCE属性的具体用法?Java ExtendedMetaData.INSTANCE怎么用?Java ExtendedMetaData.INSTANCE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.eclipse.emf.ecore.util.ExtendedMetaData
的用法示例。
在下文中一共展示了ExtendedMetaData.INSTANCE属性的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createDockersForBoundaryEvent
private void createDockersForBoundaryEvent(BoundaryEvent boundaryEvent) {
List<Point> dockers = _dockers.get(boundaryEvent.getId());
StringBuffer dockerBuff = new StringBuffer();
for (int i = 0; i < dockers.size(); i++) {
dockerBuff.append(dockers.get(i).getX());
dockerBuff.append("^");
dockerBuff.append(dockers.get(i).getY());
dockerBuff.append("|");
}
ExtendedMetaData metadata = ExtendedMetaData.INSTANCE;
EAttributeImpl extensionAttribute = (EAttributeImpl) metadata.demandFeature(
"http://www.jboss.org/drools",
"dockerinfo",
false,
false);
SimpleFeatureMapEntry extensionEntry = new SimpleFeatureMapEntry(extensionAttribute,
dockerBuff.toString());
boundaryEvent.getAnyAttribute().add(extensionEntry);
}
示例2: applyAssociationProperties
protected void applyAssociationProperties(Association association,
Map<String, String> properties) {
if (properties.get("type") != null) {
ExtendedMetaData metadata = ExtendedMetaData.INSTANCE;
EAttributeImpl extensionAttribute = (EAttributeImpl) metadata.demandFeature(
"http://www.jboss.org/drools",
"type",
false,
false);
SimpleFeatureMapEntry extensionEntry = new SimpleFeatureMapEntry(extensionAttribute,
properties.get("type"));
association.getAnyAttribute().add(extensionEntry);
}
if (properties.get("bordercolor") != null && properties.get("bordercolor").length() > 0) {
if (!(_elementColors.containsKey(association.getId()))) {
List<String> colorsList = new ArrayList<String>();
colorsList.add("bordercolor:" + properties.get("bordercolor"));
_elementColors.put(association.getId(),
colorsList);
} else {
_elementColors.get(association.getId()).add("bordercolor:" + properties.get("bordercolor"));
}
}
}
示例3: applyDefinitionProperties
protected void applyDefinitionProperties(Definitions def,
Map<String, String> properties) {
def.setTypeLanguage(properties.get("typelanguage"));
//def.setTargetNamespace(properties.get("targetnamespace"));
def.setTargetNamespace("http://www.omg.org/bpmn20");
def.setExpressionLanguage(properties.get("expressionlanguage"));
ExtendedMetaData metadata = ExtendedMetaData.INSTANCE;
EAttributeImpl extensionAttribute = (EAttributeImpl) metadata.demandFeature(
"xsi",
"schemaLocation",
false,
false);
SimpleFeatureMapEntry extensionEntry = new SimpleFeatureMapEntry(extensionAttribute,
"http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd http://www.jboss.org/drools drools.xsd http://www.bpsim.org/schemas/1.0 bpsim.xsd");
def.getAnyAttribute().add(extensionEntry);
//_currentResource.getContents().add(def);// hook the definitions object to the resource early.
}
示例4: applyGatewayProperties
protected void applyGatewayProperties(Gateway gateway,
Map<String, String> properties) {
if (properties.get("name") != null && properties.get("name").length() > 0) {
gateway.setName(StringEscapeUtils.escapeXml(properties.get("name")).replaceAll("\\r\\n|\\r|\\n",
" "));
// add unescaped and untouched name value as extension element as well
Utils.setMetaDataExtensionValue(gateway,
"elementname",
wrapInCDATABlock(properties.get("name").replaceAll("\\\\n",
"\n")));
} else {
gateway.setName("");
}
if (properties.get("defaultgate") != null && (gateway instanceof InclusiveGateway || gateway instanceof ExclusiveGateway)) {
ExtendedMetaData metadata = ExtendedMetaData.INSTANCE;
EAttributeImpl extensionAttribute = (EAttributeImpl) metadata.demandFeature(
"http://www.jboss.org/drools",
"dg",
false,
false);
SimpleFeatureMapEntry extensionEntry = new SimpleFeatureMapEntry(extensionAttribute,
properties.get("defaultgate"));
gateway.getAnyAttribute().add(extensionEntry);
}
}
示例5: applyGroupProperties
protected void applyGroupProperties(Group group,
Map<String, String> properties) {
if (properties.get("name") != null) {
ExtendedMetaData metadata = ExtendedMetaData.INSTANCE;
EAttributeImpl extensionAttribute = (EAttributeImpl) metadata.demandFeature(
"http://www.jboss.org/drools",
"categoryval",
false,
false);
SimpleFeatureMapEntry extensionEntry = new SimpleFeatureMapEntry(extensionAttribute,
properties.get("name"));
group.getAnyAttribute().add(extensionEntry);
}
}
示例6: applyReceiveTaskProperties
public void applyReceiveTaskProperties(ReceiveTask receiveTask,
Map<String, String> properties) {
if (properties.get("messageref") != null && properties.get("messageref").length() > 0) {
ExtendedMetaData metadata = ExtendedMetaData.INSTANCE;
EAttributeImpl extensionAttribute = (EAttributeImpl) metadata.demandFeature(
"http://www.jboss.org/drools",
"msgref",
false,
false);
SimpleFeatureMapEntry extensionEntry = new SimpleFeatureMapEntry(extensionAttribute,
properties.get("messageref"));
receiveTask.getAnyAttribute().add(extensionEntry);
}
receiveTask.setImplementation("Other");
}
示例7: applySendTaskProperties
public void applySendTaskProperties(SendTask sendTask,
Map<String, String> properties) {
if (properties.get("messageref") != null && properties.get("messageref").length() > 0) {
ExtendedMetaData metadata = ExtendedMetaData.INSTANCE;
EAttributeImpl extensionAttribute = (EAttributeImpl) metadata.demandFeature(
"http://www.jboss.org/drools",
"msgref",
false,
false);
SimpleFeatureMapEntry extensionEntry = new SimpleFeatureMapEntry(extensionAttribute,
properties.get("messageref"));
sendTask.getAnyAttribute().add(extensionEntry);
}
sendTask.setImplementation("Other");
}
示例8: updateShapeColors
public void updateShapeColors(BPMNShape shape) {
List<String> eleColorsForShape = _elementColors.get(shape.getBpmnElement().getId());
if (eleColorsForShape != null) {
String backgroundColor = "";
String borderColor = "";
String fontColor = "";
for (String shapeColor : eleColorsForShape) {
String[] shapeColorParts = shapeColor.split(":");
if (shapeColorParts[0].equals("bgcolor")) {
backgroundColor = shapeColorParts[1];
}
if (shapeColorParts[0].equals("bordercolor")) {
borderColor = shapeColorParts[1];
}
if (shapeColorParts[0].equals("fontcolor")) {
fontColor = shapeColorParts[1];
}
}
ExtendedMetaData metadata = ExtendedMetaData.INSTANCE;
EAttributeImpl extensionAttributeBgColor = (EAttributeImpl) metadata.demandFeature(
"http://www.omg.org/spec/BPMN/non-normative/color",
"background-color",
false,
false);
SimpleFeatureMapEntry extensionEntryBgColor = new SimpleFeatureMapEntry(extensionAttributeBgColor,
backgroundColor);
shape.getBpmnElement().getAnyAttribute().add(extensionEntryBgColor);
EAttributeImpl extensionAttributeBorderColor = (EAttributeImpl) metadata.demandFeature(
"http://www.omg.org/spec/BPMN/non-normative/color",
"border-color",
false,
false);
SimpleFeatureMapEntry extensionEntryBorderColor = new SimpleFeatureMapEntry(extensionAttributeBorderColor,
borderColor);
shape.getBpmnElement().getAnyAttribute().add(extensionEntryBorderColor);
EAttributeImpl extensionAttributeColor = (EAttributeImpl) metadata.demandFeature(
"http://www.omg.org/spec/BPMN/non-normative/color",
"color",
false,
false);
SimpleFeatureMapEntry extensionEntryColor = new SimpleFeatureMapEntry(extensionAttributeColor,
fontColor);
shape.getBpmnElement().getAnyAttribute().add(extensionEntryColor);
} else {
_logger.debug("Unable to find color information for shape: " + shape.getBpmnElement().getId());
}
}
示例9: updateEdgeColors
public void updateEdgeColors(BPMNEdge edge) {
List<String> eleColorsForEdge = _elementColors.get(edge.getBpmnElement().getId());
if (eleColorsForEdge != null) {
String backgroundColor = "";
String borderColor = "";
String fontColor = "";
for (String edgeColor : eleColorsForEdge) {
String[] shapeColorParts = edgeColor.split(":");
if (shapeColorParts[0].equals("bgcolor")) {
backgroundColor = shapeColorParts[1];
}
if (shapeColorParts[0].equals("bordercolor")) {
borderColor = shapeColorParts[1];
}
if (shapeColorParts[0].equals("fontcolor")) {
fontColor = shapeColorParts[1];
}
}
ExtendedMetaData metadata = ExtendedMetaData.INSTANCE;
EAttributeImpl extensionAttributeBgColor = (EAttributeImpl) metadata.demandFeature(
"http://www.omg.org/spec/BPMN/non-normative/color",
"background-color",
false,
false);
SimpleFeatureMapEntry extensionEntryBgColor = new SimpleFeatureMapEntry(extensionAttributeBgColor,
backgroundColor);
edge.getBpmnElement().getAnyAttribute().add(extensionEntryBgColor);
EAttributeImpl extensionAttributeBorderColor = (EAttributeImpl) metadata.demandFeature(
"http://www.omg.org/spec/BPMN/non-normative/color",
"border-color",
false,
false);
SimpleFeatureMapEntry extensionEntryBorderColor = new SimpleFeatureMapEntry(extensionAttributeBorderColor,
borderColor);
edge.getBpmnElement().getAnyAttribute().add(extensionEntryBorderColor);
EAttributeImpl extensionAttributeColor = (EAttributeImpl) metadata.demandFeature(
"http://www.omg.org/spec/BPMN/non-normative/color",
"color",
false,
false);
SimpleFeatureMapEntry extensionEntryColor = new SimpleFeatureMapEntry(extensionAttributeColor,
fontColor);
edge.getBpmnElement().getAnyAttribute().add(extensionEntryColor);
} else {
_logger.debug("Unable to find color information for shape: " + edge.getBpmnElement().getId());
}
}