本文整理汇总了Java中org.activiti.bpmn.model.BpmnModel.getNamespace方法的典型用法代码示例。如果您正苦于以下问题:Java BpmnModel.getNamespace方法的具体用法?Java BpmnModel.getNamespace怎么用?Java BpmnModel.getNamespace使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.activiti.bpmn.model.BpmnModel
的用法示例。
在下文中一共展示了BpmnModel.getNamespace方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: parse
import org.activiti.bpmn.model.BpmnModel; //导入方法依赖的package包/类
public void parse(XMLStreamReader xtr, BpmnModel model) throws Exception {
if (StringUtils.isNotEmpty(xtr.getAttributeValue(null, ATTRIBUTE_ID))) {
String itemDefinitionId = model.getTargetNamespace() + ":" + xtr.getAttributeValue(null, ATTRIBUTE_ID);
String structureRef = xtr.getAttributeValue(null, ATTRIBUTE_STRUCTURE_REF);
if (StringUtils.isNotEmpty(structureRef)) {
ItemDefinition item = new ItemDefinition();
item.setId(itemDefinitionId);
BpmnXMLUtil.addXMLLocation(item, xtr);
int indexOfP = structureRef.indexOf(':');
if (indexOfP != -1) {
String prefix = structureRef.substring(0, indexOfP);
String resolvedNamespace = model.getNamespace(prefix);
structureRef = resolvedNamespace + ":" + structureRef.substring(indexOfP + 1);
} else {
structureRef = model.getTargetNamespace() + ":" + structureRef;
}
item.setStructureRef(structureRef);
item.setItemKind(xtr.getAttributeValue(null, ATTRIBUTE_ITEM_KIND));
model.addItemDefinition(itemDefinitionId, item);
}
}
}
示例2: parseChildElement
import org.activiti.bpmn.model.BpmnModel; //导入方法依赖的package包/类
public void parseChildElement(XMLStreamReader xtr, BaseElement parentElement, BpmnModel model) throws Exception {
if (parentElement instanceof Event == false) return;
MessageEventDefinition eventDefinition = new MessageEventDefinition();
BpmnXMLUtil.addXMLLocation(eventDefinition, xtr);
eventDefinition.setMessageRef(xtr.getAttributeValue(null, ATTRIBUTE_MESSAGE_REF));
if(StringUtils.isEmpty(eventDefinition.getMessageRef())) {
model.addProblem("attribute 'messageRef' is required", xtr);
} else {
int indexOfP = eventDefinition.getMessageRef().indexOf(':');
if (indexOfP != -1) {
String prefix = eventDefinition.getMessageRef().substring(0, indexOfP);
String resolvedNamespace = model.getNamespace(prefix);
eventDefinition.setMessageRef(resolvedNamespace + ":" + eventDefinition.getMessageRef().substring(indexOfP + 1));
} else {
eventDefinition.setMessageRef(model.getTargetNamespace() + ":" + eventDefinition.getMessageRef());
}
if(model.containsMessageId(eventDefinition.getMessageRef()) == false) {
model.addProblem("Invalid 'messageRef': no message with id '" + eventDefinition.getMessageRef() + "' found.", xtr);
}
}
((Event) parentElement).getEventDefinitions().add(eventDefinition);
}
示例3: parseOperationRef
import org.activiti.bpmn.model.BpmnModel; //导入方法依赖的package包/类
protected String parseOperationRef(String operationRef, BpmnModel model) {
String result = null;
if (StringUtils.isNotEmpty(operationRef)) {
int indexOfP = operationRef.indexOf(':');
if (indexOfP != -1) {
String prefix = operationRef.substring(0, indexOfP);
String resolvedNamespace = model.getNamespace(prefix);
result = resolvedNamespace + ":" + operationRef.substring(indexOfP + 1);
} else {
result = model.getTargetNamespace() + ":" + operationRef;
}
}
return result;
}
示例4: parseMessageRef
import org.activiti.bpmn.model.BpmnModel; //导入方法依赖的package包/类
protected String parseMessageRef(String messageRef, BpmnModel model) {
String result = null;
if (StringUtils.isNotEmpty(messageRef)) {
int indexOfP = messageRef.indexOf(':');
if (indexOfP != -1) {
String prefix = messageRef.substring(0, indexOfP);
String resolvedNamespace = model.getNamespace(prefix);
result = resolvedNamespace + ":" + messageRef.substring(indexOfP + 1);
} else {
result = model.getTargetNamespace() + ":" + messageRef;
}
}
return result;
}
示例5: parseItemRef
import org.activiti.bpmn.model.BpmnModel; //导入方法依赖的package包/类
protected String parseItemRef(String itemRef, BpmnModel model) {
String result = null;
if (StringUtils.isNotEmpty(itemRef)) {
int indexOfP = itemRef.indexOf(':');
if (indexOfP != -1) {
String prefix = itemRef.substring(0, indexOfP);
String resolvedNamespace = model.getNamespace(prefix);
result = resolvedNamespace + ":" + itemRef.substring(indexOfP + 1);
} else {
result = model.getTargetNamespace() + ":" + itemRef;
}
}
return result;
}
示例6: parseItemSubjectRef
import org.activiti.bpmn.model.BpmnModel; //导入方法依赖的package包/类
protected String parseItemSubjectRef(String itemSubjectRef, BpmnModel model) {
String result = null;
if (StringUtils.isNotEmpty(itemSubjectRef)) {
int indexOfP = itemSubjectRef.indexOf(':');
if (indexOfP != -1) {
String prefix = itemSubjectRef.substring(0, indexOfP);
String resolvedNamespace = model.getNamespace(prefix);
result = resolvedNamespace + ":" + itemSubjectRef.substring(indexOfP + 1);
} else {
result = model.getTargetNamespace() + ":" + itemSubjectRef;
}
}
return result;
}