本文整理匯總了Java中org.eclipse.bpmn2.util.Bpmn2Resource類的典型用法代碼示例。如果您正苦於以下問題:Java Bpmn2Resource類的具體用法?Java Bpmn2Resource怎麽用?Java Bpmn2Resource使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
Bpmn2Resource類屬於org.eclipse.bpmn2.util包,在下文中一共展示了Bpmn2Resource類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createBpmnDiagram
import org.eclipse.bpmn2.util.Bpmn2Resource; //導入依賴的package包/類
private Resource createBpmnDiagram(URI diagramUri) throws CoreException {
final Bpmn2Resource resource = Bpmn2DiagramCreator.createBpmn2Resource(diagramUri);
ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
@Override
public void run(IProgressMonitor monitor) throws CoreException {
try {
resource.save(null);
} catch (IOException e) {
throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Failed to save file", e));
}
}
}, new NullProgressMonitor());
return resource;
}
示例2: getIncomingConversationLinks
import org.eclipse.bpmn2.util.Bpmn2Resource; //導入依賴的package包/類
/**
* <!-- begin-user-doc -->
* Virtual opposite of {@link ConversationLink#getTargetRef()}.
* For general information about virtual opposites see {@link CategoryValueImpl#getCategorizedFlowElements()}
* <!-- end-user-doc -->
* @generated NOT
*/
public List<ConversationLink> getIncomingConversationLinks() {
if (eResource() instanceof Bpmn2Resource) {
return ((Bpmn2Resource) eResource()).getOppositeReferenceAdapter().getOppositeList(
ConversationLink.class, this,
Bpmn2Package.Literals.CONVERSATION_LINK__TARGET_REF);
}
throw new UnsupportedOperationException();
}
示例3: getOutgoingConversationLinks
import org.eclipse.bpmn2.util.Bpmn2Resource; //導入依賴的package包/類
/**
* <!-- begin-user-doc -->
* Virtual opposite of {@link ConversationLink#getSourceRef()}.
* For general information about virtual opposites see {@link CategoryValueImpl#getCategorizedFlowElements()}
* <!-- end-user-doc -->
* @generated NOT
*/
public List<ConversationLink> getOutgoingConversationLinks() {
if (eResource() instanceof Bpmn2Resource) {
return ((Bpmn2Resource) eResource()).getOppositeReferenceAdapter().getOppositeList(
ConversationLink.class, this,
Bpmn2Package.Literals.CONVERSATION_LINK__SOURCE_REF);
}
throw new UnsupportedOperationException();
}
示例4: save
import org.eclipse.bpmn2.util.Bpmn2Resource; //導入依賴的package包/類
/**
* 測試方法 不可用
* @param defintion
*/
public void save(Definitions defintion){
ResourceSet resourceSet = getResourceSet();
Bpmn2Resource resource = (Bpmn2Resource) resourceSet.getResource(URI.createFileURI("d:\\node_template.bpmn"), true);
DocumentRoot documentRoot = (DocumentRoot) resource.getContents().get(0);
documentRoot.setDefinitions(defintion);
try {
resource.save(null);
} catch (IOException e) {
e.printStackTrace();
}
}
示例5: unmarshall
import org.eclipse.bpmn2.util.Bpmn2Resource; //導入依賴的package包/類
public Bpmn2Resource unmarshall(String json,
String preProcessingData) throws JsonParseException, IOException {
return unmarshall(new JsonFactory().createJsonParser(json),
preProcessingData);
}
示例6: getCategorizedFlowElements
import org.eclipse.bpmn2.util.Bpmn2Resource; //導入依賴的package包/類
/**
* <!-- begin-user-doc -->
* Returns a computed list of flow elements where {@link FlowElement#getCategoryValueRef()}
* contains this CategoryValue.
*
* This object has to be contained in a BPMN2 resource. The resource needs to have attached a
* {@linkplain Bpmn2Resource#getOppositeReferenceAdapter() OppositeReferenceAdapter} that
* observes (probably among others) the reference {@link FlowElement#getCategoryValueRef()},
* which is the default state.
*
* The result only includes those FlowElements that are contained in the same resource or
* resource set.
* <!-- end-user-doc -->
* @generated NOT
*/
public List<FlowElement> getCategorizedFlowElements() {
if (eResource() instanceof Bpmn2Resource) {
return ((Bpmn2Resource) eResource()).getOppositeReferenceAdapter()
.getOppositeList(FlowElement.class, this,
Bpmn2Package.Literals.FLOW_ELEMENT__CATEGORY_VALUE_REF);
}
throw new UnsupportedOperationException();
}